Skip to content

Commit

Permalink
Remove my monkeypatch for etcd
Browse files Browse the repository at this point in the history
  • Loading branch information
bobtfish committed Aug 24, 2014
1 parent 8b509c6 commit 3988e57
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 43 deletions.
38 changes: 15 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ PATH
synapse (0.11.1)
aws-sdk (~> 1.39)
docker-api (~> 1.7.2)
etcd (~> 0.2.3)
etcd (~> 0.2.4)
zk (~> 1.9.4)

GEM
remote: https://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
aws-sdk (1.47.0)
aws-sdk (1.51.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
coderay (1.1.0)
Expand All @@ -20,12 +20,10 @@ GEM
archive-tar-minitar
excon (>= 0.28)
json
excon (0.38.0)
ffi (1.9.3-java)
etcd (0.2.3)
etcd (0.2.4)
mixlib-log
excon (0.39.5)
json (1.8.1)
json (1.8.1-java)
little-plugger (1.1.3)
logging (1.8.2)
little-plugger (>= 1.1.3)
Expand All @@ -34,38 +32,32 @@ GEM
mini_portile (0.6.0)
mixlib-log (1.6.0)
multi_json (1.10.1)
nokogiri (1.6.2.1)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
nokogiri (1.6.2.1-java)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-nav (0.2.3)
pry (~> 0.9.10)
spoon (0.0.4)
ffi
pry-nav (0.2.4)
pry (>= 0.9.10, < 0.11.0)
rake (10.3.2)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.2)
rspec-core (3.0.4)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.2)
rspec-expectations (3.0.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.2)
rspec-mocks (3.0.4)
rspec-support (~> 3.0.0)
rspec-support (3.0.2)
slop (3.5.0)
rspec-support (3.0.4)
slop (3.6.0)
zk (1.9.4)
logging (~> 1.8.2)
zookeeper (~> 1.4.0)
zookeeper (1.4.8)
zookeeper (1.4.8-java)
slyphon-log4j (= 1.2.15)
slyphon-zookeeper_jar (= 3.3.5)

PLATFORMS
ruby
Expand Down
19 changes: 0 additions & 19 deletions lib/synapse/service_watcher/etcd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@

require 'etcd'

# Monkeypatch till 91f9e72d6d57ae3760e9266835f404d986072590 gets to rubygems..
module Etcd
module Keys
def watch(key, opts = {})
params = { wait: true }
fail ArgumentError, 'Second argument must be a hash' unless opts.is_a?(Hash)
timeout = opts[:timeout] || @read_timeout
index = opts[:waitIndex] || opts[:index]
params[:waitIndex] = index unless index.nil?
params[:consistent] = opts[:consistent] if opts.key?(:consistent)
params[:recursive] = opts[:recursive] if opts.key?(:recursive)

response = api_execute(key_endpoint + key, :get,
timeout: timeout, params: params)
Response.from_http_response(response)
end
end
end

module Synapse
class EtcdWatcher < BaseWatcher
NUMBERS_RE = /^\d+$/
Expand Down
2 changes: 1 addition & 1 deletion synapse.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "aws-sdk", "~> 1.39"
gem.add_runtime_dependency "docker-api", "~> 1.7.2"
gem.add_runtime_dependency "zk", "~> 1.9.4"
gem.add_runtime_dependency "etcd", "~> 0.2.3"
gem.add_runtime_dependency "etcd", "~> 0.2.4"

gem.add_development_dependency "rake"
gem.add_development_dependency "rspec"
Expand Down

0 comments on commit 3988e57

Please sign in to comment.