active_attr 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of active_attr might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02c6c69fe8a87196740e45c3e827e832b09a8eca
|
4
|
+
data.tar.gz: ce44bea22a9b8d2dbc753bc9a81cee7f51b4c6da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a13a61893450f32efa41744f7187e0cf4988359db4cf556de5175098fa9e357dd6744319e8fd43b786bcf4c9b156ea92aff74f9d26ccb1100c1821272e8a9b2
|
7
|
+
data.tar.gz: 605675def174c8cd4d83d2b2b7bc9c99a57c625409cc6124f3bf163d234441c96f93cd71d78e542d4eccc52824dec4c3fae94e0d154573c088623af147797ce1
|
data/.travis.yml
CHANGED
@@ -6,10 +6,10 @@ rvm:
|
|
6
6
|
- 1.9.3
|
7
7
|
- 2.0.0
|
8
8
|
- 2.1.10
|
9
|
-
- 2.2.
|
10
|
-
- 2.3.
|
11
|
-
- 2.4.
|
12
|
-
- 2.5.
|
9
|
+
- 2.2.10
|
10
|
+
- 2.3.7
|
11
|
+
- 2.4.4
|
12
|
+
- 2.5.1
|
13
13
|
before_install: gem install bundler
|
14
14
|
bundler_args: --without development
|
15
15
|
gemfile:
|
@@ -27,7 +27,7 @@ matrix:
|
|
27
27
|
allow_failures:
|
28
28
|
- gemfile: gemfiles/rails_head.gemfile
|
29
29
|
exclude:
|
30
|
-
- rvm: 2.5.
|
30
|
+
- rvm: 2.5.1
|
31
31
|
gemfile: gemfiles/rails_3_0.gemfile
|
32
32
|
- rvm: ree
|
33
33
|
gemfile: gemfiles/rails_4_0.gemfile
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# ActiveAttr 0.12.0 (August 6, 2018) #
|
2
|
+
|
3
|
+
* #167 Changed Typecasting::BooleanTypecaster to cast strings starting
|
4
|
+
with a zero character to cast to true (Artin Boghosian)
|
5
|
+
* Changed Typecasting::BooleanTypecaster to cast more numeric strings
|
6
|
+
to true
|
7
|
+
|
1
8
|
# ActiveAttr 0.11.0 (May 29, 2018) #
|
2
9
|
|
3
10
|
* #166 Changed Typecasting::DateTimeTypecaster to not raise on invalid
|
data/lib/active_attr/version.rb
CHANGED
@@ -33,6 +33,14 @@ module ActiveAttr
|
|
33
33
|
typecaster.call("abc").should equal true
|
34
34
|
end
|
35
35
|
|
36
|
+
it "casts a non-empty String starting with number 0 to true" do
|
37
|
+
typecaster.call("0c2").should equal true
|
38
|
+
end
|
39
|
+
|
40
|
+
it "casts a non-empty String starting with number > 0 to true" do
|
41
|
+
typecaster.call("1c2").should equal true
|
42
|
+
end
|
43
|
+
|
36
44
|
{
|
37
45
|
"t" => true,
|
38
46
|
"f" => false,
|
@@ -119,6 +127,10 @@ module ActiveAttr
|
|
119
127
|
typecaster.call("0").should equal false
|
120
128
|
end
|
121
129
|
|
130
|
+
it "casts '0\\nx' to true" do
|
131
|
+
typecaster.call("0\nx").should equal true
|
132
|
+
end
|
133
|
+
|
122
134
|
it "casts '1' to true" do
|
123
135
|
typecaster.call("1").should equal true
|
124
136
|
end
|
@@ -127,6 +139,14 @@ module ActiveAttr
|
|
127
139
|
typecaster.call("0.0").should equal false
|
128
140
|
end
|
129
141
|
|
142
|
+
it "casts '.0' to false" do
|
143
|
+
typecaster.call(".0").should equal false
|
144
|
+
end
|
145
|
+
|
146
|
+
it "casts '0.' to false" do
|
147
|
+
typecaster.call("0.").should equal false
|
148
|
+
end
|
149
|
+
|
130
150
|
it "casts '0.1' to true" do
|
131
151
|
typecaster.call("0.1").should equal true
|
132
152
|
end
|
@@ -135,13 +155,25 @@ module ActiveAttr
|
|
135
155
|
typecaster.call("-1").should equal true
|
136
156
|
end
|
137
157
|
|
158
|
+
it "casts '+1' to true" do
|
159
|
+
typecaster.call("+1").should equal true
|
160
|
+
end
|
161
|
+
|
138
162
|
it "casts '-0.0' to false" do
|
139
163
|
typecaster.call("-0.0").should equal false
|
140
164
|
end
|
141
165
|
|
166
|
+
it "casts '+0.0' to false" do
|
167
|
+
typecaster.call("+0.0").should equal false
|
168
|
+
end
|
169
|
+
|
142
170
|
it "casts '-0.1' to true" do
|
143
171
|
typecaster.call("-0.1").should equal true
|
144
172
|
end
|
173
|
+
|
174
|
+
it "casts '+0.1' to true" do
|
175
|
+
typecaster.call("+0.1").should equal true
|
176
|
+
end
|
145
177
|
end
|
146
178
|
end
|
147
179
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_attr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Griego
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|