wristband 0.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/Gemfile +2 -1
  2. data/Gemfile.lock +3 -3
  3. data/README.md +121 -38
  4. data/Rakefile +1 -0
  5. data/VERSION +1 -1
  6. data/app/controllers/application_controller.rb +0 -6
  7. data/app/controllers/passwords_controller.rb +43 -0
  8. data/app/controllers/sessions_controller.rb +6 -7
  9. data/app/controllers/users_controller.rb +1 -26
  10. data/app/helpers/form_helper.rb +8 -0
  11. data/app/mailers/user_mailer.rb +4 -26
  12. data/app/models/user.rb +1 -2
  13. data/app/views/passwords/edit.html.haml +7 -0
  14. data/app/views/passwords/new.html.haml +15 -0
  15. data/app/views/sessions/new.html.haml +1 -5
  16. data/app/views/user_mailer/password_reset.html.haml +7 -0
  17. data/app/views/user_mailer/password_reset.text.haml +6 -0
  18. data/config/environment.rb +1 -0
  19. data/config/initializers/formatted_form_builder.rb +141 -0
  20. data/config/routes.rb +6 -9
  21. data/db/migrate/01_create_users_table.rb +5 -3
  22. data/db/schema.rb +7 -4
  23. data/lib/generators/wristband/wristband_generator.rb +26 -15
  24. data/lib/wristband/application_extensions.rb +1 -0
  25. data/lib/wristband/user_extensions.rb +7 -17
  26. data/lib/wristband.rb +1 -3
  27. data/test/dummy/user.rb +1 -1
  28. data/test/functional/passwords_controller_test.rb +62 -0
  29. data/test/functional/sessions_controller_test.rb +93 -0
  30. data/test/test_helper.rb +1 -5
  31. data/test/unit/has_authorities_test.rb +1 -8
  32. data/test/unit/session_user_test.rb +46 -4
  33. data/test/unit/user_mailer_test.rb +18 -0
  34. data/test/unit/user_test.rb +1 -72
  35. data/test/unit/wristband_test.rb +74 -0
  36. data/wristband.gemspec +27 -10
  37. metadata +62 -29
  38. data/app/views/user_mailer/email_verification.text.html.rhtml +0 -7
  39. data/app/views/user_mailer/email_verification.text.plain.rhtml +0 -9
  40. data/app/views/user_mailer/forgot_password.text.html.rhtml +0 -10
  41. data/app/views/user_mailer/forgot_password.text.plain.rhtml +0 -10
data/wristband.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wristband}
8
- s.version = "0.0.0"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jack Neto", "The Working Group Inc"]
12
- s.date = %q{2011-01-23}
12
+ s.date = %q{2011-01-25}
13
13
  s.description = %q{Provides a starting point for user authentication}
14
14
  s.email = %q{jack@theworkinggroup.ca}
15
15
  s.extra_rdoc_files = [
@@ -23,17 +23,19 @@ Gem::Specification.new do |s|
23
23
  "Rakefile",
24
24
  "VERSION",
25
25
  "app/controllers/application_controller.rb",
26
+ "app/controllers/passwords_controller.rb",
26
27
  "app/controllers/sessions_controller.rb",
27
28
  "app/controllers/users_controller.rb",
29
+ "app/helpers/form_helper.rb",
28
30
  "app/mailers/user_mailer.rb",
29
31
  "app/models/session_user.rb",
30
32
  "app/models/user.rb",
31
33
  "app/views/layouts/application.html.erb",
34
+ "app/views/passwords/edit.html.haml",
35
+ "app/views/passwords/new.html.haml",
32
36
  "app/views/sessions/new.html.haml",
33
- "app/views/user_mailer/email_verification.text.html.rhtml",
34
- "app/views/user_mailer/email_verification.text.plain.rhtml",
35
- "app/views/user_mailer/forgot_password.text.html.rhtml",
36
- "app/views/user_mailer/forgot_password.text.plain.rhtml",
37
+ "app/views/user_mailer/password_reset.html.haml",
38
+ "app/views/user_mailer/password_reset.text.haml",
37
39
  "app/views/users/show.html.haml",
38
40
  "config.ru",
39
41
  "config/application.rb",
@@ -43,6 +45,7 @@ Gem::Specification.new do |s|
43
45
  "config/environments/development.rb",
44
46
  "config/environments/production.rb",
45
47
  "config/environments/test.rb",
48
+ "config/initializers/formatted_form_builder.rb",
46
49
  "config/initializers/wristband.rb",
47
50
  "config/locales/en.yml",
48
51
  "config/routes.rb",
@@ -58,10 +61,14 @@ Gem::Specification.new do |s|
58
61
  "public/robots.txt",
59
62
  "script/rails",
60
63
  "test/dummy/user.rb",
64
+ "test/functional/passwords_controller_test.rb",
65
+ "test/functional/sessions_controller_test.rb",
61
66
  "test/test_helper.rb",
62
67
  "test/unit/has_authorities_test.rb",
63
68
  "test/unit/session_user_test.rb",
69
+ "test/unit/user_mailer_test.rb",
64
70
  "test/unit/user_test.rb",
71
+ "test/unit/wristband_test.rb",
65
72
  "wristband.gemspec"
66
73
  ]
67
74
  s.homepage = %q{http://github.com/twg/wristband}
@@ -70,10 +77,14 @@ Gem::Specification.new do |s|
70
77
  s.summary = %q{An authentication engine}
71
78
  s.test_files = [
72
79
  "test/dummy/user.rb",
80
+ "test/functional/passwords_controller_test.rb",
81
+ "test/functional/sessions_controller_test.rb",
73
82
  "test/test_helper.rb",
74
83
  "test/unit/has_authorities_test.rb",
75
84
  "test/unit/session_user_test.rb",
76
- "test/unit/user_test.rb"
85
+ "test/unit/user_mailer_test.rb",
86
+ "test/unit/user_test.rb",
87
+ "test/unit/wristband_test.rb"
77
88
  ]
78
89
 
79
90
  if s.respond_to? :specification_version then
@@ -83,25 +94,31 @@ Gem::Specification.new do |s|
83
94
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
84
95
  s.add_runtime_dependency(%q<rails>, ["= 3.0.3"])
85
96
  s.add_runtime_dependency(%q<haml>, ["= 3.0.25"])
86
- s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
97
+ s.add_runtime_dependency(%q<formatted_form>, ["= 1.0.0"])
98
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
87
99
  s.add_development_dependency(%q<jeweler>, [">= 0"])
88
100
  s.add_runtime_dependency(%q<rails>, [">= 3.0.3"])
89
101
  s.add_runtime_dependency(%q<haml>, [">= 3.0.25"])
102
+ s.add_runtime_dependency(%q<formatted_form>, [">= 1.0.0"])
90
103
  else
91
104
  s.add_dependency(%q<rails>, ["= 3.0.3"])
92
105
  s.add_dependency(%q<haml>, ["= 3.0.25"])
93
- s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
106
+ s.add_dependency(%q<formatted_form>, ["= 1.0.0"])
107
+ s.add_dependency(%q<sqlite3>, [">= 0"])
94
108
  s.add_dependency(%q<jeweler>, [">= 0"])
95
109
  s.add_dependency(%q<rails>, [">= 3.0.3"])
96
110
  s.add_dependency(%q<haml>, [">= 3.0.25"])
111
+ s.add_dependency(%q<formatted_form>, [">= 1.0.0"])
97
112
  end
98
113
  else
99
114
  s.add_dependency(%q<rails>, ["= 3.0.3"])
100
115
  s.add_dependency(%q<haml>, ["= 3.0.25"])
101
- s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
116
+ s.add_dependency(%q<formatted_form>, ["= 1.0.0"])
117
+ s.add_dependency(%q<sqlite3>, [">= 0"])
102
118
  s.add_dependency(%q<jeweler>, [">= 0"])
103
119
  s.add_dependency(%q<rails>, [">= 3.0.3"])
104
120
  s.add_dependency(%q<haml>, [">= 3.0.25"])
121
+ s.add_dependency(%q<formatted_form>, [">= 1.0.0"])
105
122
  end
106
123
  end
107
124
 
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wristband
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
4
  prerelease: false
6
5
  segments:
6
+ - 1
7
7
  - 0
8
- - 0
9
- - 0
10
- version: 0.0.0
8
+ - 2
9
+ version: 1.0.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Jack Neto
@@ -16,101 +15,125 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2011-01-23 00:00:00 -05:00
18
+ date: 2011-01-25 00:00:00 -05:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
22
+ name: rails
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
26
  - - "="
27
27
  - !ruby/object:Gem::Version
28
- hash: 1
29
28
  segments:
30
29
  - 3
31
30
  - 0
32
31
  - 3
33
32
  version: 3.0.3
34
33
  type: :runtime
35
- name: rails
36
34
  prerelease: false
37
35
  version_requirements: *id001
38
36
  - !ruby/object:Gem::Dependency
37
+ name: haml
39
38
  requirement: &id002 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - "="
43
42
  - !ruby/object:Gem::Version
44
- hash: 53
45
43
  segments:
46
44
  - 3
47
45
  - 0
48
46
  - 25
49
47
  version: 3.0.25
50
48
  type: :runtime
51
- name: haml
52
49
  prerelease: false
53
50
  version_requirements: *id002
54
51
  - !ruby/object:Gem::Dependency
52
+ name: formatted_form
55
53
  requirement: &id003 !ruby/object:Gem::Requirement
56
54
  none: false
57
55
  requirements:
58
- - - ">="
56
+ - - "="
59
57
  - !ruby/object:Gem::Version
60
- hash: 3
61
58
  segments:
59
+ - 1
62
60
  - 0
63
- version: "0"
64
- type: :development
65
- name: sqlite3-ruby
61
+ - 0
62
+ version: 1.0.0
63
+ type: :runtime
66
64
  prerelease: false
67
65
  version_requirements: *id003
68
66
  - !ruby/object:Gem::Dependency
67
+ name: sqlite3
69
68
  requirement: &id004 !ruby/object:Gem::Requirement
70
69
  none: false
71
70
  requirements:
72
71
  - - ">="
73
72
  - !ruby/object:Gem::Version
74
- hash: 3
75
73
  segments:
76
74
  - 0
77
75
  version: "0"
78
76
  type: :development
79
- name: jeweler
80
77
  prerelease: false
81
78
  version_requirements: *id004
82
79
  - !ruby/object:Gem::Dependency
80
+ name: jeweler
83
81
  requirement: &id005 !ruby/object:Gem::Requirement
84
82
  none: false
85
83
  requirements:
86
84
  - - ">="
87
85
  - !ruby/object:Gem::Version
88
- hash: 1
86
+ segments:
87
+ - 0
88
+ version: "0"
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *id005
92
+ - !ruby/object:Gem::Dependency
93
+ name: rails
94
+ requirement: &id006 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
89
99
  segments:
90
100
  - 3
91
101
  - 0
92
102
  - 3
93
103
  version: 3.0.3
94
104
  type: :runtime
95
- name: rails
96
105
  prerelease: false
97
- version_requirements: *id005
106
+ version_requirements: *id006
98
107
  - !ruby/object:Gem::Dependency
99
- requirement: &id006 !ruby/object:Gem::Requirement
108
+ name: haml
109
+ requirement: &id007 !ruby/object:Gem::Requirement
100
110
  none: false
101
111
  requirements:
102
112
  - - ">="
103
113
  - !ruby/object:Gem::Version
104
- hash: 53
105
114
  segments:
106
115
  - 3
107
116
  - 0
108
117
  - 25
109
118
  version: 3.0.25
110
119
  type: :runtime
111
- name: haml
112
120
  prerelease: false
113
- version_requirements: *id006
121
+ version_requirements: *id007
122
+ - !ruby/object:Gem::Dependency
123
+ name: formatted_form
124
+ requirement: &id008 !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ segments:
130
+ - 1
131
+ - 0
132
+ - 0
133
+ version: 1.0.0
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: *id008
114
137
  description: Provides a starting point for user authentication
115
138
  email: jack@theworkinggroup.ca
116
139
  executables: []
@@ -127,17 +150,19 @@ files:
127
150
  - Rakefile
128
151
  - VERSION
129
152
  - app/controllers/application_controller.rb
153
+ - app/controllers/passwords_controller.rb
130
154
  - app/controllers/sessions_controller.rb
131
155
  - app/controllers/users_controller.rb
156
+ - app/helpers/form_helper.rb
132
157
  - app/mailers/user_mailer.rb
133
158
  - app/models/session_user.rb
134
159
  - app/models/user.rb
135
160
  - app/views/layouts/application.html.erb
161
+ - app/views/passwords/edit.html.haml
162
+ - app/views/passwords/new.html.haml
136
163
  - app/views/sessions/new.html.haml
137
- - app/views/user_mailer/email_verification.text.html.rhtml
138
- - app/views/user_mailer/email_verification.text.plain.rhtml
139
- - app/views/user_mailer/forgot_password.text.html.rhtml
140
- - app/views/user_mailer/forgot_password.text.plain.rhtml
164
+ - app/views/user_mailer/password_reset.html.haml
165
+ - app/views/user_mailer/password_reset.text.haml
141
166
  - app/views/users/show.html.haml
142
167
  - config.ru
143
168
  - config/application.rb
@@ -147,6 +172,7 @@ files:
147
172
  - config/environments/development.rb
148
173
  - config/environments/production.rb
149
174
  - config/environments/test.rb
175
+ - config/initializers/formatted_form_builder.rb
150
176
  - config/initializers/wristband.rb
151
177
  - config/locales/en.yml
152
178
  - config/routes.rb
@@ -162,10 +188,14 @@ files:
162
188
  - public/robots.txt
163
189
  - script/rails
164
190
  - test/dummy/user.rb
191
+ - test/functional/passwords_controller_test.rb
192
+ - test/functional/sessions_controller_test.rb
165
193
  - test/test_helper.rb
166
194
  - test/unit/has_authorities_test.rb
167
195
  - test/unit/session_user_test.rb
196
+ - test/unit/user_mailer_test.rb
168
197
  - test/unit/user_test.rb
198
+ - test/unit/wristband_test.rb
169
199
  - wristband.gemspec
170
200
  has_rdoc: true
171
201
  homepage: http://github.com/twg/wristband
@@ -181,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
211
  requirements:
182
212
  - - ">="
183
213
  - !ruby/object:Gem::Version
184
- hash: 3
214
+ hash: -1436971957664611674
185
215
  segments:
186
216
  - 0
187
217
  version: "0"
@@ -190,7 +220,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
220
  requirements:
191
221
  - - ">="
192
222
  - !ruby/object:Gem::Version
193
- hash: 3
194
223
  segments:
195
224
  - 0
196
225
  version: "0"
@@ -203,7 +232,11 @@ specification_version: 3
203
232
  summary: An authentication engine
204
233
  test_files:
205
234
  - test/dummy/user.rb
235
+ - test/functional/passwords_controller_test.rb
236
+ - test/functional/sessions_controller_test.rb
206
237
  - test/test_helper.rb
207
238
  - test/unit/has_authorities_test.rb
208
239
  - test/unit/session_user_test.rb
240
+ - test/unit/user_mailer_test.rb
209
241
  - test/unit/user_test.rb
242
+ - test/unit/wristband_test.rb
@@ -1,7 +0,0 @@
1
- <p>Hi,</p>
2
-
3
- <p>Your account has been set up.</p>
4
-
5
- <p>To verify your email address so that you may login, please click <%= link_to 'here', verify_email_url(@user.email_validation_key) %>.</p>
6
-
7
- <p>Thanks</p>
@@ -1,9 +0,0 @@
1
- Hi,
2
-
3
- Your account has been set up.
4
-
5
- To verify your email address so that you may login, please visit the following link:
6
-
7
- <%= verify_email_url(@user.email_validation_key) %>
8
-
9
- Thanks
@@ -1,10 +0,0 @@
1
- <p>Hi,</p>
2
-
3
- <p>A new password was requested for this email address.</p>
4
-
5
- <p>Your new password is: <b><%= @user.password %></b> </p>
6
-
7
- <p><%= link_to 'Click here to login', login_url %>.</p>
8
- <p>Once you have logged in, you can edit your profile and change your password to something you can easily remember.</p>
9
-
10
- <p>Thanks</p>
@@ -1,10 +0,0 @@
1
- Hi,
2
-
3
- A new password was requested for this email address.
4
-
5
- Your new password is: <b><%= @user.password %></b>
6
-
7
- To login go to: <%= login_url %>.
8
- Once you have logged in, you can edit your profile and change your password to something you can easily remember.
9
-
10
- Thanks