attr_encrypted 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,34 +124,26 @@ module AttrEncrypted
124
124
 
125
125
  attributes.each do |attribute|
126
126
  encrypted_attribute_name = (options[:attribute] ? options[:attribute] : [options[:prefix], attribute, options[:suffix]].join).to_sym
127
+ iv_name = "#{encrypted_attribute_name}_iv".to_sym
128
+ salt_name = "#{encrypted_attribute_name}_salt".to_sym
127
129
 
128
130
  instance_methods_as_symbols = instance_methods.collect { |method| method.to_sym }
129
131
  attr_reader encrypted_attribute_name unless instance_methods_as_symbols.include?(encrypted_attribute_name)
130
132
  attr_writer encrypted_attribute_name unless instance_methods_as_symbols.include?(:"#{encrypted_attribute_name}=")
131
133
 
132
134
  if options[:mode] == :per_attribute_iv_and_salt
133
- attr_reader (encrypted_attribute_name.to_s + "_iv").to_sym unless instance_methods_as_symbols.include?((encrypted_attribute_name.to_s + "_iv").to_sym )
134
- attr_writer (encrypted_attribute_name.to_s + "_iv").to_sym unless instance_methods_as_symbols.include?((encrypted_attribute_name.to_s + "_iv").to_sym )
135
+ attr_reader iv_name unless instance_methods_as_symbols.include?(iv_name)
136
+ attr_writer iv_name unless instance_methods_as_symbols.include?(:"#{iv_name}=")
135
137
 
136
- attr_reader (encrypted_attribute_name.to_s + "_salt").to_sym unless instance_methods_as_symbols.include?((encrypted_attribute_name.to_s + "_salt").to_sym )
137
- attr_writer (encrypted_attribute_name.to_s + "_salt").to_sym unless instance_methods_as_symbols.include?((encrypted_attribute_name.to_s + "_salt").to_sym )
138
+ attr_reader salt_name unless instance_methods_as_symbols.include?(salt_name)
139
+ attr_writer salt_name unless instance_methods_as_symbols.include?(:"#{salt_name}=")
138
140
  end
139
141
 
140
142
  define_method(attribute) do
141
- if options[:mode] == :per_attribute_iv_and_salt
142
- load_iv_for_attribute(attribute,encrypted_attribute_name, options[:algorithm])
143
- load_salt_for_attribute(attribute,encrypted_attribute_name)
144
- end
145
-
146
143
  instance_variable_get("@#{attribute}") || instance_variable_set("@#{attribute}", decrypt(attribute, send(encrypted_attribute_name)))
147
144
  end
148
145
 
149
146
  define_method("#{attribute}=") do |value|
150
- if options[:mode] == :per_attribute_iv_and_salt
151
- load_iv_for_attribute(attribute, encrypted_attribute_name, options[:algorithm])
152
- load_salt_for_attribute(attribute, encrypted_attribute_name)
153
- end
154
-
155
147
  send("#{encrypted_attribute_name}=", encrypt(attribute, value))
156
148
  instance_variable_set("@#{attribute}", value)
157
149
  end
@@ -310,7 +302,12 @@ module AttrEncrypted
310
302
 
311
303
  # Returns attr_encrypted options evaluated in the current object's scope for the attribute specified
312
304
  def evaluated_attr_encrypted_options_for(attribute)
313
- self.class.encrypted_attributes[attribute.to_sym].inject({}) { |hash, (option, value)| hash.merge!(option => evaluate_attr_encrypted_option(value)) }
305
+ if self.class.encrypted_attributes[attribute.to_sym][:mode] == :per_attribute_iv_and_salt
306
+ load_iv_for_attribute(attribute, self.class.encrypted_attributes[attribute.to_sym][:algorithm])
307
+ load_salt_for_attribute(attribute)
308
+ end
309
+
310
+ self.class.encrypted_attributes[attribute.to_sym].inject({}) { |hash, (option, value)| hash[option] = evaluate_attr_encrypted_option(value); hash }
314
311
  end
315
312
 
316
313
  # Evaluates symbol (method reference) or proc (responds to call) options
@@ -326,22 +323,24 @@ module AttrEncrypted
326
323
  end
327
324
  end
328
325
 
329
- def load_iv_for_attribute (attribute, encrypted_attribute_name, algorithm)
330
- iv = send("#{encrypted_attribute_name.to_s + "_iv"}")
331
- if(iv == nil)
332
- begin
333
- algorithm = algorithm || "aes-256-cbc"
334
- algo = OpenSSL::Cipher::Cipher.new(algorithm)
335
- iv = [algo.random_iv].pack("m")
336
- send("#{encrypted_attribute_name.to_s + "_iv"}=", iv)
337
- rescue RuntimeError
338
- end
326
+ def load_iv_for_attribute(attribute, algorithm)
327
+ encrypted_attribute_name = self.class.encrypted_attributes[attribute.to_sym][:attribute]
328
+ iv = send("#{encrypted_attribute_name}_iv")
329
+ if(iv == nil)
330
+ begin
331
+ algorithm = algorithm || "aes-256-cbc"
332
+ algo = OpenSSL::Cipher::Cipher.new(algorithm)
333
+ iv = [algo.random_iv].pack("m")
334
+ send("#{encrypted_attribute_name}_iv=", iv)
335
+ rescue RuntimeError
339
336
  end
337
+ end
340
338
  self.class.encrypted_attributes[attribute.to_sym] = self.class.encrypted_attributes[attribute.to_sym].merge(:iv => iv.unpack("m").first) if (iv && !iv.empty?)
341
339
  end
342
340
 
343
- def load_salt_for_attribute(attribute, encrypted_attribute_name)
344
- salt = send("#{encrypted_attribute_name.to_s + "_salt"}") || send("#{encrypted_attribute_name.to_s + "_salt"}=", Digest::SHA256.hexdigest((Time.now.to_i * rand(1000)).to_s)[0..15])
341
+ def load_salt_for_attribute(attribute)
342
+ encrypted_attribute_name = self.class.encrypted_attributes[attribute.to_sym][:attribute]
343
+ salt = send("#{encrypted_attribute_name}_salt") || send("#{encrypted_attribute_name}_salt=", Digest::SHA256.hexdigest((Time.now.to_i * rand(1000)).to_s)[0..15])
345
344
  self.class.encrypted_attributes[attribute.to_sym] = self.class.encrypted_attributes[attribute.to_sym].merge(:salt => salt)
346
345
  end
347
346
  end
@@ -7,25 +7,26 @@ if defined?(ActiveRecord::Base)
7
7
  attr_encrypted_options[:encode] = true
8
8
  class << self
9
9
  alias_method_chain :method_missing, :attr_encrypted
10
- if ::ActiveRecord::VERSION::STRING < "3"
11
- alias_method :undefine_attribute_methods, :reset_column_information
12
- end
10
+ alias_method :undefine_attribute_methods, :reset_column_information if ::ActiveRecord::VERSION::STRING < "3"
11
+ end
12
+
13
+ def perform_attribute_assignment(method, new_attributes, *args)
14
+ return if new_attributes.blank?
15
+ attributes = new_attributes.respond_to?(:with_indifferent_access) ? new_attributes.with_indifferent_access : new_attributes.symbolize_keys
16
+ encrypted_attributes = self.class.encrypted_attributes.keys
17
+ self.send method, attributes.except(*encrypted_attributes), *args
18
+ self.send method, attributes.slice(*encrypted_attributes), *args
13
19
  end
20
+ private :perform_attribute_assignment
14
21
 
15
22
  if ::ActiveRecord::VERSION::STRING < "3.0" || ::ActiveRecord::VERSION::STRING > "3.1"
16
23
  def assign_attributes_with_attr_encrypted(*args)
17
- attributes = args.shift.symbolize_keys
18
- encrypted_attributes = self.class.encrypted_attributes.keys
19
- assign_attributes_without_attr_encrypted attributes.except(*encrypted_attributes), *args
20
- assign_attributes_without_attr_encrypted attributes.slice(*encrypted_attributes), *args
24
+ perform_attribute_assignment :assign_attributes_without_attr_encrypted, *args
21
25
  end
22
26
  alias_method_chain :assign_attributes, :attr_encrypted
23
27
  else
24
- def attributes_with_attr_encrypted=(attributes)
25
- attributes = attributes.symbolize_keys
26
- encrypted_attributes = self.class.encrypted_attributes.keys
27
- self.attributes_without_attr_encrypted = attributes.except(*encrypted_attributes)
28
- self.attributes_without_attr_encrypted = attributes.slice(*encrypted_attributes)
28
+ def attributes_with_attr_encrypted=(*args)
29
+ perform_attribute_assignment :attributes_without_attr_encrypted=, *args
29
30
  end
30
31
  alias_method_chain :attributes=, :attr_encrypted
31
32
  end
@@ -3,7 +3,7 @@ module AttrEncrypted
3
3
  module Version
4
4
  MAJOR = 1
5
5
  MINOR = 3
6
- PATCH = 1
6
+ PATCH = 2
7
7
 
8
8
  # Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
9
9
  #
@@ -10,7 +10,7 @@ def create_tables
10
10
  t.string :password
11
11
  t.string :encrypted_credentials
12
12
  t.binary :salt
13
- t.string :encrypted_email_salt
13
+ t.string :encrypted_email_salt
14
14
  t.string :encrypted_credentials_salt
15
15
  t.string :encrypted_email_iv
16
16
  t.string :encrypted_credentials_iv
@@ -20,6 +20,11 @@ def create_tables
20
20
  t.string :encrypted_password_iv
21
21
  t.string :encrypted_password_salt
22
22
  end
23
+ create_table :users do |t|
24
+ t.string :login
25
+ t.string :encrypted_password
26
+ t.boolean :is_admin
27
+ end
23
28
  end
24
29
  end
25
30
  end
@@ -28,6 +33,17 @@ end
28
33
  create_tables
29
34
 
30
35
  ActiveRecord::MissingAttributeError = ActiveModel::MissingAttributeError unless defined?(ActiveRecord::MissingAttributeError)
36
+ ActiveRecord::Base.logger = Logger.new(nil) if ::ActiveRecord::VERSION::STRING < "3.0"
37
+
38
+ if ::ActiveRecord::VERSION::STRING > "4.0"
39
+ module Rack
40
+ module Test
41
+ class UploadedFile; end
42
+ end
43
+ end
44
+
45
+ require 'action_controller/metal/strong_parameters'
46
+ end
31
47
 
32
48
  class Person < ActiveRecord::Base
33
49
  self.attr_encrypted_options[:mode] = :per_attribute_iv_and_salt
@@ -65,6 +81,12 @@ class PersonWithSerialization < ActiveRecord::Base
65
81
  serialize :password
66
82
  end
67
83
 
84
+ class UserWithProtectedAttribute < ActiveRecord::Base
85
+ self.table_name = 'users'
86
+ attr_encrypted :password, :key => 'a secret key'
87
+ attr_protected :is_admin if ::ActiveRecord::VERSION::STRING < "4.0"
88
+ end
89
+
68
90
  class ActiveRecordTest < Test::Unit::TestCase
69
91
 
70
92
  def setup
@@ -114,4 +136,65 @@ class ActiveRecordTest < Test::Unit::TestCase
114
136
  Account.create!(:key => SECRET_KEY, :password => "password")
115
137
  Account.create!(:password => "password" , :key => SECRET_KEY)
116
138
  end
139
+
140
+ if ::ActiveRecord::VERSION::STRING > "4.0"
141
+ def test_should_assign_attributes
142
+ @user = UserWithProtectedAttribute.new :login => 'login', :is_admin => false
143
+ @user.attributes = ActionController::Parameters.new(:login => 'modified', :is_admin => true).permit(:login)
144
+ assert_equal 'modified', @user.login
145
+ end
146
+
147
+ def test_should_not_assign_protected_attributes
148
+ @user = UserWithProtectedAttribute.new :login => 'login', :is_admin => false
149
+ @user.attributes = ActionController::Parameters.new(:login => 'modified', :is_admin => true).permit(:login)
150
+ assert !@user.is_admin?
151
+ end
152
+
153
+ def test_should_raise_exception_if_not_permitted
154
+ @user = UserWithProtectedAttribute.new :login => 'login', :is_admin => false
155
+ assert_raise ActiveModel::ForbiddenAttributesError do
156
+ @user.attributes = ActionController::Parameters.new(:login => 'modified', :is_admin => true)
157
+ end
158
+ end
159
+
160
+ def test_should_raise_exception_on_init_if_not_permitted
161
+ assert_raise ActiveModel::ForbiddenAttributesError do
162
+ @user = UserWithProtectedAttribute.new ActionController::Parameters.new(:login => 'modified', :is_admin => true)
163
+ end
164
+ end
165
+ else
166
+ def test_should_assign_attributes
167
+ @user = UserWithProtectedAttribute.new :login => 'login', :is_admin => false
168
+ @user.attributes = {:login => 'modified', :is_admin => true}
169
+ assert_equal 'modified', @user.login
170
+ end
171
+
172
+ def test_should_not_assign_protected_attributes
173
+ @user = UserWithProtectedAttribute.new :login => 'login', :is_admin => false
174
+ @user.attributes = {:login => 'modified', :is_admin => true}
175
+ assert !@user.is_admin?
176
+ end
177
+
178
+ def test_should_assign_protected_attributes
179
+ @user = UserWithProtectedAttribute.new :login => 'login', :is_admin => false
180
+ if ::ActiveRecord::VERSION::STRING > "3.1"
181
+ @user.send :assign_attributes, {:login => 'modified', :is_admin => true}, :without_protection => true
182
+ else
183
+ @user.send :attributes=, {:login => 'modified', :is_admin => true}, false
184
+ end
185
+ assert @user.is_admin?
186
+ end
187
+ end
188
+
189
+ def test_should_allow_assignment_of_nil_attributes
190
+ @person = Person.new
191
+ assert_nil(@person.attributes = nil)
192
+ end
193
+
194
+ if ::ActiveRecord::VERSION::STRING > "3.1"
195
+ def test_should_allow_assign_attributes_with_nil
196
+ @person = Person.new
197
+ assert_nil(@person.assign_attributes nil)
198
+ end
199
+ end
117
200
  end
@@ -289,4 +289,43 @@ class AttrEncryptedTest < Test::Unit::TestCase
289
289
  assert @user.email?
290
290
  end
291
291
 
292
+ def test_should_vary_iv_per_attribute
293
+ @user = User.new
294
+ @user.email = 'email@example.com'
295
+ @user.password = 'p455w0rd'
296
+ assert_not_equal @user.encrypted_email_iv, @user.crypted_password_test_iv
297
+ end
298
+
299
+ def test_should_vary_iv_per_instance
300
+ @user1 = User.new
301
+ @user1.email = 'email@example.com'
302
+ @user2 = User.new
303
+ @user2.email = 'email@example.com'
304
+ assert_not_equal @user1.encrypted_email_iv, @user2.encrypted_email_iv
305
+ end
306
+
307
+ def test_should_vary_salt_per_attribute
308
+ @user = User.new
309
+ @user.email = 'email@example.com'
310
+ @user.password = 'p455w0rd'
311
+ assert_not_equal @user.encrypted_email_salt, @user.crypted_password_test_salt
312
+ end
313
+
314
+ def test_should_vary_salt_per_instance
315
+ @user1 = User.new
316
+ @user1.email = 'email@example.com'
317
+ @user2 = User.new
318
+ @user2.email = 'email@example.com'
319
+ assert_not_equal @user1.encrypted_email_salt, @user2.encrypted_email_salt
320
+ end
321
+
322
+ def test_should_decrypt_second_record
323
+ @user1 = User.new
324
+ @user1.email = 'test@example.com'
325
+
326
+ @user2 = User.new
327
+ @user2.email = 'test@example.com'
328
+
329
+ assert_equal 'test@example.com', @user1.decrypt(:email, @user1.encrypted_email)
330
+ end
292
331
  end
@@ -0,0 +1,52 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ export RBENV_VERSION=ree-1.8.7-2012.02
6
+ rbenv version
7
+
8
+ export ACTIVERECORD=2.3.8
9
+ bundle
10
+ bundle exec rake
11
+ export ACTIVERECORD=3.0.0
12
+ bundle
13
+ bundle exec rake
14
+ export ACTIVERECORD=3.1.0
15
+ bundle
16
+ bundle exec rake
17
+ export ACTIVERECORD=3.2.0
18
+ bundle
19
+ bundle exec rake
20
+
21
+ export RBENV_VERSION=1.9.3-p484
22
+ rbenv version
23
+
24
+ export ACTIVERECORD=3.0.0
25
+ bundle
26
+ bundle exec rake
27
+ export ACTIVERECORD=3.1.0
28
+ bundle
29
+ bundle exec rake
30
+ export ACTIVERECORD=3.2.0
31
+ bundle
32
+ bundle exec rake
33
+ export ACTIVERECORD=4.0.0
34
+ bundle
35
+ bundle exec rake
36
+
37
+ export RBENV_VERSION=2.0.0-p353
38
+ rbenv version
39
+
40
+ export ACTIVERECORD=3.2.0
41
+ bundle
42
+ bundle exec rake
43
+ export ACTIVERECORD=4.0.0
44
+ bundle
45
+ bundle exec rake
46
+
47
+ export RBENV_VERSION=2.1.0
48
+ rbenv version
49
+
50
+ export ACTIVERECORD=4.0.0
51
+ bundle
52
+ bundle exec rake
@@ -19,7 +19,7 @@ gem 'activerecord', ENV['ACTIVE_RECORD_VERSION'] if ENV['ACTIVE_RECORD_VERSION']
19
19
  require 'active_record'
20
20
  require 'data_mapper'
21
21
  require 'sequel'
22
- require 'mocha'
22
+ require 'mocha/test_unit'
23
23
 
24
24
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
25
25
  $:.unshift(File.dirname(__FILE__))
metadata CHANGED
@@ -1,177 +1,187 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: attr_encrypted
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 3
9
- - 1
10
- version: 1.3.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Sean Huber
14
9
  - S. Brent Faulkner
15
10
  - William Monk
16
11
  autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
-
20
- date: 2013-12-06 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
14
+ date: 2014-02-13 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
23
17
  name: encryptor
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 27
31
- segments:
32
- - 1
33
- - 3
34
- - 0
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
35
23
  version: 1.3.0
36
24
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: activerecord
40
25
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 15
47
- segments:
48
- - 2
49
- - 0
50
- - 0
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ! '>='
30
+ - !ruby/object:Gem::Version
31
+ version: 1.3.0
32
+ - !ruby/object:Gem::Dependency
33
+ name: activerecord
34
+ requirement: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
51
39
  version: 2.0.0
52
- - - <
53
- - !ruby/object:Gem::Version
54
- hash: 63
55
- segments:
56
- - 4
57
- - 0
58
- - 0
59
- version: 4.0.0
60
40
  type: :development
61
- version_requirements: *id002
62
- - !ruby/object:Gem::Dependency
63
- name: datamapper
64
41
  prerelease: false
65
- requirement: &id003 !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 2.0.0
48
+ - !ruby/object:Gem::Dependency
49
+ name: datamapper
50
+ requirement: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
74
56
  type: :development
75
- version_requirements: *id003
76
- - !ruby/object:Gem::Dependency
77
- name: mocha
78
57
  prerelease: false
79
- requirement: &id004 !ruby/object:Gem::Requirement
80
- none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ - !ruby/object:Gem::Dependency
65
+ name: mocha
66
+ requirement: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ~>
70
+ - !ruby/object:Gem::Version
71
+ version: 1.0.0
88
72
  type: :development
89
- version_requirements: *id004
90
- - !ruby/object:Gem::Dependency
91
- name: sequel
92
73
  prerelease: false
93
- requirement: &id005 !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- hash: 3
99
- segments:
100
- - 0
101
- version: "0"
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: 1.0.0
80
+ - !ruby/object:Gem::Dependency
81
+ name: sequel
82
+ requirement: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
102
88
  type: :development
103
- version_requirements: *id005
104
- - !ruby/object:Gem::Dependency
105
- name: sqlite3
106
89
  prerelease: false
107
- requirement: &id006 !ruby/object:Gem::Requirement
108
- none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- hash: 3
113
- segments:
114
- - 0
115
- version: "0"
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: sqlite3
98
+ requirement: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
116
104
  type: :development
117
- version_requirements: *id006
118
- - !ruby/object:Gem::Dependency
119
- name: dm-sqlite-adapter
120
105
  prerelease: false
121
- requirement: &id007 !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: dm-sqlite-adapter
114
+ requirement: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
130
120
  type: :development
131
- version_requirements: *id007
132
- - !ruby/object:Gem::Dependency
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ - !ruby/object:Gem::Dependency
133
129
  name: rake
130
+ requirement: !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - '='
134
+ - !ruby/object:Gem::Version
135
+ version: 0.9.2.2
136
+ type: :development
134
137
  prerelease: false
135
- requirement: &id008 !ruby/object:Gem::Requirement
136
- none: false
137
- requirements:
138
- - - "="
139
- - !ruby/object:Gem::Version
140
- hash: 11
141
- segments:
142
- - 0
143
- - 9
144
- - 2
145
- - 2
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - '='
142
+ - !ruby/object:Gem::Version
146
143
  version: 0.9.2.2
144
+ - !ruby/object:Gem::Dependency
145
+ name: simplecov
146
+ requirement: !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
147
152
  type: :development
148
- version_requirements: *id008
149
- - !ruby/object:Gem::Dependency
150
- name: rcov
151
153
  prerelease: false
152
- requirement: &id009 !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- hash: 3
158
- segments:
159
- - 0
160
- version: "0"
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ - !ruby/object:Gem::Dependency
161
+ name: simplecov-rcov
162
+ requirement: !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
161
168
  type: :development
162
- version_requirements: *id009
169
+ prerelease: false
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
163
176
  description: Generates attr_accessors that encrypt and decrypt attributes transparently
164
- email:
177
+ email:
165
178
  - shuber@huberry.com
166
179
  - sbfaulkner@gmail.com
167
180
  - billy.monk@gmail.com
168
181
  executables: []
169
-
170
182
  extensions: []
171
-
172
183
  extra_rdoc_files: []
173
-
174
- files:
184
+ files:
175
185
  - lib/attr_encrypted/adapters/active_record.rb
176
186
  - lib/attr_encrypted/adapters/data_mapper.rb
177
187
  - lib/attr_encrypted/adapters/sequel.rb
@@ -189,45 +199,44 @@ files:
189
199
  - test/legacy_compatibility_test.rb
190
200
  - test/legacy_data_mapper_test.rb
191
201
  - test/legacy_sequel_test.rb
202
+ - test/run.sh
192
203
  - test/sequel_test.rb
193
204
  - test/test_helper.rb
194
205
  homepage: http://github.com/attr-encrypted/attr_encrypted
195
206
  licenses: []
196
-
197
207
  post_install_message:
198
- rdoc_options:
208
+ rdoc_options:
199
209
  - --line-numbers
200
210
  - --inline-source
201
211
  - --main
202
212
  - README.rdoc
203
- require_paths:
213
+ require_paths:
204
214
  - lib
205
- required_ruby_version: !ruby/object:Gem::Requirement
215
+ required_ruby_version: !ruby/object:Gem::Requirement
206
216
  none: false
207
- requirements:
208
- - - ">="
209
- - !ruby/object:Gem::Version
210
- hash: 3
211
- segments:
217
+ requirements:
218
+ - - ! '>='
219
+ - !ruby/object:Gem::Version
220
+ version: '0'
221
+ segments:
212
222
  - 0
213
- version: "0"
214
- required_rubygems_version: !ruby/object:Gem::Requirement
223
+ hash: -1158977372203285747
224
+ required_rubygems_version: !ruby/object:Gem::Requirement
215
225
  none: false
216
- requirements:
217
- - - ">="
218
- - !ruby/object:Gem::Version
219
- hash: 3
220
- segments:
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ segments:
221
231
  - 0
222
- version: "0"
232
+ hash: -1158977372203285747
223
233
  requirements: []
224
-
225
234
  rubyforge_project:
226
- rubygems_version: 1.8.15
235
+ rubygems_version: 1.8.23
227
236
  signing_key:
228
237
  specification_version: 3
229
238
  summary: Encrypt and decrypt attributes
230
- test_files:
239
+ test_files:
231
240
  - test/active_record_test.rb
232
241
  - test/attr_encrypted_test.rb
233
242
  - test/compatibility_test.rb
@@ -237,5 +246,6 @@ test_files:
237
246
  - test/legacy_compatibility_test.rb
238
247
  - test/legacy_data_mapper_test.rb
239
248
  - test/legacy_sequel_test.rb
249
+ - test/run.sh
240
250
  - test/sequel_test.rb
241
251
  - test/test_helper.rb