Module: Rwm::GemfileDsl
- Defined in:
- lib/rwm/gemfile.rb
Instance Method Summary collapse
Instance Method Details
#rwm_lib(name, **opts) ⇒ Object
28 29 30 31 |
# File 'lib/rwm/gemfile.rb', line 28 def rwm_lib(name, **opts) path = File.join(rwm_workspace_root, "libs", name.to_s) gem(name.to_s, **opts, path: path) end |
#rwm_workspace_root ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/rwm/gemfile.rb', line 19 def rwm_workspace_root @rwm_workspace_root ||= begin out, _, status = Open3.capture3("git", "rev-parse", "--show-toplevel") root = status.success? ? out.strip : "" raise "rwm: not inside a git repository" if root.empty? root end end |