hello-rails 0.0.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +97 -0
  4. data/Rakefile +23 -0
  5. data/app/controllers/hello/application_controller.rb +27 -0
  6. data/app/controllers/hello/authentication/sessions_controller.rb +81 -0
  7. data/app/controllers/hello/authentication/sign_in_controller.rb +39 -0
  8. data/app/controllers/hello/authentication/sudo_mode_controller.rb +40 -0
  9. data/app/controllers/hello/concerns/authentication/sign_in.rb +44 -0
  10. data/app/controllers/hello/concerns/management/forgot_password.rb +45 -0
  11. data/app/controllers/hello/concerns/management/reset_password.rb +33 -0
  12. data/app/controllers/hello/concerns/registration/sign_up.rb +64 -0
  13. data/app/controllers/hello/internationalization/locale_controller.rb +28 -0
  14. data/app/controllers/hello/management/accesses_controller.rb +29 -0
  15. data/app/controllers/hello/management/confirm_emails_controller.rb +41 -0
  16. data/app/controllers/hello/management/emails_controller.rb +67 -0
  17. data/app/controllers/hello/management/forgot_password_controller.rb +41 -0
  18. data/app/controllers/hello/management/passwords_controller.rb +57 -0
  19. data/app/controllers/hello/management/profiles_controller.rb +71 -0
  20. data/app/controllers/hello/management/reset_password_controller.rb +53 -0
  21. data/app/controllers/hello/registration/sign_up_controller.rb +63 -0
  22. data/app/helpers/hello/application_helper.rb +5 -0
  23. data/app/mailers/hello/mailer.rb +26 -0
  24. data/app/models/access.rb +2 -0
  25. data/app/models/credential.rb +2 -0
  26. data/app/models/email_credential.rb +2 -0
  27. data/app/models/password_credential.rb +2 -0
  28. data/app/models/user.rb +2 -0
  29. data/app/views/hello/authentication/_sign_in.html.erb +64 -0
  30. data/app/views/hello/authentication/new_session.html.erb +4 -0
  31. data/app/views/hello/authentication/sessions.html.erb +36 -0
  32. data/app/views/hello/authentication/sign_in.html.erb +3 -0
  33. data/app/views/hello/authentication/sudo_mode.html.erb +37 -0
  34. data/app/views/hello/internationalization/locales.html.erb +7 -0
  35. data/app/views/hello/mailer/confirm_email.html.erb +12 -0
  36. data/app/views/hello/mailer/forgot_password.html.erb +12 -0
  37. data/app/views/hello/mailer/welcome.html.erb +11 -0
  38. data/app/views/hello/management/accesses.html.erb +47 -0
  39. data/app/views/hello/management/cancel.html.erb +14 -0
  40. data/app/views/hello/management/email_credentials/expired_confirmation_token.html.erb +1 -0
  41. data/app/views/hello/management/email_credentials/index.html.erb +84 -0
  42. data/app/views/hello/management/password_credentials/_forgot_form.html.erb +17 -0
  43. data/app/views/hello/management/password_credentials/_reset_form.html.erb +39 -0
  44. data/app/views/hello/management/password_credentials/forgot.html.erb +10 -0
  45. data/app/views/hello/management/password_credentials/forgot_success.html.erb +26 -0
  46. data/app/views/hello/management/password_credentials/reset.html.erb +3 -0
  47. data/app/views/hello/management/password_credentials/show.html.erb +25 -0
  48. data/app/views/hello/management/user.html.erb +73 -0
  49. data/app/views/hello/registration/_sign_up.html.erb +86 -0
  50. data/app/views/hello/registration/sign_up.html.erb +3 -0
  51. data/app/views/hello/registration/sign_up_widget.html.erb +3 -0
  52. data/app/views/hello/shared/_errors.html.erb +11 -0
  53. data/app/views/hello/shared/_flash.html.erb +8 -0
  54. data/app/views/hello/shared/_nav_pills.html.erb +15 -0
  55. data/app/views/hello/shared/_session_expiration.html.erb +15 -0
  56. data/app/views/hello/shared/_settings.html.erb +41 -0
  57. data/config/locales/hello.en.yml +69 -0
  58. data/config/locales/hello.es.yml +71 -0
  59. data/config/locales/hello.fr.yml +71 -0
  60. data/config/locales/hello.pl.yml +71 -0
  61. data/config/locales/hello.pt-BR.yml +71 -0
  62. data/config/locales/hello.zh-CN.yml +71 -0
  63. data/config/locales/hello.zh-TW.yml +71 -0
  64. data/config/routes.rb +74 -0
  65. data/db/migrate/1_create_credentials.rb +17 -0
  66. data/db/migrate/2_create_accesses.rb +15 -0
  67. data/db/migrate/3_create_users.rb +23 -0
  68. data/lib/generators/hello/concerns/USAGE +8 -0
  69. data/lib/generators/hello/concerns/concerns_generator.rb +10 -0
  70. data/lib/generators/hello/from_devise/USAGE +8 -0
  71. data/lib/generators/hello/from_devise/from_devise_generator.rb +13 -0
  72. data/lib/generators/hello/from_devise/templates/from_devise.migration.rb +39 -0
  73. data/lib/generators/hello/install/USAGE +8 -0
  74. data/lib/generators/hello/install/install_generator.rb +94 -0
  75. data/lib/generators/hello/install/templates/application.html.erb +35 -0
  76. data/lib/generators/hello/install/templates/hello_helper.rb +16 -0
  77. data/lib/generators/hello/install/templates/initializer.rb +24 -0
  78. data/lib/generators/hello/install/templates/models/concerns/user/authorization.rb +21 -0
  79. data/lib/generators/hello/install/templates/models/user.rb +9 -0
  80. data/lib/generators/hello/install/templates/onboarding/index.html.erb +5 -0
  81. data/lib/generators/hello/install/templates/onboarding/onboarding_controller.rb +33 -0
  82. data/lib/generators/hello/install/templates/root/index.html.erb +7 -0
  83. data/lib/generators/hello/install/templates/root/root_controller.rb +6 -0
  84. data/lib/generators/hello/install/templates/users/controllers/users_controller.rb +71 -0
  85. data/lib/generators/hello/install/templates/users/views/users/index.html.erb +29 -0
  86. data/lib/generators/hello/install/templates/users/views/users/list.html.erb +35 -0
  87. data/lib/generators/hello/install/templates/users/views/users/new.html.erb +60 -0
  88. data/lib/generators/hello/install/templates/users/views/users/show.html.erb +74 -0
  89. data/lib/generators/hello/locales/USAGE +12 -0
  90. data/lib/generators/hello/locales/locales_generator.rb +64 -0
  91. data/lib/generators/hello/views/USAGE +8 -0
  92. data/lib/generators/hello/views/views_generator.rb +9 -0
  93. data/lib/hello-rails.rb +1 -0
  94. data/lib/hello.rb +36 -0
  95. data/lib/hello/CHANGES.md +26 -0
  96. data/lib/hello/business.rb +47 -0
  97. data/lib/hello/business/authentication/sign_in.rb +92 -0
  98. data/lib/hello/business/authentication/sign_out.rb +8 -0
  99. data/lib/hello/business/authentication/sudo_mode_authentication.rb +25 -0
  100. data/lib/hello/business/authentication/sudo_mode_expiration.rb +17 -0
  101. data/lib/hello/business/base.rb +33 -0
  102. data/lib/hello/business/internationalization/update_locale.rb +33 -0
  103. data/lib/hello/business/management/add_email.rb +19 -0
  104. data/lib/hello/business/management/cancel_account.rb +22 -0
  105. data/lib/hello/business/management/confirm_email.rb +36 -0
  106. data/lib/hello/business/management/forgot_password.rb +47 -0
  107. data/lib/hello/business/management/remove_email.rb +19 -0
  108. data/lib/hello/business/management/reset_password.rb +34 -0
  109. data/lib/hello/business/management/send_confirmation_email.rb +40 -0
  110. data/lib/hello/business/management/unlink_access.rb +8 -0
  111. data/lib/hello/business/management/update_profile.rb +44 -0
  112. data/lib/hello/business/registration/sign_up.rb +159 -0
  113. data/lib/hello/configuration.rb +12 -0
  114. data/lib/hello/encryptors.rb +6 -0
  115. data/lib/hello/encryptors/complex.rb +25 -0
  116. data/lib/hello/encryptors/simple.rb +27 -0
  117. data/lib/hello/engine.rb +23 -0
  118. data/lib/hello/errors.rb +12 -0
  119. data/lib/hello/locales.rb +238 -0
  120. data/lib/hello/middleware.rb +13 -0
  121. data/lib/hello/rails_active_record.rb +10 -0
  122. data/lib/hello/rails_active_record/access.rb +65 -0
  123. data/lib/hello/rails_active_record/credential.rb +51 -0
  124. data/lib/hello/rails_active_record/email_credential.rb +60 -0
  125. data/lib/hello/rails_active_record/password_credential.rb +70 -0
  126. data/lib/hello/rails_active_record/user.rb +99 -0
  127. data/lib/hello/rails_controller.rb +124 -0
  128. data/lib/hello/rails_controller/restrict_by_role.rb +79 -0
  129. data/lib/hello/rails_helper.rb +35 -0
  130. data/lib/hello/request_manager.rb +14 -0
  131. data/lib/hello/request_manager/abstract.rb +77 -0
  132. data/lib/hello/request_manager/factory.rb +32 -0
  133. data/lib/hello/request_manager/stateful.rb +53 -0
  134. data/lib/hello/request_manager/stateful/finder.rb +58 -0
  135. data/lib/hello/request_manager/stateful/session_wrapper.rb +37 -0
  136. data/lib/hello/request_manager/stateless.rb +35 -0
  137. data/lib/hello/time_zones.rb +7 -0
  138. data/lib/hello/utils.rb +11 -0
  139. data/lib/hello/utils/device_name.rb +34 -0
  140. data/lib/hello/version.rb +4 -0
  141. data/lib/tasks/hello_tasks.rake +4 -0
  142. data/spec/bdd/hello/authentication/authorization/authorization_role_restriction_spec.rb +291 -0
  143. data/spec/bdd/hello/authentication/authorization/authorization_router_constraints_spec.rb +41 -0
  144. data/spec/bdd/hello/authentication/authorization/authorization_sensitive_restriction_spec.rb +84 -0
  145. data/spec/bdd/hello/authentication/authorization/bdd.yml +1 -0
  146. data/spec/bdd/hello/authentication/bdd.yml +1 -0
  147. data/spec/bdd/hello/authentication/classic_sign_in_spec.rb +264 -0
  148. data/spec/bdd/hello/authentication/manage_sessions_spec.rb +292 -0
  149. data/spec/bdd/hello/authentication/sign_out_spec.rb +159 -0
  150. data/spec/bdd/hello/bdd.yml +1 -0
  151. data/spec/bdd/hello/internalionalization/anyone_can_change_their_locale/bdd.yml +1 -0
  152. data/spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_locale_page_spec.rb +90 -0
  153. data/spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_profile_page_spec.rb +64 -0
  154. data/spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_sign_in_form_spec.rb +31 -0
  155. data/spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_sign_up_form_spec.rb +34 -0
  156. data/spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/bdd.yml +1 -0
  157. data/spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_profile_page_spec.rb +14 -0
  158. data/spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_sign_in_form_spec.rb +14 -0
  159. data/spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_sign_up_form_spec.rb +14 -0
  160. data/spec/bdd/hello/internalionalization/bdd.yml +1 -0
  161. data/spec/bdd/hello/management/bdd.yml +1 -0
  162. data/spec/bdd/hello/management/cancel_account_spec.rb +128 -0
  163. data/spec/bdd/hello/management/manage_email_credentials/bdd.yml +1 -0
  164. data/spec/bdd/hello/management/manage_email_credentials/manage_email_credentials_emails_api_spec.rb +7 -0
  165. data/spec/bdd/hello/management/manage_email_credentials/manage_email_credentials_emails_page_spec.rb +252 -0
  166. data/spec/bdd/hello/management/manage_password_credentials/bdd.yml +1 -0
  167. data/spec/bdd/hello/management/manage_password_credentials/manage_password_forgot_password_spec.rb +68 -0
  168. data/spec/bdd/hello/management/manage_password_credentials/manage_password_page_spec.rb +60 -0
  169. data/spec/bdd/hello/management/manage_password_credentials/manage_password_reset_password_spec.rb +145 -0
  170. data/spec/bdd/hello/management/manage_profile/bdd.yml +1 -0
  171. data/spec/bdd/hello/management/manage_profile/manage_profile_api_spec.rb +7 -0
  172. data/spec/bdd/hello/management/manage_profile/manage_profile_page_spec.rb +65 -0
  173. data/spec/bdd/hello/management/manage_social_credentials/bdd.yml +1 -0
  174. data/spec/bdd/hello/management/manage_social_credentials/manage_social_credentials_pending_spec.rb +7 -0
  175. data/spec/bdd/hello/management/unlink_sessions_spec.rb +59 -0
  176. data/spec/bdd/hello/other/bdd.yml +1 -0
  177. data/spec/bdd/hello/other/create_user_spec.rb +70 -0
  178. data/spec/bdd/hello/other/impersonate_user_spec.rb +58 -0
  179. data/spec/bdd/hello/other/list_users_spec.rb +86 -0
  180. data/spec/bdd/hello/registration/bdd.yml +1 -0
  181. data/spec/bdd/hello/registration/classic_sign_up_spec.rb +228 -0
  182. data/spec/bdd/hello/registration/onboarding_process_spec.rb +101 -0
  183. data/spec/bdd/hello/support.rb +62 -0
  184. data/spec/business/hello/authentication/sign_in_spec.rb +72 -0
  185. data/spec/business/hello/registration/sign_up_spec.rb +258 -0
  186. data/spec/controllers/authentication_spec.rb +97 -0
  187. data/spec/controllers/localization_spec.rb +65 -0
  188. data/spec/controllers/request_can_carry_an_access_token_spec.rb +223 -0
  189. data/spec/fixtures/hello/password_mailer/confirmation +3 -0
  190. data/spec/fixtures/hello/password_mailer/forgot +3 -0
  191. data/spec/fixtures/hello/password_mailer/sign_up +3 -0
  192. data/spec/mailers/hello/mailer_spec.rb +53 -0
  193. data/spec/models/access_spec.rb +19 -0
  194. data/spec/models/credential_spec.rb +9 -0
  195. data/spec/models/email_credential_spec.rb +163 -0
  196. data/spec/models/hello/sign_up_model_spec.rb +64 -0
  197. data/spec/models/password_credential_spec.rb +75 -0
  198. data/spec/models/user_spec.rb +93 -0
  199. data/spec/others/configuration_spec.rb +25 -0
  200. data/spec/others/encryptors/complex_spec.rb +26 -0
  201. data/spec/others/encryptors/simple_spec.rb +21 -0
  202. data/spec/others/helper_spec.rb +10 -0
  203. data/spec/others/localization_consistency_spec.rb +73 -0
  204. data/spec/requests/forgot_password_spec.rb +36 -0
  205. data/spec/requests/reset_password_spec.rb +7 -0
  206. data/spec/requests/security/user_spec.rb +19 -0
  207. data/spec/routing/hello/accesses_routing_spec.rb +17 -0
  208. data/spec/routing/hello/emails_routing_spec.rb +37 -0
  209. data/spec/routing/hello/locale_routing_spec.rb +17 -0
  210. data/spec/routing/hello/profile_routing_spec.rb +29 -0
  211. data/spec/routing/hello/registration_routing_spec.rb +23 -0
  212. data/spec/routing/hello/sign_out_routing_spec.rb +11 -0
  213. data/spec/routing/hello/sudo_mode_routing_spec.rb +23 -0
  214. data/spec/routing/hello/users_routing_spec.rb +15 -0
  215. data/spec/spec_helper.rb +9 -0
  216. data/spec/spec_helper/codeclimate.rb +2 -0
  217. data/spec/spec_helper/configure_rspec.rb +23 -0
  218. data/spec/spec_helper/create_database.rb +5 -0
  219. data/spec/spec_helper/dummy_and_test_dependencies.rb +17 -0
  220. data/spec/spec_helper/support.rb +1 -0
  221. data/spec/support/factories.rb +60 -0
  222. data/spec/support/feature_injection.rb +118 -0
  223. data/spec/support/features/feature_support_given.rb +46 -0
  224. data/spec/support/features/feature_support_then.rb +43 -0
  225. data/spec/support/helpers/aliases.rb +76 -0
  226. data/spec/support/helpers/configuration.rb +6 -0
  227. data/spec/support/helpers/current.rb +16 -0
  228. data/spec/support/helpers/expect.rb +61 -0
  229. data/spec/support/helpers/given.rb +49 -0
  230. data/spec/support/helpers/shortcuts.rb +24 -0
  231. data/spec/support/helpers/then.rb +29 -0
  232. data/spec/support/helpers/when.rb +108 -0
  233. data/spec/support/requests/request_support.rb +8 -0
  234. data/spec/utils/device_name_spec.rb +228 -0
  235. metadata +562 -11
@@ -0,0 +1,24 @@
1
+
2
+ def json_response
3
+ JSON(response.body)
4
+ end
5
+
6
+ def response_status
7
+ [response.status, response.status_message]
8
+ end
9
+
10
+ def show_me
11
+ save_and_open_page
12
+ end
13
+
14
+ def page_reload
15
+ visit current_url
16
+ end
17
+
18
+ def click_nth_button(string, i)
19
+ page.all(:button, string)[i].click
20
+ end
21
+
22
+ def mock_stateless!
23
+ allow_any_instance_of(Hello::RequestManager::Factory).to receive(:is_stateless?).and_return(true)
24
+ end
@@ -0,0 +1,29 @@
1
+
2
+ def then_I_should_be_logged_in
3
+ then_I_should_be_logged_in_as_a_user
4
+ end
5
+
6
+ def then_I_should_be_logged_in_as_a_user(expected_accesses_count = 1)
7
+ then_I_should_see 'Hello, James Pinto!'
8
+ then_I_should_see 'Sign Out'
9
+ expect(Access.count).to eq(expected_accesses_count)
10
+ end
11
+
12
+ def then_I_should_be_logged_in_as_a_webmaster
13
+ then_I_should_see 'Hello, Admin!'
14
+ then_I_should_see 'Sign Out'
15
+ expect(Access.count).to eq(1)
16
+ end
17
+
18
+ def then_I_should_be_logged_out(_expected_accesses_count = 0)
19
+ then_I_should_see 'Hello, Guest!'
20
+ # expect(Access.count).to eq(expected_accesses_count)
21
+ end
22
+
23
+ def then_I_should_see(text)
24
+ expect(page).to have_content text
25
+ end
26
+
27
+ def then_I_should_not_see(text)
28
+ expect(page).not_to have_content text
29
+ end
@@ -0,0 +1,108 @@
1
+
2
+ def when_I_ask_to_reset_my_password(custom_login = nil)
3
+ visit hello.root_path
4
+ click_link 'Forgot'
5
+ within('form') do
6
+ fill_in 'forgot_password_login', with: (custom_login || 'foobar')
7
+ click_button 'Continue'
8
+ end
9
+ end
10
+
11
+ def when_sign_up_with_standard_data(_options = {})
12
+ when_sign_up_as_an_onboarding(expect_success: true)
13
+
14
+ click_button 'Continue'
15
+ # expect(current_path).to eq root_path
16
+ expect(current_path).to eq '/hello/user' # because there is no root path in this app
17
+ end
18
+
19
+ def when_sign_up_as_an_onboarding(options = {})
20
+ # if options[:expect_welcome_mailer] === true
21
+ # Hello::Mailer.should_receive(:welcome).and_return(double("mailer", deliver: true))
22
+ # elsif options[:expect_welcome_mailer] === false
23
+ # Hello::Mailer.should_not_receive(:welcome)
24
+ # end
25
+
26
+ # visit hello.root_path
27
+ visit hello.sign_up_path
28
+ within('form#new_sign_up') do
29
+ fill_in 'sign_up_name', with: 'James Pinto'
30
+ fill_in 'sign_up_email', with: 'foo@bar.com'
31
+ fill_in 'sign_up_username', with: 'foobar'
32
+ fill_in 'sign_up_password', with: '1234'
33
+ fill_in 'sign_up_city', with: 'OMG! I can customize Hello!'
34
+ click_button 'Sign Up'
35
+ end
36
+
37
+ expect(current_path).to eq('/onboarding') if options[:expect_success] === true
38
+ click_link 'expire' unless options[:skip_expire]
39
+ end
40
+
41
+ def when_sign_in_with_standard_data(options = {})
42
+ when_sign_in('foobar', (options[:password] || '1234'), options)
43
+ end
44
+
45
+ def when_sign_in_with_webmaster_data
46
+ when_sign_in('webmaster', '1234')
47
+ end
48
+
49
+ def when_sign_in(login, password, options = {})
50
+ # visit hello.root_path
51
+ visit hello.sign_in_path
52
+ within('form#new_sign_in') do
53
+ fill_in 'sign_in_login', with: login
54
+ fill_in 'sign_in_password', with: password
55
+ check 'keep_me' if options[:keep_me]
56
+ click_button 'Sign In'
57
+ end
58
+ click_link 'expire' unless options[:skip_expire]
59
+ __fetch_current_access
60
+ end
61
+
62
+ def when_I_sign_out
63
+ click_link 'Sign Out'
64
+ __fetch_current_access
65
+ end
66
+
67
+ def when_I_confirm_my_user_password(custom_password = nil, expect_to_be_valid = true)
68
+ # expect(current_path).to eq '/hello/sudo'
69
+ expect_to_see 'Confirm Password to Continue'
70
+ within('form') do
71
+ fill_in 'user_password', with: (custom_password || '1234')
72
+ click_button 'Confirm Password'
73
+ end
74
+ if expect_to_be_valid
75
+ expect_flash_notice "Now we know it's really you. We won't be asking your password again for 60 minutes"
76
+ end
77
+ end
78
+
79
+ def when_I_confirm_sudo_mode(custom_password = nil)
80
+ when_I_confirm_my_user_password(custom_password)
81
+ end
82
+
83
+ def sign_up_as_an_onboarding
84
+ when_sign_up_as_an_onboarding(expect_success: true)
85
+ __fetch_current_access
86
+ expect(current_user.role).to eq('onboarding')
87
+ end
88
+
89
+ def sign_up_as_a_user
90
+ when_sign_up_with_standard_data
91
+ __fetch_current_access
92
+ expect(current_user.role).to eq('user')
93
+ end
94
+
95
+ def sign_up_as_a_webmaster
96
+ sign_up_as_a_user
97
+ current_user.update! role: 'webmaster'
98
+ end
99
+
100
+ def sign_up_as_a(role)
101
+ case role.to_sym
102
+ when :guest # nothing to do
103
+ when :onboarding then sign_up_as_an_onboarding
104
+ when :user then sign_up_as_a_user
105
+ when :webmaster then sign_up_as_a_webmaster
106
+ else fail("Role #{role} is unknown")
107
+ end
108
+ end
@@ -0,0 +1,8 @@
1
+ module Hello::RequestSupport
2
+ def then_I_should_get_a_response(i, s)
3
+ Then "I should get a #{i} '#{s}' response" do
4
+ expect(response.status).to eq(i)
5
+ expect(response.status_message).to eq(s)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,228 @@
1
+ require 'spec_helper'
2
+
3
+ # Please help this project detect device names.
4
+ # All suggestions, issues and pull requests are welcome
5
+ #
6
+ # suggested sources:
7
+ # http://www.useragentstring.com/pages/useragentstring.php
8
+ # http://www.useragentstring.com/pages/Browserlist/
9
+ # http://www.useragentstring.com/pages/Chrome/
10
+ # http://www.webapps-online.com/online-tools/user-agent-strings
11
+
12
+ module Hello::Utils
13
+ describe DeviceName do
14
+ def expect_device_name(original, expected)
15
+ expect(DeviceName.instance.parse(original)).to eq(expected)
16
+ end
17
+
18
+ describe '#full_device_name' do
19
+ describe 'Firefox' do
20
+ it 'Mac OS X 10 - Firefox 27' do
21
+ expect_device_name 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Firefox/27.0',
22
+ 'Mac OS X 10 - Firefox 27'
23
+ end
24
+ end
25
+
26
+ describe 'Chrome' do
27
+ describe 'Desktop' do
28
+ it 'Mac OS X 10 - Chrome 34' do
29
+ expect_device_name 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36',
30
+ 'Mac OS X 10 - Chrome 34'
31
+ end
32
+ end
33
+ describe 'Mobile' do
34
+ it 'Android 4 (GT-I9300) - Chrome Mobile 30' do
35
+ expect_device_name 'Mozilla/5.0 (Linux; Android 4.1.2; GT-I9300 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.92 Mobile Safari/537.36',
36
+ 'Android 4 (Samsung GT-I9300) - Chrome Mobile 30'
37
+ end
38
+ end
39
+ describe 'OS' do
40
+ it 'Chrome OS 4537 - Chrome 30' do
41
+ expect_device_name 'Mozilla/5.0 (X11; CrOS armv7l 4537.56.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.38 Safari/537.36',
42
+ 'Chrome OS 4537 - Chrome 30'
43
+ end
44
+ it 'Chrome OS 4731 - Chrome 31' do
45
+ expect_device_name 'Mozilla/5.0 (X11; CrOS x86_64 4731.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36',
46
+ 'Chrome OS 4731 - Chrome 31'
47
+ end
48
+ end
49
+ end
50
+
51
+ describe 'Safari' do
52
+ it 'Mac OS X 10 - Safari 7' do
53
+ expect_device_name 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14',
54
+ 'Mac OS X 10 - Safari 7'
55
+ end
56
+ end
57
+
58
+ describe 'Microsoft' do
59
+ it 'Windows 7 - Internet Explorer 10' do
60
+ expect_device_name 'Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0',
61
+ 'Windows 7 - Internet Explorer 10'
62
+ end
63
+ it 'Windows 7 - Internet Explorer 9' do
64
+ expect_device_name 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0',
65
+ 'Windows 7 - Internet Explorer 9'
66
+ end
67
+ it 'Windows 7 - Internet Explorer 8' do
68
+ expect_device_name 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)',
69
+ 'Windows 7 - Internet Explorer 8'
70
+ end
71
+ it 'Windows XP - Internet Explorer 7' do
72
+ expect_device_name 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)',
73
+ 'Windows XP - Internet Explorer 7'
74
+ end
75
+ it 'Windows Phone 8 (HTC Windows Phone 8X by HTC) - Internet Explorer Mobile 10' do
76
+ expect_device_name 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)',
77
+ 'Windows Phone 8 (HTC Windows Phone 8X by HTC) - Internet Explorer Mobile 10'
78
+ end
79
+ it 'Windows Phone 8 (Lumia 620) - Internet Explorer Mobile 10' do
80
+ expect_device_name 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 620)',
81
+ 'Windows Phone 8 (Lumia 620) - Internet Explorer Mobile 10'
82
+ end
83
+ end
84
+
85
+ describe 'Android' do
86
+ it 'Android 4 (LG-L160L) - Android 4' do
87
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
88
+ 'Android 4 (LG-L160L) - Android 4'
89
+ end
90
+ it 'Android 2 (T-Mobile myTouch 3G Slide) - Android 2' do
91
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; T-Mobile myTouch 3G Slide Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',
92
+ 'Android 2 (T-Mobile myTouch 3G Slide) - Android 2'
93
+ end
94
+ it 'Android 2 (HTC Vision) - Android 2' do
95
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',
96
+ 'Android 2 (HTC Vision) - Android 2'
97
+ end
98
+ it 'Android 4 (SAMSUNG GT-I9300/I9300XXEMRD) - Android 4' do
99
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 4.1.2; nl-nl; SAMSUNG GT-I9300/I9300XXEMRD Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
100
+ 'Android 4 (Samsung GT-I9300) - Android 4'
101
+ end
102
+ it 'Symbian OS 9 (Nokia 5800d-1) - Nokia Browser 7' do
103
+ expect_device_name 'Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 Nokia5800d-1/60.0.003; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.33 Mobile Safari/533.4',
104
+ 'Symbian OS 9 (Nokia 5800d-1) - Nokia Browser 7'
105
+ end
106
+ end
107
+
108
+ describe 'Linux' do
109
+ it 'Slackware 13.0 - Konqueror 4.2' do
110
+ expect_device_name 'Mozilla/5.0 (compatible; Konqueror/4.2; Linux) KHTML/4.2.4 (like Gecko) Slackware/13.0',
111
+ 'Slackware 13 - Konqueror 4'
112
+ end
113
+ it 'Ubuntu - Other' do
114
+ expect_device_name 'Mozilla/5.0 (Ubuntu; Mobile) WebKit/ 537.21',
115
+ 'Ubuntu - Other'
116
+ end
117
+ end
118
+
119
+ describe 'TV' do
120
+ it 'Android 4 (POV TV-HDMI-200BT) - Android 4' do
121
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 4.1.1; nl-nl; POV_TV-HDMI-200BT Build/JRO03H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30',
122
+ 'Android 4 (POV TV-HDMI-200BT) - Android 4'
123
+ end
124
+ it 'Linux - WebKit Nightly 531.2' do
125
+ expect_device_name 'Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV) AppleWebKit/531.2+ (KHTML, like Gecko) WebBrowser/1.0 SmartTV Safari/531.2+',
126
+ 'Linux - WebKit Nightly 531'
127
+ end
128
+ it 'Linux 2.6.35 (LG BDP) - Other' do
129
+ expect_device_name 'LG-BDP Linux/2.6.35 UPnP/1.0 DLNADOC/1.50 LGE_DLNA_SDK/1.5.0',
130
+ 'Linux 2 (LG BDP) - Other'
131
+ end
132
+ # NeoTV
133
+ it 'Android 3.2 (GTV100) - Android 3.2' do
134
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 3.2; en-us; GTV100 Build/MASTER) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13',
135
+ 'Android 3 (GTV100) - Android 3'
136
+ end
137
+ end
138
+
139
+ describe 'Amazon Kindle' do
140
+ it 'Android 4 (Kindle Fire HDX 7" WiFi) - Android 4' do
141
+ expect_device_name 'Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30',
142
+ 'Android 4 (Kindle Fire HDX 7" WiFi) - Android 4'
143
+ end
144
+ it 'Android 4 (Kindle Fire HDX 7" WiFi) - Chrome 34' do
145
+ expect_device_name 'Mozilla/5.0 (Linux; Android 4.2.2; KFTHWI Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.62 Safari/537.36',
146
+ 'Android 4 (Kindle Fire HDX 7" WiFi) - Chrome 34'
147
+ end
148
+ end
149
+
150
+ describe 'Blackberry' do
151
+ it 'BlackBerry OS 6 (BlackBerry 9650) - BlackBerry WebKit 6' do
152
+ expect_device_name 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9650; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.719 Mobile Safari/534.8+',
153
+ 'BlackBerry OS 6 (BlackBerry 9650) - BlackBerry WebKit 6'
154
+ end
155
+ it 'BlackBerry OS 5 (BlackBerry 8520) - BlackBerry 8520' do
156
+ expect_device_name 'BlackBerry8520/5.0.0.681 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/120',
157
+ 'BlackBerry OS 5 (BlackBerry 8520) - BlackBerry 8520'
158
+ end
159
+ end
160
+
161
+ describe 'Apple' do
162
+ it 'iOS 6 (iPad) - Mobile Safari 6' do
163
+ expect_device_name 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25',
164
+ 'iOS 6 (iPad) - Mobile Safari 6'
165
+ end
166
+ it 'iOS 7 (iPad) - Chrome Mobile iOS 30' do
167
+ expect_device_name 'Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/30.0.1599.12 Mobile/11A465 Safari/8536.25 (3B92C18B-D9DE-4CB7-A02A-22FD2AF17C8F)',
168
+ 'iOS 7 (iPad) - Chrome Mobile iOS 30'
169
+ end
170
+ it 'iOS 7 (iPod) - Mobile Safari 7' do
171
+ expect_device_name 'Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B511 Safari/9537.53',
172
+ 'iOS 7 (iPod) - Mobile Safari 7'
173
+ end
174
+ it 'iOS 6 (iPhone) - Mobile Safari 6' do
175
+ expect_device_name 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_4 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B350 Safari/8536.25',
176
+ 'iOS 6 (iPhone) - Mobile Safari 6'
177
+ end
178
+ it 'Windows - iTunes 9' do
179
+ expect_device_name 'iTunes/9.0.2 (Windows; N)',
180
+ 'Windows - iTunes 9'
181
+ end
182
+ end
183
+
184
+ describe 'Spiders' do
185
+ describe 'bingbot 2.0' do
186
+ it '1' do
187
+ expect_device_name 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)',
188
+ 'Spider: bingbot 2'
189
+ end
190
+ it '2' do
191
+ expect_device_name 'Mozilla/5.0 (compatible; bingbot/2.0 +http://www.bing.com/bingbot.htm)',
192
+ 'Spider: bingbot 2'
193
+ end
194
+ end
195
+
196
+ describe 'Googlebot 2.1' do
197
+ it '1' do
198
+ expect_device_name 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
199
+ 'Spider: Googlebot 2'
200
+ end
201
+ it '2' do
202
+ expect_device_name 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)',
203
+ 'Spider: Googlebot 2'
204
+ end
205
+ it '3' do
206
+ expect_device_name 'Googlebot/2.1 (+http://www.google.com/bot.html)',
207
+ 'Spider: Googlebot 2'
208
+ end
209
+ end
210
+
211
+ describe 'Baidu' do
212
+ it 'Baidu 1' do
213
+ expect_device_name 'Baiduspider+(+http://www.baidu.com/search/spider_jp.html)',
214
+ 'Spider: Baiduspider'
215
+ end
216
+ it 'Baidu 2' do
217
+ expect_device_name 'Baiduspider+(+http://www.baidu.com/search/spider.htm)',
218
+ 'Spider: Baiduspider'
219
+ end
220
+ it 'Baidu 3' do
221
+ expect_device_name 'BaiDuSpider',
222
+ 'Spider: BaiDuSpider'
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
metadata CHANGED
@@ -1,24 +1,483 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hello-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pinto
8
+ - Michal Papis
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
12
- dependencies: []
13
- description: Saving this name for an upcoming project, feel free to contact me via
14
- email
12
+ date: 2016-06-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: before_actions
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: colorize
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: user_agent_parser
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: http_accept_language
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rails-i18n
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: sqlite3
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rspec-rails
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: capybara
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: email_spec
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: factory_girl_rails
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: faker
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: codeclimate-test-reporter
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: bdd
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - "~>"
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - "~>"
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: bcrypt
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '3.1'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: '3.1'
210
+ - !ruby/object:Gem::Dependency
211
+ name: rubocop
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - "~>"
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - "~>"
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ name: launchy
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - "~>"
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :development
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - "~>"
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ description: Provides a set of valuable features for Registration, Authentication,
239
+ Management and Internationalization.
15
240
  email:
16
241
  - thejamespinto@gmail.com
242
+ - mpapis@gmail.com
17
243
  executables: []
18
244
  extensions: []
19
245
  extra_rdoc_files: []
20
- files: []
21
- homepage: ''
246
+ files:
247
+ - MIT-LICENSE
248
+ - README.md
249
+ - Rakefile
250
+ - app/controllers/hello/application_controller.rb
251
+ - app/controllers/hello/authentication/sessions_controller.rb
252
+ - app/controllers/hello/authentication/sign_in_controller.rb
253
+ - app/controllers/hello/authentication/sudo_mode_controller.rb
254
+ - app/controllers/hello/concerns/authentication/sign_in.rb
255
+ - app/controllers/hello/concerns/management/forgot_password.rb
256
+ - app/controllers/hello/concerns/management/reset_password.rb
257
+ - app/controllers/hello/concerns/registration/sign_up.rb
258
+ - app/controllers/hello/internationalization/locale_controller.rb
259
+ - app/controllers/hello/management/accesses_controller.rb
260
+ - app/controllers/hello/management/confirm_emails_controller.rb
261
+ - app/controllers/hello/management/emails_controller.rb
262
+ - app/controllers/hello/management/forgot_password_controller.rb
263
+ - app/controllers/hello/management/passwords_controller.rb
264
+ - app/controllers/hello/management/profiles_controller.rb
265
+ - app/controllers/hello/management/reset_password_controller.rb
266
+ - app/controllers/hello/registration/sign_up_controller.rb
267
+ - app/helpers/hello/application_helper.rb
268
+ - app/mailers/hello/mailer.rb
269
+ - app/models/access.rb
270
+ - app/models/credential.rb
271
+ - app/models/email_credential.rb
272
+ - app/models/password_credential.rb
273
+ - app/models/user.rb
274
+ - app/views/hello/authentication/_sign_in.html.erb
275
+ - app/views/hello/authentication/new_session.html.erb
276
+ - app/views/hello/authentication/sessions.html.erb
277
+ - app/views/hello/authentication/sign_in.html.erb
278
+ - app/views/hello/authentication/sudo_mode.html.erb
279
+ - app/views/hello/internationalization/locales.html.erb
280
+ - app/views/hello/mailer/confirm_email.html.erb
281
+ - app/views/hello/mailer/forgot_password.html.erb
282
+ - app/views/hello/mailer/welcome.html.erb
283
+ - app/views/hello/management/accesses.html.erb
284
+ - app/views/hello/management/cancel.html.erb
285
+ - app/views/hello/management/email_credentials/expired_confirmation_token.html.erb
286
+ - app/views/hello/management/email_credentials/index.html.erb
287
+ - app/views/hello/management/password_credentials/_forgot_form.html.erb
288
+ - app/views/hello/management/password_credentials/_reset_form.html.erb
289
+ - app/views/hello/management/password_credentials/forgot.html.erb
290
+ - app/views/hello/management/password_credentials/forgot_success.html.erb
291
+ - app/views/hello/management/password_credentials/reset.html.erb
292
+ - app/views/hello/management/password_credentials/show.html.erb
293
+ - app/views/hello/management/user.html.erb
294
+ - app/views/hello/registration/_sign_up.html.erb
295
+ - app/views/hello/registration/sign_up.html.erb
296
+ - app/views/hello/registration/sign_up_widget.html.erb
297
+ - app/views/hello/shared/_errors.html.erb
298
+ - app/views/hello/shared/_flash.html.erb
299
+ - app/views/hello/shared/_nav_pills.html.erb
300
+ - app/views/hello/shared/_session_expiration.html.erb
301
+ - app/views/hello/shared/_settings.html.erb
302
+ - config/locales/hello.en.yml
303
+ - config/locales/hello.es.yml
304
+ - config/locales/hello.fr.yml
305
+ - config/locales/hello.pl.yml
306
+ - config/locales/hello.pt-BR.yml
307
+ - config/locales/hello.zh-CN.yml
308
+ - config/locales/hello.zh-TW.yml
309
+ - config/routes.rb
310
+ - db/migrate/1_create_credentials.rb
311
+ - db/migrate/2_create_accesses.rb
312
+ - db/migrate/3_create_users.rb
313
+ - lib/generators/hello/concerns/USAGE
314
+ - lib/generators/hello/concerns/concerns_generator.rb
315
+ - lib/generators/hello/from_devise/USAGE
316
+ - lib/generators/hello/from_devise/from_devise_generator.rb
317
+ - lib/generators/hello/from_devise/templates/from_devise.migration.rb
318
+ - lib/generators/hello/install/USAGE
319
+ - lib/generators/hello/install/install_generator.rb
320
+ - lib/generators/hello/install/templates/application.html.erb
321
+ - lib/generators/hello/install/templates/hello_helper.rb
322
+ - lib/generators/hello/install/templates/initializer.rb
323
+ - lib/generators/hello/install/templates/models/concerns/user/authorization.rb
324
+ - lib/generators/hello/install/templates/models/user.rb
325
+ - lib/generators/hello/install/templates/onboarding/index.html.erb
326
+ - lib/generators/hello/install/templates/onboarding/onboarding_controller.rb
327
+ - lib/generators/hello/install/templates/root/index.html.erb
328
+ - lib/generators/hello/install/templates/root/root_controller.rb
329
+ - lib/generators/hello/install/templates/users/controllers/users_controller.rb
330
+ - lib/generators/hello/install/templates/users/views/users/index.html.erb
331
+ - lib/generators/hello/install/templates/users/views/users/list.html.erb
332
+ - lib/generators/hello/install/templates/users/views/users/new.html.erb
333
+ - lib/generators/hello/install/templates/users/views/users/show.html.erb
334
+ - lib/generators/hello/locales/USAGE
335
+ - lib/generators/hello/locales/locales_generator.rb
336
+ - lib/generators/hello/views/USAGE
337
+ - lib/generators/hello/views/views_generator.rb
338
+ - lib/hello-rails.rb
339
+ - lib/hello.rb
340
+ - lib/hello/CHANGES.md
341
+ - lib/hello/business.rb
342
+ - lib/hello/business/authentication/sign_in.rb
343
+ - lib/hello/business/authentication/sign_out.rb
344
+ - lib/hello/business/authentication/sudo_mode_authentication.rb
345
+ - lib/hello/business/authentication/sudo_mode_expiration.rb
346
+ - lib/hello/business/base.rb
347
+ - lib/hello/business/internationalization/update_locale.rb
348
+ - lib/hello/business/management/add_email.rb
349
+ - lib/hello/business/management/cancel_account.rb
350
+ - lib/hello/business/management/confirm_email.rb
351
+ - lib/hello/business/management/forgot_password.rb
352
+ - lib/hello/business/management/remove_email.rb
353
+ - lib/hello/business/management/reset_password.rb
354
+ - lib/hello/business/management/send_confirmation_email.rb
355
+ - lib/hello/business/management/unlink_access.rb
356
+ - lib/hello/business/management/update_profile.rb
357
+ - lib/hello/business/registration/sign_up.rb
358
+ - lib/hello/configuration.rb
359
+ - lib/hello/encryptors.rb
360
+ - lib/hello/encryptors/complex.rb
361
+ - lib/hello/encryptors/simple.rb
362
+ - lib/hello/engine.rb
363
+ - lib/hello/errors.rb
364
+ - lib/hello/locales.rb
365
+ - lib/hello/middleware.rb
366
+ - lib/hello/rails_active_record.rb
367
+ - lib/hello/rails_active_record/access.rb
368
+ - lib/hello/rails_active_record/credential.rb
369
+ - lib/hello/rails_active_record/email_credential.rb
370
+ - lib/hello/rails_active_record/password_credential.rb
371
+ - lib/hello/rails_active_record/user.rb
372
+ - lib/hello/rails_controller.rb
373
+ - lib/hello/rails_controller/restrict_by_role.rb
374
+ - lib/hello/rails_helper.rb
375
+ - lib/hello/request_manager.rb
376
+ - lib/hello/request_manager/abstract.rb
377
+ - lib/hello/request_manager/factory.rb
378
+ - lib/hello/request_manager/stateful.rb
379
+ - lib/hello/request_manager/stateful/finder.rb
380
+ - lib/hello/request_manager/stateful/session_wrapper.rb
381
+ - lib/hello/request_manager/stateless.rb
382
+ - lib/hello/time_zones.rb
383
+ - lib/hello/utils.rb
384
+ - lib/hello/utils/device_name.rb
385
+ - lib/hello/version.rb
386
+ - lib/tasks/hello_tasks.rake
387
+ - spec/bdd/hello/authentication/authorization/authorization_role_restriction_spec.rb
388
+ - spec/bdd/hello/authentication/authorization/authorization_router_constraints_spec.rb
389
+ - spec/bdd/hello/authentication/authorization/authorization_sensitive_restriction_spec.rb
390
+ - spec/bdd/hello/authentication/authorization/bdd.yml
391
+ - spec/bdd/hello/authentication/bdd.yml
392
+ - spec/bdd/hello/authentication/classic_sign_in_spec.rb
393
+ - spec/bdd/hello/authentication/manage_sessions_spec.rb
394
+ - spec/bdd/hello/authentication/sign_out_spec.rb
395
+ - spec/bdd/hello/bdd.yml
396
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/bdd.yml
397
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_locale_page_spec.rb
398
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_profile_page_spec.rb
399
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_sign_in_form_spec.rb
400
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_sign_up_form_spec.rb
401
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/bdd.yml
402
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_profile_page_spec.rb
403
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_sign_in_form_spec.rb
404
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_sign_up_form_spec.rb
405
+ - spec/bdd/hello/internalionalization/bdd.yml
406
+ - spec/bdd/hello/management/bdd.yml
407
+ - spec/bdd/hello/management/cancel_account_spec.rb
408
+ - spec/bdd/hello/management/manage_email_credentials/bdd.yml
409
+ - spec/bdd/hello/management/manage_email_credentials/manage_email_credentials_emails_api_spec.rb
410
+ - spec/bdd/hello/management/manage_email_credentials/manage_email_credentials_emails_page_spec.rb
411
+ - spec/bdd/hello/management/manage_password_credentials/bdd.yml
412
+ - spec/bdd/hello/management/manage_password_credentials/manage_password_forgot_password_spec.rb
413
+ - spec/bdd/hello/management/manage_password_credentials/manage_password_page_spec.rb
414
+ - spec/bdd/hello/management/manage_password_credentials/manage_password_reset_password_spec.rb
415
+ - spec/bdd/hello/management/manage_profile/bdd.yml
416
+ - spec/bdd/hello/management/manage_profile/manage_profile_api_spec.rb
417
+ - spec/bdd/hello/management/manage_profile/manage_profile_page_spec.rb
418
+ - spec/bdd/hello/management/manage_social_credentials/bdd.yml
419
+ - spec/bdd/hello/management/manage_social_credentials/manage_social_credentials_pending_spec.rb
420
+ - spec/bdd/hello/management/unlink_sessions_spec.rb
421
+ - spec/bdd/hello/other/bdd.yml
422
+ - spec/bdd/hello/other/create_user_spec.rb
423
+ - spec/bdd/hello/other/impersonate_user_spec.rb
424
+ - spec/bdd/hello/other/list_users_spec.rb
425
+ - spec/bdd/hello/registration/bdd.yml
426
+ - spec/bdd/hello/registration/classic_sign_up_spec.rb
427
+ - spec/bdd/hello/registration/onboarding_process_spec.rb
428
+ - spec/bdd/hello/support.rb
429
+ - spec/business/hello/authentication/sign_in_spec.rb
430
+ - spec/business/hello/registration/sign_up_spec.rb
431
+ - spec/controllers/authentication_spec.rb
432
+ - spec/controllers/localization_spec.rb
433
+ - spec/controllers/request_can_carry_an_access_token_spec.rb
434
+ - spec/fixtures/hello/password_mailer/confirmation
435
+ - spec/fixtures/hello/password_mailer/forgot
436
+ - spec/fixtures/hello/password_mailer/sign_up
437
+ - spec/mailers/hello/mailer_spec.rb
438
+ - spec/models/access_spec.rb
439
+ - spec/models/credential_spec.rb
440
+ - spec/models/email_credential_spec.rb
441
+ - spec/models/hello/sign_up_model_spec.rb
442
+ - spec/models/password_credential_spec.rb
443
+ - spec/models/user_spec.rb
444
+ - spec/others/configuration_spec.rb
445
+ - spec/others/encryptors/complex_spec.rb
446
+ - spec/others/encryptors/simple_spec.rb
447
+ - spec/others/helper_spec.rb
448
+ - spec/others/localization_consistency_spec.rb
449
+ - spec/requests/forgot_password_spec.rb
450
+ - spec/requests/reset_password_spec.rb
451
+ - spec/requests/security/user_spec.rb
452
+ - spec/routing/hello/accesses_routing_spec.rb
453
+ - spec/routing/hello/emails_routing_spec.rb
454
+ - spec/routing/hello/locale_routing_spec.rb
455
+ - spec/routing/hello/profile_routing_spec.rb
456
+ - spec/routing/hello/registration_routing_spec.rb
457
+ - spec/routing/hello/sign_out_routing_spec.rb
458
+ - spec/routing/hello/sudo_mode_routing_spec.rb
459
+ - spec/routing/hello/users_routing_spec.rb
460
+ - spec/spec_helper.rb
461
+ - spec/spec_helper/codeclimate.rb
462
+ - spec/spec_helper/configure_rspec.rb
463
+ - spec/spec_helper/create_database.rb
464
+ - spec/spec_helper/dummy_and_test_dependencies.rb
465
+ - spec/spec_helper/support.rb
466
+ - spec/support/factories.rb
467
+ - spec/support/feature_injection.rb
468
+ - spec/support/features/feature_support_given.rb
469
+ - spec/support/features/feature_support_then.rb
470
+ - spec/support/helpers/aliases.rb
471
+ - spec/support/helpers/configuration.rb
472
+ - spec/support/helpers/current.rb
473
+ - spec/support/helpers/expect.rb
474
+ - spec/support/helpers/given.rb
475
+ - spec/support/helpers/shortcuts.rb
476
+ - spec/support/helpers/then.rb
477
+ - spec/support/helpers/when.rb
478
+ - spec/support/requests/request_support.rb
479
+ - spec/utils/device_name_spec.rb
480
+ homepage: http://github.com/hello-gem/hello
22
481
  licenses:
23
482
  - MIT
24
483
  metadata: {}
@@ -38,9 +497,101 @@ required_rubygems_version: !ruby/object:Gem::Requirement
38
497
  version: '0'
39
498
  requirements: []
40
499
  rubyforge_project:
41
- rubygems_version: 2.4.8
500
+ rubygems_version: 2.5.1
42
501
  signing_key:
43
502
  specification_version: 4
44
- summary: Saving this name for an upcoming project, feel free to contact me via email
45
- test_files: []
46
- has_rdoc:
503
+ summary: A Configurable Rails Authentication Engine
504
+ test_files:
505
+ - spec/bdd/hello/authentication/authorization/authorization_role_restriction_spec.rb
506
+ - spec/bdd/hello/authentication/authorization/authorization_router_constraints_spec.rb
507
+ - spec/bdd/hello/authentication/authorization/authorization_sensitive_restriction_spec.rb
508
+ - spec/bdd/hello/authentication/authorization/bdd.yml
509
+ - spec/bdd/hello/authentication/bdd.yml
510
+ - spec/bdd/hello/authentication/classic_sign_in_spec.rb
511
+ - spec/bdd/hello/authentication/manage_sessions_spec.rb
512
+ - spec/bdd/hello/authentication/sign_out_spec.rb
513
+ - spec/bdd/hello/bdd.yml
514
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/bdd.yml
515
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_locale_page_spec.rb
516
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_profile_page_spec.rb
517
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_sign_in_form_spec.rb
518
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_locale/change_locale_on_the_sign_up_form_spec.rb
519
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/bdd.yml
520
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_profile_page_spec.rb
521
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_sign_in_form_spec.rb
522
+ - spec/bdd/hello/internalionalization/anyone_can_change_their_timezone/change_timezone_on_the_sign_up_form_spec.rb
523
+ - spec/bdd/hello/internalionalization/bdd.yml
524
+ - spec/bdd/hello/management/bdd.yml
525
+ - spec/bdd/hello/management/cancel_account_spec.rb
526
+ - spec/bdd/hello/management/manage_email_credentials/bdd.yml
527
+ - spec/bdd/hello/management/manage_email_credentials/manage_email_credentials_emails_api_spec.rb
528
+ - spec/bdd/hello/management/manage_email_credentials/manage_email_credentials_emails_page_spec.rb
529
+ - spec/bdd/hello/management/manage_password_credentials/bdd.yml
530
+ - spec/bdd/hello/management/manage_password_credentials/manage_password_forgot_password_spec.rb
531
+ - spec/bdd/hello/management/manage_password_credentials/manage_password_page_spec.rb
532
+ - spec/bdd/hello/management/manage_password_credentials/manage_password_reset_password_spec.rb
533
+ - spec/bdd/hello/management/manage_profile/bdd.yml
534
+ - spec/bdd/hello/management/manage_profile/manage_profile_api_spec.rb
535
+ - spec/bdd/hello/management/manage_profile/manage_profile_page_spec.rb
536
+ - spec/bdd/hello/management/manage_social_credentials/bdd.yml
537
+ - spec/bdd/hello/management/manage_social_credentials/manage_social_credentials_pending_spec.rb
538
+ - spec/bdd/hello/management/unlink_sessions_spec.rb
539
+ - spec/bdd/hello/other/bdd.yml
540
+ - spec/bdd/hello/other/create_user_spec.rb
541
+ - spec/bdd/hello/other/impersonate_user_spec.rb
542
+ - spec/bdd/hello/other/list_users_spec.rb
543
+ - spec/bdd/hello/registration/bdd.yml
544
+ - spec/bdd/hello/registration/classic_sign_up_spec.rb
545
+ - spec/bdd/hello/registration/onboarding_process_spec.rb
546
+ - spec/bdd/hello/support.rb
547
+ - spec/business/hello/authentication/sign_in_spec.rb
548
+ - spec/business/hello/registration/sign_up_spec.rb
549
+ - spec/controllers/authentication_spec.rb
550
+ - spec/controllers/localization_spec.rb
551
+ - spec/controllers/request_can_carry_an_access_token_spec.rb
552
+ - spec/fixtures/hello/password_mailer/confirmation
553
+ - spec/fixtures/hello/password_mailer/forgot
554
+ - spec/fixtures/hello/password_mailer/sign_up
555
+ - spec/mailers/hello/mailer_spec.rb
556
+ - spec/models/access_spec.rb
557
+ - spec/models/credential_spec.rb
558
+ - spec/models/email_credential_spec.rb
559
+ - spec/models/hello/sign_up_model_spec.rb
560
+ - spec/models/password_credential_spec.rb
561
+ - spec/models/user_spec.rb
562
+ - spec/others/configuration_spec.rb
563
+ - spec/others/encryptors/complex_spec.rb
564
+ - spec/others/encryptors/simple_spec.rb
565
+ - spec/others/helper_spec.rb
566
+ - spec/others/localization_consistency_spec.rb
567
+ - spec/requests/forgot_password_spec.rb
568
+ - spec/requests/reset_password_spec.rb
569
+ - spec/requests/security/user_spec.rb
570
+ - spec/routing/hello/accesses_routing_spec.rb
571
+ - spec/routing/hello/emails_routing_spec.rb
572
+ - spec/routing/hello/locale_routing_spec.rb
573
+ - spec/routing/hello/profile_routing_spec.rb
574
+ - spec/routing/hello/registration_routing_spec.rb
575
+ - spec/routing/hello/sign_out_routing_spec.rb
576
+ - spec/routing/hello/sudo_mode_routing_spec.rb
577
+ - spec/routing/hello/users_routing_spec.rb
578
+ - spec/spec_helper/codeclimate.rb
579
+ - spec/spec_helper/configure_rspec.rb
580
+ - spec/spec_helper/create_database.rb
581
+ - spec/spec_helper/dummy_and_test_dependencies.rb
582
+ - spec/spec_helper/support.rb
583
+ - spec/spec_helper.rb
584
+ - spec/support/factories.rb
585
+ - spec/support/feature_injection.rb
586
+ - spec/support/features/feature_support_given.rb
587
+ - spec/support/features/feature_support_then.rb
588
+ - spec/support/helpers/aliases.rb
589
+ - spec/support/helpers/configuration.rb
590
+ - spec/support/helpers/current.rb
591
+ - spec/support/helpers/expect.rb
592
+ - spec/support/helpers/given.rb
593
+ - spec/support/helpers/shortcuts.rb
594
+ - spec/support/helpers/then.rb
595
+ - spec/support/helpers/when.rb
596
+ - spec/support/requests/request_support.rb
597
+ - spec/utils/device_name_spec.rb