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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67bc4a415a532f4e89bee0d95c2835179bacd242
4
- data.tar.gz: 405fd9d6cba3b198596dea55c4f5f50c4352205c
3
+ metadata.gz: 47596eed47c824d972d720e7a92824c3dfc78be2
4
+ data.tar.gz: ad7d7ae821c585f6eb14433f2f632652ba26800d
5
5
  SHA512:
6
- metadata.gz: e523a69c53ece6f5a0a9f8f13378d9fe0ccc5bab91ebeee8cde35f7e68f72a709c4cae0d4292a85b49fddf96a12600f0c39b4df2904a91555d4fe79476a40dc2
7
- data.tar.gz: 66e36cc506e2e7e7774928f92e63049ba22a54d9a9888a2e48a24f99c88f301e5af22bf4ca6685d7e6453d266e2e2cea8abcd0615fd856208fb890560675c48f
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.9
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
- puts `#{command}`
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, :decimal, :datetime, :date, :boolean, :any].each do |type|
18
- define_method(type) do |name, options={}|
19
- @columns << Column.new(name, type, options.reverse_merge(accessor: @accessors))
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module TypedStore
3
- VERSION = '0.5.3'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  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.5.3
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-06-10 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord