mixlib-cli 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0b83294a142567e4623a4ddd204cdc48744b15a2
4
+ data.tar.gz: 8ac8ddf99fddb139ffdd9af600ff5d0dffa57ae5
5
+ SHA512:
6
+ metadata.gz: 63741ab4ed751ec9a49d4eb11508263a5c092eb7e54325459aa4e269c57611355f1a0b20264126a0eefde285a8a0bf9272f594f739ec5558e8e85aafefe99414
7
+ data.tar.gz: 3c3e77b4bc304b71de88e1bcea01ce100a308ef853dd0aad9cd6e6d989fd6b0b35fc2f9c685b998bd9f6c17aa7c52dc082c68516586b19f8d6b51f76f418a7c5
data/Rakefile CHANGED
@@ -1,7 +1,10 @@
1
+ require 'bundler'
1
2
  require 'rubygems'
2
3
  require 'rubygems/package_task'
3
- require 'rspec/core/rake_task'
4
4
  require 'rdoc/task'
5
+ require 'rspec/core/rake_task'
6
+
7
+ Bundler::GemHelper.install_tasks
5
8
 
6
9
  task :default => :spec
7
10
 
@@ -12,31 +15,9 @@ end
12
15
 
13
16
  gem_spec = eval(File.read("mixlib-cli.gemspec"))
14
17
 
15
- Gem::PackageTask.new(gem_spec) do |pkg|
16
- pkg.gem_spec = gem_spec
17
- end
18
-
19
- desc "install the gem locally"
20
- task :install => [:package] do
21
- sh %{gem install pkg/#{gem_spec.name}-#{gem_spec.version}}
22
- end
23
-
24
- desc "create a gemspec file"
25
- task :make_spec do
26
- File.open("#{gem_spec.name}.gemspec", "w") do |file|
27
- file.puts spec.to_ruby
28
- end
29
- end
30
-
31
- desc "remove build files"
32
- task :clean do
33
- sh %Q{ rm -f pkg/*.gem }
34
- end
35
-
36
18
  RDoc::Task.new do |rdoc|
37
19
  rdoc.rdoc_dir = 'rdoc'
38
20
  rdoc.title = "mixlib-cli #{gem_spec.version}"
39
21
  rdoc.rdoc_files.include('README*')
40
22
  rdoc.rdoc_files.include('lib/**/*.rb')
41
23
  end
42
-
@@ -128,6 +128,9 @@ module Mixlib
128
128
  # hash.
129
129
  attr_accessor :default_config
130
130
 
131
+ # Any arguments which were not parsed and placed in "config"--the leftovers.
132
+ attr_accessor :cli_arguments
133
+
131
134
  # Banner for the option parser. If the option parser is printed, e.g., by
132
135
  # `puts opt_parser`, this string will be used as the first line.
133
136
  attr_accessor :banner
@@ -235,6 +238,7 @@ module Mixlib
235
238
  end
236
239
  end
237
240
 
241
+ @cli_arguments = argv
238
242
  argv
239
243
  end
240
244
 
@@ -1,6 +1,6 @@
1
1
  module Mixlib
2
2
  module CLI
3
- VERSION = "1.3.0"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
6
6
 
@@ -206,10 +206,11 @@ describe Mixlib::CLI do
206
206
  ARGV.replace argv_old
207
207
  end
208
208
 
209
- it "should return any un-parsed elements" do
209
+ it "should preserve and return any un-parsed elements" do
210
210
  TestCLI.option(:party, :short => "-p LOCATION")
211
211
  @cli = TestCLI.new
212
- @cli.parse_options([ '-p', 'opscode', 'hard' ]).should == ['hard']
212
+ @cli.parse_options([ 'easy', '-p', 'opscode', 'hard' ]).should == ['easy', 'hard']
213
+ @cli.cli_arguments.should == ['easy', 'hard']
213
214
  end
214
215
  end
215
216
  end
metadata CHANGED
@@ -1,16 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
5
- prerelease:
4
+ version: 1.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Opscode, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-15 00:00:00.000000000 Z
13
- dependencies: []
11
+ date: 2013-12-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
14
55
  description: A simple mixin for CLI interfaces, including option parsing
15
56
  email: info@opscode.com
16
57
  executables: []
@@ -30,26 +71,26 @@ files:
30
71
  - spec/spec_helper.rb
31
72
  homepage: http://www.opscode.com
32
73
  licenses: []
74
+ metadata: {}
33
75
  post_install_message:
34
76
  rdoc_options: []
35
77
  require_paths:
36
78
  - lib
37
79
  required_ruby_version: !ruby/object:Gem::Requirement
38
- none: false
39
80
  requirements:
40
- - - ! '>='
81
+ - - '>='
41
82
  - !ruby/object:Gem::Version
42
83
  version: '0'
43
84
  required_rubygems_version: !ruby/object:Gem::Requirement
44
- none: false
45
85
  requirements:
46
- - - ! '>='
86
+ - - '>='
47
87
  - !ruby/object:Gem::Version
48
88
  version: '0'
49
89
  requirements: []
50
90
  rubyforge_project:
51
- rubygems_version: 1.8.23
91
+ rubygems_version: 2.0.3
52
92
  signing_key:
53
- specification_version: 3
93
+ specification_version: 4
54
94
  summary: A simple mixin for CLI interfaces, including option parsing
55
95
  test_files: []
96
+ has_rdoc: true