opscode-mixlib-config 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -19,6 +19,7 @@ end
19
19
  require 'spec/rake/spectask'
20
20
  Spec::Rake::SpecTask.new(:spec) do |spec|
21
21
  spec.libs << 'lib' << 'spec'
22
+ spec.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
22
23
  spec.spec_files = FileList['spec/**/*_spec.rb']
23
24
  end
24
25
 
@@ -54,3 +55,10 @@ Rake::RDocTask.new do |rdoc|
54
55
  rdoc.rdoc_files.include('lib/**/*.rb')
55
56
  end
56
57
 
58
+ desc "remove build files"
59
+ task :clean do
60
+ sh %Q{ rm -f pkg/*.gem }
61
+ end
62
+
63
+ desc "Run the spec and features"
64
+ task :test => [ :features, :spec ]
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 0
4
- :patch: 7
4
+ :patch: 8
data/lib/mixlib/config.rb CHANGED
@@ -146,7 +146,7 @@ module Mixlib
146
146
  # If we have the symbol, or if we need to set it
147
147
  if @@configuration.has_key?(method_symbol) || num_args > 0
148
148
  if num_args > 0
149
- @@configuration[method_symbol] = num_args == 1 ? args[0] : args
149
+ internal_set(method_symbol, num_args == 1 ? args[0] : args)
150
150
  end
151
151
  return @@configuration[method_symbol]
152
152
  else
@@ -94,6 +94,11 @@ describe Mixlib::Config do
94
94
  ConfigIt[:test_method] = 53
95
95
  ConfigIt[:test_method].should == 53000
96
96
  end
97
+
98
+ it "should multiply an integer by 1000 with the method_missing form" do
99
+ ConfigIt.test_method = 53
100
+ ConfigIt.test_method.should == 53000
101
+ end
97
102
 
98
103
  it "should receive internal_set with the method name and config value" do
99
104
  ConfigIt.should_receive(:internal_set).with(:test_method, 53).and_return(true)
@@ -108,4 +113,4 @@ describe Mixlib::Config do
108
113
  end
109
114
  end
110
115
  end
111
- end
116
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --format specdoc
3
+ --loadby mtime
4
+ --reverse
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opscode-mixlib-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Opscode, Inc.
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-14 00:00:00 -07:00
12
+ date: 2009-06-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -29,8 +29,9 @@ files:
29
29
  - VERSION.yml
30
30
  - lib/mixlib/config.rb
31
31
  - spec/mixlib/config_spec.rb
32
+ - spec/spec.opts
32
33
  - spec/spec_helper.rb
33
- has_rdoc: true
34
+ has_rdoc: false
34
35
  homepage: http://www.opscode.com
35
36
  post_install_message:
36
37
  rdoc_options: