bit_settings 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bit_settings.rb +2 -2
- data/lib/bit_settings/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8792ede8be1fe550712aba1eca853cb7804bf0a7
|
4
|
+
data.tar.gz: f647e88674d7bfd33ce56f570ff256d7f05f5d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 680ef3ec4a9c7b6c15a2698132269deb135ac7b5dae39990070b95a4e0ddcb63871083fe7a1a15200ceb258506f4b488e4c3d8f5010a379fe02389149e603214
|
7
|
+
data.tar.gz: b59808d9f32e91d907ebad5f185424799f359e734c02ee4a8b0d00b94aed40a87a812a59ca2ae34aee92d2eaaaae18f467baa634d70eae1418113a1b5a4467c8
|
data/lib/bit_settings.rb
CHANGED
@@ -7,7 +7,7 @@ module BitSettings
|
|
7
7
|
included do
|
8
8
|
class_attribute :bit_settings
|
9
9
|
|
10
|
-
scope :with_settings,
|
10
|
+
scope :with_settings, lambda { |h|
|
11
11
|
available = self.bit_settings.values.flatten
|
12
12
|
invalid = h.keys - available
|
13
13
|
raise "Settings #{invalid.inspect} do not exist for #{self} model: available settings are #{available.inspect}" if invalid.any?
|
@@ -19,7 +19,7 @@ module BitSettings
|
|
19
19
|
scope = scope.where("#{table_name}.#{column} & #{false_mask} = 0") if false_mask > 0
|
20
20
|
end
|
21
21
|
return scope
|
22
|
-
|
22
|
+
}
|
23
23
|
|
24
24
|
end
|
25
25
|
|
data/lib/bit_settings/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bit_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pioz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02
|
11
|
+
date: 2018-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.6.
|
148
|
+
rubygems_version: 2.6.14
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: BitSettings is a plugin for ActiveRecord that transform a column of your
|