flipper-activerecord 0.1.2 → 0.1.3

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: fd52078ee557c71d42582fa6f0f42c09d4fb27a2
4
- data.tar.gz: 9f98915938d51a381e89ea8385adf9c734e84172
3
+ metadata.gz: 4a5784ed7d6b6448b056465435e6a89f9d56f079
4
+ data.tar.gz: 18aa440084c845d8dbcb980f22be333de0b6c287
5
5
  SHA512:
6
- metadata.gz: e9dbe12859ba393e06c46edfd758703a1483ea672a2ba27696d4a473b06c6b322876c2cc5cd44658a52b2ea0caab5f0296109a3bf8d35c8687526daec1201892
7
- data.tar.gz: 42b9c3b9973e0903b65094b14f3ad9553fdf6fb11a933756fccda1c074983612527f5bc8c2dc9901276e7639f6c6b800c9f373c6fc00a447b4439fa62e89b7a2
6
+ metadata.gz: 5cd36dea986885c1a9f2ad031697d3e39df200e0dbd199a83a500d1e542c411454f31b6185fc55554e5f1ed780bde943ec7e0c0eef802f91be2eccf790690ff9
7
+ data.tar.gz: 1a3caa4a68b5ac6d38ebdeedc0fca12ad021f7d5ee3ec4a4bbab9335c326a7c36b574c7757ab961750c604d4a37f1c53b5402526675d000e2c5be48a542057a7
@@ -30,12 +30,14 @@ module Flipper
30
30
 
31
31
  # Public: Removes a feature from the set of known features.
32
32
  def remove(feature)
33
- clear(feature)
33
+ Flipper::ActiveRecord::Feature.where(name: feature.key).destroy_all
34
+ true
34
35
  end
35
36
 
36
37
  # Public: Clears all the gate values for a feature.
37
38
  def clear(feature)
38
- Flipper::ActiveRecord::Feature.where(name: feature.key).destroy_all
39
+ f = Flipper::ActiveRecord::Feature.find_by(name: feature.key)
40
+ f.gates.destroy_all if f
39
41
  true
40
42
  end
41
43
 
@@ -1,7 +1,7 @@
1
1
  module Flipper
2
2
  module Adapters
3
3
  class ActiveRecord
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Gentry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flipper