dryad 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aa0959a2ba9d45a628ad86863e1a996b5acdf76ebb4f3b35dd26af8e5bfa166
4
- data.tar.gz: 0ccfcff2f13a96b2fece1b464f5f46c0a72e6dec1bd2c16c4c9e815a2b71fbe0
3
+ metadata.gz: 2940ab87fc2f8b45b3c3cd4cd8db68af37159ad71c1412c675ebed3178b28222
4
+ data.tar.gz: 78561f0fd81400b04547df3e835e71c35094dc64308969419b29f49d0b3bf2a7
5
5
  SHA512:
6
- metadata.gz: ece57d341bd12a3d76452e81aff1ad944a4d7a9a6ce83d0ca49e996bd28b1ac887e8e4ffdbbcb425382870644747946aae59d9a5c72469a714a8b89bcb98cb31
7
- data.tar.gz: d8d33833813226d79c82bcc4772114fd1ec7cd19f85da4d647ae2d6b2f54f151c803ea1989564a296193701d018eb18d5f183c4640c6267534411d35c3f13746
6
+ metadata.gz: 603a45988fca0375328a9edc7bbf0c65ab754674619738f5bbaaa805896351775e68710d30996a12a728cd2a5196e8f6cb09e402780dc869e8d734921c3a3fc1
7
+ data.tar.gz: 254884b77a97fd7600c0a1bc6d7aaf683703962ce79fa99b7b59d8c82c8fdc57d7581d7308e66abe170ef3e8ea19d9d6b0ee1dade56141c7b73198dbdfc550b0
data/Gemfile.lock CHANGED
@@ -1,17 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dryad (0.1.1)
5
- dryad-cluster (= 0.1.1)
6
- dryad-consul (= 0.1.1)
7
- dryad-core (= 0.1.1)
8
- dryad-cluster (0.1.1)
4
+ dryad (0.2.1)
5
+ dryad-cluster (= 0.2.1)
6
+ dryad-consul (= 0.2.1)
7
+ dryad-core (= 0.2.1)
8
+ dryad-cluster (0.2.1)
9
9
  concurrent-ruby (~> 1.1, >= 1.1.5)
10
- dryad-core (= 0.1.1)
11
- dryad-consul (0.1.1)
10
+ dryad-core (= 0.2.1)
11
+ dryad-consul (0.2.1)
12
12
  diplomat (~> 2.2, >= 2.2.4)
13
- dryad-core (= 0.1.1)
14
- dryad-core (0.1.1)
13
+ dryad-core (= 0.2.1)
14
+ dryad-core (0.2.1)
15
15
 
16
16
  GEM
17
17
  remote: https://rubygems.org/
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dryad-cluster (0.1.1)
4
+ dryad-cluster (0.2.1)
5
5
  concurrent-ruby (~> 1.1, >= 1.1.5)
6
- dryad-core (= 0.1.1)
6
+ dryad-core (= 0.2.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -14,10 +14,10 @@ GEM
14
14
  diplomat (2.2.4)
15
15
  deep_merge (~> 1.0, >= 1.0.1)
16
16
  faraday (~> 0.9)
17
- dryad-consul (0.1.1)
17
+ dryad-consul (0.2.1)
18
18
  diplomat (~> 2.2, >= 2.2.4)
19
- dryad-core (= 0.1.1)
20
- dryad-core (0.1.1)
19
+ dryad-core (= 0.2.1)
20
+ dryad-core (0.2.1)
21
21
  faraday (0.15.4)
22
22
  multipart-post (>= 1.2, < 3)
23
23
  multipart-post (2.1.1)
@@ -1,5 +1,5 @@
1
1
  module Dryad
2
2
  module Cluster
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dryad-consul (0.1.1)
4
+ dryad-consul (0.2.1)
5
5
  diplomat (~> 2.2, >= 2.2.4)
6
- dryad-core (= 0.1.1)
6
+ dryad-core (= 0.2.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -13,7 +13,7 @@ GEM
13
13
  diplomat (2.2.4)
14
14
  deep_merge (~> 1.0, >= 1.0.1)
15
15
  faraday (~> 0.9)
16
- dryad-core (0.1.1)
16
+ dryad-core (0.2.1)
17
17
  faraday (0.15.4)
18
18
  multipart-post (>= 1.2, < 3)
19
19
  multipart-post (2.1.1)
@@ -1,5 +1,5 @@
1
1
  module Dryad
2
2
  module Consul
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -13,6 +13,7 @@ module Dryad
13
13
 
14
14
  ::Diplomat.configure do |config|
15
15
  config.url = "http://#{Dryad.configuration.consul[:host]}:#{Dryad.configuration.consul[:port]}"
16
+ config.options = { headers: { "X-Consul-Token" => Dryad.configuration.consul[:token] } } if Dryad.configuration.consul[:token]
16
17
  end
17
18
  end
18
19
  end
@@ -1,7 +1,6 @@
1
1
  RSpec.describe Dryad::Consul do
2
2
  it "has a version number" do
3
- version = File.read(File.expand_path("../../../DRYAD_VERSION", __dir__)).strip
4
- expect(Dryad::Consul::VERSION).to eq(version)
3
+ expect(Dryad::Consul::VERSION).not_to be(nil)
5
4
  end
6
5
 
7
6
  it "has configured dependencies" do
@@ -1,10 +1,10 @@
1
1
  module Dryad
2
2
  class Configuration
3
- attr_accessor :consul, :namespace, :group, :registry, :service
3
+ attr_accessor :consul, :namespace, :group, :registry, :provider, :service
4
4
 
5
5
  DEFAULT_OPTIONS = {
6
6
  consul: {
7
- host: 'localhost',
7
+ host: '127.0.0.1',
8
8
  port: 8500
9
9
  },
10
10
  service: {}
@@ -16,6 +16,7 @@ module Dryad
16
16
  @namespace = opts[:namespace]
17
17
  @group = opts[:group]
18
18
  @registry = opts[:registry]
19
+ @provider = opts[:provider]
19
20
  @service = opts[:service]
20
21
  end
21
22
  end
@@ -1,5 +1,5 @@
1
1
  module Dryad
2
2
  module Core
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -1,6 +1,5 @@
1
1
  RSpec.describe Dryad::Core do
2
2
  it "has a version number" do
3
- version = File.read(File.expand_path("../../../DRYAD_VERSION", __dir__)).strip
4
- expect(Dryad::Core::VERSION).to eq(version)
3
+ expect(Dryad::Core::VERSION).not_to be(nil)
5
4
  end
6
5
  end
@@ -1,7 +1,6 @@
1
1
  RSpec.describe Dryad do
2
2
  it "has a valid version number" do
3
- version = File.read(File.expand_path("../../DRYAD_VERSION", __dir__)).strip
4
- expect(Dryad::Core::VERSION).to eq(version)
3
+ expect(Dryad::Core::VERSION).not_to be(nil)
5
4
  end
6
5
 
7
6
  it "can be configured with config file" do
data/dryad.gemspec CHANGED
@@ -1,9 +1,11 @@
1
1
 
2
- version = File.read(File.expand_path("DRYAD_VERSION", __dir__)).strip
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "dryad/version"
3
5
 
4
6
  Gem::Specification.new do |spec|
5
7
  spec.name = "dryad"
6
- spec.version = version
8
+ spec.version = Dryad::VERSION
7
9
  spec.authors = ["Pan Jie"]
8
10
  spec.email = ["panjie@growingio.com"]
9
11
 
@@ -18,9 +20,9 @@ Gem::Specification.new do |spec|
18
20
  spec.bindir = "exe"
19
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
22
 
21
- spec.add_dependency "dryad-core", version
22
- spec.add_dependency "dryad-consul", version
23
- spec.add_dependency "dryad-cluster", version
23
+ spec.add_dependency "dryad-core", Dryad::VERSION
24
+ spec.add_dependency "dryad-consul", Dryad::VERSION
25
+ spec.add_dependency "dryad-cluster", Dryad::VERSION
24
26
 
25
27
  spec.add_development_dependency "bundler", "~> 2.0"
26
28
  spec.add_development_dependency "rake", "~> 10.0"
@@ -0,0 +1,3 @@
1
+ module Dryad
2
+ VERSION = '0.2.1'
3
+ end
data/lib/dryad.rb ADDED
@@ -0,0 +1 @@
1
+ require "dryad/version"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dryad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pan Jie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-29 00:00:00.000000000 Z
11
+ date: 2019-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dryad-core
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.2.1
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.2.0
26
+ version: 0.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dryad-consul
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.0
33
+ version: 0.2.1
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
- version: 0.2.0
40
+ version: 0.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dryad-cluster
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.2.0
47
+ version: 0.2.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.2.0
54
+ version: 0.2.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -105,7 +105,6 @@ files:
105
105
  - ".gitignore"
106
106
  - ".rspec"
107
107
  - ".travis.yml"
108
- - DRYAD_VERSION
109
108
  - Gemfile
110
109
  - Gemfile.lock
111
110
  - LICENSE
@@ -185,6 +184,8 @@ files:
185
184
  - dryad-core/spec/dummy/config/dryad.yml
186
185
  - dryad-core/spec/spec_helper.rb
187
186
  - dryad.gemspec
187
+ - lib/dryad.rb
188
+ - lib/dryad/version.rb
188
189
  homepage: https://github.com/jack0pan/dryad.rb
189
190
  licenses:
190
191
  - MIT
data/DRYAD_VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.0