activemodel 3.1.0 → 3.1.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,13 @@
1
- *Rails 3.1.0 (unreleased)*
1
+ *Rails 3.1.1 (unreleased)*
2
+
3
+ * Remove hard dependency on bcrypt-ruby to avoid make ActiveModel dependent on a binary library.
4
+ You must add the gem explicitly to your Gemfile if you want use ActiveModel::SecurePassword:
5
+
6
+ gem 'bcrypt-ruby', '~> 3.0.0'
7
+
8
+ See GH #2687. [Guillermo Iguaran]
9
+
10
+ *Rails 3.1.0 (August 30, 2011)*
2
11
 
3
12
  * Alternate I18n namespace lookup is no longer supported.
4
13
  Instead of "activerecord.models.admins.post", do "activerecord.models.admins/post" instead [José Valim]
@@ -1,5 +1,3 @@
1
- require 'bcrypt'
2
-
3
1
  module ActiveModel
4
2
  module SecurePassword
5
3
  extend ActiveSupport::Concern
@@ -12,6 +10,10 @@ module ActiveModel
12
10
  # a "password_confirmation" attribute) are automatically added.
13
11
  # You can add more validations by hand if need be.
14
12
  #
13
+ # You need to add bcrypt-ruby (~> 3.0.0) to Gemfile to use has_secure_password:
14
+ #
15
+ # gem 'bcrypt-ruby', '~> 3.0.0'
16
+ #
15
17
  # Example using Active Record (which automatically includes ActiveModel::SecurePassword):
16
18
  #
17
19
  # # Schema: User(name:string, password_digest:string)
@@ -30,6 +32,11 @@ module ActiveModel
30
32
  # User.find_by_name("david").try(:authenticate, "notright") # => nil
31
33
  # User.find_by_name("david").try(:authenticate, "mUc3m00RsqyRe") # => user
32
34
  def has_secure_password
35
+ # Load bcrypt-ruby only when has_secured_password is used to avoid make ActiveModel
36
+ # (and by extension the entire framework) dependent on a binary library.
37
+ gem 'bcrypt-ruby', '~> 3.0.0'
38
+ require 'bcrypt'
39
+
33
40
  attr_reader :password
34
41
 
35
42
  validates_confirmation_of :password
@@ -2,8 +2,8 @@ module ActiveModel
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 0
6
- PRE = nil
5
+ TINY = 1
6
+ PRE = "rc1"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
5
- prerelease:
4
+ hash: 977940594
5
+ prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
- - 0
10
- version: 3.1.0
9
+ - 1
10
+ - rc1
11
+ version: 3.1.1.rc1
11
12
  platform: ruby
12
13
  authors:
13
14
  - David Heinemeier Hansson
@@ -15,7 +16,8 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-08-31 00:00:00 Z
19
+ date: 2011-09-14 00:00:00 -07:00
20
+ default_executable:
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: activesupport
@@ -25,12 +27,13 @@ dependencies:
25
27
  requirements:
26
28
  - - "="
27
29
  - !ruby/object:Gem::Version
28
- hash: 3
30
+ hash: 977940594
29
31
  segments:
30
32
  - 3
31
33
  - 1
32
- - 0
33
- version: 3.1.0
34
+ - 1
35
+ - rc1
36
+ version: 3.1.1.rc1
34
37
  type: :runtime
35
38
  version_requirements: *id001
36
39
  - !ruby/object:Gem::Dependency
@@ -64,22 +67,6 @@ dependencies:
64
67
  version: "0.6"
65
68
  type: :runtime
66
69
  version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: bcrypt-ruby
69
- prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- hash: 7
76
- segments:
77
- - 3
78
- - 0
79
- - 0
80
- version: 3.0.0
81
- type: :runtime
82
- version_requirements: *id004
83
70
  description: A toolkit for building modeling frameworks like Active Record and Active Resource. Rich support for attributes, callbacks, validations, observers, serialization, internationalization, and testing.
84
71
  email: david@loudthinking.com
85
72
  executables: []
@@ -127,6 +114,7 @@ files:
127
114
  - lib/active_model/validator.rb
128
115
  - lib/active_model/version.rb
129
116
  - lib/active_model.rb
117
+ has_rdoc: true
130
118
  homepage: http://www.rubyonrails.org
131
119
  licenses: []
132
120
 
@@ -149,16 +137,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
137
  required_rubygems_version: !ruby/object:Gem::Requirement
150
138
  none: false
151
139
  requirements:
152
- - - ">="
140
+ - - ">"
153
141
  - !ruby/object:Gem::Version
154
- hash: 3
142
+ hash: 25
155
143
  segments:
156
- - 0
157
- version: "0"
144
+ - 1
145
+ - 3
146
+ - 1
147
+ version: 1.3.1
158
148
  requirements: []
159
149
 
160
150
  rubyforge_project:
161
- rubygems_version: 1.8.8
151
+ rubygems_version: 1.3.7
162
152
  signing_key:
163
153
  specification_version: 3
164
154
  summary: A toolkit for building modeling frameworks (part of Rails).