Class: LockJar::CLI

Inherits:
Thor
  • Object
show all
Extended by:
ClassMethods
Defined in:
lib/lock_jar/cli.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from ClassMethods

generate_jarfile_option, generate_lockfile_option, generate_scopes_option

Instance Method Details

#installObject



42
43
44
45
# File 'lib/lock_jar/cli.rb', line 42

def install
    puts "Installing Jars from #{options[:lockfile]} for #{options[:scopes].inspect}"
    LockJar.install( options[:lockfile], options[:scopes] )      
end

#listObject



50
51
52
53
# File 'lib/lock_jar/cli.rb', line 50

def list
  puts "Listing Jars from #{options[:lockfile]} for #{options[:scopes].inspect}"
  puts LockJar.list( options[:lockfile], options[:scopes] ).inspect
end

#lockObject



58
59
60
61
# File 'lib/lock_jar/cli.rb', line 58

def lock
  puts "Locking #{options[:jarfile]} to #{options[:lockfile]}"
  LockJar.lock( options[:jarfile], { :lockfile => options[:lockfile] } )
end

#versionObject



35
36
37
# File 'lib/lock_jar/cli.rb', line 35

def version
  puts LockJar::VERSION
end