bank 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bank/serialize.rb +3 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4b430c9d8d8a0e59b99b802a5f66efe5198bf14
4
- data.tar.gz: a9445c8e34ca03645d3e376d4a89ab726d0eef98
3
+ metadata.gz: d03efb19732b41b52f5cb6ffab196b6f0f77120a
4
+ data.tar.gz: cd2277b27bd298d7c4c4f579bcef6b3db4b3afff
5
5
  SHA512:
6
- metadata.gz: e015429d011a307b8464d169f7cbfeb2dd40988c8cdc986e171981636179634b561d837f7b989b8ab1e0a62c853a7d0227a2576bd830f265d27820121cfc8d1f
7
- data.tar.gz: 387327fd13a036fc4618a6c42d797ea0eca29428d6f950064a0b4dce58b50dd191a2fb0a46d33771d95370b3578cfdffc5e92d011d9be3f5b8dc882fb8dd664c
6
+ metadata.gz: a8898aff4bd1866df4205bd34779847a5b24de400ef78996118dfe51acbad6372ec26b28253c6deb24e8ef78aa642635835df225989123c9b8f6886f1d309777
7
+ data.tar.gz: 394c8790b5691dc54bf371098af30d736b2b1b0f06af4e9a5475b9c59fad2a0431e38ef60e8d8d7d8e8a177192bc4d8055cbba24a645a87adcded9d890f179c2
@@ -29,7 +29,9 @@ module Bank
29
29
 
30
30
  PackBooleans = ->(attrs, config) do
31
31
  config.columns_of_type(:boolean).each { |column, opts|
32
- attrs[column] = attrs[column] ? 1 : 0
32
+ false_values = [false, nil, 0, 'false', 'nil', '0']
33
+ value = !false_values.include?(attrs[column])
34
+ attrs[column] = value ? 1 : 0
33
35
  }
34
36
  end
35
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pratt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 2.0.14
127
+ rubygems_version: 2.4.8
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: simple interface for persistence built on Sequel