aaf-gumboot 1.2.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -0
- data/aaf-gumboot.gemspec +11 -11
- data/lib/gumboot/shared_examples/api_controller.rb +3 -3
- data/lib/gumboot/strap.rb +4 -4
- data/lib/gumboot/version.rb +1 -1
- data/spec/dummy/.rubocop.yml +1 -1
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/bin/bundle +1 -1
- data/spec/dummy/bin/rails +1 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/boot.rb +2 -2
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -1
- data/spec/lib/gumboot/strap_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +34 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f6c408fe802e23bb7398729d35834e150e5a28a6143f1faf575803c321651886
|
4
|
+
data.tar.gz: 0a4e63e2d3f43f18d3ff2ec17b2b6885c5ff88a8f2d605d4b861eb0959e2e5dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15fc9d9a88af07dd164aa5213d31e9a95513aa969db8ee721939b8212f720c3b9a4f8ecf651960e970cdb4bb969ae0a873a37daecb464383788aa6d4c9e27de2
|
7
|
+
data.tar.gz: 25732e97b7610edea1fe8a08c6e7d34041da49c571c9822d2faae059f0d3c0a8afa1d665d84fce1bbd98750abb978de229dd192f43138a7b24ad2347eafd470a
|
data/Gemfile
CHANGED
data/aaf-gumboot.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'gumboot/version'
|
6
6
|
|
@@ -19,25 +19,25 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.files = `git ls-files -z`.split("\x0")
|
21
21
|
|
22
|
-
spec.add_dependency 'accession'
|
22
|
+
spec.add_dependency 'accession'
|
23
23
|
|
24
|
-
spec.add_development_dependency 'bundler'
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency 'mysql2', '~> 0.3.20'
|
27
|
-
spec.add_development_dependency 'sqlite3'
|
28
|
-
spec.add_development_dependency 'valhammer'
|
24
|
+
spec.add_development_dependency 'bundler'
|
25
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
29
26
|
spec.add_development_dependency 'factory_girl'
|
30
27
|
spec.add_development_dependency 'faker'
|
28
|
+
spec.add_development_dependency 'mysql2'
|
29
|
+
spec.add_development_dependency 'rails-controller-testing'
|
30
|
+
spec.add_development_dependency 'rake'
|
31
31
|
spec.add_development_dependency 'rspec-rails'
|
32
32
|
spec.add_development_dependency 'rubocop'
|
33
33
|
spec.add_development_dependency 'simplecov'
|
34
|
-
spec.add_development_dependency '
|
35
|
-
spec.add_development_dependency '
|
34
|
+
spec.add_development_dependency 'sqlite3'
|
35
|
+
spec.add_development_dependency 'valhammer'
|
36
36
|
|
37
37
|
spec.add_development_dependency 'guard'
|
38
|
+
spec.add_development_dependency 'guard-bundler'
|
38
39
|
spec.add_development_dependency 'guard-rspec'
|
39
40
|
spec.add_development_dependency 'guard-rubocop'
|
40
|
-
spec.add_development_dependency 'guard-bundler'
|
41
41
|
|
42
|
-
spec.add_development_dependency 'rails'
|
42
|
+
spec.add_development_dependency 'rails'
|
43
43
|
end
|
@@ -88,7 +88,7 @@ RSpec.shared_examples 'API base controller' do
|
|
88
88
|
|
89
89
|
context 'with a CN that does not represent an APISubject' do
|
90
90
|
before do
|
91
|
-
request.env['HTTP_X509_DN'] = "CN=#{Faker::Lorem.word}/" \
|
91
|
+
request.env['HTTP_X509_DN'] = "/CN=#{Faker::Lorem.word}/" \
|
92
92
|
"O=#{Faker::Lorem.word}"
|
93
93
|
get :an_action
|
94
94
|
end
|
@@ -108,7 +108,7 @@ RSpec.shared_examples 'API base controller' do
|
|
108
108
|
let(:api_subject) { create :api_subject, enabled: false }
|
109
109
|
|
110
110
|
before do
|
111
|
-
request.env['HTTP_X509_DN'] = "CN=#{api_subject.x509_cn}/" \
|
111
|
+
request.env['HTTP_X509_DN'] = "/CN=#{api_subject.x509_cn}/" \
|
112
112
|
"O=#{Faker::Lorem.word}"
|
113
113
|
get :an_action
|
114
114
|
end
|
@@ -130,7 +130,7 @@ RSpec.shared_examples 'API base controller' do
|
|
130
130
|
let(:json) { JSON.parse(response.body) }
|
131
131
|
|
132
132
|
before do
|
133
|
-
request.env['HTTP_X509_DN'] = "CN=#{api_subject.x509_cn}/DC=example"
|
133
|
+
request.env['HTTP_X509_DN'] = "/CN=#{api_subject.x509_cn}/DC=example"
|
134
134
|
end
|
135
135
|
|
136
136
|
RSpec.shared_examples 'APIController base state' do
|
data/lib/gumboot/strap.rb
CHANGED
@@ -23,8 +23,8 @@ module Gumboot
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def ensure_database(
|
27
|
-
adapter, database =
|
26
|
+
def ensure_database(dbase)
|
27
|
+
adapter, database = dbase.values_at('adapter', 'database')
|
28
28
|
raise('Only supports mysql2 adapter') unless adapter == 'mysql2'
|
29
29
|
|
30
30
|
Rails.logger.info "Ensuring database `#{database}` exists"
|
@@ -32,9 +32,9 @@ module Gumboot
|
|
32
32
|
'CHARACTER SET utf8 COLLATE utf8_bin')
|
33
33
|
end
|
34
34
|
|
35
|
-
def ensure_database_user(
|
35
|
+
def ensure_database_user(dbase)
|
36
36
|
adapter, database, username, password =
|
37
|
-
|
37
|
+
dbase.values_at('adapter', 'database', 'username', 'password')
|
38
38
|
|
39
39
|
raise('Only supports mysql2 adapter') unless adapter == 'mysql2'
|
40
40
|
|
data/lib/gumboot/version.rb
CHANGED
data/spec/dummy/.rubocop.yml
CHANGED
data/spec/dummy/Rakefile
CHANGED
data/spec/dummy/bin/bundle
CHANGED
data/spec/dummy/bin/rails
CHANGED
data/spec/dummy/config/boot.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Set up gems listed in the Gemfile.
|
4
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('
|
4
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
|
5
5
|
|
6
6
|
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
7
|
-
$LOAD_PATH.unshift File.expand_path('
|
7
|
+
$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
|
@@ -336,7 +336,7 @@ RSpec.describe Gumboot::Strap do
|
|
336
336
|
end
|
337
337
|
end
|
338
338
|
|
339
|
-
def create_db_query(
|
340
|
-
"CREATE DATABASE IF NOT EXISTS `#{
|
339
|
+
def create_db_query(dbs)
|
340
|
+
"CREATE DATABASE IF NOT EXISTS `#{dbs}` CHARACTER SET utf8 COLLATE utf8_bin"
|
341
341
|
end
|
342
342
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,73 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aaf-gumboot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bradley Beddoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: accession
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
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
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: codeclimate-test-reporter
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
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
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: factory_girl
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
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
|
-
version: 0
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: faker
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: mysql2
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rails-controller-testing
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: sqlite3
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: valhammer
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
@@ -207,7 +207,7 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name: guard-
|
210
|
+
name: guard-bundler
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - ">="
|
@@ -221,7 +221,7 @@ dependencies:
|
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name: guard-
|
224
|
+
name: guard-rspec
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - ">="
|
@@ -235,7 +235,7 @@ dependencies:
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name: guard-
|
238
|
+
name: guard-rubocop
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
@@ -252,16 +252,16 @@ dependencies:
|
|
252
252
|
name: rails
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
|
-
- - "
|
255
|
+
- - ">="
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
257
|
+
version: '0'
|
258
258
|
type: :development
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
|
-
- - "
|
262
|
+
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
264
|
+
version: '0'
|
265
265
|
description: Provides a set of shared specs and base generators to ensure that all
|
266
266
|
AAF ruby applications follow the same basic structure and implementation for subjects,
|
267
267
|
RESTful APIs and access control.
|
@@ -383,7 +383,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
383
383
|
version: '0'
|
384
384
|
requirements: []
|
385
385
|
rubyforge_project:
|
386
|
-
rubygems_version: 2.
|
386
|
+
rubygems_version: 2.7.7
|
387
387
|
signing_key:
|
388
388
|
specification_version: 4
|
389
389
|
summary: Kick off subject and API structure for AAF applications
|