Class: Bauble::Cli::BundleCommandBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/bauble/cli/bundle_command_builder.rb

Overview

bundle command builder

Instance Method Summary collapse

Constructor Details

#initializeBundleCommandBuilder

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

#buildObject



36
37
38
# File 'lib/bauble/cli/bundle_command_builder.rb', line 36

def build
  @commands.join(' && ')
end

#with_bauble_gem_overrideObject



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_installObject



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_cleanupObject



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