activerecord-typedstore 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/Rakefile +15 -1
- data/lib/active_record/typed_store/dsl.rb +7 -3
- data/lib/active_record/typed_store/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47596eed47c824d972d720e7a92824c3dfc78be2
|
4
|
+
data.tar.gz: ad7d7ae821c585f6eb14433f2f632652ba26800d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 776c9702342b18f7660cadf2feb2ca95b8c14bf4e7746c68551d3ec22ee36a468718d3ad4fd83a880fa32d997f767588e179ffadf4bd460f0e3ee504d7e49033
|
7
|
+
data.tar.gz: 0107e22b515e042c74a535d0e1f1650d31de11f70ca55b4994554eed435f43c8f06f84ec039125b069b62ce414407b1dd3ffce5f5e078bbca9ff3bd9362d0977
|
data/.travis.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
rvm:
|
4
|
-
- 1.9
|
5
4
|
- 2.0
|
6
5
|
- 2.1
|
6
|
+
- 2.2
|
7
7
|
gemfile:
|
8
8
|
- gemfiles/Gemfile.ar-3.2
|
9
9
|
- gemfiles/Gemfile.ar-4.0
|
@@ -29,6 +29,6 @@ matrix:
|
|
29
29
|
- gemfile: gemfiles/Gemfile.ar-edge
|
30
30
|
exclude:
|
31
31
|
- gemfile: gemfiles/Gemfile.ar-edge
|
32
|
-
rvm: 1
|
32
|
+
rvm: 2.1
|
33
33
|
- gemfile: gemfiles/Gemfile.ar-edge
|
34
34
|
rvm: 2.0
|
data/Rakefile
CHANGED
@@ -5,6 +5,20 @@ RSpec::Core::RakeTask.new(:spec)
|
|
5
5
|
|
6
6
|
task :default => :spec
|
7
7
|
|
8
|
+
namespace :gemfiles do
|
9
|
+
task :update do
|
10
|
+
Dir[File.expand_path('gemfiles/*')].each do |file|
|
11
|
+
next if file.end_with?('.lock')
|
12
|
+
command = %W{
|
13
|
+
BUNDLE_GEMFILE='#{file}'
|
14
|
+
bundle update
|
15
|
+
}.join(' ')
|
16
|
+
puts command
|
17
|
+
system(command)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
8
22
|
namespace :spec do
|
9
23
|
task :all do
|
10
24
|
%w(3.2 4.0 edge).each do |ar_version|
|
@@ -17,7 +31,7 @@ namespace :spec do
|
|
17
31
|
rspec
|
18
32
|
}.join(' ')
|
19
33
|
puts command
|
20
|
-
|
34
|
+
system(command)
|
21
35
|
end
|
22
36
|
end
|
23
37
|
end
|
@@ -14,12 +14,16 @@ module ActiveRecord::TypedStore
|
|
14
14
|
@columns.select(&:accessor?).map(&:name)
|
15
15
|
end
|
16
16
|
|
17
|
-
[:string, :text, :integer, :float, :
|
18
|
-
define_method(type) do |name, options={}|
|
19
|
-
@columns << Column.new(name, type,
|
17
|
+
[:string, :text, :integer, :float, :datetime, :date, :boolean, :any].each do |type|
|
18
|
+
define_method(type) do |name, options = {}|
|
19
|
+
@columns << Column.new(name, type, {accessor: @accessors}.merge(options))
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def decimal(name, options = {})
|
24
|
+
@columns << Column.new(name, :decimal, {accessor: @accessors, limit: 20, scale: 6}.merge(options))
|
25
|
+
end
|
26
|
+
|
23
27
|
end
|
24
28
|
|
25
29
|
end
|
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.6.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: 2015-
|
11
|
+
date: 2015-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|