ridley 4.1.0 → 4.1.1

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: a8f779adc3b49cb4e56e8c3ec7be31f9c9d4d578
4
- data.tar.gz: 567f7dfd4825123df48ba3481b925de1d99e2dfc
3
+ metadata.gz: 693d3b020cb5366d57481f79708376cefba8209c
4
+ data.tar.gz: 56163c381348636326fbc231087d068ba0d2c5d3
5
5
  SHA512:
6
- metadata.gz: 19d7b37325d54cba04a0685999cdb753b2bec68c8361e83736049a62a3b99410dfff57ab42757943395ce3f66075725dd9b479f44d4930e08f9b9300c04de839
7
- data.tar.gz: 15f13659355c879b27e1b5e5388f7b055baef746d5474e2478557f771f7d152727d4c609e540855a901b7d92d4360d0e3424e9fda3de542adfdfe3249682996a
6
+ metadata.gz: 23915d3e57d0533f7c7d6af90272fb830aa9acf956ab08617d298d8f439d67d5e8e1bf9d7dfcb9b0e7e7f1f5fb2493bc8674e68656e3f132e5385b62bb9b2d58
7
+ data.tar.gz: a792da783a486a4ad3de98e11e0bf0d49751bfdc66ca6e591ad4d88f920f005b638ec0e9da2486992dd5736c447e484a2da9497e41ad6ec4cfeaf30b7b1bfece
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 4.1.1
2
+
3
+ * Enhancements
4
+ * Add support for metadata source_url field
5
+ * Add support for metadata issues_url field
6
+
1
7
  # 4.1.0
2
8
 
3
9
  * Fix monkey patching issue with options#slice when running under Vagrant
@@ -47,6 +47,8 @@ module Ridley::Chef
47
47
  GROUPINGS = 'groupings'.freeze
48
48
  RECIPES = 'recipes'.freeze
49
49
  VERSION = 'version'.freeze
50
+ SOURCE_URL = 'source_url'.freeze
51
+ ISSUES_URL = 'issues_url'.freeze
50
52
 
51
53
  COMPILED_FILE_NAME = "metadata.json".freeze
52
54
  RAW_FILE_NAME = "metadata.rb".freeze
@@ -55,7 +57,8 @@ module Ridley::Chef
55
57
  :name, :description, :long_description, :maintainer,
56
58
  :maintainer_email, :license, :platforms, :dependencies,
57
59
  :recommendations, :suggestions, :conflicting, :providing,
58
- :replacing, :attributes, :groupings, :recipes, :version
60
+ :replacing, :attributes, :groupings, :recipes, :version,
61
+ :source_url, :issues_url
59
62
  ]
60
63
 
61
64
  include Ridley::Mixin::ParamsValidate
@@ -92,17 +95,20 @@ module Ridley::Chef
92
95
  self.maintainer_email(maintainer_email)
93
96
  self.license(license)
94
97
  self.description('A fabulous new cookbook')
95
- @platforms = Hashie::Mash.new
96
- @dependencies = Hashie::Mash.new
98
+ @platforms = Hashie::Mash.new
99
+ @dependencies = Hashie::Mash.new
97
100
  @recommendations = Hashie::Mash.new
98
- @suggestions = Hashie::Mash.new
99
- @conflicting = Hashie::Mash.new
100
- @providing = Hashie::Mash.new
101
- @replacing = Hashie::Mash.new
102
- @attributes = Hashie::Mash.new
103
- @groupings = Hashie::Mash.new
104
- @recipes = Hashie::Mash.new
105
- @version = Semverse::Version.new("0.0.0")
101
+ @suggestions = Hashie::Mash.new
102
+ @conflicting = Hashie::Mash.new
103
+ @providing = Hashie::Mash.new
104
+ @replacing = Hashie::Mash.new
105
+ @attributes = Hashie::Mash.new
106
+ @groupings = Hashie::Mash.new
107
+ @recipes = Hashie::Mash.new
108
+ @version = Semverse::Version.new("0.0.0")
109
+ @source_url = ''
110
+ @issues_url = ''
111
+
106
112
  if cookbook
107
113
  @recipes = cookbook.fully_qualified_recipe_names.inject({}) do |r, e|
108
114
  e = self.name if e =~ /::default$/
@@ -382,7 +388,9 @@ module Ridley::Chef
382
388
  :type => { :equal_to => [ "string", "array", "hash", "symbol", "boolean", "numeric" ], :default => "string" },
383
389
  :required => { :equal_to => [ "required", "recommended", "optional", true, false ], :default => "optional" },
384
390
  :recipes => { :kind_of => [ Array ], :default => [] },
385
- :default => { :kind_of => [ String, Array, Hash, Symbol, Numeric, TrueClass, FalseClass ] }
391
+ :default => { :kind_of => [ String, Array, Hash, Symbol, Numeric, TrueClass, FalseClass ] },
392
+ :source_url => { :kind_of => String },
393
+ :issues_url => { :kind_of => String }
386
394
  }
387
395
  )
388
396
  options[:required] = remap_required_attribute(options[:required]) unless options[:required].nil?
@@ -424,13 +432,18 @@ module Ridley::Chef
424
432
  ATTRIBUTES => self.attributes,
425
433
  GROUPINGS => self.groupings,
426
434
  RECIPES => self.recipes,
427
- VERSION => self.version
435
+ VERSION => self.version,
436
+ SOURCE_URL => self.source_url,
437
+ ISSUES_URL => self.issues_url
428
438
  }
429
439
  end
430
440
 
431
441
  # @return [String]
432
442
  def to_json
433
- JSON.fast_generate(to_hash)
443
+ # Switched from fast to pretty generate here
444
+ # to match `knife cookbook metadata from file` format
445
+ # See https://github.com/RiotGames/ridley/pull/287
446
+ JSON.pretty_generate(to_hash)
434
447
  end
435
448
 
436
449
  def from_hash(o)
@@ -451,6 +464,8 @@ module Ridley::Chef
451
464
  @groupings = o[GROUPINGS] if o.has_key?(GROUPINGS)
452
465
  @recipes = o[RECIPES] if o.has_key?(RECIPES)
453
466
  @version = o[VERSION] if o.has_key?(VERSION)
467
+ @source_url = o[SOURCE_URL] if o.has_key?(SOURCE_URL)
468
+ @issues_url = o[ISSUES_URL] if o.has_key?(ISSUES_URL)
454
469
  self
455
470
  end
456
471
 
@@ -458,6 +473,36 @@ module Ridley::Chef
458
473
  from_hash JSON.parse(json)
459
474
  end
460
475
 
476
+ # Sets the cookbook's source URL, or returns it.
477
+ #
478
+ # === Parameters
479
+ # maintainer<String>:: The source URL
480
+ #
481
+ # === Returns
482
+ # source_url<String>:: Returns the current source URL.
483
+ def source_url(arg = nil)
484
+ set_or_return(
485
+ :source_url,
486
+ arg,
487
+ :kind_of => [ String ]
488
+ )
489
+ end
490
+
491
+ # Sets the cookbook's issues URL, or returns it.
492
+ #
493
+ # === Parameters
494
+ # issues_url<String>:: The issues URL
495
+ #
496
+ # === Returns
497
+ # issues_url<String>:: Returns the current issues URL.
498
+ def issues_url(arg = nil)
499
+ set_or_return(
500
+ :issues_url,
501
+ arg,
502
+ :kind_of => [ String ]
503
+ )
504
+ end
505
+
461
506
  private
462
507
 
463
508
  # Verify that the given array is an array of strings
@@ -1,3 +1,3 @@
1
1
  module Ridley
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
  end
@@ -130,16 +130,16 @@ describe Ridley::CookbookResource do
130
130
  # the ignored files weren't uploaded, so we just check that the
131
131
  # non-ignored files are the ONLY thing uploaded
132
132
  sandbox_resource.should_receive(:create).with([
133
- "211a3a8798d4acd424af15ff8a2e28a5",
134
- "4f9051c3ac8031bdaff10300fa92e817",
135
- "75077ba33d2887cc1746d1ef716bf8b7",
136
- "7b1ebd2ff580ca9dc46fb27ec1653bf2",
137
- "84e12365e6f4ebe7db6a0e6a92473b16",
138
- "a39eb80def9804f4b118099697cc2cd2",
139
- "b70ba735f3af47e5d6fc71b91775b34c",
140
- "cafb6869fca13f5c36f24a60de8fb982",
141
- "dbf3a6c4ab68a86172be748aced9f46e",
142
- "dc6461b5da25775f3ef6a9cc1f6cff9f",
133
+ "211a3a8798d4acd424af15ff8a2e28a5",
134
+ "75077ba33d2887cc1746d1ef716bf8b7",
135
+ "7b1ebd2ff580ca9dc46fb27ec1653bf2",
136
+ "84e12365e6f4ebe7db6a0e6a92473b16",
137
+ "a39eb80def9804f4b118099697cc2cd2",
138
+ "b70ba735f3af47e5d6fc71b91775b34c",
139
+ "b946e579ba3640470c16f6fb3445e346",
140
+ "cafb6869fca13f5c36f24a60de8fb982",
141
+ "dbf3a6c4ab68a86172be748aced9f46e",
142
+ "dc6461b5da25775f3ef6a9cc1f6cff9f",
143
143
  "e9a2e24281cfbd6be0a6b1af3b6d277e"
144
144
  ]).and_return(sandbox)
145
145
 
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.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -9,250 +9,250 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-23 00:00:00.000000000 Z
12
+ date: 2014-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: varia_model
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0.4'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0.4'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: buff-config
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '1.0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '1.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: buff-extensions
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: buff-ignore
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.1'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.1'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: buff-shell_out
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ~>
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0.1'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ~>
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0.1'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: celluloid
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ~>
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
104
  version: 0.16.0
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ~>
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: 0.16.0
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: celluloid-io
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ~>
116
+ - - "~>"
117
117
  - !ruby/object:Gem::Version
118
118
  version: 0.16.1
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ~>
123
+ - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: 0.16.1
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: erubis
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: faraday
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ~>
144
+ - - "~>"
145
145
  - !ruby/object:Gem::Version
146
146
  version: 0.9.0
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ~>
151
+ - - "~>"
152
152
  - !ruby/object:Gem::Version
153
153
  version: 0.9.0
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: hashie
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: 2.0.2
161
- - - <
161
+ - - "<"
162
162
  - !ruby/object:Gem::Version
163
163
  version: 3.0.0
164
164
  type: :runtime
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - '>='
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: 2.0.2
171
- - - <
171
+ - - "<"
172
172
  - !ruby/object:Gem::Version
173
173
  version: 3.0.0
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: json
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.7.7
181
181
  type: :runtime
182
182
  prerelease: false
183
183
  version_requirements: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: 1.7.7
188
188
  - !ruby/object:Gem::Dependency
189
189
  name: mixlib-authentication
190
190
  requirement: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - '>='
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: 1.3.0
195
195
  type: :runtime
196
196
  prerelease: false
197
197
  version_requirements: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '>='
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
201
  version: 1.3.0
202
202
  - !ruby/object:Gem::Dependency
203
203
  name: net-http-persistent
204
204
  requirement: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '>='
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '2.8'
209
209
  type: :runtime
210
210
  prerelease: false
211
211
  version_requirements: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - '>='
213
+ - - ">="
214
214
  - !ruby/object:Gem::Version
215
215
  version: '2.8'
216
216
  - !ruby/object:Gem::Dependency
217
217
  name: retryable
218
218
  requirement: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - '>='
220
+ - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '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
229
  version: '0'
230
230
  - !ruby/object:Gem::Dependency
231
231
  name: semverse
232
232
  requirement: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ~>
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '1.1'
237
237
  type: :runtime
238
238
  prerelease: false
239
239
  version_requirements: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ~>
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
243
  version: '1.1'
244
244
  - !ruby/object:Gem::Dependency
245
245
  name: buff-ruby_engine
246
246
  requirement: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ~>
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0.1'
251
251
  type: :development
252
252
  prerelease: false
253
253
  version_requirements: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - ~>
255
+ - - "~>"
256
256
  - !ruby/object:Gem::Version
257
257
  version: '0.1'
258
258
  description: A reliable Chef API client with a clean syntax
@@ -263,9 +263,8 @@ executables: []
263
263
  extensions: []
264
264
  extra_rdoc_files: []
265
265
  files:
266
- - .gitignore
267
- - .ruby-version
268
- - .travis.yml
266
+ - ".gitignore"
267
+ - ".travis.yml"
269
268
  - CHANGELOG.md
270
269
  - Gemfile
271
270
  - Guardfile
@@ -405,17 +404,17 @@ require_paths:
405
404
  - lib
406
405
  required_ruby_version: !ruby/object:Gem::Requirement
407
406
  requirements:
408
- - - '>='
407
+ - - ">="
409
408
  - !ruby/object:Gem::Version
410
409
  version: 1.9.1
411
410
  required_rubygems_version: !ruby/object:Gem::Requirement
412
411
  requirements:
413
- - - '>='
412
+ - - ">="
414
413
  - !ruby/object:Gem::Version
415
414
  version: '0'
416
415
  requirements: []
417
416
  rubyforge_project:
418
- rubygems_version: 2.0.14
417
+ rubygems_version: 2.2.2
419
418
  signing_key:
420
419
  specification_version: 4
421
420
  summary: A reliable Chef API client with a clean syntax
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.0.0-p353