elementary-rpc 2.4.0.56 → 2.5.0.62
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 +8 -8
- data/README.md +2 -1
- data/lib/elementary/transport/http.rb +3 -1
- data/lib/elementary/version.rb +1 -1
- data/spec/transport/http_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmVkY2FkOGRmOGU1MmE5N2Q4ODUyZjY1YTI2ZWUwYjI2Mjg5YjM4Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmJjODk5N2IzMWU3Mjc2NTFjNWRmNjgwYzMwMDQ1MmMwMmU1ZjU1NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGM0YTI1MGU3OTc2ODFiMWFhOGU3Mzg3MjBmZTE2OTUzNTYwYjNmZGQ3Njcy
|
10
|
+
NGMyNGNiYzM5NmE5OThmZDNmZjQxNjA1NzdiNTgzOTIxODEyZjk4NDIzYTM0
|
11
|
+
OGJhYzIwMmI3YzQ0ODllODQ1N2Q4MWJjZmViNDIxMmQyZTIzMzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzBlMDMwYmMyYzdjOGVlMWIyMTQ1ZmEzYTk2MzA0OGYwZTcwNDRhZGM0MmU1
|
14
|
+
MDAzMDI0NzI4NzlkZDQ2N2YwNDJmNWU3MDY3MjRmNjljMjlhOWVkOGZkZjNk
|
15
|
+
NjExMjYzMDRhNmMzN2ZiM2U4MmM0YmI5NTE1YjRlNmQ4OTNkMmM=
|
data/README.md
CHANGED
@@ -37,10 +37,11 @@ require 'elementary'
|
|
37
37
|
require 'echoserv/service.pb' # Include our protobuf object declarations
|
38
38
|
|
39
39
|
|
40
|
+
# You may, optionally, include a :protocol (e.g. 'https') key in a host hash
|
40
41
|
hosts = [{:host => 'localhost', :port => '9292', :prefix => '/rpcserv'}]
|
41
42
|
|
42
43
|
|
43
|
-
# Let's use the Statsd middleware to send RPC timing and count information to
|
44
|
+
# Let's use the Statsd middleware to send RPC timing and count information to
|
44
45
|
# Graphite (this presumes we have already used `Statsd.create_instance` elsewhere
|
45
46
|
# in our code)
|
46
47
|
Elementary.use(Elementary::Middleware::Statsd, :client => Statsd.instance)
|
@@ -47,7 +47,9 @@ module Elementary
|
|
47
47
|
# elasticsearch-ruby
|
48
48
|
host = @hosts.first
|
49
49
|
prefix = host[:prefix]
|
50
|
-
|
50
|
+
protocol = host[:protocol] || 'http'
|
51
|
+
|
52
|
+
return "#{protocol}://#{host[:host]}:#{host[:port]}/#{prefix}"
|
51
53
|
end
|
52
54
|
|
53
55
|
def client
|
data/lib/elementary/version.rb
CHANGED
data/spec/transport/http_spec.rb
CHANGED
@@ -38,6 +38,22 @@ describe Elementary::Transport::HTTP do
|
|
38
38
|
|
39
39
|
it { should eql 'http://localhost:8080/rspec' }
|
40
40
|
end
|
41
|
+
|
42
|
+
context 'without a protocol' do
|
43
|
+
let(:hosts) do
|
44
|
+
[ { :host => 'localhost', :port => 8080 } ]
|
45
|
+
end
|
46
|
+
|
47
|
+
it { should eql 'http://localhost:8080/' }
|
48
|
+
end
|
49
|
+
|
50
|
+
context 'with a protocol' do
|
51
|
+
let(:hosts) do
|
52
|
+
[ { :host => 'localhost', :port => 8080, :protocol => 'https' } ]
|
53
|
+
end
|
54
|
+
|
55
|
+
it { should eql 'https://localhost:8080/' }
|
56
|
+
end
|
41
57
|
end
|
42
58
|
|
43
59
|
describe '#client' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elementary-rpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- R. Tyler Croy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|