authr 0.1.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 (60) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +1 -0
  4. data/Rakefile +37 -0
  5. data/app/controllers/authr/application_controller.rb +4 -0
  6. data/app/models/authr/user.rb +10 -0
  7. data/config/initializers/devise.rb +259 -0
  8. data/config/locales/devise.en.yml +60 -0
  9. data/config/routes.rb +3 -0
  10. data/db/migrate/20150209201242_devise_create_authr_users.rb +42 -0
  11. data/db/migrate/20150210225824_add_authentication_token_to_authr_users.rb +6 -0
  12. data/lib/authr.rb +8 -0
  13. data/lib/authr/engine.rb +18 -0
  14. data/lib/authr/version.rb +3 -0
  15. data/lib/tasks/authr_tasks.rake +4 -0
  16. data/test/authr_test.rb +7 -0
  17. data/test/dummy/README.rdoc +28 -0
  18. data/test/dummy/Rakefile +6 -0
  19. data/test/dummy/app/assets/javascripts/application.js +13 -0
  20. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  21. data/test/dummy/app/controllers/application_controller.rb +5 -0
  22. data/test/dummy/app/helpers/application_helper.rb +2 -0
  23. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  24. data/test/dummy/bin/bundle +3 -0
  25. data/test/dummy/bin/rails +4 -0
  26. data/test/dummy/bin/rake +4 -0
  27. data/test/dummy/bin/setup +29 -0
  28. data/test/dummy/config.ru +4 -0
  29. data/test/dummy/config/application.rb +26 -0
  30. data/test/dummy/config/boot.rb +5 -0
  31. data/test/dummy/config/database.yml +25 -0
  32. data/test/dummy/config/environment.rb +5 -0
  33. data/test/dummy/config/environments/development.rb +41 -0
  34. data/test/dummy/config/environments/production.rb +79 -0
  35. data/test/dummy/config/environments/test.rb +42 -0
  36. data/test/dummy/config/initializers/assets.rb +11 -0
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  39. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  40. data/test/dummy/config/initializers/inflections.rb +16 -0
  41. data/test/dummy/config/initializers/mime_types.rb +4 -0
  42. data/test/dummy/config/initializers/session_store.rb +3 -0
  43. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  44. data/test/dummy/config/locales/en.yml +23 -0
  45. data/test/dummy/config/routes.rb +4 -0
  46. data/test/dummy/config/secrets.yml +22 -0
  47. data/test/dummy/db/development.sqlite3 +0 -0
  48. data/test/dummy/db/schema.rb +45 -0
  49. data/test/dummy/db/test.sqlite3 +0 -0
  50. data/test/dummy/log/development.log +10038 -0
  51. data/test/dummy/log/test.log +252 -0
  52. data/test/dummy/public/404.html +67 -0
  53. data/test/dummy/public/422.html +67 -0
  54. data/test/dummy/public/500.html +66 -0
  55. data/test/dummy/public/favicon.ico +0 -0
  56. data/test/fixtures/authr/users.yml +11 -0
  57. data/test/integration/navigation_test.rb +10 -0
  58. data/test/models/authr/user_test.rb +9 -0
  59. data/test/test_helper.rb +21 -0
  60. metadata +244 -0
@@ -0,0 +1,252 @@
1
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.6ms) select sqlite_version(*)
3
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to DeviseCreateAuthrUsers (20150209201242)
6
+  (0.1ms) begin transaction
7
+  (1.5ms) CREATE TABLE "authr_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar, "last_sign_in_ip" varchar, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "failed_attempts" integer DEFAULT 0 NOT NULL, "unlock_token" varchar, "locked_at" datetime, "created_at" datetime, "updated_at" datetime)
8
+  (2.6ms) CREATE UNIQUE INDEX "index_authr_users_on_email" ON "authr_users" ("email")
9
+  (0.7ms) SELECT sql
10
+ FROM sqlite_master
11
+ WHERE name='index_authr_users_on_email' AND type='index'
12
+ UNION ALL
13
+ SELECT sql
14
+ FROM sqlite_temp_master
15
+ WHERE name='index_authr_users_on_email' AND type='index'
16
+
17
+  (0.2ms) CREATE UNIQUE INDEX "index_authr_users_on_reset_password_token" ON "authr_users" ("reset_password_token")
18
+  (0.1ms) SELECT sql
19
+ FROM sqlite_master
20
+ WHERE name='index_authr_users_on_reset_password_token' AND type='index'
21
+ UNION ALL
22
+ SELECT sql
23
+ FROM sqlite_temp_master
24
+ WHERE name='index_authr_users_on_reset_password_token' AND type='index'
25
+
26
+  (0.1ms)  SELECT sql
27
+ FROM sqlite_master
28
+ WHERE name='index_authr_users_on_email' AND type='index'
29
+ UNION ALL
30
+ SELECT sql
31
+ FROM sqlite_temp_master
32
+ WHERE name='index_authr_users_on_email' AND type='index'
33
+ 
34
+  (0.2ms) CREATE UNIQUE INDEX "index_authr_users_on_confirmation_token" ON "authr_users" ("confirmation_token")
35
+  (0.1ms)  SELECT sql
36
+ FROM sqlite_master
37
+ WHERE name='index_authr_users_on_confirmation_token' AND type='index'
38
+ UNION ALL
39
+ SELECT sql
40
+ FROM sqlite_temp_master
41
+ WHERE name='index_authr_users_on_confirmation_token' AND type='index'
42
+ 
43
+  (0.1ms) SELECT sql
44
+ FROM sqlite_master
45
+ WHERE name='index_authr_users_on_reset_password_token' AND type='index'
46
+ UNION ALL
47
+ SELECT sql
48
+ FROM sqlite_temp_master
49
+ WHERE name='index_authr_users_on_reset_password_token' AND type='index'
50
+
51
+  (0.1ms)  SELECT sql
52
+ FROM sqlite_master
53
+ WHERE name='index_authr_users_on_email' AND type='index'
54
+ UNION ALL
55
+ SELECT sql
56
+ FROM sqlite_temp_master
57
+ WHERE name='index_authr_users_on_email' AND type='index'
58
+ 
59
+  (0.2ms) CREATE UNIQUE INDEX "index_authr_users_on_unlock_token" ON "authr_users" ("unlock_token")
60
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150209201242"]]
61
+  (1.4ms) commit transaction
62
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
63
+  (0.2ms) SELECT sql
64
+ FROM sqlite_master
65
+ WHERE name='index_authr_users_on_unlock_token' AND type='index'
66
+ UNION ALL
67
+ SELECT sql
68
+ FROM sqlite_temp_master
69
+ WHERE name='index_authr_users_on_unlock_token' AND type='index'
70
+
71
+  (0.1ms)  SELECT sql
72
+ FROM sqlite_master
73
+ WHERE name='index_authr_users_on_confirmation_token' AND type='index'
74
+ UNION ALL
75
+ SELECT sql
76
+ FROM sqlite_temp_master
77
+ WHERE name='index_authr_users_on_confirmation_token' AND type='index'
78
+ 
79
+  (0.1ms) SELECT sql
80
+ FROM sqlite_master
81
+ WHERE name='index_authr_users_on_reset_password_token' AND type='index'
82
+ UNION ALL
83
+ SELECT sql
84
+ FROM sqlite_temp_master
85
+ WHERE name='index_authr_users_on_reset_password_token' AND type='index'
86
+
87
+  (1.5ms)  SELECT sql
88
+ FROM sqlite_master
89
+ WHERE name='index_authr_users_on_email' AND type='index'
90
+ UNION ALL
91
+ SELECT sql
92
+ FROM sqlite_temp_master
93
+ WHERE name='index_authr_users_on_email' AND type='index'
94
+ 
95
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
96
+  (0.1ms) begin transaction
97
+ ---------------------
98
+ AuthrTest: test_truth
99
+ ---------------------
100
+  (0.1ms) rollback transaction
101
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
102
+  (0.4ms) begin transaction
103
+ ---------------------
104
+ AuthrTest: test_truth
105
+ ---------------------
106
+  (0.1ms) rollback transaction
107
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
108
+  (0.1ms) begin transaction
109
+ ----------------------------------------------------
110
+ Authr::UsersControllerTest: test_0002_should get new
111
+ ----------------------------------------------------
112
+  (0.1ms) rollback transaction
113
+  (0.1ms) begin transaction
114
+ --------------------------------------------------------
115
+ Authr::UsersControllerTest: test_0003_should create user
116
+ --------------------------------------------------------
117
+  (0.1ms) rollback transaction
118
+  (0.1ms) begin transaction
119
+ ------------------------------------------------------
120
+ Authr::UsersControllerTest: test_0001_should get index
121
+ ------------------------------------------------------
122
+  (0.1ms) rollback transaction
123
+  (0.1ms) begin transaction
124
+ -----------------------------------------------------
125
+ Authr::UsersControllerTest: test_0005_should get edit
126
+ -----------------------------------------------------
127
+  (0.1ms) rollback transaction
128
+  (0.1ms) begin transaction
129
+ ------------------------------------------------------
130
+ Authr::UsersControllerTest: test_0004_should show user
131
+ ------------------------------------------------------
132
+  (0.1ms) rollback transaction
133
+  (0.1ms) begin transaction
134
+ --------------------------------------------------------
135
+ Authr::UsersControllerTest: test_0006_should update user
136
+ --------------------------------------------------------
137
+  (0.0ms) rollback transaction
138
+  (0.1ms) begin transaction
139
+ ---------------------------------------------------------
140
+ Authr::UsersControllerTest: test_0007_should destroy user
141
+ ---------------------------------------------------------
142
+  (0.1ms) rollback transaction
143
+  (0.1ms) begin transaction
144
+ --------------------------
145
+ AuthrTest: test_0001_truth
146
+ --------------------------
147
+  (0.1ms) rollback transaction
148
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
149
+  (0.1ms) begin transaction
150
+ --------------------------------------------------------
151
+ Authr::UsersControllerTest: test_0001_should create user
152
+ --------------------------------------------------------
153
+  (0.1ms) rollback transaction
154
+  (0.2ms) begin transaction
155
+ --------------------------
156
+ AuthrTest: test_0001_truth
157
+ --------------------------
158
+  (0.1ms) rollback transaction
159
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
160
+  (0.9ms) begin transaction
161
+ --------------------------
162
+ AuthrTest: test_0001_truth
163
+ --------------------------
164
+  (0.1ms) rollback transaction
165
+  (0.1ms) begin transaction
166
+ --------------------------------------------------------
167
+ Authr::UsersControllerTest: test_0001_should create user
168
+ --------------------------------------------------------
169
+  (0.1ms) rollback transaction
170
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
171
+  (0.1ms) begin transaction
172
+ --------------------------------------------------------
173
+ Authr::UsersControllerTest: test_0001_should create user
174
+ --------------------------------------------------------
175
+  (0.5ms) SELECT COUNT(*) FROM "authr_users"
176
+  (0.1ms) rollback transaction
177
+  (0.1ms) begin transaction
178
+ --------------------------
179
+ AuthrTest: test_0001_truth
180
+ --------------------------
181
+  (0.0ms) rollback transaction
182
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
183
+  (0.1ms) begin transaction
184
+ --------------------------------------------------------
185
+ Authr::UsersControllerTest: test_0001_should create user
186
+ --------------------------------------------------------
187
+  (0.6ms) SELECT COUNT(*) FROM "authr_users"
188
+  (0.1ms) rollback transaction
189
+  (0.1ms) begin transaction
190
+ --------------------------
191
+ AuthrTest: test_0001_truth
192
+ --------------------------
193
+  (0.0ms) rollback transaction
194
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
195
+  (0.1ms) begin transaction
196
+ -----------------------------------------------------------------
197
+ Devise::RegistrationsControllerTest: test_0001_should create user
198
+ -----------------------------------------------------------------
199
+  (0.1ms) rollback transaction
200
+  (0.1ms) begin transaction
201
+ --------------------------
202
+ AuthrTest: test_0001_truth
203
+ --------------------------
204
+  (0.0ms) rollback transaction
205
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
206
+  (0.1ms) begin transaction
207
+ -----------------------------------------------------------------
208
+ Devise::RegistrationsControllerTest: test_0001_should create user
209
+ -----------------------------------------------------------------
210
+  (0.5ms) SELECT COUNT(*) FROM "authr_users"
211
+  (0.1ms) rollback transaction
212
+  (0.1ms) begin transaction
213
+ --------------------------
214
+ AuthrTest: test_0001_truth
215
+ --------------------------
216
+  (0.1ms) rollback transaction
217
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
218
+  (0.1ms) begin transaction
219
+ --------------------------
220
+ AuthrTest: test_0001_truth
221
+ --------------------------
222
+  (0.0ms) rollback transaction
223
+  (0.1ms) begin transaction
224
+ -----------------------------------------------------------------
225
+ Devise::RegistrationsControllerTest: test_0001_should create user
226
+ -----------------------------------------------------------------
227
+  (0.5ms) SELECT COUNT(*) FROM "authr_users"
228
+  (0.2ms) rollback transaction
229
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
230
+  (0.1ms) begin transaction
231
+ --------------------------
232
+ AuthrTest: test_0001_truth
233
+ --------------------------
234
+  (0.1ms) rollback transaction
235
+  (0.1ms) begin transaction
236
+ -----------------------------------------------------------------
237
+ Devise::RegistrationsControllerTest: test_0001_should create user
238
+ -----------------------------------------------------------------
239
+  (0.5ms) SELECT COUNT(*) FROM "authr_users"
240
+  (0.1ms) rollback transaction
241
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
242
+  (0.1ms) begin transaction
243
+ -----------------------------------------------------------------
244
+ Devise::RegistrationsControllerTest: test_0001_should create user
245
+ -----------------------------------------------------------------
246
+  (0.5ms) SELECT COUNT(*) FROM "authr_users"
247
+  (0.1ms) rollback transaction
248
+  (0.1ms) begin transaction
249
+ --------------------------
250
+ AuthrTest: test_0001_truth
251
+ --------------------------
252
+  (0.0ms) rollback transaction
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>