flipper-consul 0.1.1 → 0.1.2
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/.travis.yml +5 -6
- data/README.md +20 -4
- data/Vagrantfile +2 -2
- data/flipper-consul.gemspec +2 -2
- data/lib/flipper/adapters/consul/version.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3f959653072972d5abd8be932d7de1f72f75d86
|
4
|
+
data.tar.gz: 350d3aa0a87279b738251d31a574e557b78cbd77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de28ae87466905cfaecc4505925eb2c4b9dcc58416da527928aeddbf37a4d7decc35164a1fb3f476b5f51abd77aaf69dacc2123c2457f7ddc0c992e533744eee
|
7
|
+
data.tar.gz: 8014faf981ca43e4fbc0a585804e7c4898c447483d07635a0e8c9c81341d5be142e991658b69c555248772fe4efcc1d62a119435d39441ee06b13713d28f84cf
|
data/.travis.yml
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
sudo: required # don't run on container-based infrastructure
|
2
1
|
language: ruby
|
3
2
|
rvm:
|
4
|
-
- 1.9.3
|
5
3
|
- 2.0.0
|
6
|
-
- 2.1.
|
7
|
-
- 2.2.
|
4
|
+
- 2.1.8
|
5
|
+
- 2.2.4
|
6
|
+
- 2.3.1
|
8
7
|
before_script:
|
9
|
-
- wget 'https://
|
10
|
-
- unzip '
|
8
|
+
- wget 'https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip' --output-document=consul.zip
|
9
|
+
- unzip 'consul.zip'
|
11
10
|
- ./consul --version
|
12
11
|
script:
|
13
12
|
- ./consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul &
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
# Flipper
|
1
|
+
# Flipper Consul
|
2
2
|
|
3
|
-
|
3
|
+
A [Consul](https://www.consul.io) adapter for [Flipper](https://github.com/jnunemaker/flipper).
|
4
|
+
|
5
|
+
Uses [Diplomat](https://github.com/WeAreFarmGeek/diplomat) as the Consul client.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -14,13 +16,27 @@ And then execute:
|
|
14
16
|
|
15
17
|
$ bundle
|
16
18
|
|
17
|
-
Or install it yourself
|
19
|
+
Or install it yourself with:
|
18
20
|
|
19
21
|
$ gem install flipper-consul
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
23
|
-
|
25
|
+
```ruby
|
26
|
+
require 'flipper/adapters/consul'
|
27
|
+
client = Diplomat::Kv.new
|
28
|
+
adapter = Flipper::Adapters::Consul.new(client)
|
29
|
+
flipper = Flipper.new(adapter)
|
30
|
+
```
|
31
|
+
|
32
|
+
To avoid polluting the global key/value space, the Flipper data can (and should) be namespaced.
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require 'flipper/adapters/consul'
|
36
|
+
client = Diplomat::Kv.new
|
37
|
+
adapter = Flipper::Adapters::Consul.new(client, 'your/flipper/namespace')
|
38
|
+
flipper = Flipper.new(adapter)
|
39
|
+
```
|
24
40
|
|
25
41
|
## Contributing
|
26
42
|
|
data/Vagrantfile
CHANGED
@@ -7,12 +7,12 @@ Vagrant.configure(2) do |config|
|
|
7
7
|
sudo apt-get update
|
8
8
|
sudo apt-get install unzip
|
9
9
|
|
10
|
-
wget 'https://
|
10
|
+
wget 'https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip' --output-document=consul.zip
|
11
11
|
unzip consul.zip
|
12
12
|
sudo chmod +x consul
|
13
13
|
sudo mv consul /usr/bin/consul
|
14
14
|
|
15
|
-
wget 'https://
|
15
|
+
wget 'https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_web_ui.zip' --output-document=ui.zip
|
16
16
|
unzip ui.zip
|
17
17
|
|
18
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 &
|
data/flipper-consul.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.files = `git ls-files`.split($/)
|
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
|
-
|
18
|
-
spec.add_dependency 'flipper', '~> 0.7
|
17
|
+
|
18
|
+
spec.add_dependency 'flipper', '~> 0.7'
|
19
19
|
spec.add_dependency 'diplomat', '~> 0.11'
|
20
20
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-consul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Davison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flipper
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.7
|
19
|
+
version: '0.7'
|
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.7'
|
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
33
|
version: '0.11'
|
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
40
|
version: '0.11'
|
41
41
|
description: Consul adapter for Flipper
|
@@ -45,10 +45,10 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
49
|
-
- .ruby-gemset
|
50
|
-
- .ruby-version
|
51
|
-
- .travis.yml
|
48
|
+
- ".gitignore"
|
49
|
+
- ".ruby-gemset"
|
50
|
+
- ".ruby-version"
|
51
|
+
- ".travis.yml"
|
52
52
|
- Gemfile
|
53
53
|
- LICENSE.txt
|
54
54
|
- README.md
|
@@ -70,20 +70,21 @@ require_paths:
|
|
70
70
|
- lib
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.6.3
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Consul adapter for Flipper
|
87
87
|
test_files:
|
88
88
|
- spec/flipper/consul_spec.rb
|
89
89
|
- spec/helper.rb
|
90
|
+
has_rdoc:
|