ridley 4.1.2 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d868df34840cd47fd59e935cd829407bc0bf528d
4
- data.tar.gz: 60b9b0e0f5b2214df516d92b6e5f9e5238879408
3
+ metadata.gz: c13d1d47eeb614454e357f42ed41e60d16fe1287
4
+ data.tar.gz: 2e48d517a5fd6d1aa51327eb2c050207132b315e
5
5
  SHA512:
6
- metadata.gz: 66474151072d89a2ecaa988a66c185eabbbc4b50b0b072fd8fd33baf931b3d0008c1f027951efb5ca386c8dc372a317b7163f720704ac4bdd7245aca0474584e
7
- data.tar.gz: 7c07e8dceef19387f4e8bda86cef751c9a14cd12f3d72d99b112a1381a55a7bf577ac30896ce3f03e91dff5cd02f9efbd00bab1448f0a6a5c1f7e4149ea758ba
6
+ metadata.gz: a7f9d49e3cff824cfdc0725ae925ffb205024474b037a44b3dcbcde037f63d8c6bd95cdc346191f10592a6d4ea72404c72aaea959d63566fa051e8e8d5ca0c98
7
+ data.tar.gz: 0d0234d3ef23f7942e18c3c54c4c1f0528870259cf9fa89a5d5b5b3ce58d1f9faba59330394d1248335cba20f20adeb45d8e9c3805765a17b06d9abbc8f61e2b
@@ -1,3 +1,8 @@
1
+ # 4.2.0
2
+
3
+ * Enhancements
4
+ * Support 'root_default' files
5
+
1
6
  # 4.1.2
2
7
 
3
8
  * Fixed: permission denied errors on Windows while uploading cookbooks
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -170,7 +170,7 @@ module Ridley::Chef
170
170
  case category
171
171
  when :files, :templates
172
172
  relpath = target.relative_path_from(path).to_s
173
- relpath.slice(/(.+)\/(.+)\/.+/, 2)
173
+ relpath.slice(/(.+)\/(.+)\/.+/, 2) || 'root_default'
174
174
  else
175
175
  'default'
176
176
  end
@@ -1,3 +1,3 @@
1
1
  module Ridley
2
- VERSION = "4.1.2"
2
+ VERSION = "4.2.0"
3
3
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_dependency 'json', '>= 1.7.7'
32
32
  s.add_dependency 'mixlib-authentication', '>= 1.3.0'
33
33
  s.add_dependency 'net-http-persistent', '>= 2.8'
34
- s.add_dependency 'retryable', '>= 2.0.0'
34
+ s.add_dependency 'retryable', '~> 2.0'
35
35
  s.add_dependency 'semverse', '~> 1.1'
36
36
 
37
37
  s.add_development_dependency 'buff-ruby_engine', '~> 0.1'
@@ -261,6 +261,45 @@ describe Ridley::Chef::Cookbook do
261
261
  end
262
262
  end
263
263
 
264
+ describe "#file_specificity" do
265
+ let(:category) { :templates }
266
+ let(:relpath) { 'default.rb' }
267
+ let(:file) { subject.path.join(category.to_s, relpath) }
268
+ before(:each) { @specificity = subject.file_specificity(category, file) }
269
+
270
+ context "given a recipe file" do
271
+ let(:category) { :recipes }
272
+
273
+ it "has a specificity of 'default'" do
274
+ @specificity.should eql("default")
275
+ end
276
+ end
277
+
278
+ context "given a template 'default/config.erb'" do
279
+ let(:relpath) { 'default/config.erb' }
280
+
281
+ it "has a specificity of 'default'" do
282
+ @specificity.should eql("default")
283
+ end
284
+ end
285
+
286
+ context "given a template 'centos/config.erb'" do
287
+ let(:relpath) { 'centos/config.erb' }
288
+
289
+ it "has a specificity of 'centos'" do
290
+ @specificity.should eql("centos")
291
+ end
292
+ end
293
+
294
+ context "given a template 'config.erb'" do
295
+ let(:relpath) { 'config.erb' }
296
+
297
+ it "has a specificity of 'root_default'" do
298
+ @specificity.should eql("root_default")
299
+ end
300
+ end
301
+ end
302
+
264
303
  describe "#to_hash" do
265
304
  subject { cookbook.to_hash }
266
305
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridley
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.2
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-13 00:00:00.000000000 Z
12
+ date: 2015-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -217,16 +217,16 @@ dependencies:
217
217
  name: retryable
218
218
  requirement: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ">="
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 2.0.0
222
+ version: '2.0'
223
223
  type: :runtime
224
224
  prerelease: false
225
225
  version_requirements: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">="
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 2.0.0
229
+ version: '2.0'
230
230
  - !ruby/object:Gem::Dependency
231
231
  name: semverse
232
232
  requirement: !ruby/object:Gem::Requirement
@@ -270,6 +270,7 @@ files:
270
270
  - Guardfile
271
271
  - LICENSE
272
272
  - README.md
273
+ - Rakefile
273
274
  - Thorfile
274
275
  - lib/ridley.rb
275
276
  - lib/ridley/chef.rb