flipper-active_record 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/flipper/adapters/active_record.rb +6 -5
- data/lib/flipper/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9aab55863101daa2663ee348482f416122a417b
|
4
|
+
data.tar.gz: fcc72dadd91ea281545067182a960abff1cef5be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b6369212ba6dc4eefa299fe73af467b6c458703768261cce31d6f3f53e7d9fc962c48705aebea7992bf1dd55c1b9ec94a86ccf3b1dfaef521608c7d8a809dc7
|
7
|
+
data.tar.gz: 7135855356904bfa6982fedac622f058e39ab0e89f7e1bc8983a55c448fd6b7be2fd68a6911c21598a64d022a435ffc8cdcd2c6ef7dc127b485657081240b96d
|
@@ -89,11 +89,12 @@ module Flipper
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def get_all
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
92
|
+
rows = ::ActiveRecord::Base.connection.select_all <<-SQL
|
93
|
+
SELECT ff.key AS feature_key, fg.key, fg.value
|
94
|
+
FROM #{@feature_class.table_name} ff
|
95
|
+
LEFT JOIN #{@gate_class.table_name} fg ON ff.key = fg.feature_key
|
96
|
+
SQL
|
97
|
+
db_gates = rows.map { |row| Gate.new(row) }
|
97
98
|
grouped_db_gates = db_gates.group_by(&:feature_key)
|
98
99
|
result = Hash.new { |hash, key| hash[key] = default_config }
|
99
100
|
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-active_record
|
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
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-19 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.12.
|
19
|
+
version: 0.12.1
|
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.12.
|
26
|
+
version: 0.12.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|