devise_g5_authenticatable 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +25 -0
  6. data/Gemfile +23 -0
  7. data/LICENSE +20 -0
  8. data/README.md +243 -0
  9. data/Rakefile +20 -0
  10. data/app/controllers/devise_g5_authenticatable/registrations_controller.rb +5 -0
  11. data/app/controllers/devise_g5_authenticatable/sessions_controller.rb +58 -0
  12. data/circle.yml +4 -0
  13. data/config/initializers/devise_g5_authenticatable.rb +3 -0
  14. data/config/locales/en.yml +6 -0
  15. data/devise_g5_authenticatable.gemspec +24 -0
  16. data/lib/devise_g5_authenticatable.rb +16 -0
  17. data/lib/devise_g5_authenticatable/controllers/helpers.rb +37 -0
  18. data/lib/devise_g5_authenticatable/controllers/url_helpers.rb +13 -0
  19. data/lib/devise_g5_authenticatable/engine.rb +11 -0
  20. data/lib/devise_g5_authenticatable/g5.rb +4 -0
  21. data/lib/devise_g5_authenticatable/g5/auth_password_validator.rb +30 -0
  22. data/lib/devise_g5_authenticatable/g5/auth_user_creator.rb +48 -0
  23. data/lib/devise_g5_authenticatable/g5/auth_user_updater.rb +43 -0
  24. data/lib/devise_g5_authenticatable/g5/user_exporter.rb +61 -0
  25. data/lib/devise_g5_authenticatable/models/g5_authenticatable.rb +99 -0
  26. data/lib/devise_g5_authenticatable/models/protected_attributes.rb +16 -0
  27. data/lib/devise_g5_authenticatable/omniauth.rb +9 -0
  28. data/lib/devise_g5_authenticatable/routes.rb +58 -0
  29. data/lib/devise_g5_authenticatable/version.rb +3 -0
  30. data/lib/tasks/g5/export_users.rake +13 -0
  31. data/spec/controllers/helpers_spec.rb +295 -0
  32. data/spec/controllers/sessions_controller_spec.rb +256 -0
  33. data/spec/controllers/url_helpers_spec.rb +332 -0
  34. data/spec/dummy/.gitignore +15 -0
  35. data/spec/dummy/README.rdoc +261 -0
  36. data/spec/dummy/Rakefile +7 -0
  37. data/spec/dummy/app/assets/images/rails.png +0 -0
  38. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  39. data/spec/dummy/app/assets/javascripts/custom_sessions.js +2 -0
  40. data/spec/dummy/app/assets/javascripts/home.js +2 -0
  41. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  42. data/spec/dummy/app/assets/stylesheets/custom_sessions.css +4 -0
  43. data/spec/dummy/app/assets/stylesheets/home.css +4 -0
  44. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  45. data/spec/dummy/app/controllers/custom_registrations_controllers.rb +2 -0
  46. data/spec/dummy/app/controllers/custom_sessions_controller.rb +2 -0
  47. data/spec/dummy/app/controllers/home_controller.rb +4 -0
  48. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  49. data/spec/dummy/app/helpers/custom_sessions_helper.rb +2 -0
  50. data/spec/dummy/app/helpers/home_helper.rb +2 -0
  51. data/spec/dummy/app/mailers/.gitkeep +0 -0
  52. data/spec/dummy/app/models/admin.rb +3 -0
  53. data/spec/dummy/app/models/user.rb +10 -0
  54. data/spec/dummy/app/views/anonymous/new.html.erb +0 -0
  55. data/spec/dummy/app/views/home/index.html.erb +1 -0
  56. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  57. data/spec/dummy/config.ru +4 -0
  58. data/spec/dummy/config/application.rb +64 -0
  59. data/spec/dummy/config/boot.rb +10 -0
  60. data/spec/dummy/config/database.yml.ci +6 -0
  61. data/spec/dummy/config/database.yml.sample +13 -0
  62. data/spec/dummy/config/environment.rb +5 -0
  63. data/spec/dummy/config/environments/development.rb +39 -0
  64. data/spec/dummy/config/environments/production.rb +67 -0
  65. data/spec/dummy/config/environments/test.rb +37 -0
  66. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  67. data/spec/dummy/config/initializers/devise.rb +259 -0
  68. data/spec/dummy/config/initializers/inflections.rb +15 -0
  69. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  70. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  71. data/spec/dummy/config/initializers/session_store.rb +8 -0
  72. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  73. data/spec/dummy/config/locales/devise.en.yml +60 -0
  74. data/spec/dummy/config/locales/en.yml +5 -0
  75. data/spec/dummy/config/routes.rb +70 -0
  76. data/spec/dummy/db/migrate/20131230235849_devise_create_users.rb +42 -0
  77. data/spec/dummy/db/migrate/20140102213131_drop_database_authenticatable.rb +16 -0
  78. data/spec/dummy/db/migrate/20140103032308_drop_recoverable.rb +16 -0
  79. data/spec/dummy/db/migrate/20140103042329_drop_rememberable.rb +13 -0
  80. data/spec/dummy/db/migrate/20140103174810_add_omniauth_columns_to_users.rb +18 -0
  81. data/spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb +8 -0
  82. data/spec/dummy/db/migrate/20140113202948_devise_create_admins.rb +42 -0
  83. data/spec/dummy/db/migrate/20140113233821_add_provider_and_uid_to_admins.rb +8 -0
  84. data/spec/dummy/db/schema.rb +50 -0
  85. data/spec/dummy/db/seeds.rb +7 -0
  86. data/spec/dummy/lib/assets/.gitkeep +0 -0
  87. data/spec/dummy/lib/tasks/.gitkeep +0 -0
  88. data/spec/dummy/log/.gitkeep +0 -0
  89. data/spec/dummy/public/404.html +26 -0
  90. data/spec/dummy/public/422.html +26 -0
  91. data/spec/dummy/public/500.html +25 -0
  92. data/spec/dummy/public/favicon.ico +0 -0
  93. data/spec/dummy/public/robots.txt +5 -0
  94. data/spec/dummy/script/rails +6 -0
  95. data/spec/dummy/vendor/assets/javascripts/.gitkeep +0 -0
  96. data/spec/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  97. data/spec/dummy/vendor/plugins/.gitkeep +0 -0
  98. data/spec/factories/admin.rb +10 -0
  99. data/spec/factories/user.rb +10 -0
  100. data/spec/features/edit_registration_spec.rb +109 -0
  101. data/spec/features/registration_spec.rb +99 -0
  102. data/spec/features/sign_in_spec.rb +91 -0
  103. data/spec/features/sign_out_spec.rb +7 -0
  104. data/spec/g5/auth_password_validator_spec.rb +81 -0
  105. data/spec/g5/auth_user_creator_spec.rb +100 -0
  106. data/spec/g5/auth_user_updater_spec.rb +113 -0
  107. data/spec/g5/user_exporter_spec.rb +105 -0
  108. data/spec/models/g5_authenticatable_spec.rb +540 -0
  109. data/spec/models/protected_attributes_spec.rb +17 -0
  110. data/spec/routing/registrations_routing_spec.rb +107 -0
  111. data/spec/routing/sessions_routing_spec.rb +111 -0
  112. data/spec/spec_helper.rb +44 -0
  113. data/spec/support/devise.rb +3 -0
  114. data/spec/support/omniauth.rb +3 -0
  115. data/spec/support/shared_contexts/oauth_error.rb +9 -0
  116. data/spec/support/shared_contexts/rake.rb +21 -0
  117. data/spec/support/shared_examples/registration_error.rb +15 -0
  118. data/spec/support/user_feature_methods.rb +26 -0
  119. data/spec/tasks/export_users_spec.rb +90 -0
  120. metadata +293 -0
metadata ADDED
@@ -0,0 +1,293 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: devise_g5_authenticatable
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Maeve Revels
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: devise
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: g5_authentication_client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: omniauth-g5
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.1'
55
+ description: Devise extension for the G5 Auth service
56
+ email:
57
+ - maeve.revels@getg5.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".ruby-version"
65
+ - CHANGELOG.md
66
+ - Gemfile
67
+ - LICENSE
68
+ - README.md
69
+ - Rakefile
70
+ - app/controllers/devise_g5_authenticatable/registrations_controller.rb
71
+ - app/controllers/devise_g5_authenticatable/sessions_controller.rb
72
+ - circle.yml
73
+ - config/initializers/devise_g5_authenticatable.rb
74
+ - config/locales/en.yml
75
+ - devise_g5_authenticatable.gemspec
76
+ - lib/devise_g5_authenticatable.rb
77
+ - lib/devise_g5_authenticatable/controllers/helpers.rb
78
+ - lib/devise_g5_authenticatable/controllers/url_helpers.rb
79
+ - lib/devise_g5_authenticatable/engine.rb
80
+ - lib/devise_g5_authenticatable/g5.rb
81
+ - lib/devise_g5_authenticatable/g5/auth_password_validator.rb
82
+ - lib/devise_g5_authenticatable/g5/auth_user_creator.rb
83
+ - lib/devise_g5_authenticatable/g5/auth_user_updater.rb
84
+ - lib/devise_g5_authenticatable/g5/user_exporter.rb
85
+ - lib/devise_g5_authenticatable/models/g5_authenticatable.rb
86
+ - lib/devise_g5_authenticatable/models/protected_attributes.rb
87
+ - lib/devise_g5_authenticatable/omniauth.rb
88
+ - lib/devise_g5_authenticatable/routes.rb
89
+ - lib/devise_g5_authenticatable/version.rb
90
+ - lib/tasks/g5/export_users.rake
91
+ - spec/controllers/helpers_spec.rb
92
+ - spec/controllers/sessions_controller_spec.rb
93
+ - spec/controllers/url_helpers_spec.rb
94
+ - spec/dummy/.gitignore
95
+ - spec/dummy/README.rdoc
96
+ - spec/dummy/Rakefile
97
+ - spec/dummy/app/assets/images/rails.png
98
+ - spec/dummy/app/assets/javascripts/application.js
99
+ - spec/dummy/app/assets/javascripts/custom_sessions.js
100
+ - spec/dummy/app/assets/javascripts/home.js
101
+ - spec/dummy/app/assets/stylesheets/application.css
102
+ - spec/dummy/app/assets/stylesheets/custom_sessions.css
103
+ - spec/dummy/app/assets/stylesheets/home.css
104
+ - spec/dummy/app/controllers/application_controller.rb
105
+ - spec/dummy/app/controllers/custom_registrations_controllers.rb
106
+ - spec/dummy/app/controllers/custom_sessions_controller.rb
107
+ - spec/dummy/app/controllers/home_controller.rb
108
+ - spec/dummy/app/helpers/application_helper.rb
109
+ - spec/dummy/app/helpers/custom_sessions_helper.rb
110
+ - spec/dummy/app/helpers/home_helper.rb
111
+ - spec/dummy/app/mailers/.gitkeep
112
+ - spec/dummy/app/models/admin.rb
113
+ - spec/dummy/app/models/user.rb
114
+ - spec/dummy/app/views/anonymous/new.html.erb
115
+ - spec/dummy/app/views/home/index.html.erb
116
+ - spec/dummy/app/views/layouts/application.html.erb
117
+ - spec/dummy/config.ru
118
+ - spec/dummy/config/application.rb
119
+ - spec/dummy/config/boot.rb
120
+ - spec/dummy/config/database.yml.ci
121
+ - spec/dummy/config/database.yml.sample
122
+ - spec/dummy/config/environment.rb
123
+ - spec/dummy/config/environments/development.rb
124
+ - spec/dummy/config/environments/production.rb
125
+ - spec/dummy/config/environments/test.rb
126
+ - spec/dummy/config/initializers/backtrace_silencers.rb
127
+ - spec/dummy/config/initializers/devise.rb
128
+ - spec/dummy/config/initializers/inflections.rb
129
+ - spec/dummy/config/initializers/mime_types.rb
130
+ - spec/dummy/config/initializers/secret_token.rb
131
+ - spec/dummy/config/initializers/session_store.rb
132
+ - spec/dummy/config/initializers/wrap_parameters.rb
133
+ - spec/dummy/config/locales/devise.en.yml
134
+ - spec/dummy/config/locales/en.yml
135
+ - spec/dummy/config/routes.rb
136
+ - spec/dummy/db/migrate/20131230235849_devise_create_users.rb
137
+ - spec/dummy/db/migrate/20140102213131_drop_database_authenticatable.rb
138
+ - spec/dummy/db/migrate/20140103032308_drop_recoverable.rb
139
+ - spec/dummy/db/migrate/20140103042329_drop_rememberable.rb
140
+ - spec/dummy/db/migrate/20140103174810_add_omniauth_columns_to_users.rb
141
+ - spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb
142
+ - spec/dummy/db/migrate/20140113202948_devise_create_admins.rb
143
+ - spec/dummy/db/migrate/20140113233821_add_provider_and_uid_to_admins.rb
144
+ - spec/dummy/db/schema.rb
145
+ - spec/dummy/db/seeds.rb
146
+ - spec/dummy/lib/assets/.gitkeep
147
+ - spec/dummy/lib/tasks/.gitkeep
148
+ - spec/dummy/log/.gitkeep
149
+ - spec/dummy/public/404.html
150
+ - spec/dummy/public/422.html
151
+ - spec/dummy/public/500.html
152
+ - spec/dummy/public/favicon.ico
153
+ - spec/dummy/public/robots.txt
154
+ - spec/dummy/script/rails
155
+ - spec/dummy/vendor/assets/javascripts/.gitkeep
156
+ - spec/dummy/vendor/assets/stylesheets/.gitkeep
157
+ - spec/dummy/vendor/plugins/.gitkeep
158
+ - spec/factories/admin.rb
159
+ - spec/factories/user.rb
160
+ - spec/features/edit_registration_spec.rb
161
+ - spec/features/registration_spec.rb
162
+ - spec/features/sign_in_spec.rb
163
+ - spec/features/sign_out_spec.rb
164
+ - spec/g5/auth_password_validator_spec.rb
165
+ - spec/g5/auth_user_creator_spec.rb
166
+ - spec/g5/auth_user_updater_spec.rb
167
+ - spec/g5/user_exporter_spec.rb
168
+ - spec/models/g5_authenticatable_spec.rb
169
+ - spec/models/protected_attributes_spec.rb
170
+ - spec/routing/registrations_routing_spec.rb
171
+ - spec/routing/sessions_routing_spec.rb
172
+ - spec/spec_helper.rb
173
+ - spec/support/devise.rb
174
+ - spec/support/omniauth.rb
175
+ - spec/support/shared_contexts/oauth_error.rb
176
+ - spec/support/shared_contexts/rake.rb
177
+ - spec/support/shared_examples/registration_error.rb
178
+ - spec/support/user_feature_methods.rb
179
+ - spec/tasks/export_users_spec.rb
180
+ homepage: https://github.com/G5/devise_g5_authenticatable
181
+ licenses:
182
+ - MIT
183
+ metadata: {}
184
+ post_install_message:
185
+ rdoc_options: []
186
+ require_paths:
187
+ - lib
188
+ required_ruby_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ required_rubygems_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ requirements: []
199
+ rubyforge_project:
200
+ rubygems_version: 2.2.0
201
+ signing_key:
202
+ specification_version: 4
203
+ summary: Devise extension for the G5 Auth service
204
+ test_files:
205
+ - spec/controllers/helpers_spec.rb
206
+ - spec/controllers/sessions_controller_spec.rb
207
+ - spec/controllers/url_helpers_spec.rb
208
+ - spec/dummy/.gitignore
209
+ - spec/dummy/README.rdoc
210
+ - spec/dummy/Rakefile
211
+ - spec/dummy/app/assets/images/rails.png
212
+ - spec/dummy/app/assets/javascripts/application.js
213
+ - spec/dummy/app/assets/javascripts/custom_sessions.js
214
+ - spec/dummy/app/assets/javascripts/home.js
215
+ - spec/dummy/app/assets/stylesheets/application.css
216
+ - spec/dummy/app/assets/stylesheets/custom_sessions.css
217
+ - spec/dummy/app/assets/stylesheets/home.css
218
+ - spec/dummy/app/controllers/application_controller.rb
219
+ - spec/dummy/app/controllers/custom_registrations_controllers.rb
220
+ - spec/dummy/app/controllers/custom_sessions_controller.rb
221
+ - spec/dummy/app/controllers/home_controller.rb
222
+ - spec/dummy/app/helpers/application_helper.rb
223
+ - spec/dummy/app/helpers/custom_sessions_helper.rb
224
+ - spec/dummy/app/helpers/home_helper.rb
225
+ - spec/dummy/app/mailers/.gitkeep
226
+ - spec/dummy/app/models/admin.rb
227
+ - spec/dummy/app/models/user.rb
228
+ - spec/dummy/app/views/anonymous/new.html.erb
229
+ - spec/dummy/app/views/home/index.html.erb
230
+ - spec/dummy/app/views/layouts/application.html.erb
231
+ - spec/dummy/config.ru
232
+ - spec/dummy/config/application.rb
233
+ - spec/dummy/config/boot.rb
234
+ - spec/dummy/config/database.yml.ci
235
+ - spec/dummy/config/database.yml.sample
236
+ - spec/dummy/config/environment.rb
237
+ - spec/dummy/config/environments/development.rb
238
+ - spec/dummy/config/environments/production.rb
239
+ - spec/dummy/config/environments/test.rb
240
+ - spec/dummy/config/initializers/backtrace_silencers.rb
241
+ - spec/dummy/config/initializers/devise.rb
242
+ - spec/dummy/config/initializers/inflections.rb
243
+ - spec/dummy/config/initializers/mime_types.rb
244
+ - spec/dummy/config/initializers/secret_token.rb
245
+ - spec/dummy/config/initializers/session_store.rb
246
+ - spec/dummy/config/initializers/wrap_parameters.rb
247
+ - spec/dummy/config/locales/devise.en.yml
248
+ - spec/dummy/config/locales/en.yml
249
+ - spec/dummy/config/routes.rb
250
+ - spec/dummy/db/migrate/20131230235849_devise_create_users.rb
251
+ - spec/dummy/db/migrate/20140102213131_drop_database_authenticatable.rb
252
+ - spec/dummy/db/migrate/20140103032308_drop_recoverable.rb
253
+ - spec/dummy/db/migrate/20140103042329_drop_rememberable.rb
254
+ - spec/dummy/db/migrate/20140103174810_add_omniauth_columns_to_users.rb
255
+ - spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb
256
+ - spec/dummy/db/migrate/20140113202948_devise_create_admins.rb
257
+ - spec/dummy/db/migrate/20140113233821_add_provider_and_uid_to_admins.rb
258
+ - spec/dummy/db/schema.rb
259
+ - spec/dummy/db/seeds.rb
260
+ - spec/dummy/lib/assets/.gitkeep
261
+ - spec/dummy/lib/tasks/.gitkeep
262
+ - spec/dummy/log/.gitkeep
263
+ - spec/dummy/public/404.html
264
+ - spec/dummy/public/422.html
265
+ - spec/dummy/public/500.html
266
+ - spec/dummy/public/favicon.ico
267
+ - spec/dummy/public/robots.txt
268
+ - spec/dummy/script/rails
269
+ - spec/dummy/vendor/assets/javascripts/.gitkeep
270
+ - spec/dummy/vendor/assets/stylesheets/.gitkeep
271
+ - spec/dummy/vendor/plugins/.gitkeep
272
+ - spec/factories/admin.rb
273
+ - spec/factories/user.rb
274
+ - spec/features/edit_registration_spec.rb
275
+ - spec/features/registration_spec.rb
276
+ - spec/features/sign_in_spec.rb
277
+ - spec/features/sign_out_spec.rb
278
+ - spec/g5/auth_password_validator_spec.rb
279
+ - spec/g5/auth_user_creator_spec.rb
280
+ - spec/g5/auth_user_updater_spec.rb
281
+ - spec/g5/user_exporter_spec.rb
282
+ - spec/models/g5_authenticatable_spec.rb
283
+ - spec/models/protected_attributes_spec.rb
284
+ - spec/routing/registrations_routing_spec.rb
285
+ - spec/routing/sessions_routing_spec.rb
286
+ - spec/spec_helper.rb
287
+ - spec/support/devise.rb
288
+ - spec/support/omniauth.rb
289
+ - spec/support/shared_contexts/oauth_error.rb
290
+ - spec/support/shared_contexts/rake.rb
291
+ - spec/support/shared_examples/registration_error.rb
292
+ - spec/support/user_feature_methods.rb
293
+ - spec/tasks/export_users_spec.rb