thoughtbot-clearance 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -121,6 +121,11 @@ In config/environments/test.rb and config/environments/development.rb:
121
121
 
122
122
  HOST = "localhost"
123
123
 
124
+ In config/environment.rb:
125
+
126
+ DO_NOT_REPLY = "donotreply@example.com"
127
+ PROJECT_NAME = "my_app_name"
128
+
124
129
  h2. Authors
125
130
 
126
131
  * thoughtbot, inc.
data/TODO.textile CHANGED
@@ -1,8 +1,9 @@
1
1
  (highest priority first)
2
2
 
3
- # activation code instead of salt?
3
+ # change url_after_creates to be a class method or use after_filter
4
+ # activation code (like restful-auth) instead of salt?
5
+ # remove dependency on root_url?
4
6
  # users#show doesn't exist, but confirmations create redirects there
5
- # mailers should not hardcode example.com as from address
6
7
  # should_have_form should be pulled into shoulda
7
8
  # generator should print out instructions to include modules existing files
8
9
  # check to make sure attr_accessible doesn't override and w/ attr_protected
@@ -18,6 +19,6 @@ ideas to steal from merb-auth:
18
19
  # email confirmation is a strategy
19
20
  # forgot password is a strategy
20
21
  # salted password is a strategy
21
- # 401 and 405 need to be in Exceptions controller
22
+ # 401 and 405 need to be in Exceptions controller or use safety_valve
22
23
 
23
24
  http://adam.speaksoutofturn.com/articles/entication_vs_orization.html
@@ -38,6 +38,7 @@ module Clearance
38
38
  def url_after_create
39
39
  new_session_url
40
40
  end
41
+
41
42
  end
42
43
 
43
44
  end
@@ -13,17 +13,17 @@ module Clearance
13
13
 
14
14
  module InstanceMethods
15
15
  def change_password(user)
16
- from "donotreply@example.com"
16
+ from DO_NOT_REPLY
17
17
  recipients user.email
18
- subject "[YOUR APP] Request to change your password"
18
+ subject "[#{PROJECT_NAME.humanize}] Change your password"
19
19
  body :user => user
20
20
  end
21
21
 
22
22
  def confirmation(user)
23
23
  recipients user.email
24
- from "donotreply@example.com"
25
- subject 'Account Confirmation'
26
- body :user => user
24
+ from DO_NOT_REPLY
25
+ subject "[#{PROJECT_NAME.humanize}] Email confirmation"
26
+ body :user => user
27
27
  end
28
28
  end
29
29
 
@@ -1,7 +1,7 @@
1
- module Clearance
2
- module Version
3
- MAJOR = 0
4
- MINOR = 2
5
- PATCH = 8
1
+ module Clearance
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 2
5
+ PATCH = 9
6
+ end
6
7
  end
7
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thoughtbot-clearance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot, inc.