ridley 3.0.0.rc1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ridley.rb +1 -1
- data/lib/ridley/chef/cookbook/metadata.rb +9 -9
- data/lib/ridley/resources/cookbook_resource.rb +4 -4
- data/lib/ridley/version.rb +1 -1
- data/ridley.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671f8cbe8bd8971f86b37681c2e2e607ce379e01
|
4
|
+
data.tar.gz: dca7dbfa8709346fd021d688277f5bb4c1c60cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d8d2ed4e008bfc5ee20c67114a97823c5ad944d7b6bc62ba1e05ed519474aba4f9d2100bb98d37335837917a64077b8710d3201d0f83467d5a83ccf55ba6601
|
7
|
+
data.tar.gz: b2c9e1b9d4a5f21100adbe9e0733134c829f28cfa00fdc4cf7d07fc5dd7c06744a25011eb0110d6114264a41d6f35f4f4a3931b29fe481b1d597d991f5342660
|
data/lib/ridley.rb
CHANGED
@@ -102,7 +102,7 @@ module Ridley::Chef
|
|
102
102
|
@attributes = Hashie::Mash.new
|
103
103
|
@groupings = Hashie::Mash.new
|
104
104
|
@recipes = Hashie::Mash.new
|
105
|
-
@version =
|
105
|
+
@version = Semverse::Version.new("0.0.0")
|
106
106
|
if cookbook
|
107
107
|
@recipes = cookbook.fully_qualified_recipe_names.inject({}) do |r, e|
|
108
108
|
e = self.name if e =~ /::default$/
|
@@ -204,7 +204,7 @@ module Ridley::Chef
|
|
204
204
|
# version<String>:: Returns the current version
|
205
205
|
def version(arg = nil)
|
206
206
|
if arg
|
207
|
-
@version =
|
207
|
+
@version = Semverse::Version.new(arg)
|
208
208
|
end
|
209
209
|
|
210
210
|
@version.to_s
|
@@ -237,7 +237,7 @@ module Ridley::Chef
|
|
237
237
|
# versions<Array>:: Returns the list of versions for the platform
|
238
238
|
def supports(platform, *version_args)
|
239
239
|
version = version_args.first
|
240
|
-
@platforms[platform] =
|
240
|
+
@platforms[platform] = Semverse::Constraint.new(version).to_s
|
241
241
|
@platforms[platform]
|
242
242
|
end
|
243
243
|
|
@@ -253,7 +253,7 @@ module Ridley::Chef
|
|
253
253
|
# versions<Array>:: Returns the list of versions for the platform
|
254
254
|
def depends(cookbook, *version_args)
|
255
255
|
version = version_args.first
|
256
|
-
@dependencies[cookbook] =
|
256
|
+
@dependencies[cookbook] = Semverse::Constraint.new(version).to_s
|
257
257
|
@dependencies[cookbook]
|
258
258
|
end
|
259
259
|
|
@@ -269,7 +269,7 @@ module Ridley::Chef
|
|
269
269
|
# versions<Array>:: Returns the list of versions for the platform
|
270
270
|
def recommends(cookbook, *version_args)
|
271
271
|
version = version_args.first
|
272
|
-
@recommendations[cookbook] =
|
272
|
+
@recommendations[cookbook] = Semverse::Constraint.new(version).to_s
|
273
273
|
@recommendations[cookbook]
|
274
274
|
end
|
275
275
|
|
@@ -285,7 +285,7 @@ module Ridley::Chef
|
|
285
285
|
# versions<Array>:: Returns the list of versions for the platform
|
286
286
|
def suggests(cookbook, *version_args)
|
287
287
|
version = version_args.first
|
288
|
-
@suggestions[cookbook] =
|
288
|
+
@suggestions[cookbook] = Semverse::Constraint.new(version).to_s
|
289
289
|
@suggestions[cookbook]
|
290
290
|
end
|
291
291
|
|
@@ -301,7 +301,7 @@ module Ridley::Chef
|
|
301
301
|
# versions<Array>:: Returns the list of versions for the platform
|
302
302
|
def conflicts(cookbook, *version_args)
|
303
303
|
version = version_args.first
|
304
|
-
@conflicting[cookbook] =
|
304
|
+
@conflicting[cookbook] = Semverse::Constraint.new(version).to_s
|
305
305
|
@conflicting[cookbook]
|
306
306
|
end
|
307
307
|
|
@@ -321,7 +321,7 @@ module Ridley::Chef
|
|
321
321
|
# versions<Array>:: Returns the list of versions for the platform
|
322
322
|
def provides(cookbook, *version_args)
|
323
323
|
version = version_args.first
|
324
|
-
@providing[cookbook] =
|
324
|
+
@providing[cookbook] = Semverse::Constraint.new(version).to_s
|
325
325
|
@providing[cookbook]
|
326
326
|
end
|
327
327
|
|
@@ -336,7 +336,7 @@ module Ridley::Chef
|
|
336
336
|
# versions<Array>:: Returns the list of versions for the platform
|
337
337
|
def replaces(cookbook, *version_args)
|
338
338
|
version = version_args.first
|
339
|
-
@replacing[cookbook] =
|
339
|
+
@replacing[cookbook] = Semverse::Constraint.new(version).to_s
|
340
340
|
@replacing[cookbook]
|
341
341
|
end
|
342
342
|
|
@@ -106,7 +106,7 @@ module Ridley
|
|
106
106
|
# @return [String, nil]
|
107
107
|
def latest_version(name)
|
108
108
|
ver = versions(name).collect do |version|
|
109
|
-
|
109
|
+
Semverse::Version.new(version)
|
110
110
|
end.sort.last
|
111
111
|
|
112
112
|
ver.nil? ? nil : ver.to_s
|
@@ -116,7 +116,7 @@ module Ridley
|
|
116
116
|
#
|
117
117
|
# @param [String] name
|
118
118
|
# name of the cookbook
|
119
|
-
# @param [String,
|
119
|
+
# @param [String, Semverse::Constraint] constraint
|
120
120
|
# constraint to solve for
|
121
121
|
#
|
122
122
|
# @raise [Errors::ResourceNotFound] if the target cookbook has no versions
|
@@ -124,9 +124,9 @@ module Ridley
|
|
124
124
|
# @return [CookbookResource, nil]
|
125
125
|
# returns the cookbook resource for the best solution or nil if no solution exists
|
126
126
|
def satisfy(name, constraint)
|
127
|
-
version =
|
127
|
+
version = Semverse::Constraint.satisfy_best(constraint, versions(name)).to_s
|
128
128
|
find(name, version)
|
129
|
-
rescue
|
129
|
+
rescue Semverse::NoSolutionError
|
130
130
|
nil
|
131
131
|
end
|
132
132
|
|
data/lib/ridley/version.rb
CHANGED
data/ridley.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_dependency 'mixlib-authentication', '>= 1.3.0'
|
33
33
|
s.add_dependency 'net-http-persistent', '>= 2.8'
|
34
34
|
s.add_dependency 'retryable'
|
35
|
-
s.add_dependency '
|
35
|
+
s.add_dependency 'semverse', '~> 1.1'
|
36
36
|
|
37
37
|
s.add_development_dependency 'buff-ruby_engine', '~> 0.1'
|
38
38
|
end
|
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: 3.0.0
|
4
|
+
version: 3.0.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: 2014-04-
|
12
|
+
date: 2014-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
@@ -222,19 +222,19 @@ dependencies:
|
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '0'
|
224
224
|
- !ruby/object:Gem::Dependency
|
225
|
-
name:
|
225
|
+
name: semverse
|
226
226
|
requirement: !ruby/object:Gem::Requirement
|
227
227
|
requirements:
|
228
|
-
- -
|
228
|
+
- - ~>
|
229
229
|
- !ruby/object:Gem::Version
|
230
|
-
version:
|
230
|
+
version: '1.1'
|
231
231
|
type: :runtime
|
232
232
|
prerelease: false
|
233
233
|
version_requirements: !ruby/object:Gem::Requirement
|
234
234
|
requirements:
|
235
|
-
- -
|
235
|
+
- - ~>
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version:
|
237
|
+
version: '1.1'
|
238
238
|
- !ruby/object:Gem::Dependency
|
239
239
|
name: buff-ruby_engine
|
240
240
|
requirement: !ruby/object:Gem::Requirement
|
@@ -416,9 +416,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
416
416
|
version: 1.9.1
|
417
417
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
418
418
|
requirements:
|
419
|
-
- - '
|
419
|
+
- - '>='
|
420
420
|
- !ruby/object:Gem::Version
|
421
|
-
version:
|
421
|
+
version: '0'
|
422
422
|
requirements: []
|
423
423
|
rubyforge_project:
|
424
424
|
rubygems_version: 2.0.14
|