kitchen-inspector 1.2.0 → 1.3.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: 68e23844d77116a23b08ba739b8ed04569aaa82f
4
- data.tar.gz: a5e820d914562944de16eaf98053fa9dee7051e0
3
+ metadata.gz: e6dbcedbaee8a4996d2ddd5e5dda388f57800210
4
+ data.tar.gz: 93362be6cd8fd49bae1d912c7fd7e7930b3f6744
5
5
  SHA512:
6
- metadata.gz: 154b8702208b8d647427e985a7c26674180663b82cfd6656b2fb2c71072b9e5d54eae281ac48617caa8c475d16c2a3d6f0f5d30394aa2a68272363d21e3e2d2d
7
- data.tar.gz: 498cbbc3e0cfc33836211b7e7d16849ec6b42676ff1c995ddef4f27b7f85a109d357807051ba710146f857a750cf36bcda16592c016ed904f8042d6a40a8e98e
6
+ metadata.gz: 42367fc54c0a63c22bcf745a348c837e0d70824e1027dd5134390a75827138aea8eebea0a6b385e1ee49e0de015d671cdfa0f7db5f70ec697f6bffb1e1bcb58a
7
+ data.tar.gz: 8eabed529d5f5338debfc04ab0a6b7d90a66068cf13dc0974a3fab0961389b60933782f9f70722af4641bfe204bf74ff1d733e2e922d1a889c0d4a96e97451f3
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.1
3
4
  - 2.0.0
4
5
  - 1.9.3
5
- - 1.9.2
6
6
  script: bundle exec rspec spec
7
7
  env:
8
8
  global:
@@ -1,6 +1,20 @@
1
1
  Changes
2
2
  ==
3
3
 
4
+ 14 Mar 2014 (1.3.0)
5
+ --
6
+
7
+ Maintenance release that updates dependencies and **drops support for Ruby 1.9.2**.
8
+
9
+ As a result, less dependencies are now required.
10
+
11
+ CHANGES:
12
+
13
+ * Drop support for 1.9.2
14
+ * Add official support for 2.1.1
15
+ * Update dependencies (i.e., httparty)
16
+ * Remove some dependencies (i.e., Berkshelf & googl)
17
+
4
18
  12 Feb 2014 (1.2.0)
5
19
  --
6
20
 
data/README.md CHANGED
@@ -313,7 +313,7 @@ $ rake test
313
313
 
314
314
  Author:: Stefano Tortarolo (stefano.tortarolo@gmail.com)
315
315
 
316
- Copyright:: Copyright (c) 2013
316
+ Copyright:: Copyright (c) 2013-2014
317
317
  License:: MIT License
318
318
 
319
319
  ## CREDITS
@@ -40,11 +40,10 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency "octokit", "~> 2.6"
41
41
 
42
42
  spec.add_dependency "solve", "~> 0.8.0"
43
- spec.add_dependency "berkshelf", "~> 2.0.10"
43
+ spec.add_dependency "ridley", "~> 2.5.1"
44
44
  spec.add_dependency "thor", "~> 0.18.0"
45
45
  spec.add_dependency "terminal-table", "~> 1.4.5"
46
46
  spec.add_dependency "colorize", "~> 0.6.0"
47
- spec.add_dependency "httparty", "~> 0.10.0"
48
- spec.add_dependency "googl", "~> 0.6.3"
47
+ spec.add_dependency "httparty", "~> 0.13"
49
48
  spec.add_dependency "chef", ">= 11.0.0"
50
49
  end
@@ -24,15 +24,15 @@
24
24
  #
25
25
 
26
26
  require 'chef/rest'
27
- require 'berkshelf'
28
27
  require 'colorize'
29
28
  require 'ridley'
30
29
  require 'terminal-table'
31
30
  require 'thor'
32
- require 'googl'
33
31
 
34
32
  require 'kitchen-inspector/inspector/common'
35
33
  require 'kitchen-inspector/inspector/mixin/utils'
34
+ require 'kitchen-inspector/inspector/mixin/dynamic_loadable'
35
+ require 'kitchen-inspector/inspector/mixin/net_utils'
36
36
  require 'kitchen-inspector/inspector/cli'
37
37
 
38
38
  require 'kitchen-inspector/inspector/models/dependency'
@@ -0,0 +1,34 @@
1
+ #
2
+ # Copyright (c) 2014 Stefano Tortarolo <stefano.tortarolo@gmail.com>
3
+ #
4
+ # MIT License
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining
7
+ # a copy of this software and associated documentation files (the
8
+ # "Software"), to deal in the Software without restriction, including
9
+ # without limitation the rights to use, copy, modify, merge, publish,
10
+ # distribute, sublicense, and/or sell copies of the Software, and to
11
+ # permit persons to whom the Software is furnished to do so, subject to
12
+ # the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be
15
+ # included in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+ #
25
+
26
+ module KitchenInspector
27
+ module Inspector
28
+ module DynamicLoadable
29
+ def load_class
30
+ self.split('::').inject(Object) { |memo, name| memo.const_get(name) }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,46 @@
1
+ #
2
+ # Copyright (c) 2014 Stefano Tortarolo <stefano.tortarolo@gmail.com>
3
+ #
4
+ # MIT License
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining
7
+ # a copy of this software and associated documentation files (the
8
+ # "Software"), to deal in the Software without restriction, including
9
+ # without limitation the rights to use, copy, modify, merge, publish,
10
+ # distribute, sublicense, and/or sell copies of the Software, and to
11
+ # permit persons to whom the Software is furnished to do so, subject to
12
+ # the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be
15
+ # included in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+ #
25
+
26
+ module KitchenInspector
27
+ module Inspector
28
+ module NetUtils
29
+ SHORTENER_API_URL = "https://www.googleapis.com/urlshortener/v1/url"
30
+
31
+ def shorten_url(url)
32
+ response = HTTParty.post(SHORTENER_API_URL,
33
+ :body => {'longUrl' => url}.to_json,
34
+ :headers => {'Content-Type' => 'application/json'})
35
+
36
+ if response.code == 200
37
+ response['id']
38
+ else
39
+ "Short url N/A"
40
+ end
41
+ end
42
+
43
+ module_function :shorten_url
44
+ end
45
+ end
46
+ end
@@ -33,7 +33,9 @@ module KitchenInspector
33
33
  def initialize(config)
34
34
  begin
35
35
  require "kitchen-inspector/inspector/repository_managers/#{config[:type].downcase}"
36
- manager_cls = "KitchenInspector::Inspector::#{config[:type]}Manager".constantize
36
+ manager = "KitchenInspector::Inspector::#{config[:type]}Manager"
37
+ manager.extend(KitchenInspector::Inspector::DynamicLoadable)
38
+ manager_cls = manager.load_class
37
39
  rescue LoadError, NameError => e
38
40
  raise RepositoryManagerError, "Repository Manager '#{config[:type]}' not supported."
39
41
  end
@@ -102,7 +102,7 @@ module KitchenInspector
102
102
 
103
103
  @changelogs_cache[cache_key] ||=
104
104
  begin
105
- Googl.shorten("#{project_url}/compare/#{revId}...#{otherRevId}").short_url.gsub(/^http:\/\//, '')
105
+ NetUtils.shorten_url("#{project_url}/compare/#{revId}...#{otherRevId}").gsub(/^http:\/\//, '')
106
106
  end
107
107
  end
108
108
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 Stefano Tortarolo <stefano.tortarolo@gmail.com>
2
+ # Copyright (c) 2013-2014 Stefano Tortarolo <stefano.tortarolo@gmail.com>
3
3
  #
4
4
  # MIT License
5
5
  #
@@ -24,6 +24,6 @@
24
24
  #
25
25
  module KitchenInspector
26
26
  module Inspector
27
- VERSION = '1.2.0'
27
+ VERSION = '1.3.0'
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,237 +1,223 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-inspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Tortarolo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.14'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: chef-zero
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: gitlab
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '3.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '3.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: octokit
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '2.6'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '2.6'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: solve
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: 0.8.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.8.0
139
139
  - !ruby/object:Gem::Dependency
140
- name: berkshelf
140
+ name: ridley
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 2.0.10
145
+ version: 2.5.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 2.0.10
152
+ version: 2.5.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: thor
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: 0.18.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: 0.18.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: terminal-table
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: 1.4.5
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.4.5
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: colorize
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: 0.6.0
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ~>
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 0.6.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: httparty
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 0.10.0
201
+ version: '0.13'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ~>
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 0.10.0
209
- - !ruby/object:Gem::Dependency
210
- name: googl
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ~>
214
- - !ruby/object:Gem::Version
215
- version: 0.6.3
216
- type: :runtime
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ~>
221
- - !ruby/object:Gem::Version
222
- version: 0.6.3
208
+ version: '0.13'
223
209
  - !ruby/object:Gem::Dependency
224
210
  name: chef
225
211
  requirement: !ruby/object:Gem::Requirement
226
212
  requirements:
227
- - - '>='
213
+ - - ">="
228
214
  - !ruby/object:Gem::Version
229
215
  version: 11.0.0
230
216
  type: :runtime
231
217
  prerelease: false
232
218
  version_requirements: !ruby/object:Gem::Requirement
233
219
  requirements:
234
- - - '>='
220
+ - - ">="
235
221
  - !ruby/object:Gem::Version
236
222
  version: 11.0.0
237
223
  description: Given a Chef cookbook, verifies its dependencies against a Chef Server
@@ -243,8 +229,8 @@ executables:
243
229
  extensions: []
244
230
  extra_rdoc_files: []
245
231
  files:
246
- - .gitignore
247
- - .travis.yml
232
+ - ".gitignore"
233
+ - ".travis.yml"
248
234
  - CHANGELOG.md
249
235
  - Gemfile
250
236
  - LICENSE
@@ -257,6 +243,8 @@ files:
257
243
  - lib/kitchen-inspector/inspector/cli.rb
258
244
  - lib/kitchen-inspector/inspector/common.rb
259
245
  - lib/kitchen-inspector/inspector/health_bureau.rb
246
+ - lib/kitchen-inspector/inspector/mixin/dynamic_loadable.rb
247
+ - lib/kitchen-inspector/inspector/mixin/net_utils.rb
260
248
  - lib/kitchen-inspector/inspector/mixin/utils.rb
261
249
  - lib/kitchen-inspector/inspector/models/dependency.rb
262
250
  - lib/kitchen-inspector/inspector/models/repo_cookbook.rb
@@ -289,17 +277,17 @@ require_paths:
289
277
  - lib
290
278
  required_ruby_version: !ruby/object:Gem::Requirement
291
279
  requirements:
292
- - - '>='
280
+ - - ">="
293
281
  - !ruby/object:Gem::Version
294
282
  version: '0'
295
283
  required_rubygems_version: !ruby/object:Gem::Requirement
296
284
  requirements:
297
- - - '>='
285
+ - - ">="
298
286
  - !ruby/object:Gem::Version
299
287
  version: '0'
300
288
  requirements: []
301
289
  rubyforge_project:
302
- rubygems_version: 2.1.11
290
+ rubygems_version: 2.2.2
303
291
  signing_key:
304
292
  specification_version: 4
305
293
  summary: Kitchen integrity checker
@@ -316,4 +304,3 @@ test_files:
316
304
  - spec/report_spec.rb
317
305
  - spec/support/spec_helper.rb
318
306
  - spec/utils_spec.rb
319
- has_rdoc: