odania 0.0.11 → 0.0.13

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: 0f77f7b9380b996462f418c88b3f4328e01b2be3
4
- data.tar.gz: 24b76ced30b4c8465c8ad5cfe3021b257f79b868
3
+ metadata.gz: 83a3ec7a97804f894cb8f74e1f8e05d555f338de
4
+ data.tar.gz: 94474d7361a580bdf0b76c007a189e9969f9b9d0
5
5
  SHA512:
6
- metadata.gz: 2329149bacab7fb06b72a7a7419e05d3fbd92084b66ef0aeef34fa8323345a265441d143735cea79c7d3faaef22cb490a92c44eac39055471a5dae17f663b8f1
7
- data.tar.gz: 274c9968451186e9cff46e99cba85b7169aea8519636ae45bd7163e735f95f2716c77130dc1cb3e7be70929947d2bc0ede3c7ddf2f6a72c06ceebeb94a984d23
6
+ metadata.gz: 636a8397b6980c3316efb8f55fedbe1cd09b2df95490cd5302efd71b4c8abd236c0fee55e83b5557b496bf5b49be26b303b7f1c49c1ecb82a4a5108fe401c9d9
7
+ data.tar.gz: e5216b0e9128f92485ae2fa8e5be25145994806ae0902532901469ed9783043880ce3aebfe41f026c51ec1f38c84a15478e7fdb7c8cc7b61cacb3482358d00b7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- odania (0.0.11)
4
+ odania (0.0.13)
5
5
  diplomat
6
6
 
7
7
  GEM
data/lib/odania/plugin.rb CHANGED
@@ -2,6 +2,7 @@ module Odania
2
2
  class Plugin < Odania::Consul
3
3
  def plugins_config
4
4
  configs = retrieve_value 'plugins'
5
+ configs = [configs] unless configs.kind_of?(Array)
5
6
 
6
7
  result = []
7
8
  configs.each do |json_data|
@@ -8,6 +8,17 @@ module Odania
8
8
  end
9
9
  end
10
10
 
11
+ def get(name)
12
+ begin
13
+ Diplomat::Service.get(name)
14
+ rescue Diplomat::PathNotFound => e
15
+ puts "Service not found: #{e}"
16
+ puts e.backtrace.inspect
17
+
18
+ throw e
19
+ end
20
+ end
21
+
11
22
  def consul_service_config(plugin_name, plugin_instance_name, ip, tags=[], port=80)
12
23
  {
13
24
  'id' => plugin_instance_name,
@@ -1,3 +1,3 @@
1
1
  module Odania
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.13'
3
3
  end
data/lib/odania.rb CHANGED
@@ -2,6 +2,8 @@ require 'odania/version'
2
2
  require 'diplomat'
3
3
 
4
4
  module Odania
5
+ CORE_PLUGIN_NAME = 'odania-core'
6
+
5
7
  autoload :Consul, 'odania/consul'
6
8
  autoload :Service, 'odania/service'
7
9
  autoload :Plugin, 'odania/plugin'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odania
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Petersen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-24 00:00:00.000000000 Z
11
+ date: 2015-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler