Class: Tomo::Plugin::Bundler::Tasks

Inherits:
TaskLibrary show all
Defined in:
lib/tomo/plugin/bundler/tasks.rb

Instance Method Summary collapse

Methods inherited from TaskLibrary

#initialize

Constructor Details

This class inherits a constructor from Tomo::TaskLibrary

Instance Method Details

#cleanObject



30
31
32
# File 'lib/tomo/plugin/bundler/tasks.rb', line 30

def clean
  remote.bundle("clean")
end

#configObject



18
19
20
21
22
# File 'lib/tomo/plugin/bundler/tasks.rb', line 18

def config
  configuration = settings_to_configuration
  remote.mkdir_p paths.bundler_config.dirname
  remote.write(text: YAML.dump(configuration), to: paths.bundler_config)
end

#installObject



24
25
26
27
28
# File 'lib/tomo/plugin/bundler/tasks.rb', line 24

def install
  return if remote.bundle?("check") && !dry_run?

  remote.bundle("install")
end

#upgrade_bundlerObject



34
35
36
37
# File 'lib/tomo/plugin/bundler/tasks.rb', line 34

def upgrade_bundler
  needed_bundler_ver = version_setting || extract_bundler_ver_from_lockfile
  remote.run("gem", "install", "bundler", "--conservative", "--no-document", "-v", needed_bundler_ver)
end