cartage-rack 2.2 → 2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'minitest_config'
3
+ require "minitest_helper"
4
4
 
5
5
  describe Cartage::Rack::Simple do
6
6
  include Rack::Test::Methods
7
7
 
8
8
  let(:app) { Cartage::Rack::Simple(path) }
9
- let(:path) { 'test/hillvalley' }
9
+ let(:path) { "test/hillvalley" }
10
10
  let(:metadata) {
11
11
  {
12
- 'env' => { 'name' => 'production' },
13
- 'package' => {
14
- 'name' => 'hillvalley',
15
- 'repo' => {
16
- 'type' => 'git',
17
- 'url' => 'git:doc@hillvalley.com/delorean.git'
12
+ "env" => {"name" => "production"},
13
+ "package" => {
14
+ "name" => "hillvalley",
15
+ "repo" => {
16
+ "type" => "git",
17
+ "url" => "git:doc@hillvalley.com/delorean.git"
18
18
  },
19
- 'hashref' => 'd0cb1ff',
20
- 'timestamp' => '19851027104200'
19
+ "hashref" => "d0cb1ff",
20
+ "timestamp" => "19851027104200"
21
21
  }
22
22
  }
23
23
  }
@@ -32,7 +32,7 @@ describe Cartage::Rack::Simple do
32
32
  end
33
33
  end
34
34
 
35
- it 'warns when Cartage::Rack.mount(path) is used' do
35
+ it "warns when Cartage::Rack.mount(path) is used" do
36
36
  $VERBOSE, verbose = false, $VERBOSE
37
37
  assert_output nil, /Cartage::Rack.mount\(path\) is deprecated/ do
38
38
  Cartage::Rack.mount
@@ -40,78 +40,78 @@ describe Cartage::Rack::Simple do
40
40
  end
41
41
  end
42
42
 
43
- it 'inspects nicely for `rake routes` in Rails' do
44
- assert_equal 'Cartage::Rack::Simple for hillvalley (release_metadata_json)',
43
+ it "inspects nicely for `rake routes` in Rails" do
44
+ assert_equal "Cartage::Rack::Simple for hillvalley (release_metadata_json)",
45
45
  Cartage::Rack::Simple().inspect
46
46
  end
47
47
 
48
- it 'returns text/plain content by default' do
49
- get '/'
50
- assert_equal 'text/plain', last_response.header['Content-Type']
48
+ it "returns text/plain content by default" do
49
+ get "/"
50
+ assert_equal "text/plain", last_response.headers["Content-Type"]
51
51
  end
52
52
 
53
- it 'returns application/json content when requested' do
54
- get '/.json'
55
- assert_equal 'application/json', last_response.header['Content-Type']
53
+ it "returns application/json content when requested" do
54
+ get "/.json"
55
+ assert_equal "application/json", last_response.headers["Content-Type"]
56
56
  end
57
57
 
58
- context 'application environment' do
59
- it 'uses $RAILS_ENV first' do
60
- stub_env 'RAILS_ENV' => 'vne_sliar',
61
- 'APP_ENV' => 'vne_ppa',
62
- 'RACK_ENV' => 'vne_kcar' do
63
- get '/'
58
+ describe "application environment" do
59
+ it "uses $RAILS_ENV first" do
60
+ stub_env "RAILS_ENV" => "vne_sliar",
61
+ "APP_ENV" => "vne_ppa",
62
+ "RACK_ENV" => "vne_kcar" do
63
+ get "/"
64
64
 
65
65
  assert last_response.ok?
66
- assert_equal 'vne_sliar: d0cb1ff (19851027104200)', last_response.body
67
- assert_equal 'text/plain', last_response.header['Content-Type']
66
+ assert_equal "vne_sliar: d0cb1ff (19851027104200)", last_response.body
67
+ assert_equal "text/plain", last_response.headers["Content-Type"]
68
68
  end
69
69
  end
70
70
 
71
- it 'uses $APP_ENV second' do
72
- stub_env 'RAILS_ENV' => nil, 'APP_ENV' => 'vne_ppa', 'RACK_ENV' => 'vne_kcar' do
73
- get '/'
71
+ it "uses $APP_ENV second" do
72
+ stub_env "RAILS_ENV" => nil, "APP_ENV" => "vne_ppa", "RACK_ENV" => "vne_kcar" do
73
+ get "/"
74
74
 
75
75
  assert last_response.ok?
76
- assert_equal 'vne_ppa: d0cb1ff (19851027104200)', last_response.body
77
- assert_equal 'text/plain', last_response.header['Content-Type']
76
+ assert_equal "vne_ppa: d0cb1ff (19851027104200)", last_response.body
77
+ assert_equal "text/plain", last_response.headers["Content-Type"]
78
78
  end
79
79
  end
80
80
 
81
- it 'uses $RACK_ENV third' do
82
- stub_env 'RAILS_ENV' => nil, 'APP_ENV' => nil, 'RACK_ENV' => 'vne_kcar' do
83
- get '/'
81
+ it "uses $RACK_ENV third" do
82
+ stub_env "RAILS_ENV" => nil, "APP_ENV" => nil, "RACK_ENV" => "vne_kcar" do
83
+ get "/"
84
84
 
85
85
  assert last_response.ok?
86
- assert_equal 'vne_kcar: d0cb1ff (19851027104200)', last_response.body
87
- assert_equal 'text/plain', last_response.header['Content-Type']
86
+ assert_equal "vne_kcar: d0cb1ff (19851027104200)", last_response.body
87
+ assert_equal "text/plain", last_response.headers["Content-Type"]
88
88
  end
89
89
  end
90
90
 
91
- it 'falls through to UNKNOWN without either $RAILS_ENV, $APP_ENV or $RACK_ENV' do
92
- stub_env 'RAILS_ENV' => nil, 'APP_ENV' => nil, 'RACK_ENV' => nil do
93
- get '/'
91
+ it "falls through to UNKNOWN without either $RAILS_ENV, $APP_ENV or $RACK_ENV" do
92
+ stub_env "RAILS_ENV" => nil, "APP_ENV" => nil, "RACK_ENV" => nil do
93
+ get "/"
94
94
 
95
95
  assert last_response.ok?
96
- assert_equal 'UNKNOWN: d0cb1ff (19851027104200)', last_response.body
97
- assert_equal 'text/plain', last_response.header['Content-Type']
96
+ assert_equal "UNKNOWN: d0cb1ff (19851027104200)", last_response.body
97
+ assert_equal "text/plain", last_response.headers["Content-Type"]
98
98
  end
99
99
  end
100
100
  end
101
101
 
102
- context 'timestamp' do
102
+ describe "timestamp" do
103
103
  around do |&block|
104
- metadata['package'].delete('timestamp')
104
+ metadata["package"].delete("timestamp")
105
105
  super(&block)
106
106
  end
107
107
 
108
- it 'is omitted if not present in the metadata' do
109
- stub_env 'RAILS_ENV' => nil, 'RACK_ENV' => nil do
110
- get '/'
108
+ it "is omitted if not present in the metadata" do
109
+ stub_env "RAILS_ENV" => nil, "RACK_ENV" => nil do
110
+ get "/"
111
111
 
112
112
  assert last_response.ok?
113
- assert_equal 'UNKNOWN: d0cb1ff', last_response.body
114
- assert_equal 'text/plain', last_response.header['Content-Type']
113
+ assert_equal "UNKNOWN: d0cb1ff", last_response.body
114
+ assert_equal "text/plain", last_response.headers["Content-Type"]
115
115
  end
116
116
  end
117
117
  end
metadata CHANGED
@@ -1,73 +1,74 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartage-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: '2.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Ziegler
8
- autorequire:
8
+ - Kinetic Commerce
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-03-23 00:00:00.000000000 Z
12
+ date: 2022-12-16 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: minitest
15
+ name: appraisal
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: '5.11'
20
+ version: '2.4'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - "~>"
25
26
  - !ruby/object:Gem::Version
26
- version: '5.11'
27
+ version: '2.4'
27
28
  - !ruby/object:Gem::Dependency
28
- name: rake
29
+ name: hoe-doofus
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ">="
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: '10.0'
34
+ version: '1.0'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - ">="
39
+ - - "~>"
39
40
  - !ruby/object:Gem::Version
40
- version: '10.0'
41
+ version: '1.0'
41
42
  - !ruby/object:Gem::Dependency
42
- name: rdoc
43
+ name: hoe-gemspec2
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
46
  - - "~>"
46
47
  - !ruby/object:Gem::Version
47
- version: '4.2'
48
+ version: '1.1'
48
49
  type: :development
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
53
  - - "~>"
53
54
  - !ruby/object:Gem::Version
54
- version: '4.2'
55
+ version: '1.1'
55
56
  - !ruby/object:Gem::Dependency
56
- name: rack-test
57
+ name: hoe-git2
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
60
  - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: '0.6'
62
+ version: '1.7'
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: '0.6'
69
+ version: '1.7'
69
70
  - !ruby/object:Gem::Dependency
70
- name: hoe-doofus
71
+ name: hoe-rubygems
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - "~>"
@@ -81,35 +82,35 @@ dependencies:
81
82
  - !ruby/object:Gem::Version
82
83
  version: '1.0'
83
84
  - !ruby/object:Gem::Dependency
84
- name: hoe-gemspec2
85
+ name: minitest
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - "~>"
88
89
  - !ruby/object:Gem::Version
89
- version: '1.1'
90
+ version: '5.16'
90
91
  type: :development
91
92
  prerelease: false
92
93
  version_requirements: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - "~>"
95
96
  - !ruby/object:Gem::Version
96
- version: '1.1'
97
+ version: '5.16'
97
98
  - !ruby/object:Gem::Dependency
98
- name: hoe-git
99
+ name: minitest-autotest
99
100
  requirement: !ruby/object:Gem::Requirement
100
101
  requirements:
101
102
  - - "~>"
102
103
  - !ruby/object:Gem::Version
103
- version: '1.5'
104
+ version: '1.0'
104
105
  type: :development
105
106
  prerelease: false
106
107
  version_requirements: !ruby/object:Gem::Requirement
107
108
  requirements:
108
109
  - - "~>"
109
110
  - !ruby/object:Gem::Version
110
- version: '1.5'
111
+ version: '1.0'
111
112
  - !ruby/object:Gem::Dependency
112
- name: hoe-travis
113
+ name: minitest-bisect
113
114
  requirement: !ruby/object:Gem::Requirement
114
115
  requirements:
115
116
  - - "~>"
@@ -123,156 +124,182 @@ dependencies:
123
124
  - !ruby/object:Gem::Version
124
125
  version: '1.2'
125
126
  - !ruby/object:Gem::Dependency
126
- name: minitest-autotest
127
+ name: minitest-focus
127
128
  requirement: !ruby/object:Gem::Requirement
128
129
  requirements:
129
130
  - - "~>"
130
131
  - !ruby/object:Gem::Version
131
- version: '1.0'
132
+ version: '1.1'
132
133
  type: :development
133
134
  prerelease: false
134
135
  version_requirements: !ruby/object:Gem::Requirement
135
136
  requirements:
136
137
  - - "~>"
137
138
  - !ruby/object:Gem::Version
138
- version: '1.0'
139
+ version: '1.1'
139
140
  - !ruby/object:Gem::Dependency
140
- name: minitest-bisect
141
+ name: minitest-hooks
141
142
  requirement: !ruby/object:Gem::Requirement
142
143
  requirements:
143
144
  - - "~>"
144
145
  - !ruby/object:Gem::Version
145
- version: '1.2'
146
+ version: '1.4'
146
147
  type: :development
147
148
  prerelease: false
148
149
  version_requirements: !ruby/object:Gem::Requirement
149
150
  requirements:
150
151
  - - "~>"
151
152
  - !ruby/object:Gem::Version
152
- version: '1.2'
153
+ version: '1.4'
153
154
  - !ruby/object:Gem::Dependency
154
- name: minitest-bonus-assertions
155
+ name: minitest-moar
155
156
  requirement: !ruby/object:Gem::Requirement
156
157
  requirements:
157
158
  - - "~>"
158
159
  - !ruby/object:Gem::Version
159
- version: '2.0'
160
+ version: '0.0'
160
161
  type: :development
161
162
  prerelease: false
162
163
  version_requirements: !ruby/object:Gem::Requirement
163
164
  requirements:
164
165
  - - "~>"
165
166
  - !ruby/object:Gem::Version
166
- version: '2.0'
167
+ version: '0.0'
167
168
  - !ruby/object:Gem::Dependency
168
- name: minitest-focus
169
+ name: minitest-pretty_diff
169
170
  requirement: !ruby/object:Gem::Requirement
170
171
  requirements:
171
172
  - - "~>"
172
173
  - !ruby/object:Gem::Version
173
- version: '1.1'
174
+ version: '0.1'
174
175
  type: :development
175
176
  prerelease: false
176
177
  version_requirements: !ruby/object:Gem::Requirement
177
178
  requirements:
178
179
  - - "~>"
179
180
  - !ruby/object:Gem::Version
180
- version: '1.1'
181
+ version: '0.1'
181
182
  - !ruby/object:Gem::Dependency
182
- name: minitest-hooks
183
+ name: rack-test
183
184
  requirement: !ruby/object:Gem::Requirement
184
185
  requirements:
185
186
  - - "~>"
186
187
  - !ruby/object:Gem::Version
187
- version: '1.4'
188
+ version: '2.0'
188
189
  type: :development
189
190
  prerelease: false
190
191
  version_requirements: !ruby/object:Gem::Requirement
191
192
  requirements:
192
193
  - - "~>"
193
194
  - !ruby/object:Gem::Version
194
- version: '1.4'
195
+ version: '2.0'
195
196
  - !ruby/object:Gem::Dependency
196
- name: minitest-moar
197
+ name: rake
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '10.0'
203
+ - - "<"
204
+ - !ruby/object:Gem::Version
205
+ version: '14'
206
+ type: :development
207
+ prerelease: false
208
+ version_requirements: !ruby/object:Gem::Requirement
209
+ requirements:
210
+ - - ">="
211
+ - !ruby/object:Gem::Version
212
+ version: '10.0'
213
+ - - "<"
214
+ - !ruby/object:Gem::Version
215
+ version: '14'
216
+ - !ruby/object:Gem::Dependency
217
+ name: rdoc
197
218
  requirement: !ruby/object:Gem::Requirement
198
219
  requirements:
199
220
  - - "~>"
200
221
  - !ruby/object:Gem::Version
201
- version: '0.0'
222
+ version: '6.4'
202
223
  type: :development
203
224
  prerelease: false
204
225
  version_requirements: !ruby/object:Gem::Requirement
205
226
  requirements:
206
227
  - - "~>"
207
228
  - !ruby/object:Gem::Version
208
- version: '0.0'
229
+ version: '6.4'
209
230
  - !ruby/object:Gem::Dependency
210
- name: minitest-pretty_diff
231
+ name: simplecov
211
232
  requirement: !ruby/object:Gem::Requirement
212
233
  requirements:
213
234
  - - "~>"
214
235
  - !ruby/object:Gem::Version
215
- version: '0.1'
236
+ version: '0.7'
216
237
  type: :development
217
238
  prerelease: false
218
239
  version_requirements: !ruby/object:Gem::Requirement
219
240
  requirements:
220
241
  - - "~>"
221
242
  - !ruby/object:Gem::Version
222
- version: '0.1'
243
+ version: '0.7'
223
244
  - !ruby/object:Gem::Dependency
224
- name: timecop
245
+ name: standard
225
246
  requirement: !ruby/object:Gem::Requirement
226
247
  requirements:
227
248
  - - "~>"
228
249
  - !ruby/object:Gem::Version
229
- version: '0.8'
250
+ version: '1.0'
230
251
  type: :development
231
252
  prerelease: false
232
253
  version_requirements: !ruby/object:Gem::Requirement
233
254
  requirements:
234
255
  - - "~>"
235
256
  - !ruby/object:Gem::Version
236
- version: '0.8'
257
+ version: '1.0'
237
258
  - !ruby/object:Gem::Dependency
238
- name: simplecov
259
+ name: timecop
239
260
  requirement: !ruby/object:Gem::Requirement
240
261
  requirements:
241
262
  - - "~>"
242
263
  - !ruby/object:Gem::Version
243
- version: '0.7'
264
+ version: '0.8'
244
265
  type: :development
245
266
  prerelease: false
246
267
  version_requirements: !ruby/object:Gem::Requirement
247
268
  requirements:
248
269
  - - "~>"
249
270
  - !ruby/object:Gem::Version
250
- version: '0.7'
271
+ version: '0.8'
251
272
  - !ruby/object:Gem::Dependency
252
273
  name: hoe
253
274
  requirement: !ruby/object:Gem::Requirement
254
275
  requirements:
255
276
  - - "~>"
256
277
  - !ruby/object:Gem::Version
257
- version: '3.16'
278
+ version: '3.26'
258
279
  type: :development
259
280
  prerelease: false
260
281
  version_requirements: !ruby/object:Gem::Requirement
261
282
  requirements:
262
283
  - - "~>"
263
284
  - !ruby/object:Gem::Version
264
- version: '3.16'
285
+ version: '3.26'
265
286
  description: |-
266
- cartage-rack is a plug-in for {cartage}[https://github.com/KineticCafe/cartage]
267
- to provide a Rack application that reports on release metadata.
287
+ This release is the *last* version of cartage-rack. It will be replaced with
288
+ a different tool in the future, but this release will allow installation in
289
+ modern Ruby versions.
290
+
291
+ cartage-rack is a plug-in for
292
+ {cartage}[https://github.com/KineticCafe/cartage] to provide a Rack
293
+ application that reports on release metadata.
268
294
 
269
- Cartage provides a repeatable means to create a package for a Rails application
270
- that can be used in deployment with a configuration tool like Ansible, Chef,
271
- Puppet, or Salt. The package is created with its dependencies bundled in
272
- +vendor/bundle+, so it can be deployed in environments with strict access
273
- control rules and without requiring development tool access.
295
+ Cartage provides a repeatable means to create a package for a Rails
296
+ application that can be used in deployment with a configuration tool like
297
+ Ansible, Chef, Puppet, or Salt. The package is created with its dependencies
298
+ bundled in +vendor/bundle+, so it can be deployed in environments with strict
299
+ access control rules and without requiring development tool access.
274
300
  email:
275
- - aziegler@kineticcafe.com
301
+ - aziegler@kineticcommerce.com
302
+ - dev@kineticcommerce.com
276
303
  executables: []
277
304
  extensions: []
278
305
  extra_rdoc_files:
@@ -291,15 +318,17 @@ files:
291
318
  - lib/cartage/rack.rb
292
319
  - lib/cartage/rack/metadata.rb
293
320
  - lib/cartage/rack/simple.rb
294
- - test/minitest_config.rb
321
+ - test/minitest_helper.rb
295
322
  - test/test_cartage_rack.rb
296
323
  - test/test_cartage_rack_metadata.rb
297
324
  - test/test_cartage_rack_simple.rb
298
325
  homepage: https://github.com/KineticCafe/cartage-rack/
299
326
  licenses:
300
327
  - MIT
301
- metadata: {}
302
- post_install_message:
328
+ metadata:
329
+ source_code_uri: https://github.com/KineticCafe/cartage-rack/
330
+ rubygems_mfa_required: 'true'
331
+ post_install_message:
303
332
  rdoc_options:
304
333
  - "--main"
305
334
  - README.rdoc
@@ -307,19 +336,20 @@ require_paths:
307
336
  - lib
308
337
  required_ruby_version: !ruby/object:Gem::Requirement
309
338
  requirements:
310
- - - "~>"
339
+ - - ">="
340
+ - !ruby/object:Gem::Version
341
+ version: '2.7'
342
+ - - "<"
311
343
  - !ruby/object:Gem::Version
312
- version: '2.0'
344
+ version: '4'
313
345
  required_rubygems_version: !ruby/object:Gem::Requirement
314
346
  requirements:
315
347
  - - ">="
316
348
  - !ruby/object:Gem::Version
317
349
  version: '0'
318
350
  requirements: []
319
- rubyforge_project:
320
- rubygems_version: 2.6.14
321
- signing_key:
351
+ rubygems_version: 3.3.26
352
+ signing_key:
322
353
  specification_version: 4
323
- summary: cartage-rack is a plug-in for {cartage}[https://github.com/KineticCafe/cartage]
324
- to provide a Rack application that reports on release metadata
354
+ summary: This release is the *last* version of cartage-rack
325
355
  test_files: []