rough 0.2.5 → 0.2.6
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 +4 -4
- data/lib/rough/rpc_registry.rb +6 -6
- data/lib/rough/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdd68e12c7461facad8c3fd1c178a6d38f3dc2bd
|
4
|
+
data.tar.gz: f2071f30c81a93d95d54f91e59500142c7f58c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f0ec6fa52fae923225417a76b27ab78ac04f56b703d1bc47a020b49d473a72657d5fbf89bf90736c680309cad309bf5445b13b57d037cfb3c4b988242a0695
|
7
|
+
data.tar.gz: bd8282c8289615e69bc742cc85f440ddb648be83fcf8009120114291ab750605c4bd0591a7b79fe9a38d1d828be439797468c96f419e282d7155eeff06f1acf1
|
data/lib/rough/rpc_registry.rb
CHANGED
@@ -17,7 +17,7 @@ module Rough
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def rpc_for(rpc_name)
|
20
|
-
return
|
20
|
+
return methods[rpc_name] if methods.key?(rpc_name)
|
21
21
|
|
22
22
|
# TODO: in the future, should you be able to pass in a Rpc::Service, or separate rpc_name and method_names?
|
23
23
|
service_name, method_name = rpc_name.split('#')
|
@@ -25,14 +25,14 @@ module Rough
|
|
25
25
|
service_class = service_name.constantize
|
26
26
|
fail 'not a service class' unless service_class < Protobuf::Rpc::Service
|
27
27
|
|
28
|
-
|
29
|
-
fail 'not a valid rpc' unless
|
28
|
+
method = service_class.rpcs[method_name.to_sym]
|
29
|
+
fail 'not a valid rpc' unless method
|
30
30
|
|
31
|
-
|
31
|
+
methods[rpc_name] = method
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
35
|
-
@
|
34
|
+
def methods
|
35
|
+
@methods ||= {}
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
data/lib/rough/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rough
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- john crepezzi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: protobuf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.4'
|
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
40
|
version: '3.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.5.0
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: protobuf APIs
|