hiera 3.0.1-x86-mingw32 → 3.0.5-x86-mingw32

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.
@@ -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: x86-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: win32console
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
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: win32-dir
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -67,84 +60,83 @@ extensions: []
67
60
  extra_rdoc_files: []
68
61
  files:
69
62
  - bin/hiera
70
- - lib/hiera/version.rb
71
- - lib/hiera/noop_logger.rb
72
- - lib/hiera/error.rb
73
- - lib/hiera/fallback_logger.rb
74
- - lib/hiera/recursive_guard.rb
75
- - lib/hiera/backend/yaml_backend.rb
63
+ - lib/hiera/backend.rb
76
64
  - lib/hiera/backend/json_backend.rb
65
+ - lib/hiera/backend/yaml_backend.rb
77
66
  - lib/hiera/config.rb
67
+ - lib/hiera/console_logger.rb
68
+ - lib/hiera/error.rb
69
+ - lib/hiera/fallback_logger.rb
78
70
  - lib/hiera/filecache.rb
79
71
  - lib/hiera/interpolate.rb
80
- - lib/hiera/console_logger.rb
72
+ - lib/hiera/noop_logger.rb
81
73
  - lib/hiera/puppet_logger.rb
74
+ - lib/hiera/recursive_guard.rb
82
75
  - lib/hiera/util.rb
83
- - lib/hiera/backend.rb
76
+ - lib/hiera/version.rb
84
77
  - lib/hiera.rb
85
78
  - COPYING
86
79
  - README.md
87
80
  - LICENSE
88
- - spec/unit/interpolate_spec.rb
89
- - spec/unit/fixtures/override/config/hiera.yaml
90
- - spec/unit/fixtures/override/data/alternate.yaml
91
- - spec/unit/fixtures/override/data/common.yaml
92
- - spec/unit/fixtures/interpolate/config/hiera.yaml
93
- - spec/unit/fixtures/interpolate/data/niltest.yaml
94
- - spec/unit/fixtures/interpolate/data/recursive.yaml
81
+ - spec/spec_helper.rb
82
+ - spec/unit/backend/json_backend_spec.rb
83
+ - spec/unit/backend/yaml_backend_spec.rb
95
84
  - spec/unit/backend_spec.rb
96
- - spec/unit/filecache_spec.rb
97
85
  - spec/unit/config_spec.rb
98
- - spec/unit/backend/yaml_backend_spec.rb
99
- - spec/unit/backend/json_backend_spec.rb
100
- - spec/unit/puppet_logger_spec.rb
101
86
  - spec/unit/console_logger_spec.rb
102
- - spec/unit/version_spec.rb
103
87
  - spec/unit/fallback_logger_spec.rb
104
- - spec/unit/util_spec.rb
88
+ - spec/unit/filecache_spec.rb
89
+ - spec/unit/fixtures/interpolate/config/hiera.yaml
90
+ - spec/unit/fixtures/interpolate/data/niltest.yaml
91
+ - spec/unit/fixtures/interpolate/data/recursive.yaml
92
+ - spec/unit/fixtures/override/config/hiera.yaml
93
+ - spec/unit/fixtures/override/data/alternate.yaml
94
+ - spec/unit/fixtures/override/data/common.yaml
105
95
  - spec/unit/hiera_spec.rb
106
- - spec/spec_helper.rb
96
+ - spec/unit/interpolate_spec.rb
97
+ - spec/unit/puppet_logger_spec.rb
98
+ - spec/unit/util_spec.rb
99
+ - spec/unit/version_spec.rb
107
100
  homepage: https://github.com/puppetlabs/hiera
108
101
  licenses: []
102
+ metadata: {}
109
103
  post_install_message:
110
104
  rdoc_options: []
111
105
  require_paths:
112
106
  - lib
113
107
  required_ruby_version: !ruby/object:Gem::Requirement
114
- none: false
115
108
  requirements:
116
- - - ! '>='
109
+ - - '>='
117
110
  - !ruby/object:Gem::Version
118
111
  version: '0'
119
112
  required_rubygems_version: !ruby/object:Gem::Requirement
120
- none: false
121
113
  requirements:
122
- - - ! '>='
114
+ - - '>='
123
115
  - !ruby/object:Gem::Version
124
116
  version: '0'
125
117
  requirements: []
126
118
  rubyforge_project:
127
- rubygems_version: 1.8.23
119
+ rubygems_version: 2.0.14
128
120
  signing_key:
129
- specification_version: 3
121
+ specification_version: 4
130
122
  summary: Light weight hierarchical data store
131
123
  test_files:
132
- - spec/unit/interpolate_spec.rb
133
- - spec/unit/fixtures/override/config/hiera.yaml
134
- - spec/unit/fixtures/override/data/alternate.yaml
135
- - spec/unit/fixtures/override/data/common.yaml
136
- - spec/unit/fixtures/interpolate/config/hiera.yaml
137
- - spec/unit/fixtures/interpolate/data/niltest.yaml
138
- - spec/unit/fixtures/interpolate/data/recursive.yaml
124
+ - spec/spec_helper.rb
125
+ - spec/unit/backend/json_backend_spec.rb
126
+ - spec/unit/backend/yaml_backend_spec.rb
139
127
  - spec/unit/backend_spec.rb
140
- - spec/unit/filecache_spec.rb
141
128
  - spec/unit/config_spec.rb
142
- - spec/unit/backend/yaml_backend_spec.rb
143
- - spec/unit/backend/json_backend_spec.rb
144
- - spec/unit/puppet_logger_spec.rb
145
129
  - spec/unit/console_logger_spec.rb
146
- - spec/unit/version_spec.rb
147
130
  - spec/unit/fallback_logger_spec.rb
148
- - spec/unit/util_spec.rb
131
+ - spec/unit/filecache_spec.rb
132
+ - spec/unit/fixtures/interpolate/config/hiera.yaml
133
+ - spec/unit/fixtures/interpolate/data/niltest.yaml
134
+ - spec/unit/fixtures/interpolate/data/recursive.yaml
135
+ - spec/unit/fixtures/override/config/hiera.yaml
136
+ - spec/unit/fixtures/override/data/alternate.yaml
137
+ - spec/unit/fixtures/override/data/common.yaml
149
138
  - spec/unit/hiera_spec.rb
150
- - spec/spec_helper.rb
139
+ - spec/unit/interpolate_spec.rb
140
+ - spec/unit/puppet_logger_spec.rb
141
+ - spec/unit/util_spec.rb
142
+ - spec/unit/version_spec.rb