ros_sdk 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +37 -0
- data/Rakefile +10 -0
- data/bin/console +32 -0
- data/bin/setup +8 -0
- data/lib/ros_sdk.rb +10 -0
- data/lib/ros_sdk/clients.rb +5 -0
- data/lib/ros_sdk/middleware.rb +30 -0
- data/lib/ros_sdk/models/cognito.rb +11 -0
- data/lib/ros_sdk/models/comm.rb +13 -0
- data/lib/ros_sdk/models/iam.rb +149 -0
- data/lib/ros_sdk/sdk.rb +139 -0
- data/lib/ros_sdk/version.rb +3 -0
- data/ros_sdk.gemspec +39 -0
- data/settings.yml +35 -0
- metadata +197 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a09b25bb78dd646133ec268be818a854fa586e879196eed3e0011dcbc4a7e29e
|
4
|
+
data.tar.gz: 1b7378839846241eeb1a72d672bbd1d9de4585f44ef332a4802600eb377c1261
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d64ab193fedc6fd6498615ccf3ecd1be1e0123c04ff4531114857ba3c5874ae765f2b661f016afdda262888b0109a9d600c224e017850f6be968a97dcdadf0c7
|
7
|
+
data.tar.gz: aef53d1482f200170f3b200b3412308e70afa43b1618afd6d6d349d2b61770e7979d955658c62e472f4046e9902eab8ed66e03e4fe4b1271c0920e8a7b3b1e8c
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# ServiceClient
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/service_client`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'service_client'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install service_client
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
app.post '/users/sign_in', { user: { username: 'email@test1.com', password: 'abcd1234' }}
|
26
|
+
|
27
|
+
Ros::IAM::User.sign_in(user: { username: 'Fred', password: 'abcd1234' }, account_id: '806470858')
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
32
|
+
|
33
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/service_client.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'pry'
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'ros_sdk'
|
6
|
+
require 'config'
|
7
|
+
require 'inifile'
|
8
|
+
require 'globalid'
|
9
|
+
|
10
|
+
require 'jwt'
|
11
|
+
|
12
|
+
|
13
|
+
Config.setup do |config|
|
14
|
+
config.use_env = true
|
15
|
+
config.env_prefix = 'PLATFORM'
|
16
|
+
config.env_separator = '__'
|
17
|
+
end
|
18
|
+
|
19
|
+
# For local development w/out docker you probably want to run services on different ports:
|
20
|
+
# export PLATFORM_SERVICES_CONNECTION_TYPE=port
|
21
|
+
settings_file = Pathname(File.dirname(__FILE__)).join('../settings.yml').to_s
|
22
|
+
Config.load_and_set_settings(settings_file)
|
23
|
+
connection_type = 'port' # Settings.dig(:services, :connection, :type)
|
24
|
+
client_config = Settings.dig(:services, :connection, connection_type).to_h
|
25
|
+
Ros::Platform::Client.configure(client_config.merge(connection_type: connection_type))
|
26
|
+
# Ros::IAM::Client.configure(scheme: 'http', host: 'localhost', port: 3001)
|
27
|
+
Ros::Sdk::Credential.configure
|
28
|
+
|
29
|
+
|
30
|
+
# Start the console
|
31
|
+
Pry.config.should_load_plugins = false
|
32
|
+
Pry.start
|
data/bin/setup
ADDED
data/lib/ros_sdk.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ros
|
4
|
+
module Sdk
|
5
|
+
# TODO: This should probably be setting the JWT which has the relevant info
|
6
|
+
# TODO: Is RequestStore a requirement?
|
7
|
+
class Middleware < Faraday::Middleware
|
8
|
+
def call(env)
|
9
|
+
# env[:request_headers]['X-PERX-CLIENT'] = 'Internal'
|
10
|
+
# re = /(\/internal\/api_v1\/(\w*)_tenants(\w*))/
|
11
|
+
# unless env[:url].path.match(re)
|
12
|
+
# RequestStore.store[:tenant_request].try(:as_headers).try(:each) do |key, value|
|
13
|
+
# env[:request_headers][key] = value.to_s unless value.nil?
|
14
|
+
# end
|
15
|
+
# end
|
16
|
+
# env[:request_headers]['If-Modified-Since'] = RequestStore.store[:if_modified] if RequestStore.store[:if_modified]
|
17
|
+
# # env[:request_headers]['X-Request-Id'] = RequestStore.store[:request_id]
|
18
|
+
# # env[:request_headers]['X-Request-Id'] = Thread.current[:request_id] # NOTE: Not present when calling Tenant.create from rails console
|
19
|
+
env.request_headers['Authorization'] = Ros::Sdk::Credential.authorization # if Ros::Sdk.authorization
|
20
|
+
# env.request_headers['Authorization'] = RequestStore.store['Authorization']
|
21
|
+
# binding.pry
|
22
|
+
response = @app.call(env)
|
23
|
+
# binding.pry
|
24
|
+
Ros::Sdk::Credential.authorization = response.env.response_headers['authorization'] if response.env.response_headers['authorization']
|
25
|
+
# RequestStore.store['Authorization'] = env.request_headers['Authorization']
|
26
|
+
response
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,149 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ros
|
4
|
+
module IAM
|
5
|
+
class Client < Ros::Platform::Client; end
|
6
|
+
class Base < Ros::Sdk::Base; end
|
7
|
+
|
8
|
+
class Tenant < Base; end
|
9
|
+
|
10
|
+
class Credential < Base; end
|
11
|
+
class User < Base
|
12
|
+
def self.find_by_urn(username); where(username: username).first end
|
13
|
+
# TODO: Return a JWT and capture it in the middleware
|
14
|
+
# custom_endpoint :sign_in, on: :collection, request_method: :post
|
15
|
+
end
|
16
|
+
|
17
|
+
class Root < Base
|
18
|
+
def self.find_by_urn(id); find(id) end
|
19
|
+
# TODO: Return a JWT and capture it in the middleware
|
20
|
+
# custom_endpoint :sign_in, on: :collection, request_method: :post
|
21
|
+
end
|
22
|
+
|
23
|
+
class Group < Base; end
|
24
|
+
class Role < Base; end
|
25
|
+
|
26
|
+
# p = IAM::Policy.includes(:actions).find(1)
|
27
|
+
# p.map(&:actions).flatten.first
|
28
|
+
class Policy < Base; end
|
29
|
+
class Action < Base; end
|
30
|
+
class ReadAction < Action; end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
=begin
|
35
|
+
class Account < Base
|
36
|
+
def self.table_name; 'user_accounts' end
|
37
|
+
end
|
38
|
+
|
39
|
+
class Tenant < Base
|
40
|
+
def self.table_name; 'user_tenants' end
|
41
|
+
end
|
42
|
+
|
43
|
+
class Role< Base
|
44
|
+
def self.table_name; 'user_roles' end
|
45
|
+
end
|
46
|
+
|
47
|
+
module ApiV0
|
48
|
+
module User
|
49
|
+
class Base < ApiV1::Base
|
50
|
+
uses_api Internal::ApiV1.servers['user']
|
51
|
+
end
|
52
|
+
|
53
|
+
class Account < Base
|
54
|
+
collection_path 'internal/api_v1/user_accounts'
|
55
|
+
type :user_accounts
|
56
|
+
attributes :email, :first_name, :last_name
|
57
|
+
api_has_many :device_accounts, class_name: 'ApiV1::Device::Account', foreign_key: :user_account_id
|
58
|
+
|
59
|
+
#
|
60
|
+
# Convenience method which returns list of accounts in whichever service this user object was instantiated in
|
61
|
+
#
|
62
|
+
def accounts
|
63
|
+
ENV['APPLICATION_NAME'].classify.constantize::Account.where(user_account_id: id)
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# Convenience method which returns list of transactions in whichever service this user object was instantiated in
|
68
|
+
#
|
69
|
+
def transactions
|
70
|
+
account_where = Hash["#{Rails.application.class.parent.name.underscore}_accounts", { user_account_id: id }]
|
71
|
+
ENV['APPLICATION_NAME'].classify.constantize::Transaction.joins(:account).where(account_where)
|
72
|
+
end
|
73
|
+
|
74
|
+
def roles
|
75
|
+
AccountRole.xwhere(user_account_id: id).results
|
76
|
+
end
|
77
|
+
|
78
|
+
# NOTE: This is a very inefficient method. It makes two additional API calls and result is calculated on client
|
79
|
+
# TODO: Refactor so that it is a single API call #has_role that returns a boolean from User service
|
80
|
+
def has_role?(role_name)
|
81
|
+
return false unless (role_id = Role.find_by(name: role_name).try(:id).try(:to_i))
|
82
|
+
roles.select { |role| role.user_role_id.eql? role_id }.size > 0
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
class AccountRole < Base
|
87
|
+
collection_path 'internal/api_v1/user_account_roles'
|
88
|
+
type :user_account_roles
|
89
|
+
end
|
90
|
+
|
91
|
+
class Action < Base
|
92
|
+
collection_path 'internal/api_v1/user_actions'
|
93
|
+
type :user_actions
|
94
|
+
end
|
95
|
+
|
96
|
+
class ActionTransaction < Base
|
97
|
+
collection_path 'internal/api_v1/user_action_transactions'
|
98
|
+
type :user_action_transactions
|
99
|
+
end
|
100
|
+
|
101
|
+
class Group < Base
|
102
|
+
collection_path 'internal/api_v1/user_groups'
|
103
|
+
type :user_groups
|
104
|
+
end
|
105
|
+
|
106
|
+
class GroupAccount < Base
|
107
|
+
collection_path 'internal/api_v1/user_group_accounts'
|
108
|
+
type :user_group_accounts
|
109
|
+
|
110
|
+
def self.import_user_tokens(uploaded_files)
|
111
|
+
uploaded_files.each do |info|
|
112
|
+
ApiV1::User::Group.create(name: info[:list_name], list_file_url: info[:list_file_url])
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
class MembershipAccount < Base
|
118
|
+
collection_path 'internal/api_v1/user_membership_accounts'
|
119
|
+
type :membership_accounts
|
120
|
+
end
|
121
|
+
|
122
|
+
class Notification < Base
|
123
|
+
collection_path 'internal/api_v1/user_notifications'
|
124
|
+
type :user_notifications
|
125
|
+
end
|
126
|
+
|
127
|
+
class Role < Base
|
128
|
+
collection_path 'internal/api_v1/user_roles'
|
129
|
+
type :user_roles
|
130
|
+
end
|
131
|
+
|
132
|
+
class Tagging < Base
|
133
|
+
collection_path 'internal/api_v1/user_taggings'
|
134
|
+
type :user_taggings
|
135
|
+
end
|
136
|
+
|
137
|
+
class Tenant < Base
|
138
|
+
collection_path 'internal/api_v1/user_tenants'
|
139
|
+
type :user_tenants
|
140
|
+
end
|
141
|
+
|
142
|
+
class Transaction < Base
|
143
|
+
collection_path 'internal/api_v1/user_transactions'
|
144
|
+
type :user_transactions
|
145
|
+
belongs_to :account, class_name: 'ApiV1::User::Account'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
=end
|
data/lib/ros_sdk/sdk.rb
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ros
|
4
|
+
module Sdk
|
5
|
+
class << self
|
6
|
+
attr_accessor :configured_services
|
7
|
+
|
8
|
+
def service_endpoints
|
9
|
+
configured_services.each_with_object({}) do |service, hash|
|
10
|
+
hash[service[0]] = service[1]::Base.site
|
11
|
+
end
|
12
|
+
rescue
|
13
|
+
raise ClientConfigurationError
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class ClientConfigurationError < StandardError; end
|
18
|
+
|
19
|
+
class Base < JsonApiClient::Resource
|
20
|
+
attr_accessor :gid
|
21
|
+
|
22
|
+
def to_gid
|
23
|
+
@gid ||= GlobalID.new("gid://internal/#{self.class.name}/#{id}")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class Credential
|
28
|
+
class << self
|
29
|
+
attr_accessor :profile, :access_key_id, :secret_access_key, :partition, :region, :authorization
|
30
|
+
|
31
|
+
def configure(profile: (ENV["#{partition.upcase}_PROFILE"] || 'default'),
|
32
|
+
access_key_id: ENV["#{partition.upcase}_ACCESS_KEY_ID"],
|
33
|
+
secret_access_key: ENV["#{partition.upcase}_SECRET_ACCESS_KEY"])
|
34
|
+
return if self.access_key_id = access_key_id and self.secret_access_key = secret_access_key
|
35
|
+
credentials_file = "#{Dir.home}/.#{partition}/credentials"
|
36
|
+
return unless File.exists?(credentials_file)
|
37
|
+
if credentials = IniFile.load(credentials_file)[profile]
|
38
|
+
self.profile = profile
|
39
|
+
self.access_key_id = credentials["#{partition}_access_key_id"]
|
40
|
+
self.secret_access_key = credentials["#{partition}_secret_access_key"]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def partition
|
45
|
+
@partition ||= Settings.service.partition_name
|
46
|
+
end
|
47
|
+
|
48
|
+
def authorization
|
49
|
+
@authorization ||= "#{Settings.service.auth_type} #{access_key_id}:#{secret_access_key}"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
class Client
|
55
|
+
class << self
|
56
|
+
attr_accessor :scheme, :host, :domain, :port, :force_path_style, :service
|
57
|
+
|
58
|
+
def configure(scheme: 'https', host: nil, domain: nil, port: nil, force_path_style: false, service: nil, connection_type: 'host')
|
59
|
+
if descendants.any?
|
60
|
+
descendants.map(&:to_s).sort.each do |client|
|
61
|
+
client.constantize.configure(scheme: scheme, host: host, domain: domain, port: port, force_path_style: force_path_style, service: service)
|
62
|
+
port += 1 if connection_type.eql? 'port'
|
63
|
+
end
|
64
|
+
return
|
65
|
+
end
|
66
|
+
self.scheme = scheme
|
67
|
+
self.host = host
|
68
|
+
self.domain = domain
|
69
|
+
self.port = port
|
70
|
+
self.force_path_style = force_path_style
|
71
|
+
self.service = (service || parent.name.split('::').last).downcase
|
72
|
+
Ros::Sdk.configured_services ||= {}
|
73
|
+
Ros::Sdk.configured_services[self.service] = parent
|
74
|
+
parent::Base.site = endpoint
|
75
|
+
parent::Base.connection.use Ros::Sdk::Middleware
|
76
|
+
Ros::Sdk.configured_services[self.service]
|
77
|
+
end
|
78
|
+
|
79
|
+
def endpoint
|
80
|
+
path = force_path_style ? "/#{service}" : nil
|
81
|
+
chost = force_path_style ? host : (host || service)
|
82
|
+
chost = [chost, domain].compact.join('.')
|
83
|
+
"URI::#{scheme.upcase}".constantize.build({ host: chost, port: port, path: path }).to_s
|
84
|
+
rescue
|
85
|
+
raise 'ClientConfigurationError'
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
module Platform
|
92
|
+
class Client < Ros::Sdk::Client; end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
PryCommandSet = Pry::CommandSet.new
|
97
|
+
|
98
|
+
class ConsoleHelp < Pry::ClassCommand
|
99
|
+
match 'setup-client'
|
100
|
+
group 'ros'
|
101
|
+
description 'Setup client'
|
102
|
+
banner <<-BANNER
|
103
|
+
|
104
|
+
Client with service on localhost:
|
105
|
+
external: self.setup(scheme: 'http', host: 'localhost', domain: nil, port: 3000, force_path_style: false)
|
106
|
+
internal: self.setup(scheme: 'http', host: 'localhost', domain: nil, port: 3001, force_path_style: false)
|
107
|
+
|
108
|
+
Compose with nginx paths on single port for all services:
|
109
|
+
external: self.setup(scheme: 'http', host: 'localhost', domain: nil, port: 3000, force_path_style: true)
|
110
|
+
internal: self.setup(scheme: 'http', host: nil, domain: nil, port: 3000, force_path_style: false)
|
111
|
+
|
112
|
+
Kubernetes:
|
113
|
+
external: self.setup(scheme: nil, host: nil, domain: 'rails-on-services.io', port: nil, force_path_style: false)
|
114
|
+
internal: self.setup(scheme: 'http', host: nil, domain: nil, port: 3000, force_path_style: false)
|
115
|
+
BANNER
|
116
|
+
|
117
|
+
def process; end
|
118
|
+
PryCommandSet.add_command(self)
|
119
|
+
end
|
120
|
+
|
121
|
+
=begin
|
122
|
+
class RServices < Pry::ClassCommand
|
123
|
+
match 'services'
|
124
|
+
group 'ros'
|
125
|
+
|
126
|
+
def process; Ros::Sdk.configured_services end
|
127
|
+
PryCommandSet.add_command(self)
|
128
|
+
end
|
129
|
+
|
130
|
+
class REndpoints < Pry::ClassCommand
|
131
|
+
match 'endpoints'
|
132
|
+
group 'ros'
|
133
|
+
|
134
|
+
def process; Ros::Sdk.service_endpoints end
|
135
|
+
PryCommandSet.add_command(self)
|
136
|
+
end
|
137
|
+
=end
|
138
|
+
|
139
|
+
Pry.config.commands.import PryCommandSet
|
data/ros_sdk.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path("../lib", __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'ros_sdk'
|
8
|
+
spec.version = '0.1.0'
|
9
|
+
spec.authors = ['Robert Roach']
|
10
|
+
spec.email = ['rjayroach@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'Loads JSONAPI based models to connect with remote RESTful services'
|
13
|
+
spec.description = 'Authenticate and connect to remote services via REST'
|
14
|
+
spec.homepage = 'https://github.com/rails-on-services'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
# spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
# `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
# end
|
22
|
+
spec.files = Dir["{bin,lib}/**/*", 'ros_sdk.gemspec', 'settings.yml', 'Rakefile', 'README.md']
|
23
|
+
|
24
|
+
spec.bindir = 'exe'
|
25
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
|
+
spec.require_paths = ['lib']
|
27
|
+
|
28
|
+
spec.add_dependency 'json_api_client', '1.9.0'
|
29
|
+
spec.add_dependency 'pry', '0.12.2'
|
30
|
+
spec.add_dependency 'config', '1.7.1'
|
31
|
+
spec.add_dependency 'globalid', '0.4.2'
|
32
|
+
spec.add_dependency 'jwt', '2.1.0'
|
33
|
+
spec.add_dependency 'inifile', '3.0.0'
|
34
|
+
|
35
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
36
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
37
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
38
|
+
spec.add_development_dependency 'awesome_print', '1.8.0'
|
39
|
+
end
|
data/settings.yml
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# The options for configuring internal connections to services
|
2
|
+
service:
|
3
|
+
partition_name: ros
|
4
|
+
auth_type: Basic
|
5
|
+
services:
|
6
|
+
connection:
|
7
|
+
type: service
|
8
|
+
# This is the default. Connections are on https
|
9
|
+
# export PLATFORM__SERVICES__CONNECTION__SERVICE__DOMAIN=api.example.com
|
10
|
+
service:
|
11
|
+
domain: 'rails-on-services.io'
|
12
|
+
# Each service runs on port 3000 and is uniquely
|
13
|
+
# addressed by it's host name which is taken from the module name of the Client
|
14
|
+
# Can override values here with an ENV. For example, to use https instead of http:
|
15
|
+
# export PLATFORM__SERVICES__CONNECTION__HOST__SCHEME=https
|
16
|
+
host:
|
17
|
+
scheme: 'http'
|
18
|
+
port: 3000
|
19
|
+
# port based means that each configured service has its own port on localhost
|
20
|
+
# port number starts at value of 'port' and increments by 1 for each additional service
|
21
|
+
# The port to service mapping is in alphabetical order by the service name
|
22
|
+
# e.g. 'comm' is a lower port number than 'iam'
|
23
|
+
# To use this connection type:
|
24
|
+
# export PLATFORM__SERVICES__CONNECTION__TYPE=port
|
25
|
+
port:
|
26
|
+
scheme: 'http'
|
27
|
+
host: 'localhost'
|
28
|
+
port: 3000
|
29
|
+
# For external connections to services behind and nginx reverse proxy that uses path names
|
30
|
+
# to proxy to services running on differnet ports
|
31
|
+
# export PLATFORM__SERVICES__CONNECTION__TYPE=path
|
32
|
+
path:
|
33
|
+
scheme: 'http'
|
34
|
+
host: 'localhost'
|
35
|
+
force_path_style: true
|
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ros_sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Robert Roach
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json_api_client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.9.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.9.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.12.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.12.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: config
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.7.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.7.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: globalid
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.4.2
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.4.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jwt
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.1.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.1.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: inifile
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.0.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.0.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '12.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '12.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: minitest
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '5.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '5.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: awesome_print
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.8.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 1.8.0
|
153
|
+
description: Authenticate and connect to remote services via REST
|
154
|
+
email:
|
155
|
+
- rjayroach@gmail.com
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- README.md
|
161
|
+
- Rakefile
|
162
|
+
- bin/console
|
163
|
+
- bin/setup
|
164
|
+
- lib/ros_sdk.rb
|
165
|
+
- lib/ros_sdk/clients.rb
|
166
|
+
- lib/ros_sdk/middleware.rb
|
167
|
+
- lib/ros_sdk/models/cognito.rb
|
168
|
+
- lib/ros_sdk/models/comm.rb
|
169
|
+
- lib/ros_sdk/models/iam.rb
|
170
|
+
- lib/ros_sdk/sdk.rb
|
171
|
+
- lib/ros_sdk/version.rb
|
172
|
+
- ros_sdk.gemspec
|
173
|
+
- settings.yml
|
174
|
+
homepage: https://github.com/rails-on-services
|
175
|
+
licenses:
|
176
|
+
- MIT
|
177
|
+
metadata: {}
|
178
|
+
post_install_message:
|
179
|
+
rdoc_options: []
|
180
|
+
require_paths:
|
181
|
+
- lib
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubygems_version: 3.0.2
|
194
|
+
signing_key:
|
195
|
+
specification_version: 4
|
196
|
+
summary: Loads JSONAPI based models to connect with remote RESTful services
|
197
|
+
test_files: []
|