bitfields 0.12.0 → 0.12.1

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: cf9f6971a5470e30369fcfa61814a7533ac62b89
4
- data.tar.gz: 559897cbd82a915ae89b0a462da4e40d8f8d9a3a
3
+ metadata.gz: 4067949c427d33aea4273d215c2e2bc7d05c326a
4
+ data.tar.gz: eb2c0e014d2c94d2b1e4bd0298c3187e983187a0
5
5
  SHA512:
6
- metadata.gz: dd96cded51293734f1dc013966f26a42d90710efb082f628076728e96425a31011c6cfd8a964d9cb0aa7bdc7f63d2669e6655eb96a37423fddf978aaa35027fc
7
- data.tar.gz: b68f9ec05b94f11ead65c5690a19f72199dc50b0d3434e82d3a202c9c22a9a5f7793a195310c28123b334f87c4fc6213643ac1fb196dd188e61d114ee03d695d
6
+ metadata.gz: aa11c11730842bf735a7985d080eff98ff880a9271636986a964d4b1d6f1d1e397a6570c0b3d66651a41153af6e79c61a818c0cea3e2a7b5c3c44276024e9f36
7
+ data.tar.gz: e079d294a34cb6ed4f0ec3c2d5d099fdfaafa09f1eafbc6e7958d85d76f6190a34cc9d8f42b45332146f89e4bf795e268f6c6ef1705a5386cf40eeef1ae3dc2c
@@ -143,7 +143,8 @@ module Bitfields
143
143
  result = []
144
144
  bit_values.each do |bit_name, value|
145
145
  bit = bitfields[column][bit_name]
146
- result << "(#{table_name}.#{column} & #{bit}) = #{bit}" if value
146
+ eql = value ? bit : 0
147
+ result << "(#{table_name}.#{column} & #{bit}) = #{eql}"
147
148
  end
148
149
  result.join(' OR ')
149
150
  else raise("bitfields: unknown query mode #{mode.inspect}")
@@ -1,3 +1,3 @@
1
1
  module Bitfields
2
- Version = VERSION = "0.12.0"
2
+ Version = VERSION = "0.12.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitfields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-02 00:00:00.000000000 Z
11
+ date: 2019-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord