act_with_bag 0.5.2 → 0.5.3
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/.gitignore +2 -1
- data/.travis.yml +3 -1
- data/Gemfile +2 -4
- data/lib/act_with_bag/version.rb +1 -1
- data/test/test_helper.rb +3 -5
- data/test/type_test.rb +8 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74be06d69e0735cdb7f86a7008c9e6673ebfaeec
|
4
|
+
data.tar.gz: b21f869b278feece5b9bd139b3658df04f83029d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc2521bcdd011be523018f48e49cde5f125b2efb33741ac95cf36ae002ac6ffd06b3e5cadbe03eaded0bb73c4e2aade059551f1a52611f14d2b536a132a3024b
|
7
|
+
data.tar.gz: 31843f4c41d87a3beb619c1ecb41f8d3b1ab891c7fa16fa06e6c76997d6b9cc17ddfab508660e223386adc8e992a505e356edcb90e520623be612cb8114a0bfb
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -6,11 +6,13 @@ rvm:
|
|
6
6
|
# - 1.9.3
|
7
7
|
- 2.2.3
|
8
8
|
- 2.3.1
|
9
|
+
- 2.4.1
|
9
10
|
|
10
11
|
env:
|
11
12
|
# - "RAILS_VERSION=3.2.16" # making problems at travis
|
12
13
|
- "RAILS_VERSION=4.2.4"
|
13
|
-
- "RAILS_VERSION=5.0.0.1"
|
14
|
+
# - "RAILS_VERSION=5.0.0.1"
|
15
|
+
- "RAILS_VERSION=5.1.2"
|
14
16
|
|
15
17
|
#matrix:
|
16
18
|
# exclude:
|
data/Gemfile
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
gemspec
|
3
3
|
|
4
|
-
version = ENV["RAILS_VERSION"]
|
5
|
-
gem 'rails', version ? "~> #{version}" : ">= 4.0.2"
|
6
|
-
|
7
4
|
group :development, :test do
|
8
5
|
gem 'sqlite3'
|
9
6
|
gem 'observr'
|
@@ -12,6 +9,7 @@ group :development, :test do
|
|
12
9
|
end
|
13
10
|
|
14
11
|
group :test do
|
15
|
-
|
12
|
+
version = ENV["RAILS_VERSION"]
|
13
|
+
gem 'rails', version ? "~> #{version}" : "~> 5.1"
|
16
14
|
gem 'simplecov', require: false
|
17
15
|
end
|
data/lib/act_with_bag/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
require 'simplecov'
|
2
|
-
#require 'coveralls'
|
3
|
-
#Coveralls.wear!
|
4
2
|
|
5
3
|
require 'rubygems'
|
6
4
|
require 'minitest/autorun'
|
@@ -12,8 +10,8 @@ require 'active_record'
|
|
12
10
|
#end
|
13
11
|
|
14
12
|
ActiveRecord::Base.establish_connection({
|
15
|
-
:
|
16
|
-
:
|
13
|
+
adapter: 'sqlite3',
|
14
|
+
database: 'bag.sqlite3'
|
17
15
|
})
|
18
16
|
|
19
17
|
ActiveRecord::Schema.define do
|
@@ -34,5 +32,5 @@ require File.dirname(__FILE__) + '/../lib/act_with_bag.rb'
|
|
34
32
|
|
35
33
|
|
36
34
|
class Order < ActiveRecord::Base
|
37
|
-
add_to_bag :field, :
|
35
|
+
add_to_bag :field, flag: :boolean, at: :date
|
38
36
|
end
|
data/test/type_test.rb
CHANGED
@@ -15,12 +15,12 @@ class TypeTest < ActiveSupport::TestCase
|
|
15
15
|
time = Time.now
|
16
16
|
[123, 2.3, "abc", nil, {a: 1}, [1,2], time].each { |value|
|
17
17
|
@order.field = value
|
18
|
-
|
18
|
+
assert_value value, @order.field
|
19
19
|
|
20
20
|
@order.save
|
21
21
|
id = @order.id
|
22
22
|
order = Order.find(id)
|
23
|
-
|
23
|
+
assert_value value, order.field
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
@@ -38,4 +38,10 @@ class TypeTest < ActiveSupport::TestCase
|
|
38
38
|
assert_kind_of Float, @order.f
|
39
39
|
end
|
40
40
|
|
41
|
+
private
|
42
|
+
def assert_value(expect, actual)
|
43
|
+
assert_equal expect, actual if expect
|
44
|
+
assert_nil actual unless expect
|
45
|
+
end
|
46
|
+
|
41
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: act_with_bag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
|
-
rubygems_version: 2.
|
73
|
+
rubygems_version: 2.6.12
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: act_with_bag (baggies) gem
|