mori 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +51 -1
- data/Rakefile +1 -0
- data/app/controllers/mori/base_controller.rb +3 -0
- data/app/controllers/mori/invites_controller.rb +37 -0
- data/app/controllers/mori/passwords_controller.rb +59 -0
- data/app/controllers/mori/registrations_controller.rb +32 -7
- data/app/controllers/mori/sessions_controller.rb +10 -6
- data/app/helpers/mori_helper.rb +1 -1
- data/app/mailers/mori_mailer.rb +18 -0
- data/app/views/invites/new.html.erb +1 -0
- data/app/views/invites/show.html.erb +1 -0
- data/app/views/layouts/mori/application.html.erb +7 -1
- data/app/views/layouts/mori/form.html.erb +15 -0
- data/app/views/mori_forms/_accept_invite.html.erb +16 -0
- data/app/views/mori_forms/_change_password.html.erb +22 -0
- data/app/views/mori_forms/_forgot_password.html.erb +14 -0
- data/app/views/mori_forms/_invite_new_user_form.html.erb +14 -0
- data/app/views/mori_forms/_password_reset.html.erb +20 -0
- data/app/views/mori_forms/_registration.html.erb +22 -0
- data/app/views/mori_forms/_sessions.html.erb +18 -0
- data/app/views/mori_mailer/confirm_email.html.erb +4 -0
- data/app/views/mori_mailer/forgot_password.html.erb +7 -0
- data/app/views/mori_mailer/invite_user.html.erb +5 -0
- data/app/views/passwords/change.html.erb +1 -0
- data/app/views/passwords/forgot.html.erb +2 -0
- data/app/views/passwords/reset.html.erb +1 -0
- data/app/views/passwords/send_reset.html.erb +1 -0
- data/app/views/registrations/new.html.erb +2 -0
- data/app/views/sessions/new.html.erb +2 -0
- data/app/views/shared/_links.html.erb +11 -0
- data/config/database.travis.yml +3 -25
- data/config/initializers/warden.rb +5 -5
- data/config/locales/mori.en.yml +20 -16
- data/config/routes.rb +22 -2
- data/db/migrate/20140128055658_create_users.rb +29 -0
- data/lib/assets/javascripts/bootstrap.min.js +6 -0
- data/lib/assets/stylesheets/bootstrap.min.css +7 -0
- data/lib/generators/mori/install/install_generator.rb +130 -0
- data/lib/generators/mori/install/templates/db/migrate/add_mori_to_users.rb +23 -0
- data/{db/migrate/20140128055658_create_mori_users.rb → lib/generators/mori/install/templates/db/migrate/create_users.rb} +6 -9
- data/lib/generators/mori/install/templates/mori.rb +32 -0
- data/lib/generators/mori/install/templates/user.rb +3 -0
- data/lib/generators/mori/views/USAGE +12 -0
- data/lib/generators/mori/views/views_generator.rb +39 -0
- data/lib/mori/configuration.rb +17 -10
- data/lib/mori/controller.rb +25 -0
- data/lib/mori/engine.rb +2 -6
- data/lib/mori/password.rb +21 -0
- data/lib/mori/token.rb +3 -12
- data/lib/mori/user.rb +124 -0
- data/lib/mori/version.rb +1 -1
- data/lib/mori.rb +3 -3
- data/spec/dummy/app/assets/javascripts/application.js +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +1 -0
- data/spec/dummy/app/models/user.rb +4 -0
- data/spec/dummy/app/views/application/index.html.erb +13 -0
- data/spec/dummy/app/views/application/test_login.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/config/application.rb +9 -7
- data/spec/dummy/config/database.yml +6 -24
- data/spec/dummy/config/environments/production.rb +2 -2
- data/spec/dummy/config/environments/test.rb +3 -3
- data/spec/dummy/config/initializers/mime_types.rb +2 -2
- data/spec/dummy/config/initializers/mori.rb +12 -1
- data/spec/dummy/config/initializers/secret_token.rb +6 -1
- data/spec/dummy/config/locales/en.yml +1 -1
- data/spec/dummy/config/routes.rb +2 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{20140209071716_create_users.mori_engine.rb → 20140421045106_create_users.mori_engine.rb} +2 -6
- data/spec/dummy/db/schema.rb +14 -21
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +14442 -21478
- data/spec/dummy/log/test.log +128933 -76950
- data/spec/dummy/public/404.html +1 -1
- data/spec/dummy/public/422.html +1 -1
- data/spec/dummy/public/500.html +1 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/07db4022ed50ebf1535599a3e2344037 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/09f817f5fe8888d5c59a3b285c3ef605 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/19f899de0e04ccfd931a7a11e36aca13 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1b98ef3337306536c2890a74951d225c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2000a2ad47f8e201455b785beb7b1384 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/22de1150643c428d3f508171d74347a3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3453364cd811fec54cae0a92adc719e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4462cfec451130aa58d88b3da13913c3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/45753608d28d02693f8f6277074589a1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/56b349da612a4be9d5e6733778ce17e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5b3ef4ce70e1da7b1afd392754613726 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/770ff8b64985dd08cab8c32a1fa76438 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8e4cef792c949716da8fe3e9ee0cda70 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a6374c002de146da5c25b8cfd375ce6c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b085c718dd9381a5d4036f00b47d1b91 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c207a30f2b33f7df2c5336aed05485a2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cf4d7483cd5aff334d69dd3173f9b953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e2b0bfc208732a6cf47d67c1be32e54f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/07db4022ed50ebf1535599a3e2344037 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/09f817f5fe8888d5c59a3b285c3ef605 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1143c7a241c19613744d1a2be3ad7cd1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/19f899de0e04ccfd931a7a11e36aca13 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1b98ef3337306536c2890a74951d225c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/39cd89cab4906d24583c876a477cf098 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4462cfec451130aa58d88b3da13913c3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/45753608d28d02693f8f6277074589a1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/56b349da612a4be9d5e6733778ce17e4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5b3ef4ce70e1da7b1afd392754613726 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/770ff8b64985dd08cab8c32a1fa76438 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8e4cef792c949716da8fe3e9ee0cda70 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9d5b4060cdb29606bd153ef2ca742a22 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a6374c002de146da5c25b8cfd375ce6c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b085c718dd9381a5d4036f00b47d1b91 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c1fb58de0c271425746c77af9e101750 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c207a30f2b33f7df2c5336aed05485a2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e2b0bfc208732a6cf47d67c1be32e54f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/factories/mori_users.rb +8 -8
- data/spec/features/invites_spec.rb +64 -0
- data/spec/features/passwords_spec.rb +101 -0
- data/spec/features/registrations_spec.rb +37 -10
- data/spec/features/sessions_spec.rb +24 -28
- data/spec/helpers/mori_helper_spec.rb +3 -12
- data/spec/helpers.rb +10 -0
- data/spec/mailers/mori/mailer_spec.rb +24 -4
- data/spec/models/mori/user_spec.rb +187 -167
- data/spec/spec_helper.rb +17 -6
- metadata +108 -53
- data/app/assets/javascripts/mori/application.js +0 -13
- data/app/assets/stylesheets/mori/application.css +0 -13
- data/app/controllers/mori_controller.rb +0 -8
- data/app/mailers/mori/mailer.rb +0 -17
- data/app/models/mori/user.rb +0 -85
- data/app/views/mori/mailer/confirm_email.html.erb +0 -1
- data/app/views/mori/mailer/invite_user.html.erb +0 -1
- data/app/views/mori/mailer/password_reset_notification.html.erb +0 -1
- data/app/views/mori/registrations/new.slim +0 -9
- data/app/views/mori/sessions/new.slim +0 -8
- data/db/migrate/20140126052000_enable_hstore.rb +0 -9
- data/lib/mori/string.rb +0 -20
- data/spec/dummy/app/views/application/index.slim +0 -2
- data/spec/dummy/db/migrate/20140128055553_enable_hstore.mori.rb +0 -10
- data/spec/dummy/log/user.log +0 -43
- data/spec/dummy/tmp/pids/server.pid +0 -1
- data/spec/mailer_matcher.rb +0 -33
- data/spec/views/mori/registrations/create.html.erb_spec.rb +0 -5
- data/spec/views/mori/registrations/new.html.erb_spec.rb +0 -5
- data/spec/views/mori/sessions/create.html.erb_spec.rb +0 -5
- data/spec/views/mori/sessions/destroy.html.erb_spec.rb +0 -5
- data/spec/views/mori/sessions/new.html.erb_spec.rb +0 -5
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Miler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt-ruby
|
@@ -53,21 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rails
|
56
|
+
name: railties
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - '>='
|
@@ -80,38 +66,63 @@ dependencies:
|
|
80
66
|
- - '>='
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: 3.2.0
|
83
|
-
description: Mori is a
|
69
|
+
description: Mori is a lightweight module based authentication platform. Mori uses
|
70
|
+
Warden for session management, and is intended to be easy to overwrite, and configurable.
|
84
71
|
email:
|
85
72
|
- aaron@pineworks.io
|
86
73
|
executables: []
|
87
74
|
extensions: []
|
88
75
|
extra_rdoc_files: []
|
89
76
|
files:
|
90
|
-
- app/
|
91
|
-
- app/
|
77
|
+
- app/controllers/mori/base_controller.rb
|
78
|
+
- app/controllers/mori/invites_controller.rb
|
79
|
+
- app/controllers/mori/passwords_controller.rb
|
92
80
|
- app/controllers/mori/registrations_controller.rb
|
93
81
|
- app/controllers/mori/sessions_controller.rb
|
94
|
-
- app/controllers/mori_controller.rb
|
95
82
|
- app/helpers/mori_helper.rb
|
96
|
-
- app/mailers/
|
97
|
-
- app/
|
83
|
+
- app/mailers/mori_mailer.rb
|
84
|
+
- app/views/invites/new.html.erb
|
85
|
+
- app/views/invites/show.html.erb
|
98
86
|
- app/views/layouts/mori/application.html.erb
|
99
|
-
- app/views/mori/
|
100
|
-
- app/views/
|
101
|
-
- app/views/
|
102
|
-
- app/views/
|
103
|
-
- app/views/
|
87
|
+
- app/views/layouts/mori/form.html.erb
|
88
|
+
- app/views/mori_forms/_accept_invite.html.erb
|
89
|
+
- app/views/mori_forms/_change_password.html.erb
|
90
|
+
- app/views/mori_forms/_forgot_password.html.erb
|
91
|
+
- app/views/mori_forms/_invite_new_user_form.html.erb
|
92
|
+
- app/views/mori_forms/_password_reset.html.erb
|
93
|
+
- app/views/mori_forms/_registration.html.erb
|
94
|
+
- app/views/mori_forms/_sessions.html.erb
|
95
|
+
- app/views/mori_mailer/confirm_email.html.erb
|
96
|
+
- app/views/mori_mailer/forgot_password.html.erb
|
97
|
+
- app/views/mori_mailer/invite_user.html.erb
|
98
|
+
- app/views/passwords/change.html.erb
|
99
|
+
- app/views/passwords/forgot.html.erb
|
100
|
+
- app/views/passwords/reset.html.erb
|
101
|
+
- app/views/passwords/send_reset.html.erb
|
102
|
+
- app/views/registrations/new.html.erb
|
103
|
+
- app/views/sessions/new.html.erb
|
104
|
+
- app/views/shared/_links.html.erb
|
104
105
|
- config/database.travis.yml
|
105
106
|
- config/initializers/warden.rb
|
106
107
|
- config/locales/mori.en.yml
|
107
108
|
- config/mori.en.yml
|
108
109
|
- config/routes.rb
|
109
|
-
- db/migrate/
|
110
|
-
-
|
110
|
+
- db/migrate/20140128055658_create_users.rb
|
111
|
+
- lib/assets/javascripts/bootstrap.min.js
|
112
|
+
- lib/assets/stylesheets/bootstrap.min.css
|
113
|
+
- lib/generators/mori/install/install_generator.rb
|
114
|
+
- lib/generators/mori/install/templates/db/migrate/add_mori_to_users.rb
|
115
|
+
- lib/generators/mori/install/templates/db/migrate/create_users.rb
|
116
|
+
- lib/generators/mori/install/templates/mori.rb
|
117
|
+
- lib/generators/mori/install/templates/user.rb
|
118
|
+
- lib/generators/mori/views/USAGE
|
119
|
+
- lib/generators/mori/views/views_generator.rb
|
111
120
|
- lib/mori/configuration.rb
|
121
|
+
- lib/mori/controller.rb
|
112
122
|
- lib/mori/engine.rb
|
113
|
-
- lib/mori/
|
123
|
+
- lib/mori/password.rb
|
114
124
|
- lib/mori/token.rb
|
125
|
+
- lib/mori/user.rb
|
115
126
|
- lib/mori/version.rb
|
116
127
|
- lib/mori.rb
|
117
128
|
- lib/tasks/mori_tasks.rake
|
@@ -122,7 +133,9 @@ files:
|
|
122
133
|
- spec/dummy/app/assets/stylesheets/application.css
|
123
134
|
- spec/dummy/app/controllers/application_controller.rb
|
124
135
|
- spec/dummy/app/helpers/application_helper.rb
|
125
|
-
- spec/dummy/app/
|
136
|
+
- spec/dummy/app/models/user.rb
|
137
|
+
- spec/dummy/app/views/application/index.html.erb
|
138
|
+
- spec/dummy/app/views/application/test_login.html.erb
|
126
139
|
- spec/dummy/app/views/layouts/application.html.erb
|
127
140
|
- spec/dummy/bin/bundle
|
128
141
|
- spec/dummy/bin/rails
|
@@ -145,12 +158,12 @@ files:
|
|
145
158
|
- spec/dummy/config/locales/en.yml
|
146
159
|
- spec/dummy/config/routes.rb
|
147
160
|
- spec/dummy/config.ru
|
148
|
-
- spec/dummy/db/
|
149
|
-
- spec/dummy/db/migrate/
|
161
|
+
- spec/dummy/db/development.sqlite3
|
162
|
+
- spec/dummy/db/migrate/20140421045106_create_users.mori_engine.rb
|
150
163
|
- spec/dummy/db/schema.rb
|
164
|
+
- spec/dummy/db/test.sqlite3
|
151
165
|
- spec/dummy/log/development.log
|
152
166
|
- spec/dummy/log/test.log
|
153
|
-
- spec/dummy/log/user.log
|
154
167
|
- spec/dummy/public/404.html
|
155
168
|
- spec/dummy/public/422.html
|
156
169
|
- spec/dummy/public/500.html
|
@@ -158,43 +171,63 @@ files:
|
|
158
171
|
- spec/dummy/Rakefile
|
159
172
|
- spec/dummy/README.rdoc
|
160
173
|
- spec/dummy/tmp/cache/assets/development/sprockets/07db4022ed50ebf1535599a3e2344037
|
174
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/09f817f5fe8888d5c59a3b285c3ef605
|
161
175
|
- spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
|
162
176
|
- spec/dummy/tmp/cache/assets/development/sprockets/19f899de0e04ccfd931a7a11e36aca13
|
163
177
|
- spec/dummy/tmp/cache/assets/development/sprockets/1b98ef3337306536c2890a74951d225c
|
178
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/2000a2ad47f8e201455b785beb7b1384
|
179
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/22de1150643c428d3f508171d74347a3
|
164
180
|
- spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
181
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/3453364cd811fec54cae0a92adc719e4
|
165
182
|
- spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
|
183
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/4462cfec451130aa58d88b3da13913c3
|
184
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/45753608d28d02693f8f6277074589a1
|
166
185
|
- spec/dummy/tmp/cache/assets/development/sprockets/56b349da612a4be9d5e6733778ce17e4
|
167
186
|
- spec/dummy/tmp/cache/assets/development/sprockets/5b3ef4ce70e1da7b1afd392754613726
|
187
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/770ff8b64985dd08cab8c32a1fa76438
|
188
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/8e4cef792c949716da8fe3e9ee0cda70
|
168
189
|
- spec/dummy/tmp/cache/assets/development/sprockets/a6374c002de146da5c25b8cfd375ce6c
|
190
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/b085c718dd9381a5d4036f00b47d1b91
|
191
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/c207a30f2b33f7df2c5336aed05485a2
|
192
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/cf4d7483cd5aff334d69dd3173f9b953
|
169
193
|
- spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
170
194
|
- spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
195
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/e2b0bfc208732a6cf47d67c1be32e54f
|
171
196
|
- spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
172
197
|
- spec/dummy/tmp/cache/assets/test/sprockets/07db4022ed50ebf1535599a3e2344037
|
198
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/09f817f5fe8888d5c59a3b285c3ef605
|
199
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/1143c7a241c19613744d1a2be3ad7cd1
|
173
200
|
- spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
174
201
|
- spec/dummy/tmp/cache/assets/test/sprockets/19f899de0e04ccfd931a7a11e36aca13
|
175
202
|
- spec/dummy/tmp/cache/assets/test/sprockets/1b98ef3337306536c2890a74951d225c
|
176
203
|
- spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
177
204
|
- spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
205
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/39cd89cab4906d24583c876a477cf098
|
206
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/4462cfec451130aa58d88b3da13913c3
|
207
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/45753608d28d02693f8f6277074589a1
|
178
208
|
- spec/dummy/tmp/cache/assets/test/sprockets/56b349da612a4be9d5e6733778ce17e4
|
179
209
|
- spec/dummy/tmp/cache/assets/test/sprockets/5b3ef4ce70e1da7b1afd392754613726
|
210
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/770ff8b64985dd08cab8c32a1fa76438
|
211
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/8e4cef792c949716da8fe3e9ee0cda70
|
212
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/9d5b4060cdb29606bd153ef2ca742a22
|
180
213
|
- spec/dummy/tmp/cache/assets/test/sprockets/a6374c002de146da5c25b8cfd375ce6c
|
214
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/b085c718dd9381a5d4036f00b47d1b91
|
215
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/c1fb58de0c271425746c77af9e101750
|
216
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/c207a30f2b33f7df2c5336aed05485a2
|
181
217
|
- spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
182
218
|
- spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
219
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/e2b0bfc208732a6cf47d67c1be32e54f
|
183
220
|
- spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
184
|
-
- spec/dummy/tmp/pids/server.pid
|
185
221
|
- spec/factories/mori_users.rb
|
222
|
+
- spec/features/invites_spec.rb
|
223
|
+
- spec/features/passwords_spec.rb
|
186
224
|
- spec/features/registrations_spec.rb
|
187
225
|
- spec/features/sessions_spec.rb
|
188
226
|
- spec/helpers/mori_helper_spec.rb
|
189
|
-
- spec/
|
227
|
+
- spec/helpers.rb
|
190
228
|
- spec/mailers/mori/mailer_spec.rb
|
191
229
|
- spec/models/mori/user_spec.rb
|
192
230
|
- spec/spec_helper.rb
|
193
|
-
- spec/views/mori/registrations/create.html.erb_spec.rb
|
194
|
-
- spec/views/mori/registrations/new.html.erb_spec.rb
|
195
|
-
- spec/views/mori/sessions/create.html.erb_spec.rb
|
196
|
-
- spec/views/mori/sessions/destroy.html.erb_spec.rb
|
197
|
-
- spec/views/mori/sessions/new.html.erb_spec.rb
|
198
231
|
homepage: http://github.com/pineworks/mori
|
199
232
|
licenses: []
|
200
233
|
metadata: {}
|
@@ -223,7 +256,9 @@ test_files:
|
|
223
256
|
- spec/dummy/app/assets/stylesheets/application.css
|
224
257
|
- spec/dummy/app/controllers/application_controller.rb
|
225
258
|
- spec/dummy/app/helpers/application_helper.rb
|
226
|
-
- spec/dummy/app/
|
259
|
+
- spec/dummy/app/models/user.rb
|
260
|
+
- spec/dummy/app/views/application/index.html.erb
|
261
|
+
- spec/dummy/app/views/application/test_login.html.erb
|
227
262
|
- spec/dummy/app/views/layouts/application.html.erb
|
228
263
|
- spec/dummy/bin/bundle
|
229
264
|
- spec/dummy/bin/rails
|
@@ -246,12 +281,12 @@ test_files:
|
|
246
281
|
- spec/dummy/config/locales/en.yml
|
247
282
|
- spec/dummy/config/routes.rb
|
248
283
|
- spec/dummy/config.ru
|
249
|
-
- spec/dummy/db/
|
250
|
-
- spec/dummy/db/migrate/
|
284
|
+
- spec/dummy/db/development.sqlite3
|
285
|
+
- spec/dummy/db/migrate/20140421045106_create_users.mori_engine.rb
|
251
286
|
- spec/dummy/db/schema.rb
|
287
|
+
- spec/dummy/db/test.sqlite3
|
252
288
|
- spec/dummy/log/development.log
|
253
289
|
- spec/dummy/log/test.log
|
254
|
-
- spec/dummy/log/user.log
|
255
290
|
- spec/dummy/public/404.html
|
256
291
|
- spec/dummy/public/422.html
|
257
292
|
- spec/dummy/public/500.html
|
@@ -259,40 +294,60 @@ test_files:
|
|
259
294
|
- spec/dummy/Rakefile
|
260
295
|
- spec/dummy/README.rdoc
|
261
296
|
- spec/dummy/tmp/cache/assets/development/sprockets/07db4022ed50ebf1535599a3e2344037
|
297
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/09f817f5fe8888d5c59a3b285c3ef605
|
262
298
|
- spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
|
263
299
|
- spec/dummy/tmp/cache/assets/development/sprockets/19f899de0e04ccfd931a7a11e36aca13
|
264
300
|
- spec/dummy/tmp/cache/assets/development/sprockets/1b98ef3337306536c2890a74951d225c
|
301
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/2000a2ad47f8e201455b785beb7b1384
|
302
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/22de1150643c428d3f508171d74347a3
|
265
303
|
- spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
304
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/3453364cd811fec54cae0a92adc719e4
|
266
305
|
- spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
|
306
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/4462cfec451130aa58d88b3da13913c3
|
307
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/45753608d28d02693f8f6277074589a1
|
267
308
|
- spec/dummy/tmp/cache/assets/development/sprockets/56b349da612a4be9d5e6733778ce17e4
|
268
309
|
- spec/dummy/tmp/cache/assets/development/sprockets/5b3ef4ce70e1da7b1afd392754613726
|
310
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/770ff8b64985dd08cab8c32a1fa76438
|
311
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/8e4cef792c949716da8fe3e9ee0cda70
|
269
312
|
- spec/dummy/tmp/cache/assets/development/sprockets/a6374c002de146da5c25b8cfd375ce6c
|
313
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/b085c718dd9381a5d4036f00b47d1b91
|
314
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/c207a30f2b33f7df2c5336aed05485a2
|
315
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/cf4d7483cd5aff334d69dd3173f9b953
|
270
316
|
- spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
271
317
|
- spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
318
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/e2b0bfc208732a6cf47d67c1be32e54f
|
272
319
|
- spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
273
320
|
- spec/dummy/tmp/cache/assets/test/sprockets/07db4022ed50ebf1535599a3e2344037
|
321
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/09f817f5fe8888d5c59a3b285c3ef605
|
322
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/1143c7a241c19613744d1a2be3ad7cd1
|
274
323
|
- spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
275
324
|
- spec/dummy/tmp/cache/assets/test/sprockets/19f899de0e04ccfd931a7a11e36aca13
|
276
325
|
- spec/dummy/tmp/cache/assets/test/sprockets/1b98ef3337306536c2890a74951d225c
|
277
326
|
- spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
278
327
|
- spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
328
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/39cd89cab4906d24583c876a477cf098
|
329
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/4462cfec451130aa58d88b3da13913c3
|
330
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/45753608d28d02693f8f6277074589a1
|
279
331
|
- spec/dummy/tmp/cache/assets/test/sprockets/56b349da612a4be9d5e6733778ce17e4
|
280
332
|
- spec/dummy/tmp/cache/assets/test/sprockets/5b3ef4ce70e1da7b1afd392754613726
|
333
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/770ff8b64985dd08cab8c32a1fa76438
|
334
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/8e4cef792c949716da8fe3e9ee0cda70
|
335
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/9d5b4060cdb29606bd153ef2ca742a22
|
281
336
|
- spec/dummy/tmp/cache/assets/test/sprockets/a6374c002de146da5c25b8cfd375ce6c
|
337
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/b085c718dd9381a5d4036f00b47d1b91
|
338
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/c1fb58de0c271425746c77af9e101750
|
339
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/c207a30f2b33f7df2c5336aed05485a2
|
282
340
|
- spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
283
341
|
- spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
342
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/e2b0bfc208732a6cf47d67c1be32e54f
|
284
343
|
- spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
285
|
-
- spec/dummy/tmp/pids/server.pid
|
286
344
|
- spec/factories/mori_users.rb
|
345
|
+
- spec/features/invites_spec.rb
|
346
|
+
- spec/features/passwords_spec.rb
|
287
347
|
- spec/features/registrations_spec.rb
|
288
348
|
- spec/features/sessions_spec.rb
|
289
349
|
- spec/helpers/mori_helper_spec.rb
|
290
|
-
- spec/
|
350
|
+
- spec/helpers.rb
|
291
351
|
- spec/mailers/mori/mailer_spec.rb
|
292
352
|
- spec/models/mori/user_spec.rb
|
293
353
|
- spec/spec_helper.rb
|
294
|
-
- spec/views/mori/registrations/create.html.erb_spec.rb
|
295
|
-
- spec/views/mori/registrations/new.html.erb_spec.rb
|
296
|
-
- spec/views/mori/sessions/create.html.erb_spec.rb
|
297
|
-
- spec/views/mori/sessions/destroy.html.erb_spec.rb
|
298
|
-
- spec/views/mori/sessions/new.html.erb_spec.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
data/app/mailers/mori/mailer.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
module Mori
|
2
|
-
class Mailer < ActionMailer::Base
|
3
|
-
default from: Mori.configuration.from_email
|
4
|
-
|
5
|
-
def password_reset_notification(user)
|
6
|
-
@user = user
|
7
|
-
mail(to: user.email, subject: "Your password on #{Mori.configuration.application_name} has been reset")
|
8
|
-
end
|
9
|
-
def invite_user(user)
|
10
|
-
@user = user
|
11
|
-
mail(to: user.email, subject: "You've been invited to #{Mori.configuration.application_name}")
|
12
|
-
end
|
13
|
-
def confirm_email(user)
|
14
|
-
@user = user
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/app/models/mori/user.rb
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
require 'email_validator'
|
2
|
-
|
3
|
-
module Mori
|
4
|
-
include BCrypt
|
5
|
-
class User < ActiveRecord::Base
|
6
|
-
include Mori::Token
|
7
|
-
|
8
|
-
if Mori.configuration.account_database
|
9
|
-
establish_connection Mori.configuration.account_database
|
10
|
-
end
|
11
|
-
|
12
|
-
validates :email, email: { strict_mode: true }, presence: true, uniqueness: true
|
13
|
-
validates :password, presence: true, unless: :invitation_token?
|
14
|
-
validates :password_reset_token, uniqueness: true, if: :password_reset_token?
|
15
|
-
validates :invitation_token, uniqueness: true, if: :invitation_token?
|
16
|
-
|
17
|
-
before_save :encrypt_password, :if => Proc.new { |user| user.password_changed? }
|
18
|
-
before_validation :normalize_email, :if => Proc.new{ |user| user.email_changed? }
|
19
|
-
before_create :send_email_confirmation, :if => Proc.new { |user| user.password.present? }
|
20
|
-
|
21
|
-
# Methods called by ActiveRecord
|
22
|
-
|
23
|
-
def encrypt_password
|
24
|
-
self.password = self.password.encrypt
|
25
|
-
end
|
26
|
-
def normalize_email
|
27
|
-
self.email = self.email.normalize
|
28
|
-
end
|
29
|
-
def send_email_confirmation
|
30
|
-
self.confirmation_token = SecureRandom.hex(25)
|
31
|
-
self.confirmation_sent = Date.today
|
32
|
-
Mailer.confirm_email(self)
|
33
|
-
end
|
34
|
-
|
35
|
-
def accept_invitation(token,new_password)
|
36
|
-
user = User.find_by_invitation_token(token)
|
37
|
-
raise 'Expired Invitation Token' if user.invitation_sent < Date.today - 2.weeks
|
38
|
-
user.password = new_password
|
39
|
-
user.save
|
40
|
-
user
|
41
|
-
end
|
42
|
-
def reset_password(token,new_password)
|
43
|
-
raise 'Invalid Password Reset Token' unless token == self.password_reset_token
|
44
|
-
raise 'Expired Reset Token' if self.password_reset_sent < Date.today - 2.weeks
|
45
|
-
self.password = new_password
|
46
|
-
self.save
|
47
|
-
self
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.invite(email)
|
51
|
-
user = User.create({:email => email, :invitation_token => generate_token, :invitation_sent => Date.today})
|
52
|
-
Mailer.invite_user(user)
|
53
|
-
end
|
54
|
-
def self.forgot_password(email)
|
55
|
-
user = User.find_by_email(email)
|
56
|
-
user.password_reset_token = generate_token
|
57
|
-
user.password_reset_sent = Date.today
|
58
|
-
Mailer.password_reset_notification(user)
|
59
|
-
user.save
|
60
|
-
end
|
61
|
-
def self.change_password(email, password, new_password)
|
62
|
-
user = User.find_by_normalized_email(email.normalize)
|
63
|
-
raise "Passwords do not match" if ::BCrypt::Password.new(user.password) != password
|
64
|
-
user.password = new_password
|
65
|
-
user.save
|
66
|
-
user
|
67
|
-
end
|
68
|
-
def self.confirm_email(email, token)
|
69
|
-
user = User.find_by_confirmation_token(token)
|
70
|
-
raise 'Invalid Confirmation Token' if user.blank?
|
71
|
-
raise 'Expired Confirmation Token' if user.confirmation_sent < Date.today - 2.weeks
|
72
|
-
user.confirmed = true
|
73
|
-
user.save
|
74
|
-
user
|
75
|
-
end
|
76
|
-
def authenticate(password)
|
77
|
-
raise 'Invalid Login' if ::BCrypt::Password.new(self.password) != password
|
78
|
-
true
|
79
|
-
end
|
80
|
-
protected
|
81
|
-
def self.find_by_normalized_email(email)
|
82
|
-
User.find_by_email(email.normalize)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
h1 Hilo
|
@@ -1 +0,0 @@
|
|
1
|
-
<h1> I'm the invitation email </h1>
|
@@ -1 +0,0 @@
|
|
1
|
-
I am email!
|
data/lib/mori/string.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'bcrypt'
|
2
|
-
|
3
|
-
class String
|
4
|
-
include BCrypt
|
5
|
-
|
6
|
-
def encrypt
|
7
|
-
Password.create(self, :cost => cost)
|
8
|
-
end
|
9
|
-
def normalize
|
10
|
-
self.remove_whitespace.downcase
|
11
|
-
end
|
12
|
-
def remove_whitespace
|
13
|
-
self.gsub(/\s+/, '')
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
def cost
|
18
|
-
::BCrypt::Engine::DEFAULT_COST
|
19
|
-
end
|
20
|
-
end
|
data/spec/dummy/log/user.log
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
[1m[36m (2.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
2
|
-
[1m[35m (1.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
-
Migrating to EnableHstore (20140128055553)
|
5
|
-
[1m[35m (0.1ms)[0m BEGIN
|
6
|
-
[1m[36m (29.8ms)[0m [1mCREATE EXTENSION hstore[0m
|
7
|
-
[1m[35mSQL (0.7ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140128055553"]]
|
8
|
-
[1m[36m (1.3ms)[0m [1mCOMMIT[0m
|
9
|
-
Migrating to CreateMoriUsers (20140204044714)
|
10
|
-
[1m[35m (0.2ms)[0m BEGIN
|
11
|
-
[1m[36m (5.0ms)[0m [1mCREATE TABLE "mori_users" ("id" serial primary key, "email" character varying(255), "password" text, "invitation_token" character varying(255), "invitation_sent" timestamp, "password_reset_token" character varying(255), "password_reset_sent" timestamp, "confirmed" boolean, "confirmation_token" character varying(255), "confirmation_sent" timestamp, "group_id" integer, "data" hstore DEFAULT '', "created_at" timestamp, "updated_at" timestamp) [0m
|
12
|
-
[1m[35m (1.1ms)[0m CREATE INDEX "index_mori_users_on_email" ON "mori_users" ("email")
|
13
|
-
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_mori_users_on_group_id" ON "mori_users" ("group_id")[0m
|
14
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140204044714"]]
|
15
|
-
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
16
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
17
|
-
[1m[36mActiveRecord::SchemaMigration Load (7.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
18
|
-
Migrating to CreateUsers (20140209071716)
|
19
|
-
[1m[35m (0.3ms)[0m BEGIN
|
20
|
-
[1m[36m (9.1ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "password" text, "invitation_token" character varying(255), "invitation_sent" timestamp, "password_reset_token" character varying(255), "password_reset_sent" timestamp, "confirmed" boolean, "confirmation_token" character varying(255), "confirmation_sent" timestamp, "group_id" integer, "data" hstore DEFAULT '', "created_at" timestamp, "updated_at" timestamp) [0m
|
21
|
-
[1m[35m (1.3ms)[0m CREATE INDEX "index_users_on_email" ON "users" ("email")
|
22
|
-
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_users_on_group_id" ON "users" ("group_id")[0m
|
23
|
-
[1m[35mSQL (0.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140209071716"]]
|
24
|
-
[1m[36m (0.8ms)[0m [1mCOMMIT[0m
|
25
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
26
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
27
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
28
|
-
[1m[36m (2.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
29
|
-
[1m[35m (1.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
30
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
31
|
-
Migrating to EnableHstore (20140128055553)
|
32
|
-
[1m[35m (0.1ms)[0m BEGIN
|
33
|
-
[1m[36m (26.6ms)[0m [1mCREATE EXTENSION hstore[0m
|
34
|
-
[1m[35mSQL (0.9ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140128055553"]]
|
35
|
-
[1m[36m (1.5ms)[0m [1mCOMMIT[0m
|
36
|
-
Migrating to CreateUsers (20140209071716)
|
37
|
-
[1m[35m (0.3ms)[0m BEGIN
|
38
|
-
[1m[36m (5.9ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "password" text, "invitation_token" character varying(255), "invitation_sent" timestamp, "password_reset_token" character varying(255), "password_reset_sent" timestamp, "confirmed" boolean, "confirmation_token" character varying(255), "confirmation_sent" timestamp, "group_id" integer, "data" hstore DEFAULT '', "created_at" timestamp, "updated_at" timestamp) [0m
|
39
|
-
[1m[35m (1.2ms)[0m CREATE INDEX "index_users_on_email" ON "users" ("email")
|
40
|
-
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_users_on_group_id" ON "users" ("group_id")[0m
|
41
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140209071716"]]
|
42
|
-
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
43
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
@@ -1 +0,0 @@
|
|
1
|
-
48749
|
data/spec/mailer_matcher.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# Usage
|
2
|
-
# order = create(:order)
|
3
|
-
#
|
4
|
-
# expect {
|
5
|
-
# order.pay!
|
6
|
-
# }.to deliver_email(OrderMailer, :paid, order.id)
|
7
|
-
#
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
RSpec::Matchers.define :deliver_email do |mailer, action, *args|
|
12
|
-
match do |block|
|
13
|
-
stubbed_mailer = double('mailer', deliver: true)
|
14
|
-
mailer.stub(action => stubbed_mailer)
|
15
|
-
|
16
|
-
block.call
|
17
|
-
|
18
|
-
expect(mailer).to have_received(action).with(*args)
|
19
|
-
expect(stubbed_mailer).to have_received(:deliver)
|
20
|
-
end
|
21
|
-
|
22
|
-
failure_message_for_should do |actual|
|
23
|
-
"expected that block would deliver #{mailer}##{:action}"
|
24
|
-
end
|
25
|
-
|
26
|
-
failure_message_for_should_not do |actual|
|
27
|
-
"expected that block would not deliver #{mailer}##{:action}"
|
28
|
-
end
|
29
|
-
|
30
|
-
description do
|
31
|
-
"deliver #{mailer}##{:action}"
|
32
|
-
end
|
33
|
-
end
|