openstax_accounts 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +1 -0
  3. data/Rakefile +6 -6
  4. data/app/models/openstax/accounts/account.rb +34 -24
  5. data/app/models/openstax/accounts/application_group.rb +7 -0
  6. data/app/models/openstax/accounts/group.rb +132 -0
  7. data/app/models/openstax/accounts/group_member.rb +40 -0
  8. data/app/models/openstax/accounts/group_nesting.rb +62 -0
  9. data/app/models/openstax/accounts/group_owner.rb +40 -0
  10. data/app/representers/openstax/accounts/api/v1/application_group_representer.rb +25 -0
  11. data/app/representers/openstax/accounts/api/v1/application_groups_representer.rb +16 -0
  12. data/app/representers/openstax/accounts/api/v1/group_nesting_representer.rb +18 -0
  13. data/app/representers/openstax/accounts/api/v1/group_representer.rb +50 -0
  14. data/app/representers/openstax/accounts/api/v1/group_user_representer.rb +21 -0
  15. data/app/routines/openstax/accounts/search_accounts.rb +7 -14
  16. data/app/routines/openstax/accounts/sync_accounts.rb +32 -18
  17. data/app/routines/openstax/accounts/sync_groups.rb +61 -0
  18. data/app/routines/openstax/accounts/update_group_caches.rb +27 -0
  19. data/app/views/openstax/accounts/shared/accounts/_index.html.erb +0 -3
  20. data/config/initializers/action_interceptor.rb +1 -1
  21. data/db/migrate/20140811182433_create_openstax_accounts_groups.rb +16 -0
  22. data/db/migrate/20140811182505_create_openstax_accounts_group_members.rb +13 -0
  23. data/db/migrate/20140811182527_create_openstax_accounts_group_owners.rb +13 -0
  24. data/db/migrate/20140811182553_create_openstax_accounts_group_nestings.rb +13 -0
  25. data/lib/generators/openstax/accounts/schedule/templates/schedule.rb +1 -0
  26. data/lib/openstax/accounts/current_user_manager.rb +2 -2
  27. data/lib/openstax/accounts/has_many_through_groups.rb +45 -0
  28. data/lib/openstax/accounts/version.rb +1 -1
  29. data/lib/openstax_accounts.rb +165 -11
  30. data/spec/controllers/openstax/accounts/dev/accounts_controller_spec.rb +1 -1
  31. data/spec/controllers/openstax/accounts/sessions_controller_spec.rb +1 -1
  32. data/spec/dummy/app/controllers/api/application_groups_controller.rb +11 -0
  33. data/spec/dummy/app/controllers/api/dummy_controller.rb +2 -1
  34. data/spec/dummy/app/controllers/api/group_members_controller.rb +11 -0
  35. data/spec/dummy/app/controllers/api/group_nestings_controller.rb +11 -0
  36. data/spec/dummy/app/controllers/api/group_owners_controller.rb +11 -0
  37. data/spec/dummy/app/controllers/api/groups_controller.rb +15 -0
  38. data/spec/dummy/app/controllers/api/users_controller.rb +4 -0
  39. data/spec/dummy/app/models/ownership.rb +7 -0
  40. data/spec/dummy/app/models/user.rb +11 -8
  41. data/spec/dummy/config/application.rb +0 -33
  42. data/spec/dummy/config/boot.rb +4 -9
  43. data/spec/dummy/config/database.yml +8 -8
  44. data/spec/dummy/config/environment.rb +3 -3
  45. data/spec/dummy/config/environments/development.rb +20 -12
  46. data/spec/dummy/config/environments/production.rb +42 -29
  47. data/spec/dummy/config/environments/test.rb +16 -12
  48. data/spec/dummy/config/initializers/assets.rb +8 -0
  49. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  50. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  51. data/spec/dummy/config/initializers/inflections.rb +6 -5
  52. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  53. data/spec/dummy/config/initializers/session_store.rb +1 -6
  54. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  55. data/spec/dummy/config/routes.rb +23 -0
  56. data/spec/dummy/config/secrets.yml +8 -0
  57. data/spec/dummy/db/migrate/1_create_users.rb +2 -2
  58. data/spec/dummy/db/migrate/2_create_ownerships.rb +11 -0
  59. data/spec/dummy/db/schema.rb +72 -20
  60. data/spec/dummy/db/test.sqlite3 +0 -0
  61. data/spec/dummy/log/development.log +186 -0
  62. data/spec/dummy/log/test.log +2078 -0
  63. data/spec/factories/openstax_accounts_account.rb +3 -2
  64. data/spec/factories/openstax_accounts_group.rb +7 -0
  65. data/spec/factories/openstax_accounts_group_member.rb +6 -0
  66. data/spec/factories/openstax_accounts_group_nesting.rb +6 -0
  67. data/spec/factories/openstax_accounts_group_owner.rb +6 -0
  68. data/spec/lib/openstax/accounts/current_user_manager_spec.rb +9 -3
  69. data/spec/lib/openstax/accounts/has_many_through_groups_spec.rb +53 -0
  70. data/spec/lib/openstax_accounts_spec.rb +189 -25
  71. data/spec/models/openstax/accounts/account_spec.rb +16 -1
  72. data/spec/models/openstax/accounts/anonymous_account_spec.rb +1 -1
  73. data/spec/models/openstax/accounts/group_spec.rb +20 -0
  74. data/spec/routines/openstax/accounts/sync_accounts_spec.rb +70 -0
  75. data/spec/routines/openstax/accounts/sync_groups_spec.rb +125 -0
  76. metadata +73 -56
  77. data/spec/dummy/config/initializers/secret_token.rb +0 -7
@@ -0,0 +1,125 @@
1
+ require 'spec_helper'
2
+
3
+ module OpenStax
4
+ module Accounts
5
+
6
+ describe SyncGroups do
7
+
8
+ it 'can sync groups' do
9
+ controller_class = ::Api::ApplicationGroupsController
10
+ allow_any_instance_of(controller_class).to(
11
+ receive(:updates) do |controller|
12
+ controller.render :json => [{id: 1, application_id: 1,
13
+ group: {id: 2, name: 'M', members: [], owners: [],
14
+ nestings: [{container_group_id: 2,
15
+ member_group_id: 3}]},
16
+ unread_updates: 1, default_contact_info_id: 1},
17
+ {id: 3, application_id: 1,
18
+ group: {id: 3, name: 'Fuego\'s Deputies',
19
+ members: [{group_id: 3,
20
+ user: {id: 2, username: 'User'}}],
21
+ owners: [{group_id: 3,
22
+ user: {id: 3, username: 'Fuego'}}],
23
+ nestings: []},
24
+ unread_updates: 2, default_contact_info_id: 5}]
25
+ end)
26
+
27
+ begin
28
+ OpenStax::Accounts.syncing = true
29
+ u = OpenStax::Accounts::Account.new
30
+ u.openstax_uid = 2
31
+ u.username = 'User'
32
+ u.save!
33
+
34
+ u2 = OpenStax::Accounts::Account.new
35
+ u2.openstax_uid = 3
36
+ u2.username = 'Fuego'
37
+ u2.save!
38
+
39
+ g = OpenStax::Accounts::Group.new
40
+ g.name = 'Member Group'
41
+ g.openstax_uid = 2
42
+ g.save!
43
+
44
+ gm = GroupMember.new
45
+ gm.group = g
46
+ gm.user = u
47
+ gm.save!
48
+
49
+ g2 = OpenStax::Accounts::Group.new
50
+ g2.name = 'Container Group'
51
+ g2.openstax_uid = 4
52
+ g2.save!
53
+
54
+ go = GroupOwner.new
55
+ go.group = g2
56
+ go.user = u
57
+ go.save!
58
+
59
+ gn = GroupNesting.new
60
+ gn.container_group = g2
61
+ gn.member_group = g
62
+ gn.save!
63
+ ensure
64
+ OpenStax::Accounts.syncing = false
65
+ end
66
+
67
+ begin
68
+ OpenStax::Accounts.configuration.enable_stubbing = false
69
+ expect(Group.count).to eq 2
70
+ expect(Group.first.openstax_uid).to eq 2
71
+ expect(Group.first.name).to eq 'Member Group'
72
+ expect(Group.first.members).to include u
73
+ expect(Group.last.openstax_uid).to eq 4
74
+ expect(Group.last.name).to eq 'Container Group'
75
+ expect(Group.last.member_groups).to include g
76
+ expect(Group.last.owners).to include u
77
+
78
+ controller_class.last_action = nil
79
+ controller_class.last_json = nil
80
+
81
+ SyncGroups.call
82
+ expect(Group.count).to eq 3
83
+ expect(Group.first.openstax_uid).to eq 2
84
+ expect(Group.first.name).to eq 'M'
85
+ expect(Group.first.member_groups).to include Group.last
86
+ expect(Group.all.second.openstax_uid).to eq 4
87
+ expect(Group.all.second.name).to eq 'Container Group'
88
+ expect(Group.all.second.member_groups).to include Group.first
89
+ expect(Group.last.openstax_uid).to eq 3
90
+ expect(Group.last.name).to eq 'Fuego\'s Deputies'
91
+ expect(Group.last.owners).to include Account.last
92
+ expect(Group.last.members).to include Account.first
93
+
94
+ expect(controller_class.last_action).to eq :updated
95
+ expect(controller_class.last_json).to eq [{'group_id' => 2, 'read_updates' => 1},
96
+ {'group_id' => 3, 'read_updates' => 2}]
97
+
98
+ controller_class.last_action = nil
99
+ controller_class.last_json = nil
100
+
101
+ SyncGroups.call
102
+ expect(Group.count).to eq 3
103
+ expect(Group.first.openstax_uid).to eq 2
104
+ expect(Group.first.name).to eq 'M'
105
+ expect(Group.first.member_groups).to include Group.last
106
+ expect(Group.all.second.openstax_uid).to eq 4
107
+ expect(Group.all.second.name).to eq 'Container Group'
108
+ expect(Group.all.second.member_groups).to include Group.first
109
+ expect(Group.last.openstax_uid).to eq 3
110
+ expect(Group.last.name).to eq 'Fuego\'s Deputies'
111
+ expect(Group.last.owners).to include Account.last
112
+ expect(Group.last.members).to include Account.first
113
+
114
+ expect(controller_class.last_action).to eq :updated
115
+ expect(controller_class.last_json).to eq [{'group_id' => 2, 'read_updates' => 1},
116
+ {'group_id' => 3, 'read_updates' => 2}]
117
+ ensure
118
+ OpenStax::Accounts.configuration.enable_stubbing = true
119
+ end
120
+ end
121
+
122
+ end
123
+
124
+ end
125
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_accounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-02 00:00:00.000000000 Z
11
+ date: 2014-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '4.1'
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: '3.1'
27
- - !ruby/object:Gem::Dependency
28
- name: activesupport
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '3.1'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '3.1'
26
+ version: '4.1'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: omniauth
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -114,42 +100,14 @@ dependencies:
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
117
- version: 2.1.1
103
+ version: 2.2.1
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - ! '>='
123
109
  - !ruby/object:Gem::Version
124
- version: 2.1.1
125
- - !ruby/object:Gem::Dependency
126
- name: sass-rails
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '3.1'
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ! '>='
137
- - !ruby/object:Gem::Version
138
- version: '3.1'
139
- - !ruby/object:Gem::Dependency
140
- name: uglifier
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ! '>='
144
- - !ruby/object:Gem::Version
145
- version: '1.0'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ! '>='
151
- - !ruby/object:Gem::Version
152
- version: '1.0'
110
+ version: 2.2.1
153
111
  - !ruby/object:Gem::Dependency
154
112
  name: keyword_search
155
113
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +142,14 @@ dependencies:
184
142
  requirements:
185
143
  - - ! '>='
186
144
  - !ruby/object:Gem::Version
187
- version: '0.1'
145
+ version: '0.3'
188
146
  type: :runtime
189
147
  prerelease: false
190
148
  version_requirements: !ruby/object:Gem::Requirement
191
149
  requirements:
192
150
  - - ! '>='
193
151
  - !ruby/object:Gem::Version
194
- version: '0.1'
152
+ version: '0.3'
195
153
  - !ruby/object:Gem::Dependency
196
154
  name: sqlite3
197
155
  requirement: !ruby/object:Gem::Requirement
@@ -210,16 +168,16 @@ dependencies:
210
168
  name: rspec-rails
211
169
  requirement: !ruby/object:Gem::Requirement
212
170
  requirements:
213
- - - <
171
+ - - ! '>='
214
172
  - !ruby/object:Gem::Version
215
- version: '3.0'
173
+ version: 3.0.0
216
174
  type: :development
217
175
  prerelease: false
218
176
  version_requirements: !ruby/object:Gem::Requirement
219
177
  requirements:
220
- - - <
178
+ - - ! '>='
221
179
  - !ruby/object:Gem::Version
222
- version: '3.0'
180
+ version: 3.0.0
223
181
  - !ruby/object:Gem::Dependency
224
182
  name: capybara
225
183
  requirement: !ruby/object:Gem::Requirement
@@ -299,14 +257,26 @@ files:
299
257
  - app/models/openstax/accounts/account.rb
300
258
  - app/models/openstax/accounts/anonymous_account.rb
301
259
  - app/models/openstax/accounts/application_account.rb
260
+ - app/models/openstax/accounts/application_group.rb
261
+ - app/models/openstax/accounts/group.rb
262
+ - app/models/openstax/accounts/group_member.rb
263
+ - app/models/openstax/accounts/group_nesting.rb
264
+ - app/models/openstax/accounts/group_owner.rb
302
265
  - app/representers/openstax/accounts/api/v1/account_representer.rb
303
266
  - app/representers/openstax/accounts/api/v1/account_search_representer.rb
304
267
  - app/representers/openstax/accounts/api/v1/application_account_representer.rb
305
268
  - app/representers/openstax/accounts/api/v1/application_account_search_representer.rb
306
269
  - app/representers/openstax/accounts/api/v1/application_accounts_representer.rb
270
+ - app/representers/openstax/accounts/api/v1/application_group_representer.rb
271
+ - app/representers/openstax/accounts/api/v1/application_groups_representer.rb
272
+ - app/representers/openstax/accounts/api/v1/group_nesting_representer.rb
273
+ - app/representers/openstax/accounts/api/v1/group_representer.rb
274
+ - app/representers/openstax/accounts/api/v1/group_user_representer.rb
307
275
  - app/routines/openstax/accounts/dev/search_accounts.rb
308
276
  - app/routines/openstax/accounts/search_accounts.rb
309
277
  - app/routines/openstax/accounts/sync_accounts.rb
278
+ - app/routines/openstax/accounts/sync_groups.rb
279
+ - app/routines/openstax/accounts/update_group_caches.rb
310
280
  - app/views/layouts/openstax/accounts/application.html.erb
311
281
  - app/views/openstax/accounts/dev/accounts/_search_results.html.erb
312
282
  - app/views/openstax/accounts/dev/accounts/index.html.erb
@@ -316,6 +286,10 @@ files:
316
286
  - config/initializers/action_interceptor.rb
317
287
  - config/routes.rb
318
288
  - db/migrate/0_create_openstax_accounts_accounts.rb
289
+ - db/migrate/20140811182433_create_openstax_accounts_groups.rb
290
+ - db/migrate/20140811182505_create_openstax_accounts_group_members.rb
291
+ - db/migrate/20140811182527_create_openstax_accounts_group_owners.rb
292
+ - db/migrate/20140811182553_create_openstax_accounts_group_nestings.rb
319
293
  - lib/generators/openstax/accounts/schedule/USAGE
320
294
  - lib/generators/openstax/accounts/schedule/schedule_generator.rb
321
295
  - lib/generators/openstax/accounts/schedule/templates/schedule.rb
@@ -324,6 +298,7 @@ files:
324
298
  - lib/openstax/accounts/default_account_user_mapper.rb
325
299
  - lib/openstax/accounts/engine.rb
326
300
  - lib/openstax/accounts/extend_builtins.rb
301
+ - lib/openstax/accounts/has_many_through_groups.rb
327
302
  - lib/openstax/accounts/version.rb
328
303
  - lib/openstax_accounts.rb
329
304
  - spec/controllers/openstax/accounts/dev/accounts_controller_spec.rb
@@ -332,13 +307,19 @@ files:
332
307
  - spec/dummy/Rakefile
333
308
  - spec/dummy/app/assets/javascripts/application.js
334
309
  - spec/dummy/app/assets/stylesheets/application.css
310
+ - spec/dummy/app/controllers/api/application_groups_controller.rb
335
311
  - spec/dummy/app/controllers/api/application_users_controller.rb
336
312
  - spec/dummy/app/controllers/api/dummy_controller.rb
313
+ - spec/dummy/app/controllers/api/group_members_controller.rb
314
+ - spec/dummy/app/controllers/api/group_nestings_controller.rb
315
+ - spec/dummy/app/controllers/api/group_owners_controller.rb
316
+ - spec/dummy/app/controllers/api/groups_controller.rb
337
317
  - spec/dummy/app/controllers/api/users_controller.rb
338
318
  - spec/dummy/app/controllers/application_controller.rb
339
319
  - spec/dummy/app/controllers/oauth_controller.rb
340
320
  - spec/dummy/app/helpers/application_helper.rb
341
321
  - spec/dummy/app/models/anonymous_user.rb
322
+ - spec/dummy/app/models/ownership.rb
342
323
  - spec/dummy/app/models/user.rb
343
324
  - spec/dummy/config.ru
344
325
  - spec/dummy/config/application.rb
@@ -348,28 +329,43 @@ files:
348
329
  - spec/dummy/config/environments/development.rb
349
330
  - spec/dummy/config/environments/production.rb
350
331
  - spec/dummy/config/environments/test.rb
332
+ - spec/dummy/config/initializers/assets.rb
351
333
  - spec/dummy/config/initializers/backtrace_silencers.rb
334
+ - spec/dummy/config/initializers/cookies_serializer.rb
335
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
352
336
  - spec/dummy/config/initializers/inflections.rb
353
337
  - spec/dummy/config/initializers/mime_types.rb
354
338
  - spec/dummy/config/initializers/openstax_accounts.rb
355
- - spec/dummy/config/initializers/secret_token.rb
356
339
  - spec/dummy/config/initializers/session_store.rb
357
340
  - spec/dummy/config/initializers/wrap_parameters.rb
358
341
  - spec/dummy/config/locales/en.yml
359
342
  - spec/dummy/config/routes.rb
343
+ - spec/dummy/config/secrets.yml
360
344
  - spec/dummy/db/migrate/1_create_users.rb
345
+ - spec/dummy/db/migrate/2_create_ownerships.rb
361
346
  - spec/dummy/db/schema.rb
347
+ - spec/dummy/db/test.sqlite3
348
+ - spec/dummy/log/development.log
349
+ - spec/dummy/log/test.log
362
350
  - spec/dummy/public/404.html
363
351
  - spec/dummy/public/422.html
364
352
  - spec/dummy/public/500.html
365
353
  - spec/dummy/public/favicon.ico
366
354
  - spec/dummy/script/rails
367
355
  - spec/factories/openstax_accounts_account.rb
356
+ - spec/factories/openstax_accounts_group.rb
357
+ - spec/factories/openstax_accounts_group_member.rb
358
+ - spec/factories/openstax_accounts_group_nesting.rb
359
+ - spec/factories/openstax_accounts_group_owner.rb
368
360
  - spec/lib/openstax/accounts/current_user_manager_spec.rb
361
+ - spec/lib/openstax/accounts/has_many_through_groups_spec.rb
369
362
  - spec/lib/openstax_accounts_spec.rb
370
363
  - spec/models/openstax/accounts/account_spec.rb
371
364
  - spec/models/openstax/accounts/anonymous_account_spec.rb
365
+ - spec/models/openstax/accounts/group_spec.rb
372
366
  - spec/routines/openstax/accounts/search_accounts_spec.rb
367
+ - spec/routines/openstax/accounts/sync_accounts_spec.rb
368
+ - spec/routines/openstax/accounts/sync_groups_spec.rb
373
369
  - spec/spec_helper.rb
374
370
  homepage: http://github.com/openstax/accounts-rails
375
371
  licenses: []
@@ -399,13 +395,19 @@ test_files:
399
395
  - spec/controllers/openstax/accounts/sessions_controller_spec.rb
400
396
  - spec/dummy/app/assets/javascripts/application.js
401
397
  - spec/dummy/app/assets/stylesheets/application.css
398
+ - spec/dummy/app/controllers/api/application_groups_controller.rb
402
399
  - spec/dummy/app/controllers/api/application_users_controller.rb
403
400
  - spec/dummy/app/controllers/api/dummy_controller.rb
401
+ - spec/dummy/app/controllers/api/group_members_controller.rb
402
+ - spec/dummy/app/controllers/api/group_nestings_controller.rb
403
+ - spec/dummy/app/controllers/api/group_owners_controller.rb
404
+ - spec/dummy/app/controllers/api/groups_controller.rb
404
405
  - spec/dummy/app/controllers/api/users_controller.rb
405
406
  - spec/dummy/app/controllers/application_controller.rb
406
407
  - spec/dummy/app/controllers/oauth_controller.rb
407
408
  - spec/dummy/app/helpers/application_helper.rb
408
409
  - spec/dummy/app/models/anonymous_user.rb
410
+ - spec/dummy/app/models/ownership.rb
409
411
  - spec/dummy/app/models/user.rb
410
412
  - spec/dummy/config/application.rb
411
413
  - spec/dummy/config/boot.rb
@@ -414,18 +416,25 @@ test_files:
414
416
  - spec/dummy/config/environments/development.rb
415
417
  - spec/dummy/config/environments/production.rb
416
418
  - spec/dummy/config/environments/test.rb
419
+ - spec/dummy/config/initializers/assets.rb
417
420
  - spec/dummy/config/initializers/backtrace_silencers.rb
421
+ - spec/dummy/config/initializers/cookies_serializer.rb
422
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
418
423
  - spec/dummy/config/initializers/inflections.rb
419
424
  - spec/dummy/config/initializers/mime_types.rb
420
425
  - spec/dummy/config/initializers/openstax_accounts.rb
421
- - spec/dummy/config/initializers/secret_token.rb
422
426
  - spec/dummy/config/initializers/session_store.rb
423
427
  - spec/dummy/config/initializers/wrap_parameters.rb
424
428
  - spec/dummy/config/locales/en.yml
425
429
  - spec/dummy/config/routes.rb
430
+ - spec/dummy/config/secrets.yml
426
431
  - spec/dummy/config.ru
427
432
  - spec/dummy/db/migrate/1_create_users.rb
433
+ - spec/dummy/db/migrate/2_create_ownerships.rb
428
434
  - spec/dummy/db/schema.rb
435
+ - spec/dummy/db/test.sqlite3
436
+ - spec/dummy/log/development.log
437
+ - spec/dummy/log/test.log
429
438
  - spec/dummy/public/404.html
430
439
  - spec/dummy/public/422.html
431
440
  - spec/dummy/public/500.html
@@ -434,9 +443,17 @@ test_files:
434
443
  - spec/dummy/README.md
435
444
  - spec/dummy/script/rails
436
445
  - spec/factories/openstax_accounts_account.rb
446
+ - spec/factories/openstax_accounts_group.rb
447
+ - spec/factories/openstax_accounts_group_member.rb
448
+ - spec/factories/openstax_accounts_group_nesting.rb
449
+ - spec/factories/openstax_accounts_group_owner.rb
437
450
  - spec/lib/openstax/accounts/current_user_manager_spec.rb
451
+ - spec/lib/openstax/accounts/has_many_through_groups_spec.rb
438
452
  - spec/lib/openstax_accounts_spec.rb
439
453
  - spec/models/openstax/accounts/account_spec.rb
440
454
  - spec/models/openstax/accounts/anonymous_account_spec.rb
455
+ - spec/models/openstax/accounts/group_spec.rb
441
456
  - spec/routines/openstax/accounts/search_accounts_spec.rb
457
+ - spec/routines/openstax/accounts/sync_accounts_spec.rb
458
+ - spec/routines/openstax/accounts/sync_groups_spec.rb
442
459
  - spec/spec_helper.rb
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = 'b230f4e50b455110724fca292b4f33304d40c8d059118e382150a12ba7701f31ec1333b592b3c8e1447ca736dbdab99f8124ab26dae8a1eb416d9928a171e345'