Class: Bundler::InstallDashDocs::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/bundler/install_dash_docs/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/bundler/install_dash_docs/cli.rb', line 37

def self.exit_on_failure?
  true
end

Instance Method Details

#installObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/bundler/install_dash_docs/cli.rb', line 13

def install
  quiet = options[:quiet]

  lockfile_contents = read_custom_gemfile_lock(options[:gemfile_lock], quiet)
  lockfile = Lockfile.new(lockfile_contents)
  gems = if options[:dependencies_only]
    puts "Only processing gems from Dependencies section" unless quiet
    lockfile.dependencies
  else
    puts "Processing all gems" unless quiet
    lockfile.all_gems
  end
  puts

  gems.each { |name, version|
    Dash.install(name, version, quiet: quiet, trace: options[:trace], dry_run: options[:dry_run])
  }
end

#versionObject



33
34
35
# File 'lib/bundler/install_dash_docs/cli.rb', line 33

def version
  puts "bundler-install_dash_docs #{VERSION}"
end