ecomdev-chefspec 0.1.7 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d379f19e5bf65ae93daa12451bcc360da1b88d81
4
- data.tar.gz: 834a551ee88900f053dcca8739998b9b304ff46e
3
+ metadata.gz: 18159ffc44304066b431e39382c800d964f142a4
4
+ data.tar.gz: 63f5183b7e02a24c02d2555d8b08659f8f1d582b
5
5
  SHA512:
6
- metadata.gz: d043cfeb74c077ad904a5383ec5b46701834a224d7c0962dfa172422417d696eada08aa97d3d86f7c58f7368e7b68e32cfa73747d4747785d1c7f3c8084565d9
7
- data.tar.gz: e83ce811d8971facfedf074481e8930004ca7e25a67ae8839be4956f45ba04b8ff3548f20dda3c4ce94708f2a01a806830df2273d416eb9593a28a2ccf5cf5fc
6
+ metadata.gz: 154ddd0fa037720b6e4aaa9fe15e682aff6573c7e0ab7314068bd1e1fee10a3e2b21c9a32d4d7c84f2303f16ea5e3547d7bef1c03c72f91d00dc8609ac188f38
7
+ data.tar.gz: b227866df1cb1217556488f123ab23b44736ccea9ff3ab4da437663e7eb3e446c745b1da62bf906cf427a85d6f5accedb9d42db7931b876292408ff9cdc87267
@@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'chefspec', '~> 4.0'
21
+ spec.add_dependency 'chefspec', '~> 4.1'
22
+ spec.add_dependency 'chef', '11.16'
22
23
  spec.add_dependency 'json'
23
24
  spec.add_development_dependency "bundler", "~> 1.6"
24
25
  spec.add_development_dependency "rake"
@@ -97,7 +97,7 @@ module EcomDev::ChefSpec::Helpers
97
97
  return @target
98
98
  end
99
99
  block_args = nil
100
- @target = ChefSpec::Runner.new(*@args) do |*args|
100
+ @target = ChefSpec::SoloRunner.new(*@args) do |*args|
101
101
  block_args = args
102
102
  end
103
103
  invoke_blocks(:initialize, :block, *block_args, &@constructor_block)
@@ -45,7 +45,7 @@ module EcomDev
45
45
  end
46
46
 
47
47
  runners.each do |runner|
48
- ::ChefSpec::Runner.define_runner_method(runner.to_sym)
48
+ ::ChefSpec.define_matcher(runner.to_sym)
49
49
  end
50
50
  end
51
51
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module EcomDev
3
3
  module ChefSpec
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.8'
5
5
  end
6
6
  end
@@ -8,8 +8,8 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
8
8
  it 'passes constructor options to original constructor' do
9
9
  runner_proxy = described_class.new(platform: 'ubuntu')
10
10
 
11
- expect_any_instance_of(ChefSpec::Runner).to receive(:initialize).with({platform: 'ubuntu'}).and_call_original
12
- allow_any_instance_of(ChefSpec::Runner).to receive(:node).and_return('fake')
11
+ expect_any_instance_of(ChefSpec::SoloRunner).to receive(:initialize).with({platform: 'ubuntu'}).and_call_original
12
+ allow_any_instance_of(ChefSpec::SoloRunner).to receive(:node).and_return('fake')
13
13
 
14
14
  # Call node method of proxied object
15
15
  expect(runner_proxy.node).to eq('fake')
@@ -70,7 +70,7 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
70
70
  checker.called(self)
71
71
  }
72
72
 
73
- expect(checker).to receive(:called).with(instance_of(ChefSpec::Runner)).exactly(1).times
73
+ expect(checker).to receive(:called).with(instance_of(ChefSpec::SoloRunner)).exactly(1).times
74
74
 
75
75
  runner_proxy.before(:node, true, &block)
76
76
  runner_proxy.node
@@ -88,7 +88,7 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
88
88
 
89
89
  expect(checker).to receive(:node).with(instance_of(Chef::Node)).exactly(1).times
90
90
  expect(checker).to receive(:args).with(Array.new).exactly(1).times
91
- expect(checker).to receive(:called).with(instance_of(ChefSpec::Runner)).exactly(1).times
91
+ expect(checker).to receive(:called).with(instance_of(ChefSpec::SoloRunner)).exactly(1).times
92
92
 
93
93
  runner_proxy.after(:node, true, &block)
94
94
  runner_proxy.node
@@ -108,7 +108,7 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
108
108
  runner_proxy = described_class.new(&block_constructor)
109
109
 
110
110
  expect(checker).to receive(:called).with(
111
- instance_of(ChefSpec::Runner),
111
+ instance_of(ChefSpec::SoloRunner),
112
112
  instance_of(Chef::Node)
113
113
  ).exactly(1).times
114
114
  expect(checker).to receive(:called_constructor).with(
@@ -134,13 +134,13 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
134
134
  runner_proxy = described_class.new
135
135
 
136
136
  expect(checker).to receive(:called).with(
137
- instance_of(ChefSpec::Runner)
137
+ instance_of(ChefSpec::SoloRunner)
138
138
  ).exactly(1).times
139
139
  expect(checker).to receive(:called_converege).with(
140
140
  instance_of(self.class)
141
141
  ).exactly(1).times
142
142
 
143
- allow_any_instance_of(ChefSpec::Runner).to receive(:converge).and_yield
143
+ allow_any_instance_of(ChefSpec::SoloRunner).to receive(:converge).and_yield
144
144
  runner_proxy.block(:initialize, true, &block)
145
145
  runner_proxy.converge(&block_converge)
146
146
  end
@@ -156,10 +156,10 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
156
156
 
157
157
  expect(checker).to receive(:called).with(
158
158
  instance_of(self.class),
159
- instance_of(ChefSpec::Runner)
159
+ instance_of(ChefSpec::SoloRunner)
160
160
  ).exactly(1).times
161
161
 
162
- allow_any_instance_of(ChefSpec::Runner).to receive(:converge).and_yield
162
+ allow_any_instance_of(ChefSpec::SoloRunner).to receive(:converge).and_yield
163
163
  runner_proxy.block(:initialize, &block)
164
164
  runner_proxy.converge
165
165
  end
@@ -127,11 +127,11 @@ describe EcomDev::ChefSpec::Resource::Matcher do
127
127
  expect(EcomDev::ChefSpec::Resource::Matcher::Helper.instance_methods).to contain_exactly(:create_test)
128
128
  end
129
129
 
130
- it 'should define runner method in ChefSpec::Runner 'do
130
+ it 'should define runner method in ChefSpec::SoloRunner 'do
131
131
  described_class.runner(:test_resource)
132
132
  described_class.instance.extend_api
133
133
 
134
- expect(::ChefSpec::Runner.instance_methods).to include(:test_resource)
134
+ expect(::ChefSpec.matchers.keys).to include(:test_resource)
135
135
  end
136
136
  end
137
137
 
@@ -15,7 +15,7 @@ describe EcomDev::ChefSpec::Stub::IncludeRecipe do
15
15
  end
16
16
 
17
17
  context 'when there is a described recipe' do
18
- let (:runner) { ChefSpec::Runner.new }
18
+ let (:runner) { ChefSpec::SoloRunner.new }
19
19
  let (:described_recipe) { 'test::test' }
20
20
 
21
21
  it 'loaded recipes should be empty in the beginning' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecomdev-chefspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Chepurnyi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-10 00:00:00.000000000 Z
11
+ date: 2014-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chefspec
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '4.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: chef
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: '11.16'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: '11.16'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: json
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
150
  version: '0'
137
151
  requirements: []
138
152
  rubyforge_project:
139
- rubygems_version: 2.4.0
153
+ rubygems_version: 2.4.1
140
154
  signing_key:
141
155
  specification_version: 4
142
156
  summary: A collection of helpers for chef spec, to make easier writing recipe specs