flipper-consul 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c4a10cbf3af0e8dfdc0fc702a17118a2c191977
4
- data.tar.gz: 47cc2a8fc94392b25b61e5501528fa89ff7b841c
3
+ metadata.gz: edadf932ef4557ce85ddaa2d2a4987c95bd70aae
4
+ data.tar.gz: 65c90fbd9e6ad47c50076366f95b130890ab4804
5
5
  SHA512:
6
- metadata.gz: 9b2ef654009496747052f6b28b75f228b7d30289280974cd7eb8e83f3e867e28414e7033c7b7478ab389e28e69b90fa4e78250230b52d35d4c6f2fe85ee9e9dd
7
- data.tar.gz: 80ea0681d54a0bca6fee5a78679cbc224ab804448f82ede307641993b8194e19153ad9f9c7bfe3bc5166e74b53296a0082666780dfe2a135dc091e9274314d46
6
+ metadata.gz: 17648471c2d4b0e352eeb340a9e8d1d6ad1eabeadbe6e2348284ff6b3a3c6cc4bb14245ddbbef3f88e1c7ca2242a175f4fbcf6b683d794031135756966956390
7
+ data.tar.gz: bd5a148b9653ec6fb8ec58719906cd75f97b44940e18e7d075fa726949beea848cb1face2c09d4ee852cc4d420c20d2cb7b9795d8c2f5ca7fcca0de6fa33ee00
@@ -1,3 +1,4 @@
1
+ dist: trusty
1
2
  language: ruby
2
3
  rvm:
3
4
  - 2.0.0
@@ -8,12 +9,11 @@ rvm:
8
9
  gemfile: gemfiles/flipper-consul.gemfile
9
10
 
10
11
  env:
11
- - FLIPPER_VERSION: 0.9.2
12
- - FLIPPER_VERSION: 0.8.0
13
- - FLIPPER_VERSION: 0.7.5
12
+ - FLIPPER_VERSION: 0.10.2
13
+ - FLIPPER_VERSION: 0.9.2
14
14
 
15
15
  before_script:
16
- - wget 'https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip' --output-document=consul.zip
16
+ - wget 'https://releases.hashicorp.com/consul/0.7.4/consul_0.7.4_linux_amd64.zip' --output-document=consul.zip
17
17
  - unzip 'consul.zip'
18
18
  - ./consul --version
19
19
 
@@ -1,20 +1,20 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
+
4
+ CONSUL_VERSION = '0.7.4'
5
+
3
6
  Vagrant.configure(2) do |config|
4
- config.vm.box = "hashicorp/precise64"
7
+ config.vm.box = "opscode-ubuntu-14.04"
5
8
  config.vm.network "forwarded_port", guest: 8500, host: 8500
6
9
  config.vm.provision "shell", inline: <<-SHELL
7
10
  sudo apt-get update
8
11
  sudo apt-get install unzip
9
12
 
10
- wget 'https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip' --output-document=consul.zip
13
+ wget "https://releases.hashicorp.com/consul/#{CONSUL_VERSION}/consul_#{CONSUL_VERSION}_linux_amd64.zip" --output-document=consul.zip
11
14
  unzip consul.zip
12
15
  sudo chmod +x consul
13
16
  sudo mv consul /usr/bin/consul
14
17
 
15
- wget 'https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_web_ui.zip' --output-document=ui.zip
16
- unzip ui.zip
17
-
18
- consul agent -server -client 0.0.0.0 -bootstrap-expect 1 -data-dir /tmp/consul -ui-dir /home/vagrant/dist > /var/log/consul.log 2>&1 &
18
+ consul agent -server -client 0.0.0.0 -data-dir /tmp/consul -bootstrap-expect 1 -ui -dc dev04 > /var/log/consul.log 2>&1 &
19
19
  SHELL
20
20
  end
@@ -15,6 +15,6 @@ Gem::Specification.new do |spec|
15
15
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
 
18
- spec.add_dependency 'flipper', '~> 0.7'
19
- spec.add_dependency 'diplomat', '~> 1.0'
18
+ spec.add_dependency 'flipper', '~> 0.9'
19
+ spec.add_dependency 'diplomat', '~> 1.2'
20
20
  end
@@ -49,7 +49,7 @@ module Flipper
49
49
 
50
50
  # Public: Clears the gate values for a feature.
51
51
  def clear(feature)
52
- @client.delete build_path "#{feature.key}/?recurse"
52
+ @client.delete build_path(feature.key), recurse: true
53
53
  true
54
54
  end
55
55
 
@@ -104,7 +104,7 @@ module Flipper
104
104
  def disable(feature, gate, thing)
105
105
  case gate.data_type
106
106
  when :boolean
107
- @client.delete build_path "#{feature}/?recurse"
107
+ @client.delete build_path(feature), recurse: true
108
108
  when :integer
109
109
  @client.put key(feature, gate), thing.value.to_s
110
110
  when :set
@@ -156,7 +156,7 @@ module Flipper
156
156
  values = @client.raw
157
157
  result = {}
158
158
  values.each do |item|
159
- result[item['Key'].sub!("#{key_path}/", '')] = Base64.decode64(item['Value'])
159
+ result[item['Key'].sub!("#{key_path}/", '')] = item['Value']
160
160
  end
161
161
  result
162
162
  rescue Diplomat::KeyNotFound
@@ -1,7 +1,7 @@
1
1
  module Flipper
2
2
  module Adapters
3
3
  class Consul
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
6
6
  end
7
7
  end
@@ -6,7 +6,7 @@ describe Flipper::Adapters::Consul do
6
6
  let(:client) { Diplomat::Kv.new }
7
7
 
8
8
  before do
9
- client.delete "/?recurse"
9
+ client.delete '/', recurse: true
10
10
  end
11
11
 
12
12
  context 'with no namespace' do
@@ -22,5 +22,5 @@ RSpec.configure do |config|
22
22
  config.alias_example_to :fit, :focused => true
23
23
  config.alias_example_to :xit, :pending => true
24
24
  config.run_all_when_everything_filtered = true
25
- config.fail_fast = true
25
+ # config.fail_fast = true
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Graham Davison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-31 00:00:00.000000000 Z
11
+ date: 2017-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flipper
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.9'
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.7'
26
+ version: '0.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: diplomat
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '1.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: '1.2'
41
41
  description: Consul adapter for Flipper
42
42
  email:
43
43
  - g.m.davison@computer.org
@@ -81,11 +81,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.6.6
84
+ rubygems_version: 2.6.8
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Consul adapter for Flipper
88
88
  test_files:
89
89
  - spec/flipper/consul_spec.rb
90
90
  - spec/helper.rb
91
- has_rdoc: