clearance 1.0.0.rc8 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of clearance might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f594b3d9373f5783a6e2304f49ca636bbf7b904d
4
- data.tar.gz: e2731151ddda9ff6b6a746b3f789b23f5305335e
3
+ metadata.gz: dee0a601f1ee2b04fc8878923101650fc4304caa
4
+ data.tar.gz: 7327399d9f9e95f00b7846b2969a57617f0f6a80
5
5
  SHA512:
6
- metadata.gz: 633e6622929f3ae73a267f607167f004915f61b679cad2867923cc0ff249eabdf6f3cb29d2dcb9f1fa2b5519f5841468f6e8c2888bd51fe9122865ef4934ce16
7
- data.tar.gz: d52bc8b9c6b5e4007d9461b91721ac0db05e7df9b6c4efcb36d93a253ece3d04d09e07e68d0341b10e73128bbf23bd786a7a3b6522c69d6ac91770e3a9b629b1
6
+ metadata.gz: 3972adda04cb8f7a6d61d963cd5454b1dece3836e74722d91f59b5749a8f88b0e84e437461336c3ed30b9fe3f469d058e06340e339ba78ae48b784ce1dd9d3d5
7
+ data.tar.gz: 177c710269e683a5a97af3ee372be2fed1db48cb49089c9156a9adc5538c20f3ecf47519546a44fb92a70be212f0794cb6915a5930f33579cba0c1b6f110bb3a
data/.travis.yml CHANGED
@@ -1,9 +1,16 @@
1
- language: ruby
1
+ language:
2
+ - ruby
3
+
2
4
  rvm:
3
5
  - 1.9.3
4
6
  - 2.0.0
7
+
8
+ install:
9
+ - "bundle install"
10
+
5
11
  before_script:
6
12
  - "bundle exec rake db:migrate"
13
+
7
14
  branches:
8
15
  only:
9
16
  - master
data/Gemfile CHANGED
@@ -13,6 +13,8 @@ gem 'factory_girl_rails', '~> 4.2'
13
13
  gem 'jbuilder', '~> 1.2'
14
14
  gem 'rspec-rails', '~> 2.13'
15
15
  gem 'sdoc'
16
- gem 'shoulda-matchers', github: 'thoughtbot/shoulda-matchers' , branch: 'dp-rails-four'
16
+ gem 'shoulda-matchers',
17
+ github: 'thoughtbot/shoulda-matchers',
18
+ branch: 'dp-rails-four'
17
19
  gem 'sqlite3', '~> 1.3'
18
20
  gem 'timecop', '~> 0.6'
data/Gemfile.lock CHANGED
@@ -1,15 +1,15 @@
1
1
  GIT
2
2
  remote: git://github.com/thoughtbot/shoulda-matchers.git
3
- revision: 96e734d8946151ebf0e0d4488d05f2da30fdb59a
3
+ revision: 2b452d5d3970e7319d0d4ea82942960616e05453
4
4
  branch: dp-rails-four
5
5
  specs:
6
- shoulda-matchers (2.1.0)
6
+ shoulda-matchers (2.2.0)
7
7
  activesupport (>= 3.0.0)
8
8
 
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- clearance (1.0.0.rc8)
12
+ clearance (1.0.0)
13
13
  bcrypt-ruby
14
14
  email_validator (~> 1.4)
15
15
  rails (>= 3.1)
@@ -17,45 +17,43 @@ PATH
17
17
  GEM
18
18
  remote: https://rubygems.org/
19
19
  specs:
20
- actionmailer (3.2.12)
21
- actionpack (= 3.2.12)
22
- mail (~> 2.4.4)
23
- actionpack (3.2.12)
24
- activemodel (= 3.2.12)
25
- activesupport (= 3.2.12)
26
- builder (~> 3.0.0)
20
+ actionmailer (4.0.0)
21
+ actionpack (= 4.0.0)
22
+ mail (~> 2.5.3)
23
+ actionpack (4.0.0)
24
+ activesupport (= 4.0.0)
25
+ builder (~> 3.1.0)
27
26
  erubis (~> 2.7.0)
28
- journey (~> 1.0.4)
29
- rack (~> 1.4.5)
30
- rack-cache (~> 1.2)
31
- rack-test (~> 0.6.1)
32
- sprockets (~> 2.2.1)
33
- activemodel (3.2.12)
34
- activesupport (= 3.2.12)
35
- builder (~> 3.0.0)
36
- activerecord (3.2.12)
37
- activemodel (= 3.2.12)
38
- activesupport (= 3.2.12)
39
- arel (~> 3.0.2)
40
- tzinfo (~> 0.3.29)
41
- activeresource (3.2.12)
42
- activemodel (= 3.2.12)
43
- activesupport (= 3.2.12)
44
- activesupport (3.2.12)
45
- i18n (~> 0.6)
46
- multi_json (~> 1.0)
27
+ rack (~> 1.5.2)
28
+ rack-test (~> 0.6.2)
29
+ activemodel (4.0.0)
30
+ activesupport (= 4.0.0)
31
+ builder (~> 3.1.0)
32
+ activerecord (4.0.0)
33
+ activemodel (= 4.0.0)
34
+ activerecord-deprecated_finders (~> 1.0.2)
35
+ activesupport (= 4.0.0)
36
+ arel (~> 4.0.0)
37
+ activerecord-deprecated_finders (1.0.3)
38
+ activesupport (4.0.0)
39
+ i18n (~> 0.6, >= 0.6.4)
40
+ minitest (~> 4.2)
41
+ multi_json (~> 1.3)
42
+ thread_safe (~> 0.1)
43
+ tzinfo (~> 0.3.37)
47
44
  appraisal (0.5.2)
48
45
  bundler
49
46
  rake
50
- arel (3.0.2)
47
+ arel (4.0.0)
51
48
  aruba (0.5.3)
52
49
  childprocess (>= 0.3.6)
53
50
  cucumber (>= 1.1.1)
54
51
  rspec-expectations (>= 2.7.0)
52
+ atomic (1.1.10)
55
53
  bcrypt-ruby (3.1.1)
56
- bourne (1.4.0)
57
- mocha (~> 0.13.2)
58
- builder (3.0.4)
54
+ bourne (1.5.0)
55
+ mocha (>= 0.13.2, < 0.15)
56
+ builder (3.1.4)
59
57
  capybara (2.0.3)
60
58
  mime-types (>= 1.16)
61
59
  nokogiri (>= 1.3.3)
@@ -65,16 +63,16 @@ GEM
65
63
  xpath (~> 1.0.0)
66
64
  childprocess (0.3.9)
67
65
  ffi (~> 1.0, >= 1.0.11)
68
- cucumber (1.3.2)
66
+ cucumber (1.3.5)
69
67
  builder (>= 2.1.2)
70
68
  diff-lcs (>= 1.1.3)
71
69
  gherkin (~> 2.12.0)
72
- multi_json (~> 1.3)
73
- cucumber-rails (1.3.1)
70
+ multi_json (~> 1.7.5)
71
+ multi_test (>= 0.0.2)
72
+ cucumber-rails (1.3.0)
74
73
  capybara (>= 1.1.2)
75
- cucumber (>= 1.2.0)
74
+ cucumber (>= 1.1.8)
76
75
  nokogiri (>= 1.5.0)
77
- rails (~> 3.0)
78
76
  database_cleaner (1.0.1)
79
77
  diff-lcs (1.2.4)
80
78
  email_validator (1.4.0)
@@ -90,60 +88,54 @@ GEM
90
88
  multi_json (~> 1.3)
91
89
  hike (1.2.3)
92
90
  i18n (0.6.4)
93
- jbuilder (1.4.2)
91
+ jbuilder (1.5.0)
94
92
  activesupport (>= 3.0.0)
95
93
  multi_json (>= 1.2.0)
96
- journey (1.0.4)
97
94
  json (1.8.0)
98
- mail (2.4.4)
99
- i18n (>= 0.4.0)
95
+ mail (2.5.4)
100
96
  mime-types (~> 1.16)
101
97
  treetop (~> 1.4.8)
102
98
  metaclass (0.0.1)
103
99
  mime-types (1.23)
104
- mini_portile (0.5.0)
105
- mocha (0.13.3)
100
+ mini_portile (0.5.1)
101
+ minitest (4.7.5)
102
+ mocha (0.14.0)
106
103
  metaclass (~> 0.0.1)
107
104
  multi_json (1.7.7)
105
+ multi_test (0.0.2)
108
106
  nokogiri (1.6.0)
109
107
  mini_portile (~> 0.5.0)
110
108
  polyglot (0.3.3)
111
- rack (1.4.5)
112
- rack-cache (1.2)
113
- rack (>= 0.4)
114
- rack-ssl (1.3.3)
115
- rack
109
+ rack (1.5.2)
116
110
  rack-test (0.6.2)
117
111
  rack (>= 1.0)
118
- rails (3.2.12)
119
- actionmailer (= 3.2.12)
120
- actionpack (= 3.2.12)
121
- activerecord (= 3.2.12)
122
- activeresource (= 3.2.12)
123
- activesupport (= 3.2.12)
124
- bundler (~> 1.0)
125
- railties (= 3.2.12)
126
- railties (3.2.12)
127
- actionpack (= 3.2.12)
128
- activesupport (= 3.2.12)
129
- rack-ssl (~> 1.3.2)
112
+ rails (4.0.0)
113
+ actionmailer (= 4.0.0)
114
+ actionpack (= 4.0.0)
115
+ activerecord (= 4.0.0)
116
+ activesupport (= 4.0.0)
117
+ bundler (>= 1.3.0, < 2.0)
118
+ railties (= 4.0.0)
119
+ sprockets-rails (~> 2.0.0)
120
+ railties (4.0.0)
121
+ actionpack (= 4.0.0)
122
+ activesupport (= 4.0.0)
130
123
  rake (>= 0.8.7)
131
- rdoc (~> 3.4)
132
- thor (>= 0.14.6, < 2.0)
124
+ thor (>= 0.18.1, < 2.0)
133
125
  rake (10.1.0)
134
126
  rdoc (3.12.2)
135
127
  json (~> 1.4)
136
- rspec-core (2.13.1)
137
- rspec-expectations (2.13.0)
128
+ rspec-core (2.14.4)
129
+ rspec-expectations (2.14.0)
138
130
  diff-lcs (>= 1.1.3, < 2.0)
139
- rspec-mocks (2.13.1)
140
- rspec-rails (2.13.2)
131
+ rspec-mocks (2.14.2)
132
+ rspec-rails (2.14.0)
141
133
  actionpack (>= 3.0)
142
134
  activesupport (>= 3.0)
143
135
  railties (>= 3.0)
144
- rspec-core (~> 2.13.0)
145
- rspec-expectations (~> 2.13.0)
146
- rspec-mocks (~> 2.13.0)
136
+ rspec-core (~> 2.14.0)
137
+ rspec-expectations (~> 2.14.0)
138
+ rspec-mocks (~> 2.14.0)
147
139
  rubyzip (0.9.9)
148
140
  sdoc (0.3.20)
149
141
  json (>= 1.1.3)
@@ -153,15 +145,21 @@ GEM
153
145
  multi_json (~> 1.0)
154
146
  rubyzip
155
147
  websocket (~> 1.0.4)
156
- sprockets (2.2.2)
148
+ sprockets (2.10.0)
157
149
  hike (~> 1.2)
158
150
  multi_json (~> 1.0)
159
151
  rack (~> 1.0)
160
152
  tilt (~> 1.1, != 1.3.0)
161
- sqlite3 (1.3.6)
153
+ sprockets-rails (2.0.0)
154
+ actionpack (>= 3.0)
155
+ activesupport (>= 3.0)
156
+ sprockets (~> 2.8)
157
+ sqlite3 (1.3.7)
162
158
  thor (0.18.1)
159
+ thread_safe (0.1.2)
160
+ atomic
163
161
  tilt (1.4.1)
164
- timecop (0.6.1)
162
+ timecop (0.6.2.2)
165
163
  treetop (1.4.14)
166
164
  polyglot
167
165
  polyglot (>= 0.3.1)
data/NEWS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Thank you to all the [contributors](https://github.com/thoughtbot/clearance/graphs/contributors)!
2
2
 
3
- New for 1.0.0:
3
+ New for 1.0.0 (August 1, 2013):
4
4
 
5
5
  * Support Rails 4.
6
6
  * Change default password strategy to BCrypt.
data/README.md CHANGED
@@ -23,7 +23,7 @@ It works with Rails 4 and Ruby 2.
23
23
  Include the gem in your Gemfile:
24
24
 
25
25
  ```ruby
26
- gem 'clearance', '1.0.0.rc7'
26
+ gem 'clearance', '1.0.0'
27
27
  ```
28
28
 
29
29
  Bundle:
@@ -57,11 +57,11 @@ Override any of these defaults in `config/initializers/clearance.rb`:
57
57
  Clearance.configure do |config|
58
58
  config.cookie_expiration = lambda { 1.year.from_now.utc }
59
59
  config.httponly = false
60
- config.secure_cookie = false
61
60
  config.mailer_sender = 'reply@example.com'
62
61
  config.password_strategy = Clearance::PasswordStrategies::BCrypt
63
- config.user_model = User
64
62
  config.redirect_url = '/'
63
+ config.secure_cookie = false
64
+ config.user_model = User
65
65
  end
66
66
  ```
67
67
 
@@ -330,6 +330,30 @@ Clearance.configure do |config|
330
330
  end
331
331
  ```
332
332
 
333
+ Deliver password reset email in a background job
334
+ ------------------------------------------------
335
+
336
+ Clearance has one mailer. It is used to reset the user's password.
337
+
338
+ To deliver it in a background job using a queue system like [Delayed
339
+ Job](https://github.com/collectiveidea/delayed_job), subclass
340
+ `Clearance::PasswordsController` and define the behavior you need in its
341
+ `deliver_email` method:
342
+
343
+ ```ruby
344
+ class PasswordsController < Clearance::PasswordsController
345
+ def deliver_email(user)
346
+ ClearanceMailer.delay.change_password(user)
347
+ end
348
+ end
349
+ ```
350
+
351
+ Then, override the route:
352
+
353
+ ```ruby
354
+ resources :passwords, only: [:create]
355
+ ```
356
+
333
357
  Optional feature specs
334
358
  ----------------------
335
359
 
data/clearance.gemspec CHANGED
@@ -3,8 +3,9 @@ require 'clearance/version'
3
3
  require 'date'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = %q{clearance}
7
- s.version = Clearance::VERSION
6
+ s.add_dependency 'bcrypt-ruby'
7
+ s.add_dependency 'email_validator', '~> 1.4'
8
+ s.add_dependency 'rails', '>= 3.1'
8
9
  s.authors = [
9
10
  'Dan Croak',
10
11
  'Eugene Bolshakov',
@@ -25,20 +26,17 @@ Gem::Specification.new do |s|
25
26
  'Galen Frechette',
26
27
  'Josh Steiner'
27
28
  ]
28
- s.email = %q{support@thoughtbot.com}
29
- s.homepage = %q{http://github.com/thoughtbot/clearance}
30
- s.summary = %q{Rails authentication & authorization with email & password.}
31
- s.description = %q{Rails authentication & authorization with email & password.}
32
-
33
- s.files = `git ls-files`.split("\n")
34
- s.test_files = `git ls-files -- {features,spec}/*`.split("\n")
29
+ s.description = 'Rails authentication & authorization with email & password.'
30
+ s.email = 'support@thoughtbot.com'
35
31
  s.extra_rdoc_files = %w(LICENSE README.md)
32
+ s.files = `git ls-files`.split("\n")
33
+ s.homepage = 'http://github.com/thoughtbot/clearance'
34
+ s.license = 'MIT'
35
+ s.name = %q{clearance}
36
36
  s.rdoc_options = ['--charset=UTF-8']
37
37
  s.require_paths = ['lib']
38
-
39
38
  s.required_ruby_version = Gem::Requirement.new('>= 1.9.2')
40
-
41
- s.add_dependency 'bcrypt-ruby'
42
- s.add_dependency 'email_validator', '~> 1.4'
43
- s.add_dependency 'rails', '>= 3.1'
39
+ s.summary = 'Rails authentication & authorization with email & password.'
40
+ s.test_files = `git ls-files -- {features,spec}/*`.split("\n")
41
+ s.version = Clearance::VERSION
44
42
  end
@@ -1,3 +1,3 @@
1
1
  module Clearance
2
- VERSION = '1.0.0.rc8'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -21,7 +21,11 @@ module Clearance
21
21
 
22
22
  def create_or_inject_clearance_into_user_model
23
23
  if File.exists? 'app/models/user.rb'
24
- inject_into User, 'app/models/user.rb', 'include Clearance::User'
24
+ inject_into_file(
25
+ 'app/models/user.rb',
26
+ "include Clearance::User\n\n",
27
+ after: "class User < ActiveRecord::Base\n"
28
+ )
25
29
  else
26
30
  copy_file 'user.rb', 'app/models/user.rb'
27
31
  end
@@ -54,9 +54,9 @@ describe Clearance::PasswordStrategies::BCryptMigrationFromSHA1 do
54
54
  end
55
55
 
56
56
  it 'does not raise a BCrypt error for invalid passwords' do
57
- lambda {
57
+ expect {
58
58
  subject.authenticated? 'bad' + password
59
- }.should_not raise_error(BCrypt::Errors::InvalidHash)
59
+ }.not_to raise_error
60
60
  end
61
61
 
62
62
  it 'saves the subject to database' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc8
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -25,7 +25,7 @@ authors:
25
25
  autorequire:
26
26
  bindir: bin
27
27
  cert_chain: []
28
- date: 2013-07-21 00:00:00.000000000 Z
28
+ date: 2013-08-01 00:00:00.000000000 Z
29
29
  dependencies:
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: bcrypt-ruby
@@ -189,7 +189,8 @@ files:
189
189
  - spec/support/fake_model_with_password_strategy.rb
190
190
  - spec/support/request_with_remember_token.rb
191
191
  homepage: http://github.com/thoughtbot/clearance
192
- licenses: []
192
+ licenses:
193
+ - MIT
193
194
  metadata: {}
194
195
  post_install_message:
195
196
  rdoc_options:
@@ -203,9 +204,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
204
  version: 1.9.2
204
205
  required_rubygems_version: !ruby/object:Gem::Requirement
205
206
  requirements:
206
- - - '>'
207
+ - - '>='
207
208
  - !ruby/object:Gem::Version
208
- version: 1.3.1
209
+ version: '0'
209
210
  requirements: []
210
211
  rubyforge_project:
211
212
  rubygems_version: 2.0.5