contextio_next 0.0.3
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 +7 -0
- data/lib/ca.pem +26 -0
- data/lib/cat_pb.rb +34 -0
- data/lib/cat_services_pb.rb +28 -0
- data/lib/contextio_next.rb +24 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e44480f1837edfce38aa51bbd5c04af04bebcfbf
|
4
|
+
data.tar.gz: 0b1182d917ae7ff219e0e865463c032db5b96e87
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c28945bbaa6ea63416f3c901786dcbce0c4273411bc6e70422507826af5b59e9a3baec0d39500ab2c7b9d955cc3ade388b5b8a663319b0f1f9184fdf48abaf98
|
7
|
+
data.tar.gz: 08205b49a0c4b619fee681bd943ff012256251f6048c81c27776455999dc4b6f8f1c88ac26a4689027528eaedc126a1f306bc37b268aeb70f3635e5c78d164bd
|
data/lib/ca.pem
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIEWjCCA0KgAwIBAgIJAIU4XdCC6MEUMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNV
|
3
|
+
BAYTAlVTMQ4wDAYDVQQIEwVUZXhhczEPMA0GA1UEBxMGQXVzdGluMRMwEQYDVQQK
|
4
|
+
EwpDb250ZXh0LklPMRMwEQYDVQQDEwpjb250ZXh0LmlvMSEwHwYJKoZIhvcNAQkB
|
5
|
+
FhJzdXBwb3J0QGNvbnRleHQuaW8wHhcNMTcwNjA1MTcxNDE0WhcNMjcwNjAzMTcx
|
6
|
+
NDE0WjB7MQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVGV4YXMxDzANBgNVBAcTBkF1
|
7
|
+
c3RpbjETMBEGA1UEChMKQ29udGV4dC5JTzETMBEGA1UEAxMKY29udGV4dC5pbzEh
|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3/d4CKffjyEC3gEVYNnlqOtFf5cLujdtOHiBg
|
23
|
+
dhmrKgrDSW3Ily0tkeje9NBxgOE+jGmjH+ErNQarGjSQbNuljMkBmlqFV9regZea
|
24
|
+
93RkDAXViPP2h7Q97+7rWaGtlid8obdad83JFBjTRk/af6vjPoUg2TyE4bne9wuO
|
25
|
+
Ejtq6Wu/CFpqeoEzQ3Y=
|
26
|
+
-----END CERTIFICATE-----
|
data/lib/cat_pb.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: cat.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "Cat" do
|
8
|
+
optional :id, :int32, 1
|
9
|
+
optional :name, :string, 2
|
10
|
+
optional :color, :string, 3
|
11
|
+
end
|
12
|
+
add_message "CatList" do
|
13
|
+
repeated :cats, :message, 1, "Cat"
|
14
|
+
end
|
15
|
+
add_message "NewCatRequest" do
|
16
|
+
optional :name, :string, 1
|
17
|
+
optional :color, :string, 2
|
18
|
+
end
|
19
|
+
add_message "GetCatRequest" do
|
20
|
+
optional :name, :string, 1
|
21
|
+
end
|
22
|
+
add_message "DeleteCatRequest" do
|
23
|
+
optional :name, :string, 1
|
24
|
+
end
|
25
|
+
add_message "CatListRequest" do
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Cat = Google::Protobuf::DescriptorPool.generated_pool.lookup("Cat").msgclass
|
30
|
+
CatList = Google::Protobuf::DescriptorPool.generated_pool.lookup("CatList").msgclass
|
31
|
+
NewCatRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("NewCatRequest").msgclass
|
32
|
+
GetCatRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("GetCatRequest").msgclass
|
33
|
+
DeleteCatRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("DeleteCatRequest").msgclass
|
34
|
+
CatListRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("CatListRequest").msgclass
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: cat.proto for package ''
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'cat_pb'
|
6
|
+
|
7
|
+
module CatService
|
8
|
+
# CatService is BestService
|
9
|
+
class Service
|
10
|
+
|
11
|
+
include GRPC::GenericService
|
12
|
+
|
13
|
+
self.marshal_class_method = :encode
|
14
|
+
self.unmarshal_class_method = :decode
|
15
|
+
self.service_name = 'CatService'
|
16
|
+
|
17
|
+
rpc :NewCat, NewCatRequest, Cat
|
18
|
+
# Creates a new cat
|
19
|
+
rpc :GetCat, GetCatRequest, Cat
|
20
|
+
# Get a cat by name
|
21
|
+
rpc :DeleteCat, DeleteCatRequest, Cat
|
22
|
+
# Delete a cat by name
|
23
|
+
rpc :GetCatList, CatListRequest, CatList
|
24
|
+
# Get all the cats!
|
25
|
+
end
|
26
|
+
|
27
|
+
Stub = Service.rpc_stub_class
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
$:.unshift(File.dirname(__FILE__))
|
2
|
+
|
3
|
+
require 'cat_services_pb'
|
4
|
+
require 'grpc'
|
5
|
+
|
6
|
+
module ContextioNext
|
7
|
+
class Client
|
8
|
+
attr_reader :stub
|
9
|
+
def initialize(key:, cert:)
|
10
|
+
@stub = create_stub(key, cert)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
def create_stub(key, cert)
|
15
|
+
credentials = GRPC::Core::ChannelCredentials.new(
|
16
|
+
File.read('lib/ca.pem'),
|
17
|
+
File.read(key),
|
18
|
+
File.read(cert)
|
19
|
+
)
|
20
|
+
|
21
|
+
CatService::Stub.new("grpc-sandbox.context.io:50051", credentials)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: contextio_next
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dane Camichael
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-06-07 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Wrapper around ContextIO Ruby grpc clients
|
14
|
+
email: dane.carmichael@returnpath.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/ca.pem
|
20
|
+
- lib/cat_pb.rb
|
21
|
+
- lib/cat_services_pb.rb
|
22
|
+
- lib/contextio_next.rb
|
23
|
+
homepage: http://rubygems.org/gems/contextio_next
|
24
|
+
licenses:
|
25
|
+
- Apache-2.0
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.5.1
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: ContextIO Next API
|
47
|
+
test_files: []
|