flipper-sequel 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flipper/adapters/sequel.rb +9 -5
- data/lib/flipper/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ed17230bf73572a1eb0d6e9d517e0a01a459f73a50ec0058f6977ad92c1e78a
|
4
|
+
data.tar.gz: 0d372c287dbc20dc98558544165bc1b96c9cc553ace717be21157d991372a005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d4eb797141a7130d78f74b6b6daa2958f5216205f94da3660e65ae4c6d51aa20f6cbbcf46b65f20aa4c7349a9cf59938423ce1b116a4c24b17c8e43a768cdd9
|
7
|
+
data.tar.gz: a94221243cdbf03ccf2f6d4bf3ec550921e6f15e06700005972f392ae25ff466876ecb5f9b079b9941bea70d64a1d53a5d22073f6a5be7118327ac12027ba08d
|
@@ -97,11 +97,15 @@ module Flipper
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def get_all
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
100
|
+
feature_table = @feature_class.table_name.to_sym
|
101
|
+
gate_table = @gate_class.table_name.to_sym
|
102
|
+
features_sql = @feature_class.select(:key.qualify(feature_table).as(:feature_key))
|
103
|
+
.select_append(:key.qualify(gate_table))
|
104
|
+
.select_append(:value.qualify(gate_table))
|
105
|
+
.left_join(@gate_class.table_name.to_sym, feature_key: :key)
|
106
|
+
.sql
|
107
|
+
|
108
|
+
db_gates = @gate_class.fetch(features_sql).to_a
|
105
109
|
grouped_db_gates = db_gates.group_by(&:feature_key)
|
106
110
|
result = Hash.new { |hash, key| hash[key] = default_config }
|
107
111
|
features = grouped_db_gates.keys.map { |key| Flipper::Feature.new(key, self) }
|
data/lib/flipper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flipper
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.22.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.22.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sequel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|