consul-ruby-client 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjVlYmRjNDgxNTI3ZTkwM2U0NTI3ODA5YjljNjJjYTAyYmY2ZjY3Mg==
4
+ ZDc1ZDZiMmM1YTRkYTBlOWEyMThiNGVhMmFlMmQxZDBjYTFkMDliNw==
5
5
  data.tar.gz: !binary |-
6
- NDcxODgzMDkzNWQwM2EzZDRjZWIwOGVkMDc4NGIzMWFlMjgxOWQ1NA==
6
+ MTA0ODM5OGQzNTlhNzU2ODVhMWMwODRjMjkwZDNiODQ3OGI0NjEwZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTczMjJjMGNkMWU5YTQyMzlhYTE1OWQyMDM5ZmI4MDExYzBiOGQwNTg3NmYx
10
- ZjRiYjMyYzgwOTg5ZDkxOGI2NTEwZmUzM2M2ODFmNjY1YjYxM2Y0ZjVhY2Nm
11
- NjgxMmQzY2JmNDE1NGE0OGFiYmFhNDZmMjU0ZDI2ZDU3YmVhM2Q=
9
+ NmE1YTQzYWZmMWJiNjMzYmJiYTFlODJjN2U0MmEyY2Y2NmJiYzhmOGY3M2Nj
10
+ MTg4MTIxYzA4ZDJhZjZiNGFlZDI0NDQwOWU1MTM3NzNmODA0YjBhZGM0YWVm
11
+ NTU0ZjcxYTQxYWJiMzI0YTk4OGQwY2FmYTdkOGQxOWMyY2VjYTk=
12
12
  data.tar.gz: !binary |-
13
- NjkzMjQxM2FkNDY4NjFjNjRhMmRiMDYzN2UzZTlkZWVhNTlhMDQ0ODEwMWJj
14
- NzJhMGFhZDg1YWMyNGM2ZmUxYTRiZjZlOWQxNzUwYTgzZGExNDJmOGVlZTQw
15
- NzlhODNhZmRlZTlkMmNhMGQ0ZWNiM2U5ZWIyNmVlYTYyNWJiOTM=
13
+ ZmMzYWFjZDJkOTE5YTliZDI4OTgwOWRhMDU5NzFlNzEwZTE2ZjljZDdlMjg4
14
+ MTAxZjY0OWI4YzYzMjhiOTFiZmU0MTA1YzlkMmZkMDQwMjU2YjQ3ODdlYTg1
15
+ MzE2MmJjM2NkZTRlZWNkNzU3MTA3MjBmM2VjNGRlYTNhZDM0NDE=
@@ -111,7 +111,7 @@ module Consul
111
111
  return register_with_backoff(build_check_url('register'), entity.extend(Consul::Model::HealthCheck::Representer), 0, 3)
112
112
  else
113
113
  entity = entity.extend(Consul::Model::Service::Representer)
114
- success = register_with_backoff(build_service_url('register'), entity, 0, 3)
114
+ success, body = _put build_service_url('register'), entity.to_json
115
115
  if success
116
116
  logger.info("Successfully registered service #{entity.name}.")
117
117
  c = check("service:#{entity.name}") unless entity.check.nil?
@@ -120,6 +120,8 @@ module Consul
120
120
  logger.info("Updating status for health check #{c.check_id} to \"pass\".")
121
121
  _get build_check_status_url(c.check_id, 'pass')
122
122
  end
123
+ else
124
+ logger.warn("Unable to register #{entity}. Reason: #{body}")
123
125
  end
124
126
  return success
125
127
  end
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Client
3
- VERSION = '0.0.10'
3
+ VERSION = '0.0.11'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consul-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hotan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler