r10k 1.0.0rc3 → 1.0.0rc4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/r10k/cli.rb CHANGED
@@ -16,23 +16,24 @@ module R10K::CLI
16
16
  complex environments.
17
17
  EOD
18
18
 
19
- flag :h, :help, 'show help for this command' do |value, cmd|
20
- puts cmd.help
21
- exit 0
22
- end
19
+ flag :h, :help, 'show help for this command'
20
+ flag :t, :trace, 'Display stack traces on application crash'
23
21
 
24
- required :v, :verbose, 'Set verbosity level' do |value, cmd|
25
- R10K::Logging.level = value
22
+ optional :v, :verbose, 'Set verbosity level' do |value, cmd|
23
+ case value
24
+ when true
25
+ R10K::Logging.level = 'INFO'
26
+ when String
27
+ R10K::Logging.level = value
28
+ end
26
29
  end
27
30
 
28
- flag :t, :trace, 'Display stack traces on application crash'
29
-
30
31
  required :c, :config, 'Specify a configuration file' do |value, cmd|
31
32
  logger.warn "Calling `r10k --config <action>` as a global option is deprecated; use r10k <action> --config"
32
33
  end
33
34
 
34
35
  run do |opts, args, cmd|
35
- puts cmd.help
36
+ puts cmd.help(:verbose => opts[:verbose])
36
37
  exit 0
37
38
  end
38
39
  end
@@ -18,7 +18,7 @@ module R10K::CLI
18
18
  required :c, :config, 'Specify a configuration file'
19
19
 
20
20
  run do |opts, args, cmd|
21
- puts cmd.help
21
+ puts cmd.help(:verbose => opts[:verbose])
22
22
  exit 0
23
23
  end
24
24
  end
@@ -14,7 +14,7 @@ module R10K::CLI
14
14
  be_hidden
15
15
 
16
16
  run do |opts, args, cmd|
17
- puts cmd.help
17
+ puts cmd.help(:verbose => opts[:verbose])
18
18
  exit 0
19
19
  end
20
20
  end
@@ -16,7 +16,7 @@ module R10K::CLI
16
16
  required :e, :environment, 'Specify a particular environment'
17
17
 
18
18
  run do |opts, args, cmd|
19
- puts cmd.help
19
+ puts cmd.help(:verbose => opts[:verbose])
20
20
  exit 0
21
21
  end
22
22
  end
@@ -12,7 +12,7 @@ module R10K::CLI
12
12
  summary 'Perform operations on a Puppetfile'
13
13
 
14
14
  run do |opts, args, cmd|
15
- puts cmd.help
15
+ puts cmd.help(:verbose => opts[:verbose])
16
16
  exit 0
17
17
  end
18
18
  end
@@ -3,6 +3,7 @@ require 'r10k/module'
3
3
  require 'r10k/errors'
4
4
  require 'r10k/logging'
5
5
 
6
+ require 'fileutils'
6
7
  require 'systemu'
7
8
  require 'semver'
8
9
  require 'json'
@@ -46,6 +47,7 @@ class Forge
46
47
  cmd << @full_name
47
48
  pmt cmd
48
49
  else
50
+ FileUtils.mkdir @basedir unless File.directory? @basedir
49
51
  #logger.debug "Module #{@full_name} is not installed"
50
52
  cmd = []
51
53
  cmd << 'install'
data/lib/r10k/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module R10K
2
- VERSION = '1.0.0rc3'
2
+ VERSION = '1.0.0rc4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0rc3
4
+ version: 1.0.0rc4
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-19 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored