eureka_ruby 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +38 -0
- data/eureka_ruby.gemspec +2 -2
- data/lib/eureka_ruby/railtie.rb +4 -0
- data/lib/eureka_ruby/version.rb +1 -1
- data/lib/eureka_ruby.rb +1 -0
- data/lib/generators/eureka_ruby/templates/eureka_ruby.rb +16 -17
- data/lib/tasks/eureka.rake +7 -0
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5a3affd81e8b8ad6adc8b5c37317153a8e6bb5b37430f54f408b8d343b8690d
|
4
|
+
data.tar.gz: ec9904d73a249ae3a1e3a9489644c884ec30af06e5e94812fa1852eae16c1448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec7aff78cac558748d2da4d6d93ec74099c4c6d40f2a7de6913198f80cea8335a2c4b635248a18e40260f6108ed533d9752e752ea18682cb2d082f836da89f97
|
7
|
+
data.tar.gz: 784b50b37010ef55f43e808e481b7578078905a7f38c9cbbdcead9c3b5dcea6d47d7761ebeacb5671a32da320f50a34c28413b0a2b69e0675751e4ebf444979b
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
eureka_ruby (0.0.5)
|
5
|
+
http (~> 4.0, >= 4.0.5)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.6.0)
|
11
|
+
public_suffix (>= 2.0.2, < 4.0)
|
12
|
+
domain_name (0.5.20180417)
|
13
|
+
unf (>= 0.0.5, < 1.0.0)
|
14
|
+
http (4.1.1)
|
15
|
+
addressable (~> 2.3)
|
16
|
+
http-cookie (~> 1.0)
|
17
|
+
http-form_data (~> 2.0)
|
18
|
+
http_parser.rb (~> 0.6.0)
|
19
|
+
http-cookie (1.0.3)
|
20
|
+
domain_name (~> 0.5)
|
21
|
+
http-form_data (2.1.1)
|
22
|
+
http_parser.rb (0.6.0)
|
23
|
+
public_suffix (3.0.3)
|
24
|
+
rake (10.5.0)
|
25
|
+
unf (0.1.4)
|
26
|
+
unf_ext
|
27
|
+
unf_ext (0.0.7.5)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
ruby
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
bundler (~> 1.16)
|
34
|
+
eureka_ruby!
|
35
|
+
rake (~> 10.0)
|
36
|
+
|
37
|
+
BUNDLED WITH
|
38
|
+
1.17.2
|
data/eureka_ruby.gemspec
CHANGED
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
27
|
f.match(%r{^(test|spec|features)/})
|
28
28
|
end
|
29
|
-
spec.bindir = "
|
30
|
-
spec.executables = spec.files.grep(%r{^
|
29
|
+
spec.bindir = "bin"
|
30
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.16"
|
data/lib/eureka_ruby/railtie.rb
CHANGED
data/lib/eureka_ruby/version.rb
CHANGED
data/lib/eureka_ruby.rb
CHANGED
@@ -1,24 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
config.ip_addr = ENV.fetch('EUREKA_MS_IP_ADDR', ENV['HOSTNAME'])
|
11
|
-
config.info_response = { "author" => "Tumayun", "language" => "Ruby" }
|
3
|
+
EurekaRuby.configure do |config|
|
4
|
+
# Required
|
5
|
+
config.eureka_url = ENV['EUREKA_URL']
|
6
|
+
config.app_id = ENV['EUREKA_MS_APP_ID']
|
7
|
+
config.host_name = ENV.fetch('EUREKA_MS_HOST_NAME', ENV['HOSTNAME'])
|
8
|
+
config.ip_addr = ENV.fetch('EUREKA_MS_IP_ADDR', ENV['HOSTNAME'])
|
9
|
+
config.info_response = { "author" => "Tumayun", "language" => "Ruby" }
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
# Optional
|
12
|
+
config.port = ENV.fetch('EUREKA_MS_PORT', ENV['PORT']).to_i # default 3000
|
13
|
+
config.scheme = ENV.fetch('EUREKA_MS_SCHEMA', 'http') # default http
|
14
|
+
config.health_path = ENV.fetch('EUREKA_MS_HEALTH_PATH', '/health') # default /health
|
15
|
+
config.health_response = 'OK' # default OK
|
16
|
+
config.health_headers = { "Content-Type" => "text/plain" } # default
|
17
|
+
config.info_path = ENV.fetch('EUREKA_MS_INFO_PATH', '/info') # default /info
|
18
|
+
end
|
21
19
|
|
20
|
+
if ENV['EUREKA']
|
22
21
|
# Register Instance
|
23
22
|
EurekaRuby.executor.run(:register)
|
24
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eureka_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 乌托邦科技
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -62,13 +62,16 @@ description: Eureka Ruby SDK
|
|
62
62
|
email:
|
63
63
|
- tumayun@uvw.org
|
64
64
|
- wangjiaopeng@uvw.com
|
65
|
-
executables:
|
65
|
+
executables:
|
66
|
+
- console
|
67
|
+
- setup
|
66
68
|
extensions: []
|
67
69
|
extra_rdoc_files: []
|
68
70
|
files:
|
69
71
|
- ".gitignore"
|
70
72
|
- CODE_OF_CONDUCT.md
|
71
73
|
- Gemfile
|
74
|
+
- Gemfile.lock
|
72
75
|
- LICENSE.txt
|
73
76
|
- README.md
|
74
77
|
- Rakefile
|
@@ -84,6 +87,7 @@ files:
|
|
84
87
|
- lib/eureka_ruby/version.rb
|
85
88
|
- lib/generators/eureka_ruby/install_generator.rb
|
86
89
|
- lib/generators/eureka_ruby/templates/eureka_ruby.rb
|
90
|
+
- lib/tasks/eureka.rake
|
87
91
|
homepage: https://quanziapp.com
|
88
92
|
licenses:
|
89
93
|
- MIT
|