activerecord-typedstore 0.4.4 → 0.5.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +21 -8
- data/activerecord-typedstore.gemspec +9 -9
- data/gemfiles/Gemfile.ar-4.1 +1 -1
- data/gemfiles/Gemfile.ar-4.2 +11 -0
- data/lib/active_record/typed_store/column.rb +31 -2
- data/lib/active_record/typed_store/extension.rb +38 -2
- data/lib/active_record/typed_store/version.rb +1 -1
- data/spec/active_record/typed_store_spec.rb +21 -10
- data/spec/support/models.rb +23 -18
- metadata +24 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 840c3646ef834da4bfeb760ae59a440136a09b84
|
4
|
+
data.tar.gz: 25cf44e8833ff79e3870b66361ccdfc2f7913cf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9af2dc153df0bf781a9afbe9053a0246b76a2b0a60d2ab333d1113ce5b3ad68e127c2ab2c9e706d0a9d4c0446fc051d3c82f32a5d22506066425f8627e1e225
|
7
|
+
data.tar.gz: a439fda466092a2a33750859e7387017b5db9a253eb17ec64d373899425b48c0b3d444c7c21656852c31f4d44bd241b31ca80bbf5d5e59a13d03f9c1978988c2
|
data/.travis.yml
CHANGED
@@ -1,21 +1,34 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
1
3
|
rvm:
|
2
|
-
- 1.9
|
3
|
-
- 2.0
|
4
|
-
- 2.1
|
5
|
-
- 2.1.1
|
4
|
+
- 1.9
|
5
|
+
- 2.0
|
6
|
+
- 2.1
|
6
7
|
gemfile:
|
7
8
|
- gemfiles/Gemfile.ar-3.2
|
8
9
|
- gemfiles/Gemfile.ar-4.0
|
9
10
|
- gemfiles/Gemfile.ar-4.1
|
11
|
+
- gemfiles/Gemfile.ar-4.2
|
10
12
|
- gemfiles/Gemfile.ar-edge
|
11
13
|
|
14
|
+
env:
|
15
|
+
- TIMEZONE_AWARE=1 POSTGRES=1 MYSQL=1
|
16
|
+
- TIMEZONE_AWARE=0 POSTGRES=1 MYSQL=1
|
17
|
+
|
18
|
+
addons:
|
19
|
+
postgresql: 9.3
|
20
|
+
|
21
|
+
sudo: false
|
22
|
+
|
12
23
|
before_script:
|
13
24
|
- mysql -e 'create database typed_store_test;'
|
14
|
-
|
15
|
-
env:
|
16
|
-
- TIMEZONE_AWARE=1 POSTGRES=1 MYSQL=1 POSTGRES_URL=$(curl http://api.postgression.com)
|
17
|
-
- TIMEZONE_AWARE=0 POSTGRES=1 MYSQL=1 POSTGRES_URL=$(curl http://api.postgression.com)
|
25
|
+
- psql -c 'create database typed_store_test;' -U postgres
|
18
26
|
|
19
27
|
matrix:
|
20
28
|
allow_failures:
|
21
29
|
- gemfile: gemfiles/Gemfile.ar-edge
|
30
|
+
exclude:
|
31
|
+
- gemfile: gemfiles/Gemfile.ar-edge
|
32
|
+
rvm: 1.9
|
33
|
+
- gemfile: gemfiles/Gemfile.ar-edge
|
34
|
+
rvm: 2.0
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ['Jean Boussier']
|
10
10
|
spec.email = ['jean.boussier@gmail.com']
|
11
11
|
spec.description = %q{ActiveRecord::Store but with type definition}
|
12
|
-
spec.summary = %q{
|
12
|
+
spec.summary = %q{Add type casting and full method attributes support to RctiveRecord store}
|
13
13
|
spec.homepage = 'https://github.com/byroot/activerecord-typedstore'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
@@ -18,14 +18,14 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'activerecord', '>= 3.2'
|
21
|
+
spec.add_dependency 'activerecord', '>= 3.2', '< 5'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
-
spec.add_development_dependency 'rake'
|
25
|
-
spec.add_development_dependency 'rspec'
|
26
|
-
spec.add_development_dependency 'coveralls'
|
27
|
-
spec.add_development_dependency 'sqlite3'
|
28
|
-
spec.add_development_dependency 'pg'
|
29
|
-
spec.add_development_dependency 'mysql2'
|
30
|
-
spec.add_development_dependency 'database_cleaner'
|
24
|
+
spec.add_development_dependency 'rake', '~> 0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 0'
|
26
|
+
spec.add_development_dependency 'coveralls', '~> 0'
|
27
|
+
spec.add_development_dependency 'sqlite3', '~> 0'
|
28
|
+
spec.add_development_dependency 'pg', '~> 0'
|
29
|
+
spec.add_development_dependency 'mysql2', '~> 0'
|
30
|
+
spec.add_development_dependency 'database_cleaner', '~> 0'
|
31
31
|
end
|
data/gemfiles/Gemfile.ar-4.1
CHANGED
@@ -29,7 +29,8 @@ module ActiveRecord::TypedStore
|
|
29
29
|
|
30
30
|
def extract_default(value)
|
31
31
|
return value if (type == :string || type == :text) && value.nil?
|
32
|
-
|
32
|
+
|
33
|
+
type_cast(value)
|
33
34
|
end
|
34
35
|
|
35
36
|
def type_cast(value, map=true)
|
@@ -46,9 +47,37 @@ module ActiveRecord::TypedStore
|
|
46
47
|
return super(value.iso8601)
|
47
48
|
end
|
48
49
|
|
49
|
-
super(value)
|
50
|
+
defined?(super) ? super(value) : type_cast_from_database(value)
|
50
51
|
end
|
51
52
|
|
52
53
|
end
|
53
54
|
|
55
|
+
if defined? ::ActiveRecord::Type
|
56
|
+
BaseColumn = remove_const(:Column)
|
57
|
+
|
58
|
+
class DecimalType < ::ActiveRecord::Type::Decimal
|
59
|
+
def type_cast_from_database(value)
|
60
|
+
value = value.to_s if value.is_a?(Float)
|
61
|
+
super(value)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
class Column < BaseColumn
|
66
|
+
CAST_TYPES = {
|
67
|
+
boolean: ::ActiveRecord::Type::Boolean,
|
68
|
+
integer: ::ActiveRecord::Type::Integer,
|
69
|
+
string: ::ActiveRecord::Type::String,
|
70
|
+
float: ::ActiveRecord::Type::Float,
|
71
|
+
date: ::ActiveRecord::Type::Date,
|
72
|
+
datetime: ::ActiveRecord::Type::DateTime,
|
73
|
+
decimal: DecimalType,
|
74
|
+
any: ::ActiveRecord::Type::Value,
|
75
|
+
}
|
76
|
+
|
77
|
+
def initialize(_, type, *)
|
78
|
+
@cast_type = CAST_TYPES.fetch(type).new
|
79
|
+
super
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
54
83
|
end
|
@@ -5,7 +5,8 @@ require 'active_record/typed_store/typed_hash'
|
|
5
5
|
module ActiveRecord::TypedStore
|
6
6
|
AR_VERSION = Gem::Version.new(ActiveRecord::VERSION::STRING)
|
7
7
|
IS_AR_3_2 = AR_VERSION < Gem::Version.new('4.0')
|
8
|
-
IS_AR_4_1 = AR_VERSION >= Gem::Version.new('4.1.0
|
8
|
+
IS_AR_4_1 = AR_VERSION >= Gem::Version.new('4.1') && AR_VERSION < Gem::Version.new('4.2.0-rc1')
|
9
|
+
IS_AR_4_2 = AR_VERSION >= Gem::Version.new('4.2.0-rc1')
|
9
10
|
|
10
11
|
module Extension
|
11
12
|
extend ActiveSupport::Concern
|
@@ -92,6 +93,18 @@ module ActiveRecord::TypedStore
|
|
92
93
|
|
93
94
|
protected
|
94
95
|
|
96
|
+
if IS_AR_4_2
|
97
|
+
def attribute_method?(attr_name)
|
98
|
+
super || store_attribute_method?(attr_name)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def store_attribute_method?(attr_name)
|
103
|
+
return unless self.class.typed_store_attributes
|
104
|
+
store_attribute = self.class.typed_store_attributes[attr_name]
|
105
|
+
store_attribute && store_attribute.accessor?
|
106
|
+
end
|
107
|
+
|
95
108
|
def write_store_attribute(store_attribute, key, value)
|
96
109
|
column = store_column(store_attribute, key)
|
97
110
|
if column.try(:type) == :datetime && self.class.time_zone_aware_attributes && value.respond_to?(:in_time_zone)
|
@@ -106,8 +119,27 @@ module ActiveRecord::TypedStore
|
|
106
119
|
|
107
120
|
private
|
108
121
|
|
122
|
+
if IS_AR_4_2
|
123
|
+
def match_attribute_method?(method_name)
|
124
|
+
match = super
|
125
|
+
return unless match
|
126
|
+
return if match.target == 'attribute_before_type_cast'.freeze && store_attribute_method?(match.attr_name)
|
127
|
+
match
|
128
|
+
end
|
129
|
+
|
130
|
+
def coder_for(attr_name)
|
131
|
+
column = self.class.columns_hash[attr_name]
|
132
|
+
return unless column.cast_type.is_a?(::ActiveRecord::Type::Serialized)
|
133
|
+
column.cast_type.coder
|
134
|
+
end
|
135
|
+
else
|
136
|
+
def coder_for(attr_name)
|
137
|
+
self.class.serialized_attributes[attr_name]
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
109
141
|
def write_attribute(attr_name, value)
|
110
|
-
if coder =
|
142
|
+
if coder = coder_for(attr_name)
|
111
143
|
if coder.is_a?(ActiveRecord::TypedStore::Coder)
|
112
144
|
return super(attr_name, coder.as_indifferent_hash(value))
|
113
145
|
end
|
@@ -116,6 +148,10 @@ module ActiveRecord::TypedStore
|
|
116
148
|
super
|
117
149
|
end
|
118
150
|
|
151
|
+
def keys_for_partial_write
|
152
|
+
super & self.class.column_names
|
153
|
+
end
|
154
|
+
|
119
155
|
def store_column(store_attribute, key)
|
120
156
|
store = store_columns(store_attribute)
|
121
157
|
store && store[key]
|
@@ -58,11 +58,20 @@ shared_examples 'any model' do
|
|
58
58
|
}.to change { model.age_changed? }.from(true).to(false)
|
59
59
|
end
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
if AR_VERSION >= AR_4_2
|
62
|
+
it 'can be restored individually' do
|
63
|
+
model.age = 24
|
64
|
+
expect {
|
65
|
+
model.restore_age!
|
66
|
+
}.to change { model.age }.from(24).to(12)
|
67
|
+
end
|
68
|
+
else
|
69
|
+
it 'can be reset individually' do
|
70
|
+
model.age = 24
|
71
|
+
expect {
|
72
|
+
model.reset_age!
|
73
|
+
}.to change { model.age }.from(24).to(12)
|
74
|
+
end
|
66
75
|
end
|
67
76
|
|
68
77
|
it 'does not dirty track assigning the same boolean' do
|
@@ -606,7 +615,7 @@ shared_examples 'a model supporting arrays' do |pg_native=false|
|
|
606
615
|
end
|
607
616
|
|
608
617
|
it 'cast values inside the array (integer)' do
|
609
|
-
pending('ActiveRecord bug: https://github.com/rails/rails/pull/11245') if pg_native
|
618
|
+
pending('ActiveRecord bug: https://github.com/rails/rails/pull/11245') if pg_native && AR_VERSION < AR_4_2
|
610
619
|
model.update_attributes(grades: ['1', 2, 3.4])
|
611
620
|
expect(model.reload.grades).to be == [1, 2, 3]
|
612
621
|
end
|
@@ -621,12 +630,14 @@ shared_examples 'a model supporting arrays' do |pg_native=false|
|
|
621
630
|
expect(model.reload.tags).to be == ['1', nil]
|
622
631
|
end
|
623
632
|
|
624
|
-
|
625
|
-
|
626
|
-
|
633
|
+
if !pg_native || AR_VERSION < AR_4_2
|
634
|
+
it 'convert non array value as empty array' do
|
635
|
+
model.update_attributes(grades: 'foo')
|
636
|
+
expect(model.reload.grades).to be == []
|
637
|
+
end
|
627
638
|
end
|
628
639
|
|
629
|
-
if !pg_native || AR_VERSION
|
640
|
+
if !pg_native || AR_VERSION >= AR_4_1
|
630
641
|
it 'accept multidimensianl arrays' do
|
631
642
|
model.update_attributes(grades: [[1, 2], [3, 4]])
|
632
643
|
expect(model.reload.grades).to be == [[1, 2], [3, 4]]
|
data/spec/support/models.rb
CHANGED
@@ -5,6 +5,7 @@ require 'yaml'
|
|
5
5
|
AR_VERSION = Gem::Version.new(ActiveRecord::VERSION::STRING)
|
6
6
|
AR_4_0 = Gem::Version.new('4.0')
|
7
7
|
AR_4_1 = Gem::Version.new('4.1.0.beta')
|
8
|
+
AR_4_2 = Gem::Version.new('4.2.0-rc1')
|
8
9
|
|
9
10
|
ActiveRecord::Base.time_zone_aware_attributes = ENV['TIMEZONE_AWARE'] != '0'
|
10
11
|
ActiveRecord::Base.configurations = {
|
@@ -60,31 +61,33 @@ class CreateAllTables < ActiveRecord::Migration
|
|
60
61
|
|
61
62
|
def self.up
|
62
63
|
if ENV['MYSQL']
|
63
|
-
ActiveRecord::Base.establish_connection(
|
64
|
+
ActiveRecord::Base.establish_connection(:test_mysql)
|
64
65
|
recreate_table(:mysql_regular_ar_models) { |t| define_columns(t); t.text :untyped_settings }
|
65
66
|
end
|
66
67
|
|
67
68
|
if ENV['POSTGRES']
|
68
|
-
ActiveRecord::Base.establish_connection(ENV['POSTGRES_URL'] ||
|
69
|
+
ActiveRecord::Base.establish_connection(ENV['POSTGRES_URL'] || :test_postgresql)
|
69
70
|
recreate_table(:postgresql_regular_ar_models) { |t| define_columns(t); t.text :untyped_settings }
|
70
71
|
|
71
72
|
if AR_VERSION >= AR_4_0
|
72
73
|
execute "create extension if not exists hstore"
|
73
74
|
recreate_table(:postgres_hstore_typed_store_models) { |t| t.hstore :settings; t.text :untyped_settings }
|
74
75
|
|
75
|
-
|
76
|
-
|
76
|
+
if ENV['POSTGRES_JSON']
|
77
|
+
execute "create extension if not exists json"
|
78
|
+
recreate_table(:postgres_json_typed_store_models) { |t| t.json :settings; t.text :untyped_settings }
|
79
|
+
end
|
77
80
|
end
|
78
81
|
end
|
79
82
|
|
80
|
-
ActiveRecord::Base.establish_connection(
|
83
|
+
ActiveRecord::Base.establish_connection(:test_sqlite3)
|
81
84
|
recreate_table(:sqlite3_regular_ar_models) { |t| define_columns(t); t.text :untyped_settings }
|
82
85
|
recreate_table(:yaml_typed_store_models) { |t| t.text :settings; t.text :untyped_settings }
|
83
86
|
recreate_table(:json_typed_store_models) { |t| t.text :settings; t.text :untyped_settings }
|
84
87
|
recreate_table(:marshal_typed_store_models) { |t| t.text :settings; t.text :untyped_settings }
|
85
88
|
end
|
86
89
|
end
|
87
|
-
ActiveRecord::Migration.verbose =
|
90
|
+
ActiveRecord::Migration.verbose = true
|
88
91
|
CreateAllTables.up
|
89
92
|
|
90
93
|
class ColumnCoder
|
@@ -119,32 +122,34 @@ end
|
|
119
122
|
|
120
123
|
if ENV['MYSQL']
|
121
124
|
class MysqlRegularARModel < ActiveRecord::Base
|
122
|
-
establish_connection
|
125
|
+
establish_connection :test_mysql
|
123
126
|
store :untyped_settings, accessors: [:title]
|
124
127
|
end
|
125
128
|
end
|
126
129
|
|
127
130
|
if ENV['POSTGRES']
|
128
131
|
class PostgresqlRegularARModel < ActiveRecord::Base
|
129
|
-
establish_connection ENV['POSTGRES_URL'] ||
|
132
|
+
establish_connection ENV['POSTGRES_URL'] || :test_postgresql
|
130
133
|
store :untyped_settings, accessors: [:title]
|
131
134
|
end
|
132
135
|
|
133
136
|
if AR_VERSION >= AR_4_0
|
134
137
|
|
135
138
|
class PostgresHstoreTypedStoreModel < ActiveRecord::Base
|
136
|
-
establish_connection ENV['POSTGRES_URL'] ||
|
139
|
+
establish_connection ENV['POSTGRES_URL'] || :test_postgresql
|
137
140
|
store :untyped_settings, accessors: [:title]
|
138
141
|
typed_store :settings, coder: ColumnCoder.new(AsJson) do |s|
|
139
142
|
define_store_columns(s)
|
140
143
|
end
|
141
144
|
end
|
142
145
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
146
|
+
if ENV['POSTGRES_JSON']
|
147
|
+
class PostgresJsonTypedStoreModel < ActiveRecord::Base
|
148
|
+
establish_connection ENV['POSTGRES_URL'] || :test_postgresql
|
149
|
+
store :untyped_settings, accessors: [:title]
|
150
|
+
typed_store :settings, coder: ColumnCoder.new(AsJson) do |s|
|
151
|
+
define_store_columns(s)
|
152
|
+
end
|
148
153
|
end
|
149
154
|
end
|
150
155
|
|
@@ -152,12 +157,12 @@ if ENV['POSTGRES']
|
|
152
157
|
end
|
153
158
|
|
154
159
|
class Sqlite3RegularARModel < ActiveRecord::Base
|
155
|
-
establish_connection
|
160
|
+
establish_connection :test_sqlite3
|
156
161
|
store :untyped_settings, accessors: [:title]
|
157
162
|
end
|
158
163
|
|
159
164
|
class YamlTypedStoreModel < ActiveRecord::Base
|
160
|
-
establish_connection
|
165
|
+
establish_connection :test_sqlite3
|
161
166
|
store :untyped_settings, accessors: [:title]
|
162
167
|
typed_store :settings do |s|
|
163
168
|
define_store_columns(s)
|
@@ -165,7 +170,7 @@ class YamlTypedStoreModel < ActiveRecord::Base
|
|
165
170
|
end
|
166
171
|
|
167
172
|
class JsonTypedStoreModel < ActiveRecord::Base
|
168
|
-
establish_connection
|
173
|
+
establish_connection :test_sqlite3
|
169
174
|
store :untyped_settings, accessors: [:title]
|
170
175
|
typed_store :settings, coder: ColumnCoder.new(JSON) do |s|
|
171
176
|
define_store_columns(s)
|
@@ -187,7 +192,7 @@ module MarshalCoder
|
|
187
192
|
end
|
188
193
|
|
189
194
|
class MarshalTypedStoreModel < ActiveRecord::Base
|
190
|
-
establish_connection
|
195
|
+
establish_connection :test_sqlite3
|
191
196
|
store :untyped_settings, accessors: [:title]
|
192
197
|
typed_store :settings, coder: ColumnCoder.new(MarshalCoder) do |s|
|
193
198
|
define_store_columns(s)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-typedstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '3.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,98 +48,98 @@ dependencies:
|
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - "
|
58
|
+
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rspec
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- - "
|
65
|
+
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
67
|
version: '0'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- - "
|
72
|
+
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: coveralls
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- - "
|
79
|
+
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
81
|
version: '0'
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
|
-
- - "
|
86
|
+
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
88
|
version: '0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: sqlite3
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
|
-
- - "
|
93
|
+
- - "~>"
|
88
94
|
- !ruby/object:Gem::Version
|
89
95
|
version: '0'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
|
-
- - "
|
100
|
+
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: pg
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
|
-
- - "
|
107
|
+
- - "~>"
|
102
108
|
- !ruby/object:Gem::Version
|
103
109
|
version: '0'
|
104
110
|
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
|
-
- - "
|
114
|
+
- - "~>"
|
109
115
|
- !ruby/object:Gem::Version
|
110
116
|
version: '0'
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
118
|
name: mysql2
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|
114
120
|
requirements:
|
115
|
-
- - "
|
121
|
+
- - "~>"
|
116
122
|
- !ruby/object:Gem::Version
|
117
123
|
version: '0'
|
118
124
|
type: :development
|
119
125
|
prerelease: false
|
120
126
|
version_requirements: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
|
-
- - "
|
128
|
+
- - "~>"
|
123
129
|
- !ruby/object:Gem::Version
|
124
130
|
version: '0'
|
125
131
|
- !ruby/object:Gem::Dependency
|
126
132
|
name: database_cleaner
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
|
-
- - "
|
135
|
+
- - "~>"
|
130
136
|
- !ruby/object:Gem::Version
|
131
137
|
version: '0'
|
132
138
|
type: :development
|
133
139
|
prerelease: false
|
134
140
|
version_requirements: !ruby/object:Gem::Requirement
|
135
141
|
requirements:
|
136
|
-
- - "
|
142
|
+
- - "~>"
|
137
143
|
- !ruby/object:Gem::Version
|
138
144
|
version: '0'
|
139
145
|
description: ActiveRecord::Store but with type definition
|
@@ -154,6 +160,7 @@ files:
|
|
154
160
|
- gemfiles/Gemfile.ar-3.2
|
155
161
|
- gemfiles/Gemfile.ar-4.0
|
156
162
|
- gemfiles/Gemfile.ar-4.1
|
163
|
+
- gemfiles/Gemfile.ar-4.2
|
157
164
|
- gemfiles/Gemfile.ar-edge
|
158
165
|
- lib/active_record/typed_store.rb
|
159
166
|
- lib/active_record/typed_store/ar_32_fallbacks.rb
|
@@ -192,7 +199,7 @@ rubyforge_project:
|
|
192
199
|
rubygems_version: 2.2.2
|
193
200
|
signing_key:
|
194
201
|
specification_version: 4
|
195
|
-
summary:
|
202
|
+
summary: Add type casting and full method attributes support to RctiveRecord store
|
196
203
|
test_files:
|
197
204
|
- spec/active_record/typed_store/typed_hash_spec.rb
|
198
205
|
- spec/active_record/typed_store_spec.rb
|