flipper-consul 0.1.0 → 0.1.1

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: d9374d60afac720f7e9a69537095d0ef18a446d8
4
- data.tar.gz: 9c0168f2b70514831ec184861274b5c2f96c0ed8
3
+ metadata.gz: f68937f36c42ba321b212bd152950cbdfd5ea52c
4
+ data.tar.gz: 72dcdd2bad772f60e2ab28eee0fb4481dcc5b082
5
5
  SHA512:
6
- metadata.gz: 45f3f908e1c96ce2e8c9d54fc10f264ece81a3364b0ef84a847de036328b40381881ebae2880574be03792e695a37f13d37e3b858a9eef74b95a1bd324706dbd
7
- data.tar.gz: d9e9015f0ce965c8a82d5fbb899949e00c6d1c9e1c97ac8151b3350d1b5c9396241bb8a7507c6e0d1e131ba63cd1ee0b3f4d0147286a58ef7d44c27226c7b4d1
6
+ metadata.gz: a90fc91fbecce58147b3c42d9760cafc5d0867625dcbebe451b5a7e983cd6fe2281cef168f4e9d959db4b5bd966d6537d44288534f434350669dd9f83fc8c269
7
+ data.tar.gz: 634f67f67e291c55d7183ed8a2cc5ab8e9e51a8622a7ab565b83094de28466a95a252ca9ddaae70ba908b5c6592be9843ca650edcc8a84ca8b0cb1853a4fd8c4
data/Vagrantfile CHANGED
@@ -1,59 +1,20 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
-
4
- # All Vagrant configuration is done below. The "2" in Vagrant.configure
5
- # configures the configuration version (we support older styles for
6
- # backwards compatibility). Please don't change it unless you know what
7
- # you're doing.
8
3
  Vagrant.configure(2) do |config|
9
- # Every Vagrant development environment requires a box. You can search for
10
- # boxes at https://atlas.hashicorp.com/search.
11
4
  config.vm.box = "hashicorp/precise64"
12
-
13
- # config.berkshelf.enabled = true
14
- # config.berkshelf.berksfile_path = "./Berksfile"
15
-
16
- # Create a forwarded port mapping which allows access to a specific port
17
- # within the machine from a port on the host machine. In the example below,
18
- # accessing "localhost:8080" will access port 80 on the guest machine.
19
5
  config.vm.network "forwarded_port", guest: 8500, host: 8500
20
-
21
- # Create a private network, which allows host-only access to the machine
22
- # using a specific IP.
23
- # config.vm.network "private_network", ip: "192.168.33.10"
24
-
25
- # Create a public network, which generally matched to bridged network.
26
- # Bridged networks make the machine appear as another physical device on
27
- # your network.
28
- # config.vm.network "public_network"
29
-
30
- # Enable provisioning with a shell script. Additional provisioners such as
31
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
32
- # documentation for more information about their specific syntax and use.
33
6
  config.vm.provision "shell", inline: <<-SHELL
34
7
  sudo apt-get update
35
- #echo Installing dependencies...
36
- #sudo apt-get install -y unzip curl
37
- #echo Fetching Consul...
38
- #cd /tmp/
39
- #wget https://dl.bintray.com/mitchellh/consul/0.3.1_linux_amd64.zip -O consul.zip
40
- #echo Installing Consul...
41
- #unzip consul.zip
42
- #sudo chmod +x consul
43
- #sudo mv consul /usr/bin/consul
44
- #echo Installing Ruby
45
- #sudo apt-get install python-software-properties -y
46
- #sudo apt-add-repository ppa:brightbox/ruby-ng -y
47
- #sudo apt-get update
48
- #sudo apt-get install ruby2.1 -y
49
- wget -qO- https://get.docker.com/ | sh
50
-
51
- # add vagrant to docker group
52
- sudo usermod -aG docker vagrant
53
-
54
- docker run -d -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h node1 progrium/consul -server -bootstrap -ui-dir /ui
8
+ sudo apt-get install unzip
9
+
10
+ wget 'https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip' -O consul.zip
11
+ unzip consul.zip
12
+ sudo chmod +x consul
13
+ sudo mv consul /usr/bin/consul
14
+
15
+ wget 'https://dl.bintray.com/mitchellh/consul/0.5.2_web_ui.zip' -O 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 &
55
19
  SHELL
56
- # config.vm.provision "chef_zero" do |chef|
57
- # chef.add_recipe "consul-cookbook"
58
- # end
59
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.0.beta6'
18
+ spec.add_dependency 'flipper', '~> 0.7.0'
19
19
  spec.add_dependency 'diplomat', '~> 0.11'
20
20
  end
@@ -1,7 +1,7 @@
1
1
  module Flipper
2
2
  module Adapters
3
3
  class Consul
4
- VERSION = "0.1.0"
4
+ VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
@@ -19,7 +19,7 @@ module Flipper
19
19
  @client = client
20
20
  @name = :consul
21
21
  if !namespace.nil?
22
- namespace.strip!
22
+ namespace = namespace.strip
23
23
  if namespace == ''
24
24
  namespace = nil
25
25
  elsif namespace.start_with? '/'
@@ -29,6 +29,11 @@ describe Flipper::Adapters::Consul do
29
29
  its(:namespace) { is_expected.to eq 'foo' }
30
30
  end
31
31
 
32
+ context 'namespace if a frozen string' do
33
+ subject { described_class.new(client, 'foo'.freeze) }
34
+ its(:namespace) { is_expected.to eq 'foo' }
35
+ end
36
+
32
37
  context 'adapter methods' do
33
38
  subject { described_class.new(client, 'foo/bar') }
34
39
 
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Graham Davison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-16 00:00:00.000000000 Z
11
+ date: 2015-07-02 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.7.0.beta6
19
+ version: 0.7.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.7.0.beta6
26
+ version: 0.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: diplomat
29
29
  requirement: !ruby/object:Gem::Requirement