minimapper-extras 0.0.5 → 0.1.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: e25e9f439adce376313c1e6689e66aab2ee8591d
4
- data.tar.gz: c927432be7676680810eccd2a0cbf5644cca82bb
3
+ metadata.gz: 6cc35405d6f7b7f30359b489d1f6752dc2c8c1a7
4
+ data.tar.gz: a57bf9bfd4470d7fed953cae1525ff16a4827b0b
5
5
  SHA512:
6
- metadata.gz: 9efb298a73ed8bcd662356ca902600d8aad3f817a3ad1019ca3bb5a7815befa94eaf893132250ffd18d2ab68f20fd4cb0ec006d04e47b9cf58a699fc469707a3
7
- data.tar.gz: 330bc3914da9714b3e2f7603d7fe6fd3be9aef610dcaf164f3fe253a9e8725666b2667874485143f57f89d8be36d5038241bb424be4d4f3d371c3310f34e67bb
6
+ metadata.gz: 756bd40e72e990aa5e4138ccb0057ce106fb54bde9b4b31ee6bbcb22aa1fa308fba534b50fa7711e7c47306d10d76aab7e9b0de660cee007293ff38596fc633a
7
+ data.tar.gz: 41cd71d233c1dcb8c8255da4722de18ef6444810f4ace5afd4fd9bb0f5d217104972f28e86f724845997eddf65609f28369a771705243c0156eecd445e36e00f
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  class ToBoolean
11
11
  def convert(value)
12
- !!value
12
+ value && value != "0"
13
13
  end
14
14
  end
15
15
 
@@ -1,5 +1,5 @@
1
1
  module Minimapper
2
2
  module Extras
3
- VERSION = "0.0.5"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -19,5 +19,7 @@ describe "Convertions" do
19
19
  User.new(:flagged => "yep").flagged.should eq(true)
20
20
  User.new(:flagged => nil).flagged.should be_nil
21
21
  User.new(:flagged => false).flagged.should eq(false)
22
+ User.new(:flagged => "1").flagged.should eq(true)
23
+ User.new(:flagged => "0").flagged.should eq(false)
22
24
  end
23
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimapper-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joakim Kolsjö
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-13 00:00:00.000000000 Z
12
+ date: 2013-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minimapper