praetor 0.1.0
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/.gitignore +15 -0
- data/.rspec +2 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +36 -0
- data/Rakefile +2 -0
- data/lib/praetor/service.rb +87 -0
- data/lib/praetor/service_client.rb +40 -0
- data/lib/praetor/service_controller.rb +28 -0
- data/lib/praetor/version.rb +3 -0
- data/lib/praetor.rb +6 -0
- data/praetor.gemspec +31 -0
- data/spec/service_client_spec.rb +21 -0
- data/spec/service_controller_spec.rb +32 -0
- data/spec/service_spec.rb +62 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/support/echo_service/controllers/double_echo_controller.rb +5 -0
- data/spec/support/echo_service/controllers/echo_controller.rb +5 -0
- data/spec/support/echo_service/service.rb +7 -0
- metadata +210 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1e766c0c764dc7a7c5c4eeb8783e80dbbf9aaaa7
|
4
|
+
data.tar.gz: 0890736ceb2ff8f79d4fed123e9946e3586947d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9cc8b688b40364c94075100b99965a563c2436a7a57c169fe6d4e01bfae4da8698ee44ecddd87c1483980211205636f5d1fcb606d4fcc7d21be9a7d851a09e1e
|
7
|
+
data.tar.gz: 98a5866a157a5787a047cc6054e513b751d4567d2770f599c945f3c7f6a8cfee6e81f48a3a102ddc159757b634d6cffb09eaac5552b72ee4f94a0c0e8f3b4901
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Nick DeMonner
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Praetor [](https://circleci.com/gh/SenecaSystems/praetor)
|
2
|
+
|
3
|
+
Lightweight microservices for Ruby
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'praetor'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install praetor
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
You'll need to have a Redis instance running. Praetor checks for `REDIS_PROVIDER`
|
24
|
+
by default to find a connection URL. Otherwise, it just uses `Redis.new`.
|
25
|
+
|
26
|
+
See `spec/support/echo_service` for an example service implementation.
|
27
|
+
|
28
|
+
See `spec/service_client_spec.rb` for an example of how clients can consume Services.
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
1. Fork it ( https://github.com/[my-github-username]/praetor/fork )
|
33
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
36
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'redis'
|
2
|
+
require 'json'
|
3
|
+
require_relative 'service_controller'
|
4
|
+
|
5
|
+
module Praetor
|
6
|
+
class Service
|
7
|
+
class << self
|
8
|
+
attr_reader :_controllers
|
9
|
+
|
10
|
+
def controller(klass)
|
11
|
+
klass.include ServiceController
|
12
|
+
(@_controllers ||= []) << klass
|
13
|
+
end
|
14
|
+
|
15
|
+
def endpoint
|
16
|
+
@endpoint ||= name.underscore
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_accessor :redis
|
21
|
+
|
22
|
+
def run
|
23
|
+
client_options = ENV['REDIS_PROVIDER'] ? { url: ENV['REDIS_PROVIDER'] } : {}
|
24
|
+
@redis = Redis.new client_options
|
25
|
+
|
26
|
+
loop do
|
27
|
+
# Pop off the next request (or block until one arrives)
|
28
|
+
_, request = @redis.brpop self.class.endpoint
|
29
|
+
|
30
|
+
# You can shut down a service by issuing a stop command; useful for testing
|
31
|
+
break if request == 'stop'
|
32
|
+
handle_request JSON.parse(request)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def dispatch!(request)
|
37
|
+
controller = request['controller']
|
38
|
+
action = request['action']
|
39
|
+
params = request['params'] || {}
|
40
|
+
|
41
|
+
check_controller! controller
|
42
|
+
|
43
|
+
klass = controller.constantize
|
44
|
+
check_action! klass, action
|
45
|
+
|
46
|
+
instance = klass.new
|
47
|
+
instance.instance_variable_set :@params, params
|
48
|
+
instance.send action
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
def check_controller!(controller)
|
54
|
+
unless self.class._controllers.map(&:name).include? controller
|
55
|
+
raise "No controller that matches `#{controller}`"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def check_action!(controller, action)
|
60
|
+
unless controller.method_defined? action
|
61
|
+
raise "No action `#{action}` for controller `#{controller}`"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def handle_request(request)
|
66
|
+
response = begin
|
67
|
+
data = dispatch! request
|
68
|
+
{ 'status' => 'ok', 'data' => data }
|
69
|
+
rescue Exception => e
|
70
|
+
{
|
71
|
+
'status' => 'error',
|
72
|
+
'data' => { 'message' => e.message, 'backtrace' => e.backtrace }
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
respond response.merge('key' => request['key'])
|
77
|
+
end
|
78
|
+
|
79
|
+
def respond(response)
|
80
|
+
# Push the response onto a new list using the request/response key
|
81
|
+
@redis.rpush response['key'], JSON.generate(response)
|
82
|
+
|
83
|
+
# Set an expire time for our list to make sure we don't leak
|
84
|
+
@redis.expire response['key'], 30
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'rubyflake'
|
2
|
+
require 'hashie'
|
3
|
+
|
4
|
+
module Praetor
|
5
|
+
class ServiceClient
|
6
|
+
attr_accessor :redis, :service_endpoint
|
7
|
+
|
8
|
+
def initialize(service_endpoint)
|
9
|
+
@service_endpoint = service_endpoint
|
10
|
+
|
11
|
+
client_options = ENV['REDIS_PROVIDER'] ? { url: ENV['REDIS_PROVIDER'] } : {}
|
12
|
+
@redis = Redis.new client_options
|
13
|
+
end
|
14
|
+
|
15
|
+
def request(path, params = {})
|
16
|
+
path_parts = path.split '#'
|
17
|
+
req = {
|
18
|
+
'key' => Rubyflake.generate.to_s(32),
|
19
|
+
'controller' => "#{path_parts.first.camelize}Controller",
|
20
|
+
'action' => path_parts.last,
|
21
|
+
'params' => params
|
22
|
+
}
|
23
|
+
|
24
|
+
redis.lpush service_endpoint, JSON.generate(req)
|
25
|
+
_, response = redis.brpop req['key']
|
26
|
+
parsed_response = Hashie::Mash.new JSON.parse(response)
|
27
|
+
|
28
|
+
if parsed_response.status == 'ok'
|
29
|
+
parsed_response.data
|
30
|
+
else
|
31
|
+
raise "Service error: #{parsed_response.data.message} #{parsed_response.data.backtrace.join("\n")}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Used primarily during testing to stop the run loop of a service
|
36
|
+
def stop_service
|
37
|
+
redis.lpush service_endpoint, 'stop'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
3
|
+
module Praetor
|
4
|
+
module ServiceController
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
attr_reader :params
|
9
|
+
end
|
10
|
+
|
11
|
+
def serialize_collection(collection)
|
12
|
+
serializer = ActiveModel::Serializer::ArraySerializer.new collection
|
13
|
+
serialize_with serializer
|
14
|
+
end
|
15
|
+
|
16
|
+
def serialize(resource)
|
17
|
+
serializer = "#{resource.class.name}Serializer".constantize.new resource
|
18
|
+
serialize_with serializer
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def serialize_with(serializer)
|
24
|
+
adapter = ActiveModel::Serializer::Adapter.create serializer
|
25
|
+
adapter.as_json
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/praetor.rb
ADDED
data/praetor.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'praetor/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "praetor"
|
8
|
+
spec.version = Praetor::VERSION
|
9
|
+
spec.authors = ["Nick DeMonner"]
|
10
|
+
spec.email = ["nick@seneca.systems"]
|
11
|
+
spec.summary = "Lightweight microservices for Ruby"
|
12
|
+
spec.description = "Lightweight microservices for Ruby"
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "activemodel"
|
25
|
+
spec.add_runtime_dependency "hashie"
|
26
|
+
spec.add_runtime_dependency "rubyflake"
|
27
|
+
spec.add_runtime_dependency "redis"
|
28
|
+
spec.add_runtime_dependency "oj"
|
29
|
+
spec.add_runtime_dependency "oj_mimic_json"
|
30
|
+
spec.add_runtime_dependency "activesupport"
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require './lib/praetor/service_client'
|
2
|
+
require './lib/praetor/service'
|
3
|
+
require './spec/support/echo_service/service'
|
4
|
+
|
5
|
+
RSpec.describe Praetor::ServiceClient do
|
6
|
+
let(:client) { Praetor::ServiceClient.new 'echo_service' }
|
7
|
+
before { Thread.new { EchoService.new.run } }
|
8
|
+
after { client.stop_service }
|
9
|
+
|
10
|
+
it 'can call an action on the service' do
|
11
|
+
response = client.request('echo#echo', 'hi there')
|
12
|
+
expect(response).to eq 'hi there'
|
13
|
+
|
14
|
+
response = client.request('double_echo#echo', 'hi')
|
15
|
+
expect(response).to eq 'hihi'
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'propagates exceptions raised in the service' do
|
19
|
+
expect { client.request('echo#nope') }.to raise_error
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'active_model'
|
2
|
+
require 'active_model_serializers'
|
3
|
+
require './lib/praetor/service_controller'
|
4
|
+
|
5
|
+
class SomeModel
|
6
|
+
include ActiveModel::Model
|
7
|
+
include ActiveModel::Serialization
|
8
|
+
attr_accessor :id
|
9
|
+
end
|
10
|
+
|
11
|
+
class SomeModelSerializer < ActiveModel::Serializer
|
12
|
+
attributes :id
|
13
|
+
end
|
14
|
+
|
15
|
+
class SomeController
|
16
|
+
include Praetor::ServiceController
|
17
|
+
end
|
18
|
+
|
19
|
+
RSpec.describe Praetor::ServiceController do
|
20
|
+
subject { SomeController.new }
|
21
|
+
|
22
|
+
it 'serializes collections' do
|
23
|
+
collection = 3.times.map { |i| SomeModel.new(id: i) }
|
24
|
+
expect(subject.serialize_collection(collection)).to eq [{id: 0}, {id: 1}, {id: 2}]
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'serializes resources' do
|
28
|
+
resource = SomeModel.new(id: 0)
|
29
|
+
expect(subject.serialize(resource)).to eq({ id: 0 })
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require './lib/praetor/service'
|
2
|
+
|
3
|
+
def run_service(klass, r)
|
4
|
+
redis = Redis.new
|
5
|
+
redis.del klass.endpoint
|
6
|
+
redis.lpush klass.endpoint, JSON.generate(r)
|
7
|
+
redis.lpush klass.endpoint, 'stop'
|
8
|
+
klass.new.run
|
9
|
+
_, response = redis.brpop r['key']
|
10
|
+
JSON.parse response
|
11
|
+
end
|
12
|
+
|
13
|
+
RSpec.describe Praetor::Service do
|
14
|
+
class SomeController
|
15
|
+
def show
|
16
|
+
'Hi there'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class SomeService < Praetor::Service
|
21
|
+
controller SomeController
|
22
|
+
end
|
23
|
+
|
24
|
+
let(:service) { SomeService.new }
|
25
|
+
let(:req) do
|
26
|
+
{
|
27
|
+
'controller' => 'SomeController',
|
28
|
+
'action' => 'show'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
context '#dispatch!' do
|
33
|
+
it 'dispatches messages to the correct controller' do
|
34
|
+
result = service.dispatch! req
|
35
|
+
expect(result).to eq 'Hi there'
|
36
|
+
end
|
37
|
+
|
38
|
+
it "raises an error if the controller doesn't exist" do
|
39
|
+
r = req.merge('controller' => 'NilController')
|
40
|
+
expect { service.dispatch! r }.to raise_error
|
41
|
+
end
|
42
|
+
|
43
|
+
it "raises an error if the action doesn't exist" do
|
44
|
+
r = req.merge('action' => 'create')
|
45
|
+
expect { service.dispatch! r }.to raise_error
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context '#run' do
|
50
|
+
it 'grabs the first request waiting on the queue' do
|
51
|
+
r = req.merge 'key' => Rubyflake.generate.to_s(32)
|
52
|
+
response = run_service SomeService, r
|
53
|
+
expect(response['data']).to eq 'Hi there'
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'returns responses with errors' do
|
57
|
+
r = req.merge 'key' => Rubyflake.generate.to_s(32), 'controller' => 'NilController'
|
58
|
+
response = run_service SomeService, r
|
59
|
+
expect(response['status']).to eq 'error'
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
config.expect_with :rspec do |expectations|
|
3
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
4
|
+
end
|
5
|
+
|
6
|
+
config.mock_with :rspec do |mocks|
|
7
|
+
mocks.verify_partial_doubles = true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def inject_params(controller, params)
|
12
|
+
controller.instance_variable_set(:@params, params)
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: praetor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nick DeMonner
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activemodel
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: hashie
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubyflake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: redis
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: oj
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: oj_mimic_json
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: activesupport
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description: Lightweight microservices for Ruby
|
154
|
+
email:
|
155
|
+
- nick@seneca.systems
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- ".gitignore"
|
161
|
+
- ".rspec"
|
162
|
+
- Gemfile
|
163
|
+
- LICENSE.txt
|
164
|
+
- README.md
|
165
|
+
- Rakefile
|
166
|
+
- lib/praetor.rb
|
167
|
+
- lib/praetor/service.rb
|
168
|
+
- lib/praetor/service_client.rb
|
169
|
+
- lib/praetor/service_controller.rb
|
170
|
+
- lib/praetor/version.rb
|
171
|
+
- praetor.gemspec
|
172
|
+
- spec/service_client_spec.rb
|
173
|
+
- spec/service_controller_spec.rb
|
174
|
+
- spec/service_spec.rb
|
175
|
+
- spec/spec_helper.rb
|
176
|
+
- spec/support/echo_service/controllers/double_echo_controller.rb
|
177
|
+
- spec/support/echo_service/controllers/echo_controller.rb
|
178
|
+
- spec/support/echo_service/service.rb
|
179
|
+
homepage: ''
|
180
|
+
licenses:
|
181
|
+
- MIT
|
182
|
+
metadata: {}
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
require_paths:
|
186
|
+
- lib
|
187
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
requirements: []
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 2.4.5
|
200
|
+
signing_key:
|
201
|
+
specification_version: 4
|
202
|
+
summary: Lightweight microservices for Ruby
|
203
|
+
test_files:
|
204
|
+
- spec/service_client_spec.rb
|
205
|
+
- spec/service_controller_spec.rb
|
206
|
+
- spec/service_spec.rb
|
207
|
+
- spec/spec_helper.rb
|
208
|
+
- spec/support/echo_service/controllers/double_echo_controller.rb
|
209
|
+
- spec/support/echo_service/controllers/echo_controller.rb
|
210
|
+
- spec/support/echo_service/service.rb
|