r10k 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,21 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 1.3.5
5
+ -----
6
+
7
+ 2014/11/13
8
+
9
+ ### User notes
10
+
11
+ (GH-212) Force use of json_pure on Ruby 1.8.7
12
+
13
+ Ruby 1.8.7 does not ship with a JSON library, so r10k has depended on json_pure
14
+ to ensure that there's always a JSON library available. However there is a quirk
15
+ in multi_json in how it probes for JSON implementations and may load the wrong
16
+ gem, which percolates up and breaks the JSON parsing code used when querying for
17
+ forge module versions. To resolve this, json_pure is always used on ruby 1.8.7.
18
+
4
19
  1.3.4
5
20
  -----
6
21
 
@@ -8,7 +23,6 @@ CHANGELOG
8
23
 
9
24
  This bugfix release incorporates all fixes added in 1.2.4.
10
25
 
11
-
12
26
  1.3.3
13
27
  -----
14
28
 
@@ -18,18 +18,7 @@ class R10K::ModuleRepository::Forge
18
18
 
19
19
  def initialize(forge = 'forge.puppetlabs.com')
20
20
  @forge = forge
21
-
22
- @conn = Faraday.new(
23
- :url => "https://#{@forge}",
24
- :user_agent => "Ruby/r10k #{R10K::VERSION}"
25
- ) do |builder|
26
- builder.request :multi_json
27
- builder.response :multi_json
28
-
29
- # This needs to be _after_ request/response configuration for testing
30
- # purposes. This comment is the result of much consternation.
31
- builder.adapter Faraday.default_adapter
32
- end
21
+ @conn = make_conn
33
22
  end
34
23
 
35
24
  # Query for all published versions of a module
@@ -43,7 +32,6 @@ class R10K::ModuleRepository::Forge
43
32
  # @return [Array<String>] All published versions of the given module
44
33
  def versions(module_name)
45
34
  response = @conn.get("/api/v1/releases.json", {'module' => module_name})
46
-
47
35
  response.body[module_name].map do |version_info|
48
36
  version_info['version']
49
37
  end
@@ -61,4 +49,23 @@ class R10K::ModuleRepository::Forge
61
49
  def latest_version(module_name)
62
50
  versions(module_name).last
63
51
  end
52
+
53
+ private
54
+
55
+ def make_conn
56
+ # Force use of json_pure with multi_json on Ruby 1.8.7
57
+ multi_json_opts = (RUBY_VERSION == "1.8.7" ? {:adapter => :json_pure} : {})
58
+
59
+ Faraday.new(
60
+ :url => "https://#{@forge}",
61
+ :user_agent => "Ruby/r10k #{R10K::VERSION}"
62
+ ) do |builder|
63
+ builder.request(:multi_json, multi_json_opts)
64
+ builder.response(:multi_json, multi_json_opts)
65
+
66
+ # This needs to be _after_ request/response configuration for testing
67
+ # purposes. Without this ordering the tests get badly mangled.
68
+ builder.adapter(Faraday.default_adapter)
69
+ end
70
+ end
64
71
  end
@@ -1,3 +1,3 @@
1
1
  module R10K
2
- VERSION = '1.3.4'
2
+ VERSION = '1.3.5'
3
3
  end
@@ -14,7 +14,7 @@ describe R10K::ModuleRepository::Forge do
14
14
  expect(forge.forge).to eq 'forge.example.local'
15
15
  end
16
16
 
17
- describe "and the expected version is :latest", :vcr => true, :unless => (RUBY_VERSION == '1.8.7') do
17
+ describe "and the expected version is :latest", :vcr => true do
18
18
  subject(:forge) { described_class.new }
19
19
 
20
20
  before do
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Adrien Thebo
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-09-15 00:00:00.000000000 Z
12
+ date: 2014-11-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: colored
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: cri
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: systemu
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: log4r
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: multi_json
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ~>
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ~>
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: json_pure
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: faraday
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ~>
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ~>
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: faraday_middleware
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: faraday_middleware-multi_json
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ~>
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ~>
137
156
  - !ruby/object:Gem::Version
@@ -139,6 +158,7 @@ dependencies:
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: rspec
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
163
  - - ~>
144
164
  - !ruby/object:Gem::Version
@@ -146,6 +166,7 @@ dependencies:
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
171
  - - ~>
151
172
  - !ruby/object:Gem::Version
@@ -153,6 +174,7 @@ dependencies:
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: vcr
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
179
  - - ~>
158
180
  - !ruby/object:Gem::Version
@@ -160,6 +182,7 @@ dependencies:
160
182
  type: :development
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
187
  - - ~>
165
188
  - !ruby/object:Gem::Version
@@ -167,6 +190,7 @@ dependencies:
167
190
  - !ruby/object:Gem::Dependency
168
191
  name: yard
169
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
170
194
  requirements:
171
195
  - - ~>
172
196
  - !ruby/object:Gem::Version
@@ -174,6 +198,7 @@ dependencies:
174
198
  type: :development
175
199
  prerelease: false
176
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
177
202
  requirements:
178
203
  - - ~>
179
204
  - !ruby/object:Gem::Version
@@ -338,7 +363,6 @@ files:
338
363
  homepage: http://github.com/adrienthebo/r10k
339
364
  licenses:
340
365
  - Apache 2.0
341
- metadata: {}
342
366
  post_install_message: ! 'NOTICE
343
367
 
344
368
  ======
@@ -378,20 +402,22 @@ rdoc_options: []
378
402
  require_paths:
379
403
  - lib
380
404
  required_ruby_version: !ruby/object:Gem::Requirement
405
+ none: false
381
406
  requirements:
382
407
  - - ! '>='
383
408
  - !ruby/object:Gem::Version
384
409
  version: '0'
385
410
  required_rubygems_version: !ruby/object:Gem::Requirement
411
+ none: false
386
412
  requirements:
387
413
  - - ! '>='
388
414
  - !ruby/object:Gem::Version
389
415
  version: '0'
390
416
  requirements: []
391
417
  rubyforge_project:
392
- rubygems_version: 2.2.1
418
+ rubygems_version: 1.8.23.2
393
419
  signing_key:
394
- specification_version: 4
420
+ specification_version: 3
395
421
  summary: Puppet environment and module deployment
396
422
  test_files:
397
423
  - spec/system/version_spec.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODg0NmZiY2U5NjA3YmU3MjcyYjcwYjAzNGNmMjRjZDA3NTA2MWRjNA==
5
- data.tar.gz: !binary |-
6
- M2U1MWQxNDI0MGE2NThlYzUzNDg2MzM1OGNmNWZhZWU2MTI4MGY3Mw==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- Yzk0MTE4MjhlYWIwOTk1NTFhM2M0Yjg4NzJmZmM4MzQwYWRkMGE0OTdlZGMw
10
- YTE0OThhMGYwMjM4YTczNjkzZjAxZDI1YTAwZDBmZjUwMWIxZThjMmJkNWEy
11
- NmM1MzkyMDZjMTE5MjMwMjMwOThlYzlhNzc2MGJkZTlmN2E1Zjc=
12
- data.tar.gz: !binary |-
13
- YWVmYTRhODU0ZmQyYTYzOWU3ODcxYWRkZjhhYmJjNTMyZGFkNjM1NTU1NjA3
14
- MTZkNDBmNWRmMTFmYWQxMTNjZDVmYzViZDEyMGUwYWQzYzA3ZWNiYzZmZTNi
15
- NThmMjFiNTIzZTJkZWI3ZWQ3ZmE1YTE4MmUwMTg2MGQyYTM0Yjg=