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 +4 -4
- data/lib/bitfields.rb +2 -1
- data/lib/bitfields/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4067949c427d33aea4273d215c2e2bc7d05c326a
|
4
|
+
data.tar.gz: eb2c0e014d2c94d2b1e4bd0298c3187e983187a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa11c11730842bf735a7985d080eff98ff880a9271636986a964d4b1d6f1d1e397a6570c0b3d66651a41153af6e79c61a818c0cea3e2a7b5c3c44276024e9f36
|
7
|
+
data.tar.gz: e079d294a34cb6ed4f0ec3c2d5d099fdfaafa09f1eafbc6e7958d85d76f6190a34cc9d8f42b45332146f89e4bf795e268f6c6ef1705a5386cf40eeef1ae3dc2c
|
data/lib/bitfields.rb
CHANGED
@@ -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
|
-
|
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}")
|
data/lib/bitfields/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|