Class: Bauble::Cli::BundleCommandBuilder
- Inherits:
-
Object
- Object
- Bauble::Cli::BundleCommandBuilder
- Defined in:
- lib/bauble/cli/bundle_command_builder.rb
Overview
bundle command builder
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize ⇒ BundleCommandBuilder
constructor
A new instance of BundleCommandBuilder.
- #with_bauble_gem_override ⇒ Object
- #with_bundle_install ⇒ Object
- #with_bundle_path(path) ⇒ Object
- #with_bundle_without(groups) ⇒ Object
- #with_dot_bundle_cleanup ⇒ Object
Constructor Details
#initialize ⇒ BundleCommandBuilder
Returns a new instance of BundleCommandBuilder.
7 8 9 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 7 def initialize @commands = [] end |
Instance Method Details
#build ⇒ Object
36 37 38 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 36 def build @commands.join(' && ') end |
#with_bauble_gem_override ⇒ Object
21 22 23 24 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 21 def with_bauble_gem_override @commands << 'bundle config local.bauble_core /var/task/bauble_core' self end |
#with_bundle_install ⇒ Object
26 27 28 29 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 26 def with_bundle_install @commands << 'bundle install' self end |
#with_bundle_path(path) ⇒ Object
16 17 18 19 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 16 def with_bundle_path(path) @commands << "bundle config set path #{path}" self end |
#with_bundle_without(groups) ⇒ Object
11 12 13 14 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 11 def with_bundle_without(groups) @commands << "bundle config set without #{groups.join(' ')}" self end |
#with_dot_bundle_cleanup ⇒ Object
31 32 33 34 |
# File 'lib/bauble/cli/bundle_command_builder.rb', line 31 def with_dot_bundle_cleanup @commands << 'rm -rf .bundle' self end |