aaf-gumboot 1.0.0.pre.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +3 -0
- data/.rubocop.yml +15 -0
- data/Gemfile +4 -0
- data/Guardfile +18 -0
- data/LICENSE +202 -0
- data/README.md +1069 -0
- data/Rakefile +8 -0
- data/aaf-gumboot.gemspec +42 -0
- data/lib/aaf-gumboot.rb +1 -0
- data/lib/gumboot.rb +5 -0
- data/lib/gumboot/shared_examples/anonymous_controller.rb +17 -0
- data/lib/gumboot/shared_examples/api_constraints.rb +29 -0
- data/lib/gumboot/shared_examples/api_controller.rb +206 -0
- data/lib/gumboot/shared_examples/api_subjects.rb +44 -0
- data/lib/gumboot/shared_examples/application_controller.rb +223 -0
- data/lib/gumboot/shared_examples/database_schema.rb +45 -0
- data/lib/gumboot/shared_examples/foreign_keys.rb +65 -0
- data/lib/gumboot/shared_examples/permissions.rb +45 -0
- data/lib/gumboot/shared_examples/roles.rb +15 -0
- data/lib/gumboot/shared_examples/subjects.rb +29 -0
- data/lib/gumboot/strap.rb +121 -0
- data/lib/gumboot/version.rb +3 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +3 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/api/api_controller.rb +78 -0
- data/spec/dummy/app/controllers/application_controller.rb +64 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/api_subject.rb +23 -0
- data/spec/dummy/app/models/api_subject_role.rb +6 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/permission.rb +7 -0
- data/spec/dummy/app/models/role.rb +11 -0
- data/spec/dummy/app/models/subject.rb +20 -0
- data/spec/dummy/app/models/subject_role.rb +6 -0
- data/spec/dummy/app/views/dynamic_errors/forbidden.html.erb +0 -0
- data/spec/dummy/app/views/dynamic_errors/unauthorized.html.erb +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +18 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +5 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +32 -0
- data/spec/dummy/config/environments/production.rb +37 -0
- data/spec/dummy/config/environments/test.rb +33 -0
- data/spec/dummy/config/initializers/assets.rb +4 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +51 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/api_constraints.rb +16 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/api_subjects.rb +20 -0
- data/spec/factories/permissions.rb +6 -0
- data/spec/factories/roles.rb +5 -0
- data/spec/factories/subjects.rb +24 -0
- data/spec/gumboot/api_constraints_spec.rb +18 -0
- data/spec/gumboot/api_controller_spec.rb +7 -0
- data/spec/gumboot/api_subjects_spec.rb +7 -0
- data/spec/gumboot/application_controller_spec.rb +7 -0
- data/spec/gumboot/foreign_keys_spec.rb +7 -0
- data/spec/gumboot/permissions_spec.rb +7 -0
- data/spec/gumboot/roles_spec.rb +7 -0
- data/spec/gumboot/subjects_spec.rb +7 -0
- data/spec/lib/gumboot/strap_spec.rb +330 -0
- data/spec/spec_helper.rb +45 -0
- metadata +387 -0
@@ -0,0 +1,330 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'mysql2'
|
4
|
+
require 'gumboot/strap'
|
5
|
+
|
6
|
+
RSpec.describe Gumboot::Strap do
|
7
|
+
let(:client) { spy(Mysql2::Client) }
|
8
|
+
let(:kernel) { double(Kernel) }
|
9
|
+
|
10
|
+
let(:db_configs) do
|
11
|
+
{
|
12
|
+
'one' => {
|
13
|
+
'adapter' => 'mysql2',
|
14
|
+
'database' => 'one_db',
|
15
|
+
'username' => 'one_user',
|
16
|
+
'password' => 'one_password'
|
17
|
+
},
|
18
|
+
'two' => {
|
19
|
+
'adapter' => 'mysql2',
|
20
|
+
'database' => 'two_db',
|
21
|
+
'username' => 'two_user',
|
22
|
+
'password' => 'two_password'
|
23
|
+
}
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
before do
|
28
|
+
opts = {
|
29
|
+
default_file: "#{ENV['HOME']}/.my.cnf",
|
30
|
+
default_group: 'client',
|
31
|
+
host: '127.0.0.1'
|
32
|
+
}
|
33
|
+
|
34
|
+
allow(Mysql2::Client).to receive(:new).with(opts).and_return(client)
|
35
|
+
allow(client).to receive(:escape) { |x| x }
|
36
|
+
end
|
37
|
+
|
38
|
+
let(:klass) do
|
39
|
+
Class.new do
|
40
|
+
include Gumboot::Strap
|
41
|
+
attr_reader :kernel
|
42
|
+
|
43
|
+
def initialize(kernel)
|
44
|
+
@kernel = kernel
|
45
|
+
end
|
46
|
+
|
47
|
+
def puts(*); end
|
48
|
+
|
49
|
+
def system(*args)
|
50
|
+
kernel.system(*args)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
subject { klass.new(kernel) }
|
56
|
+
|
57
|
+
context '#ensure_activerecord_databases' do
|
58
|
+
before do
|
59
|
+
allow(ActiveRecord::Base).to receive(:configurations)
|
60
|
+
.and_return(db_configs)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'creates the databases' do
|
64
|
+
expect(client).to receive(:query).with(create_db_query('one_db')).once
|
65
|
+
expect(client).to receive(:query).with(create_db_query('two_db')).once
|
66
|
+
|
67
|
+
allow(client).to receive(:query).with(match(/^GRANT ALL.*/))
|
68
|
+
|
69
|
+
subject.ensure_activerecord_databases(db_configs.keys)
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'sets permissions for database users' do
|
73
|
+
expect(client).to receive(:query)
|
74
|
+
.with("GRANT ALL PRIVILEGES ON `one_db`.* TO 'one_user'@'localhost' " \
|
75
|
+
"IDENTIFIED BY 'one_password'").once
|
76
|
+
expect(client).to receive(:query)
|
77
|
+
.with("GRANT ALL PRIVILEGES ON `two_db`.* TO 'two_user'@'localhost' " \
|
78
|
+
"IDENTIFIED BY 'two_password'").once
|
79
|
+
|
80
|
+
allow(client).to receive(:query).with(match(/^CREATE DATABASE.*/))
|
81
|
+
|
82
|
+
subject.ensure_activerecord_databases(db_configs.keys)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context '#ensure_database' do
|
87
|
+
let(:opts) { { 'adapter' => 'mysql2', 'database' => 'test_db' } }
|
88
|
+
|
89
|
+
it 'creates the database' do
|
90
|
+
expect(client).to receive(:query).with(create_db_query('test_db')).once
|
91
|
+
|
92
|
+
subject.ensure_database(opts)
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'fails when adapter is not mysql2' do
|
96
|
+
expect { subject.ensure_database(opts.merge('adapter' => 'xyz')) }
|
97
|
+
.to raise_error(/Only supports mysql2 adapter/)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context '#ensure_database_user' do
|
102
|
+
let(:opts) do
|
103
|
+
{ 'adapter' => 'mysql2', 'database' => 'test_db',
|
104
|
+
'username' => 'test_user', 'password' => 'test_password' }
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'sets permission for the database user' do
|
108
|
+
expect(client).to receive(:query)
|
109
|
+
.with('GRANT ALL PRIVILEGES ON `test_db`.* TO ' \
|
110
|
+
"'test_user'@'localhost' IDENTIFIED BY 'test_password'").once
|
111
|
+
|
112
|
+
subject.ensure_database_user(opts)
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'fails when adapter is not mysql2' do
|
116
|
+
expect { subject.ensure_database_user(opts.merge('adapter' => 'xyz')) }
|
117
|
+
.to raise_error(/Only supports mysql2 adapter/)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
context '#maintain_activerecord_schema' do
|
122
|
+
let(:tables) { [] }
|
123
|
+
|
124
|
+
before do
|
125
|
+
expect(ActiveRecord::Base).to receive_message_chain(:connection, :execute)
|
126
|
+
.with('SHOW TABLES').and_return(tables)
|
127
|
+
end
|
128
|
+
|
129
|
+
context 'when a database already exists' do
|
130
|
+
let(:tables) { %w(schema_migrations) }
|
131
|
+
|
132
|
+
it 'runs the migrations' do
|
133
|
+
expect(subject.kernel).to receive(:system).with('rake db:migrate')
|
134
|
+
subject.maintain_activerecord_schema
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'loads the schema before running migrations' do
|
139
|
+
expect(subject.kernel).to receive(:system).with('rake db:schema:load')
|
140
|
+
expect(subject.kernel).to receive(:system).with('rake db:migrate')
|
141
|
+
subject.maintain_activerecord_schema
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
context '#load_seeds' do
|
146
|
+
it 'loads the seeds' do
|
147
|
+
expect(subject.kernel).to receive(:system).with('rake db:seed')
|
148
|
+
subject.load_seeds
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
context '#clean_logs' do
|
153
|
+
it 'removes the log files' do
|
154
|
+
expect(subject.kernel).to receive(:system).with('rm -f log/*')
|
155
|
+
subject.clean_logs
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
context '#clean_tempfiles' do
|
160
|
+
it 'removes the temp files' do
|
161
|
+
expect(subject.kernel).to receive(:system).with('rm -rf tmp/cache')
|
162
|
+
subject.clean_tempfiles
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
context '#link_global_configuration' do
|
167
|
+
it 'creates a symbolic link to the shared configuration' do
|
168
|
+
base = "#{ENV['HOME']}/.aaf"
|
169
|
+
|
170
|
+
allow(File).to receive(:exist?).with("#{base}/a").and_return(true)
|
171
|
+
allow(File).to receive(:exist?).with("#{base}/b").and_return(true)
|
172
|
+
allow(File).to receive(:exist?).with("#{base}/c").and_return(true)
|
173
|
+
|
174
|
+
allow(File).to receive(:exist?).with('config/a').and_return(false)
|
175
|
+
allow(File).to receive(:exist?).with('config/b').and_return(false)
|
176
|
+
allow(File).to receive(:exist?).with('config/c').and_return(false)
|
177
|
+
|
178
|
+
expect(FileUtils).to receive(:ln_s).with("#{base}/a", 'config/a')
|
179
|
+
expect(FileUtils).to receive(:ln_s).with("#{base}/b", 'config/b')
|
180
|
+
expect(FileUtils).to receive(:ln_s).with("#{base}/c", 'config/c')
|
181
|
+
|
182
|
+
subject.link_global_configuration(%w(a b c))
|
183
|
+
end
|
184
|
+
|
185
|
+
it 'skips an existing file' do
|
186
|
+
allow(File).to receive(:exist?).and_return(true)
|
187
|
+
expect(FileUtils).not_to receive(:ln_s)
|
188
|
+
|
189
|
+
subject.link_global_configuration(%w(a))
|
190
|
+
end
|
191
|
+
|
192
|
+
it 'raises an error for a missing file' do
|
193
|
+
allow(File).to receive(:exist?).and_return(false)
|
194
|
+
expect { subject.link_global_configuration(%w(a)) }
|
195
|
+
.to raise_error(/Missing global config file/)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
context '#update_local_configuration' do
|
200
|
+
let(:dist) { YAML.dump('a' => 1, 'b' => 2) }
|
201
|
+
let(:target) { nil }
|
202
|
+
|
203
|
+
let(:file) { 'a.yml' }
|
204
|
+
let(:target_file) { "config/#{file}" }
|
205
|
+
let(:dist_file) { "config/#{file}.dist" }
|
206
|
+
let(:written) { [] }
|
207
|
+
|
208
|
+
before do
|
209
|
+
allow(File).to receive(:exist?).with(target_file).and_return(target)
|
210
|
+
allow(File).to receive(:exist?).with(dist_file).and_return(dist)
|
211
|
+
|
212
|
+
allow(File).to receive(:read).with(target_file).and_return(target)
|
213
|
+
allow(File).to receive(:read).with(dist_file).and_return(dist)
|
214
|
+
|
215
|
+
file = double(File)
|
216
|
+
allow(File).to receive(:open).with(target_file, 'w').and_yield(file)
|
217
|
+
allow(file).to receive(:write) { |str| written << str }
|
218
|
+
end
|
219
|
+
|
220
|
+
def run
|
221
|
+
subject.update_local_configuration([file])
|
222
|
+
end
|
223
|
+
|
224
|
+
def updated_config
|
225
|
+
expect(written).not_to be_empty
|
226
|
+
YAML.load(written.join)
|
227
|
+
end
|
228
|
+
|
229
|
+
context 'when the target does not exist' do
|
230
|
+
it 'creates the target' do
|
231
|
+
run
|
232
|
+
expect(updated_config).to eq('a' => 1, 'b' => 2)
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
context 'when the target is missing an option' do
|
237
|
+
let(:target) { YAML.dump('a' => 2) }
|
238
|
+
|
239
|
+
it 'merges the new configuration option' do
|
240
|
+
run
|
241
|
+
expect(updated_config).to eq('a' => 2, 'b' => 2)
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
context 'when the target has an extra option' do
|
246
|
+
let(:target) { YAML.dump('a' => 2, 'b' => 2, 'c' => 3) }
|
247
|
+
|
248
|
+
it 'retains the extra option' do
|
249
|
+
run
|
250
|
+
expect(updated_config).to eq('a' => 2, 'b' => 2, 'c' => 3)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
context 'when a deeply nested option is added' do
|
255
|
+
let(:dist) { YAML.dump('a' => 1, 'b' => { 'd' => 3, 'e' => 4 }) }
|
256
|
+
let(:target) { YAML.dump('a' => 14, 'b' => { 'd' => 30 }) }
|
257
|
+
|
258
|
+
it 'merges the new configuration option' do
|
259
|
+
run
|
260
|
+
expect(updated_config).to eq('a' => 14, 'b' => { 'd' => 30, 'e' => 4 })
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
context 'when a deeply nested option is removed' do
|
265
|
+
let(:dist) { YAML.dump('a' => 1, 'b' => { 'd' => 3 }) }
|
266
|
+
let(:target) { YAML.dump('a' => 14, 'b' => { 'd' => 30, 'e' => 4 }) }
|
267
|
+
|
268
|
+
it 'retains the option' do
|
269
|
+
run
|
270
|
+
expect(updated_config).to eq('a' => 14, 'b' => { 'd' => 30, 'e' => 4 })
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
context 'when the filename is not "*.yml"' do
|
275
|
+
let(:file) { 'a.txt' }
|
276
|
+
|
277
|
+
it 'raises an error' do
|
278
|
+
expect { run }.to raise_error(/Not a \.yml file/)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
context 'when the dist file is missing' do
|
283
|
+
let(:dist) { nil }
|
284
|
+
|
285
|
+
it 'raises an error' do
|
286
|
+
expect { run }.to raise_error(/Missing dist config file/)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
describe '#install_dist_template' do
|
292
|
+
let(:filename) { Faker::Lorem.words(2).join('.') }
|
293
|
+
let(:src) { "config/#{filename}.dist" }
|
294
|
+
let(:dest) { "config/#{filename}" }
|
295
|
+
|
296
|
+
def run
|
297
|
+
subject.install_dist_template([filename])
|
298
|
+
end
|
299
|
+
|
300
|
+
before do
|
301
|
+
allow(File).to receive(:exist?).with(src).and_return(true)
|
302
|
+
end
|
303
|
+
|
304
|
+
context 'when the target file exists' do
|
305
|
+
before do
|
306
|
+
allow(File).to receive(:exist?).with(dest).and_return(true)
|
307
|
+
end
|
308
|
+
|
309
|
+
it 'does not copy the file' do
|
310
|
+
expect(FileUtils).not_to receive(:copy)
|
311
|
+
run
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
context 'when the target file does not exist' do
|
316
|
+
before do
|
317
|
+
allow(File).to receive(:exist?).with(dest).and_return(false)
|
318
|
+
end
|
319
|
+
|
320
|
+
it 'copies the file' do
|
321
|
+
expect(FileUtils).to receive(:copy).with(src, dest)
|
322
|
+
run
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
def create_db_query(db)
|
328
|
+
"CREATE DATABASE IF NOT EXISTS `#{db}` CHARACTER SET utf8 COLLATE utf8_bin"
|
329
|
+
end
|
330
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'factory_girl'
|
3
|
+
require 'rails/all'
|
4
|
+
require 'faker'
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'simplecov'
|
7
|
+
|
8
|
+
SimpleCov.start do
|
9
|
+
add_filter('spec')
|
10
|
+
add_filter('sample')
|
11
|
+
end
|
12
|
+
|
13
|
+
ENV['RAILS_ENV'] ||= 'test'
|
14
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
15
|
+
|
16
|
+
load Rails.root.join('db/schema.rb')
|
17
|
+
|
18
|
+
FactoryGirl.find_definitions
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
config.around do |example|
|
22
|
+
ActiveRecord::Base.transaction do
|
23
|
+
example.run
|
24
|
+
raise ActiveRecord::Rollback
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
config.expect_with :rspec do |expectations|
|
29
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
30
|
+
end
|
31
|
+
|
32
|
+
config.mock_with :rspec do |mocks|
|
33
|
+
mocks.verify_partial_doubles = true
|
34
|
+
end
|
35
|
+
|
36
|
+
config.filter_run :focus
|
37
|
+
config.run_all_when_everything_filtered = true
|
38
|
+
config.disable_monkey_patching!
|
39
|
+
|
40
|
+
config.default_formatter = 'doc' if config.files_to_run.one?
|
41
|
+
config.order = :random
|
42
|
+
Kernel.srand config.seed
|
43
|
+
|
44
|
+
config.include FactoryGirl::Syntax::Methods
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,387 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aaf-gumboot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.pre.alpha.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bradley Beddoes
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: accession
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mysql2
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.3.20
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.3.20
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sqlite3
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: valhammer
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: factory_girl
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: faker
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec-rails
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: codeclimate-test-reporter
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rails-controller-testing
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: guard
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: guard-rspec
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: guard-rubocop
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: guard-bundler
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: rails
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - "~>"
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: 4.2.6
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - "~>"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: 4.2.6
|
265
|
+
description: Provides a set of shared specs and base generators to ensure that all
|
266
|
+
AAF ruby applications follow the same basic structure and implementation for subjects,
|
267
|
+
RESTful APIs and access control.
|
268
|
+
email:
|
269
|
+
- bradleybeddoes@aaf.edu.au
|
270
|
+
executables: []
|
271
|
+
extensions: []
|
272
|
+
extra_rdoc_files: []
|
273
|
+
files:
|
274
|
+
- ".gitignore"
|
275
|
+
- ".rspec"
|
276
|
+
- ".rubocop.yml"
|
277
|
+
- Gemfile
|
278
|
+
- Guardfile
|
279
|
+
- LICENSE
|
280
|
+
- README.md
|
281
|
+
- Rakefile
|
282
|
+
- aaf-gumboot.gemspec
|
283
|
+
- lib/aaf-gumboot.rb
|
284
|
+
- lib/gumboot.rb
|
285
|
+
- lib/gumboot/shared_examples/anonymous_controller.rb
|
286
|
+
- lib/gumboot/shared_examples/api_constraints.rb
|
287
|
+
- lib/gumboot/shared_examples/api_controller.rb
|
288
|
+
- lib/gumboot/shared_examples/api_subjects.rb
|
289
|
+
- lib/gumboot/shared_examples/application_controller.rb
|
290
|
+
- lib/gumboot/shared_examples/database_schema.rb
|
291
|
+
- lib/gumboot/shared_examples/foreign_keys.rb
|
292
|
+
- lib/gumboot/shared_examples/permissions.rb
|
293
|
+
- lib/gumboot/shared_examples/roles.rb
|
294
|
+
- lib/gumboot/shared_examples/subjects.rb
|
295
|
+
- lib/gumboot/strap.rb
|
296
|
+
- lib/gumboot/version.rb
|
297
|
+
- spec/dummy/README.rdoc
|
298
|
+
- spec/dummy/Rakefile
|
299
|
+
- spec/dummy/app/assets/images/.keep
|
300
|
+
- spec/dummy/app/assets/javascripts/application.js
|
301
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
302
|
+
- spec/dummy/app/controllers/api/api_controller.rb
|
303
|
+
- spec/dummy/app/controllers/application_controller.rb
|
304
|
+
- spec/dummy/app/controllers/concerns/.keep
|
305
|
+
- spec/dummy/app/helpers/application_helper.rb
|
306
|
+
- spec/dummy/app/mailers/.keep
|
307
|
+
- spec/dummy/app/models/.keep
|
308
|
+
- spec/dummy/app/models/api_subject.rb
|
309
|
+
- spec/dummy/app/models/api_subject_role.rb
|
310
|
+
- spec/dummy/app/models/concerns/.keep
|
311
|
+
- spec/dummy/app/models/permission.rb
|
312
|
+
- spec/dummy/app/models/role.rb
|
313
|
+
- spec/dummy/app/models/subject.rb
|
314
|
+
- spec/dummy/app/models/subject_role.rb
|
315
|
+
- spec/dummy/app/views/dynamic_errors/forbidden.html.erb
|
316
|
+
- spec/dummy/app/views/dynamic_errors/unauthorized.html.erb
|
317
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
318
|
+
- spec/dummy/bin/bundle
|
319
|
+
- spec/dummy/bin/rails
|
320
|
+
- spec/dummy/bin/rake
|
321
|
+
- spec/dummy/config.ru
|
322
|
+
- spec/dummy/config/application.rb
|
323
|
+
- spec/dummy/config/boot.rb
|
324
|
+
- spec/dummy/config/database.yml
|
325
|
+
- spec/dummy/config/environment.rb
|
326
|
+
- spec/dummy/config/environments/development.rb
|
327
|
+
- spec/dummy/config/environments/production.rb
|
328
|
+
- spec/dummy/config/environments/test.rb
|
329
|
+
- spec/dummy/config/initializers/assets.rb
|
330
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
331
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
332
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
333
|
+
- spec/dummy/config/initializers/inflections.rb
|
334
|
+
- spec/dummy/config/initializers/mime_types.rb
|
335
|
+
- spec/dummy/config/initializers/session_store.rb
|
336
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
337
|
+
- spec/dummy/config/locales/en.yml
|
338
|
+
- spec/dummy/config/routes.rb
|
339
|
+
- spec/dummy/config/secrets.yml
|
340
|
+
- spec/dummy/db/schema.rb
|
341
|
+
- spec/dummy/db/test.sqlite3
|
342
|
+
- spec/dummy/lib/api_constraints.rb
|
343
|
+
- spec/dummy/lib/assets/.keep
|
344
|
+
- spec/dummy/log/.keep
|
345
|
+
- spec/dummy/public/404.html
|
346
|
+
- spec/dummy/public/422.html
|
347
|
+
- spec/dummy/public/500.html
|
348
|
+
- spec/dummy/public/favicon.ico
|
349
|
+
- spec/factories/api_subjects.rb
|
350
|
+
- spec/factories/permissions.rb
|
351
|
+
- spec/factories/roles.rb
|
352
|
+
- spec/factories/subjects.rb
|
353
|
+
- spec/gumboot/api_constraints_spec.rb
|
354
|
+
- spec/gumboot/api_controller_spec.rb
|
355
|
+
- spec/gumboot/api_subjects_spec.rb
|
356
|
+
- spec/gumboot/application_controller_spec.rb
|
357
|
+
- spec/gumboot/foreign_keys_spec.rb
|
358
|
+
- spec/gumboot/permissions_spec.rb
|
359
|
+
- spec/gumboot/roles_spec.rb
|
360
|
+
- spec/gumboot/subjects_spec.rb
|
361
|
+
- spec/lib/gumboot/strap_spec.rb
|
362
|
+
- spec/spec_helper.rb
|
363
|
+
homepage: http://www.aaf.edu.au
|
364
|
+
licenses:
|
365
|
+
- Apache-2.0
|
366
|
+
metadata: {}
|
367
|
+
post_install_message:
|
368
|
+
rdoc_options: []
|
369
|
+
require_paths:
|
370
|
+
- lib
|
371
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
372
|
+
requirements:
|
373
|
+
- - ">="
|
374
|
+
- !ruby/object:Gem::Version
|
375
|
+
version: '0'
|
376
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
377
|
+
requirements:
|
378
|
+
- - ">"
|
379
|
+
- !ruby/object:Gem::Version
|
380
|
+
version: 1.3.1
|
381
|
+
requirements: []
|
382
|
+
rubyforge_project:
|
383
|
+
rubygems_version: 2.6.8
|
384
|
+
signing_key:
|
385
|
+
specification_version: 4
|
386
|
+
summary: Kick off subject and API structure for AAF applications
|
387
|
+
test_files: []
|