hiera 3.0.1-x64-mingw32 → 3.0.5-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,10 +12,6 @@ class Hiera
12
12
  }
13
13
  end
14
14
 
15
- it "should treat string sources as a filename" do
16
- expect { Config.load("/nonexisting") }.to raise_error
17
- end
18
-
19
15
  it "should raise an error for missing config files" do
20
16
  File.expects(:exist?).with("/nonexisting").returns(false)
21
17
  YAML.expects(:load_file).with("/nonexisting").never
@@ -34,23 +30,23 @@ class Hiera
34
30
  File.expects(:exist?).with("/nonexisting").returns(true)
35
31
  YAML.expects(:load_file).with("/nonexisting").returns(YAML.load(""))
36
32
 
37
- Config.load("/nonexisting").should == default_config
33
+ expect(Config.load("/nonexisting")).to eq(default_config)
38
34
  end
39
35
 
40
36
  it "should use hash data as source if supplied" do
41
37
  config = Config.load({"rspec" => "test"})
42
- config["rspec"].should == "test"
38
+ expect(config["rspec"]).to eq("test")
43
39
  end
44
40
 
45
41
  it "should merge defaults with the loaded or supplied config" do
46
42
  config = Config.load({})
47
- config.should == {:backends => ["yaml"], :hierarchy => ['nodes/%{::trusted.certname}', 'common'],
48
- :logger => "console", :merge_behavior=>:native}
43
+ expect(config).to eq({:backends => ["yaml"], :hierarchy => ['nodes/%{::trusted.certname}', 'common'],
44
+ :logger => "console", :merge_behavior=>:native})
49
45
  end
50
46
 
51
47
  it "should force :backends to be a flattened array" do
52
- Config.load({:backends => [["foo", ["bar"]]]}).should == {:backends => ["foo", "bar"],
53
- :hierarchy => ['nodes/%{::trusted.certname}', 'common'], :logger => "console", :merge_behavior=>:native}
48
+ expect(Config.load({:backends => [["foo", ["bar"]]]})).to eq({:backends => ["foo", "bar"],
49
+ :hierarchy => ['nodes/%{::trusted.certname}', 'common'], :logger => "console", :merge_behavior=>:native})
54
50
  end
55
51
 
56
52
  it "should load the supplied logger" do
@@ -112,8 +108,8 @@ class Hiera
112
108
  describe "#include?" do
113
109
  it "should correctly report inclusion" do
114
110
  Config.load({})
115
- Config.include?(:foo).should == false
116
- Config.include?(:logger).should == true
111
+ expect(Config.include?(:foo)).to eq(false)
112
+ expect(Config.include?(:logger)).to eq(true)
117
113
  end
118
114
  end
119
115
  end
@@ -11,7 +11,7 @@ describe Hiera::FallbackLogger do
11
11
 
12
12
  logger.warn("the message")
13
13
 
14
- InMemoryLogger.warnings.should == ["the message"]
14
+ expect(InMemoryLogger.warnings).to eq(["the message"])
15
15
  end
16
16
 
17
17
  it "delegates #debug to the logger implemenation" do
@@ -19,7 +19,7 @@ describe Hiera::FallbackLogger do
19
19
 
20
20
  logger.debug("the message")
21
21
 
22
- InMemoryLogger.debugs.should == ["the message"]
22
+ expect(InMemoryLogger.debugs).to eq(["the message"])
23
23
  end
24
24
 
25
25
  it "chooses the first logger that is suitable" do
@@ -27,7 +27,7 @@ describe Hiera::FallbackLogger do
27
27
 
28
28
  logger.warn("for the suitable logger")
29
29
 
30
- SuitableLogger.warnings.should include("for the suitable logger")
30
+ expect(SuitableLogger.warnings).to include("for the suitable logger")
31
31
  end
32
32
 
33
33
  it "raises an error if no implementation is suitable" do
@@ -39,9 +39,9 @@ describe Hiera::FallbackLogger do
39
39
  it "issues a warning for each implementation that is not suitable" do
40
40
  Hiera::FallbackLogger.new(UnsuitableLogger, UnsuitableLogger, SuitableLogger)
41
41
 
42
- SuitableLogger.warnings.should == [
42
+ expect(SuitableLogger.warnings).to eq([
43
43
  "Not using UnsuitableLogger. It does not report itself to be suitable.",
44
- "Not using UnsuitableLogger. It does not report itself to be suitable."]
44
+ "Not using UnsuitableLogger. It does not report itself to be suitable."])
45
45
  end
46
46
 
47
47
  # Preserves log messages in memory
@@ -19,7 +19,7 @@ class Hiera
19
19
  file = File.join(dir, "testing")
20
20
  write_file(file, "my data")
21
21
 
22
- @cache.read(file).should == "my data"
22
+ expect(@cache.read(file)).to eq("my data")
23
23
  end
24
24
  end
25
25
 
@@ -27,10 +27,10 @@ class Hiera
27
27
  Dir.mktmpdir do |dir|
28
28
  file = File.join(dir, "testing")
29
29
  write_file(file, "my data")
30
- @cache.read(file).should == "my data"
30
+ expect(@cache.read(file)).to eq("my data")
31
31
 
32
32
  write_file(file, "changed data")
33
- @cache.read(file).should == "changed data"
33
+ expect(@cache.read(file)).to eq("changed data")
34
34
  end
35
35
  end
36
36
 
@@ -43,7 +43,7 @@ class Hiera
43
43
  "a string"
44
44
  end
45
45
 
46
- data.should == { :testing => "hash" }
46
+ expect(data).to eq({ :testing => "hash" })
47
47
  end
48
48
  end
49
49
 
@@ -56,7 +56,7 @@ class Hiera
56
56
  raise ArgumentError, "testing error"
57
57
  end
58
58
 
59
- data.should == { :testing => "hash" }
59
+ expect(data).to eq({ :testing => "hash" })
60
60
  end
61
61
  end
62
62
 
@@ -80,7 +80,7 @@ class Hiera
80
80
  file = File.join(dir, "testing")
81
81
  write_file(file, "my data")
82
82
 
83
- @cache.read_file(file).should == "my data"
83
+ expect(@cache.read_file(file)).to eq("my data")
84
84
  end
85
85
  end
86
86
 
@@ -88,10 +88,10 @@ class Hiera
88
88
  Dir.mktmpdir do |dir|
89
89
  file = File.join(dir, "testing")
90
90
  write_file(file, "my data")
91
- @cache.read_file(file).should == "my data"
91
+ expect(@cache.read_file(file)).to eq("my data")
92
92
 
93
93
  write_file(file, "changed data")
94
- @cache.read_file(file).should == "changed data"
94
+ expect(@cache.read_file(file)).to eq("changed data")
95
95
  end
96
96
  end
97
97
 
@@ -113,9 +113,9 @@ class Hiera
113
113
  file = File.join(dir, "testing")
114
114
  write_file(file, "my data")
115
115
 
116
- @cache.read_file(file, Hash) do |data|
116
+ expect(@cache.read_file(file, Hash) do |data|
117
117
  { :data => data }
118
- end.should == { :data => "my data" }
118
+ end).to eq({ :data => "my data" })
119
119
  end
120
120
  end
121
121
 
@@ -18,7 +18,7 @@ describe "Hiera" do
18
18
 
19
19
  Hiera.logger = "no_such_logger"
20
20
 
21
- Hiera.logger.should be Hiera::Console_logger
21
+ expect(Hiera.logger).to be Hiera::Console_logger
22
22
  end
23
23
 
24
24
  it "falls back to the Console logger when the logger class could not be found" do
@@ -27,7 +27,7 @@ describe "Hiera" do
27
27
 
28
28
  Hiera.logger = "no_constant"
29
29
 
30
- Hiera.logger.should be Hiera::Console_logger
30
+ expect(Hiera.logger).to be Hiera::Console_logger
31
31
  end
32
32
  end
33
33
 
@@ -4,13 +4,13 @@ describe Hiera::Puppet_logger do
4
4
  it "is not suitable when Puppet is not defined" do
5
5
  ensure_puppet_not_defined
6
6
 
7
- Hiera::Puppet_logger.suitable?.should == false
7
+ expect(Hiera::Puppet_logger.suitable?).to eq(false)
8
8
  end
9
9
 
10
10
  it "is suitable when Puppet is defined" do
11
11
  ensure_puppet_defined
12
12
 
13
- Hiera::Puppet_logger.suitable?.should == true
13
+ expect(Hiera::Puppet_logger.suitable?).to eq(true)
14
14
  end
15
15
 
16
16
  after :each do
@@ -4,45 +4,45 @@ describe Hiera::Util do
4
4
  describe 'Hiera::Util.posix?' do
5
5
  it 'should return true on posix systems' do
6
6
  Etc.expects(:getpwuid).with(0).returns(true)
7
- Hiera::Util.posix?.should be_true
7
+ expect(Hiera::Util.posix?).to be_truthy
8
8
  end
9
9
 
10
10
  it 'should return false on non posix systems' do
11
11
  Etc.expects(:getpwuid).with(0).returns(nil)
12
- Hiera::Util.posix?.should be_false
12
+ expect(Hiera::Util.posix?).to be_falsey
13
13
  end
14
14
  end
15
15
 
16
16
  describe 'Hiera::Util.microsoft_windows?' do
17
17
  it 'should return false on posix systems' do
18
18
  Hiera::Util.expects(:file_alt_separator).returns(nil)
19
- Hiera::Util.microsoft_windows?.should be_false
19
+ expect(Hiera::Util.microsoft_windows?).to be_falsey
20
20
  end
21
21
  end
22
22
 
23
23
  describe 'Hiera::Util.config_dir' do
24
24
  it 'should return the correct path for posix systems' do
25
25
  Hiera::Util.expects(:file_alt_separator).returns(nil)
26
- Hiera::Util.config_dir.should == '/etc/puppetlabs/code'
26
+ expect(Hiera::Util.config_dir).to eq('/etc/puppetlabs/code')
27
27
  end
28
28
 
29
29
  it 'should return the correct path for microsoft windows systems' do
30
30
  Hiera::Util.expects(:microsoft_windows?).returns(true)
31
31
  Hiera::Util.expects(:common_appdata).returns('C:\\ProgramData')
32
- Hiera::Util.config_dir.should == 'C:\\ProgramData/PuppetLabs/code'
32
+ expect(Hiera::Util.config_dir).to eq('C:\\ProgramData/PuppetLabs/code')
33
33
  end
34
34
  end
35
35
 
36
36
  describe 'Hiera::Util.var_dir' do
37
37
  it 'should return the correct path for posix systems' do
38
38
  Hiera::Util.expects(:file_alt_separator).returns(nil)
39
- Hiera::Util.var_dir.should == '/etc/puppetlabs/code/environments/%{environment}/hieradata'
39
+ expect(Hiera::Util.var_dir).to eq('/etc/puppetlabs/code/environments/%{environment}/hieradata')
40
40
  end
41
41
 
42
42
  it 'should return the correct path for microsoft windows systems' do
43
43
  Hiera::Util.expects(:microsoft_windows?).returns(true)
44
44
  Hiera::Util.expects(:common_appdata).returns('C:\\ProgramData')
45
- Hiera::Util.var_dir.should == 'C:\\ProgramData/PuppetLabs/code/environments/%{environment}/hieradata'
45
+ expect(Hiera::Util.var_dir).to eq('C:\\ProgramData/PuppetLabs/code/environments/%{environment}/hieradata')
46
46
  end
47
47
  end
48
48
  end
@@ -19,11 +19,11 @@ describe "Hiera.version Public API" do
19
19
  end
20
20
 
21
21
  it "is Hiera::VERSION" do
22
- subject.version.should == Hiera::VERSION
22
+ expect(subject.version).to eq(Hiera::VERSION)
23
23
  end
24
24
  it "respects the version= setter" do
25
25
  subject.version = '1.2.3'
26
- subject.version.should == '1.2.3'
26
+ expect(subject.version).to eq('1.2.3')
27
27
  end
28
28
  end
29
29
 
@@ -34,11 +34,11 @@ describe "Hiera.version Public API" do
34
34
  pathname.basename.to_s == "VERSION"
35
35
  end.returns('1.2.1-9-g9fda440')
36
36
 
37
- subject.version.should == '1.2.1-9-g9fda440'
37
+ expect(subject.version).to eq('1.2.1-9-g9fda440')
38
38
  end
39
39
  it "respects the version= setter" do
40
40
  subject.version = '1.2.3'
41
- subject.version.should == '1.2.3'
41
+ expect(subject.version).to eq('1.2.3')
42
42
  end
43
43
  end
44
44
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
5
- prerelease:
4
+ version: 3.0.5
6
5
  platform: x64-mingw32
7
6
  authors:
8
7
  - Puppet Labs
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json_pure
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: win32-dir
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -51,84 +46,83 @@ extensions: []
51
46
  extra_rdoc_files: []
52
47
  files:
53
48
  - bin/hiera
54
- - lib/hiera/version.rb
55
- - lib/hiera/noop_logger.rb
56
- - lib/hiera/error.rb
57
- - lib/hiera/fallback_logger.rb
58
- - lib/hiera/recursive_guard.rb
59
- - lib/hiera/backend/yaml_backend.rb
49
+ - lib/hiera/backend.rb
60
50
  - lib/hiera/backend/json_backend.rb
51
+ - lib/hiera/backend/yaml_backend.rb
61
52
  - lib/hiera/config.rb
53
+ - lib/hiera/console_logger.rb
54
+ - lib/hiera/error.rb
55
+ - lib/hiera/fallback_logger.rb
62
56
  - lib/hiera/filecache.rb
63
57
  - lib/hiera/interpolate.rb
64
- - lib/hiera/console_logger.rb
58
+ - lib/hiera/noop_logger.rb
65
59
  - lib/hiera/puppet_logger.rb
60
+ - lib/hiera/recursive_guard.rb
66
61
  - lib/hiera/util.rb
67
- - lib/hiera/backend.rb
62
+ - lib/hiera/version.rb
68
63
  - lib/hiera.rb
69
64
  - COPYING
70
65
  - README.md
71
66
  - LICENSE
72
- - spec/unit/interpolate_spec.rb
73
- - spec/unit/fixtures/override/config/hiera.yaml
74
- - spec/unit/fixtures/override/data/alternate.yaml
75
- - spec/unit/fixtures/override/data/common.yaml
76
- - spec/unit/fixtures/interpolate/config/hiera.yaml
77
- - spec/unit/fixtures/interpolate/data/niltest.yaml
78
- - spec/unit/fixtures/interpolate/data/recursive.yaml
67
+ - spec/spec_helper.rb
68
+ - spec/unit/backend/json_backend_spec.rb
69
+ - spec/unit/backend/yaml_backend_spec.rb
79
70
  - spec/unit/backend_spec.rb
80
- - spec/unit/filecache_spec.rb
81
71
  - spec/unit/config_spec.rb
82
- - spec/unit/backend/yaml_backend_spec.rb
83
- - spec/unit/backend/json_backend_spec.rb
84
- - spec/unit/puppet_logger_spec.rb
85
72
  - spec/unit/console_logger_spec.rb
86
- - spec/unit/version_spec.rb
87
73
  - spec/unit/fallback_logger_spec.rb
88
- - spec/unit/util_spec.rb
74
+ - spec/unit/filecache_spec.rb
75
+ - spec/unit/fixtures/interpolate/config/hiera.yaml
76
+ - spec/unit/fixtures/interpolate/data/niltest.yaml
77
+ - spec/unit/fixtures/interpolate/data/recursive.yaml
78
+ - spec/unit/fixtures/override/config/hiera.yaml
79
+ - spec/unit/fixtures/override/data/alternate.yaml
80
+ - spec/unit/fixtures/override/data/common.yaml
89
81
  - spec/unit/hiera_spec.rb
90
- - spec/spec_helper.rb
82
+ - spec/unit/interpolate_spec.rb
83
+ - spec/unit/puppet_logger_spec.rb
84
+ - spec/unit/util_spec.rb
85
+ - spec/unit/version_spec.rb
91
86
  homepage: https://github.com/puppetlabs/hiera
92
87
  licenses: []
88
+ metadata: {}
93
89
  post_install_message:
94
90
  rdoc_options: []
95
91
  require_paths:
96
92
  - lib
97
93
  required_ruby_version: !ruby/object:Gem::Requirement
98
- none: false
99
94
  requirements:
100
- - - ! '>='
95
+ - - '>='
101
96
  - !ruby/object:Gem::Version
102
97
  version: '0'
103
98
  required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
99
  requirements:
106
- - - ! '>='
100
+ - - '>='
107
101
  - !ruby/object:Gem::Version
108
102
  version: '0'
109
103
  requirements: []
110
104
  rubyforge_project:
111
- rubygems_version: 1.8.23
105
+ rubygems_version: 2.0.14
112
106
  signing_key:
113
- specification_version: 3
107
+ specification_version: 4
114
108
  summary: Light weight hierarchical data store
115
109
  test_files:
116
- - spec/unit/interpolate_spec.rb
117
- - spec/unit/fixtures/override/config/hiera.yaml
118
- - spec/unit/fixtures/override/data/alternate.yaml
119
- - spec/unit/fixtures/override/data/common.yaml
120
- - spec/unit/fixtures/interpolate/config/hiera.yaml
121
- - spec/unit/fixtures/interpolate/data/niltest.yaml
122
- - spec/unit/fixtures/interpolate/data/recursive.yaml
110
+ - spec/spec_helper.rb
111
+ - spec/unit/backend/json_backend_spec.rb
112
+ - spec/unit/backend/yaml_backend_spec.rb
123
113
  - spec/unit/backend_spec.rb
124
- - spec/unit/filecache_spec.rb
125
114
  - spec/unit/config_spec.rb
126
- - spec/unit/backend/yaml_backend_spec.rb
127
- - spec/unit/backend/json_backend_spec.rb
128
- - spec/unit/puppet_logger_spec.rb
129
115
  - spec/unit/console_logger_spec.rb
130
- - spec/unit/version_spec.rb
131
116
  - spec/unit/fallback_logger_spec.rb
132
- - spec/unit/util_spec.rb
117
+ - spec/unit/filecache_spec.rb
118
+ - spec/unit/fixtures/interpolate/config/hiera.yaml
119
+ - spec/unit/fixtures/interpolate/data/niltest.yaml
120
+ - spec/unit/fixtures/interpolate/data/recursive.yaml
121
+ - spec/unit/fixtures/override/config/hiera.yaml
122
+ - spec/unit/fixtures/override/data/alternate.yaml
123
+ - spec/unit/fixtures/override/data/common.yaml
133
124
  - spec/unit/hiera_spec.rb
134
- - spec/spec_helper.rb
125
+ - spec/unit/interpolate_spec.rb
126
+ - spec/unit/puppet_logger_spec.rb
127
+ - spec/unit/util_spec.rb
128
+ - spec/unit/version_spec.rb