cnfs_sdk 0.0.1.alpha
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/README.md +24 -0
- data/Rakefile +10 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/cnfs_sdk.gemspec +40 -0
- data/lib/ros_sdk.rb +11 -0
- data/lib/ros_sdk/console.rb +75 -0
- data/lib/ros_sdk/middleware.rb +36 -0
- data/lib/ros_sdk/models.rb +7 -0
- data/lib/ros_sdk/models/cognito.rb +18 -0
- data/lib/ros_sdk/models/comm.rb +17 -0
- data/lib/ros_sdk/models/iam.rb +29 -0
- data/lib/ros_sdk/models/organization.rb +12 -0
- data/lib/ros_sdk/models/storage.rb +14 -0
- data/lib/ros_sdk/sdk.rb +170 -0
- data/lib/ros_sdk/version.rb +5 -0
- data/settings.yml +36 -0
- metadata +214 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0cb84ac59d3ce351da721adb357a8b51bcae236524947df28a2500a9c26b5007
|
4
|
+
data.tar.gz: 1a120feacf91b53748430c1e175f37baee13095c10bd727fec34bc5d102d03c5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a61e87a66e84f1ee890e8db7c8e2fd4b75ce47f214c919131c536ada13491e7ec9880a545180132753c3b8a3c826111fcfc4f52f69ae9cc6c4b919e62a620396
|
7
|
+
data.tar.gz: 42e56ebeae85ce37446bc3dae5945ffb0c3ff752f222b4965ea61c86d96f82b591ef1afa5076a66716f807bf39318e3787f11eb3d4f20a8f91f9395f68a6eb14
|
data/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
# RosSdk
|
3
|
+
|
4
|
+
|
5
|
+
## Configuration
|
6
|
+
|
7
|
+
For local development without docker you probably want to run services on different ports:
|
8
|
+
|
9
|
+
`export PLATFORM__SERVICES__CONNECTION__TYPE=port`
|
10
|
+
|
11
|
+
For local development with docker-compse and nginx probalby want to run with paths:
|
12
|
+
|
13
|
+
`export PLATFORM__SERVICES__CONNECTION__TYPE=path`
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
ENV["#{partition.upcase}_PROFILE"] || 'default')
|
17
|
+
ENV["#{partition.upcase}_ACCESS_KEY_ID"],
|
18
|
+
ENV["#{partition.upcase}_SECRET_ACCESS_KEY"])
|
19
|
+
```
|
20
|
+
|
21
|
+
`bin/console https://api.ros.rails-on-services.org 222222222_Admin_2 perx`
|
22
|
+
|
23
|
+
Ros::Sdk.configured_services
|
24
|
+
Ros::Sdk.service_endpoints
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
data/cnfs_sdk.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'cnfs_sdk'
|
8
|
+
spec.version = '0.0.1.alpha'
|
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}/**/*', 'cnfs_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 'activemodel', '~> 6.0.2.1'
|
29
|
+
spec.add_dependency 'activesupport', '~> 6.0.2.1'
|
30
|
+
spec.add_dependency 'config', '~> 1.7.1'
|
31
|
+
spec.add_dependency 'globalid', '~> 0.4.2'
|
32
|
+
spec.add_dependency 'inifile', '~> 3.0.0'
|
33
|
+
spec.add_dependency 'json_api_client', '~> 1.15.0'
|
34
|
+
spec.add_dependency 'jwt', '~> 2.2.1'
|
35
|
+
|
36
|
+
spec.add_development_dependency 'awesome_print', '~> 1.8.0'
|
37
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
38
|
+
spec.add_development_dependency 'pry', '~> 0.12.2'
|
39
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
40
|
+
end
|
data/lib/ros_sdk.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/class/attribute'
|
4
|
+
require 'json_api_client'
|
5
|
+
require 'faraday_middleware'
|
6
|
+
require 'ros_sdk/sdk'
|
7
|
+
require 'ros_sdk/middleware'
|
8
|
+
require 'ros_sdk/models'
|
9
|
+
|
10
|
+
# require 'globalid'
|
11
|
+
# require 'ros_sdk/version'
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'config'
|
4
|
+
require 'inifile'
|
5
|
+
|
6
|
+
require 'jwt'
|
7
|
+
|
8
|
+
Config.setup do |config|
|
9
|
+
config.use_env = true
|
10
|
+
config.env_prefix = 'PLATFORM'
|
11
|
+
config.env_separator = '__'
|
12
|
+
end
|
13
|
+
|
14
|
+
class Console
|
15
|
+
attr_accessor :host, :profile, :partition
|
16
|
+
|
17
|
+
def initialize(host = nil, profile = nil, partition = nil)
|
18
|
+
# Get any parameters passed in and override default configuration
|
19
|
+
self.host = host
|
20
|
+
self.profile = profile
|
21
|
+
self.partition = partition
|
22
|
+
self.profile ||= ENV["#{self.partition&.upcase}_PROFILE"] || 'default'
|
23
|
+
# self.host = 'https://api.ros.rails-on-services.org'
|
24
|
+
# self.profile = '222222222_Admin_2'
|
25
|
+
# self.partition = 'perx'
|
26
|
+
# Set default configuration
|
27
|
+
settings_file = Pathname(File.dirname(__FILE__)).join('../../settings.yml').to_s
|
28
|
+
Config.load_and_set_settings(settings_file)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get the client configuration
|
32
|
+
def client_config
|
33
|
+
cc = Settings.dig(:connection, connection_type)
|
34
|
+
return cc unless host
|
35
|
+
|
36
|
+
uhost = URI(host)
|
37
|
+
cc.host = uhost.hostname
|
38
|
+
cc.port = uhost.port
|
39
|
+
cc.scheme = uhost.scheme
|
40
|
+
cc
|
41
|
+
end
|
42
|
+
|
43
|
+
def connection_type; Settings.dig(:connection, :type) end
|
44
|
+
|
45
|
+
# Set credentials from envrionment variables
|
46
|
+
# If credentials are not set then check for a credentials file in a known location and set credentials
|
47
|
+
def access_key_id
|
48
|
+
ENV["#{partition&.upcase}_ACCESS_KEY_ID"] || credentials["#{partition}_access_key_id"]
|
49
|
+
end
|
50
|
+
|
51
|
+
def secret_access_key
|
52
|
+
ENV["#{partition&.upcase}_SECRET_ACCESS_KEY"] || credentials["#{partition}_secret_access_key"]
|
53
|
+
end
|
54
|
+
|
55
|
+
def credentials
|
56
|
+
credentials_files.each do |file|
|
57
|
+
next unless File.exist?(file)
|
58
|
+
|
59
|
+
val = IniFile.load(file)[profile]
|
60
|
+
break val if val
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def credentials_files
|
65
|
+
["#{Dir.home}/.ros/#{host&.gsub('://', '_')}", "#{Dir.home}/.#{partition}/credentials"]
|
66
|
+
end
|
67
|
+
|
68
|
+
# Configure the Client connection
|
69
|
+
def configure
|
70
|
+
Ros::Platform::Client.configure(client_config.to_h.merge(connection_type: connection_type))
|
71
|
+
# Possible to configure service clients independently
|
72
|
+
# Ros::IAM::Client.configure(scheme: 'http', host: 'localhost', port: 3001)
|
73
|
+
Ros::Sdk::Credential.configure(access_key_id: access_key_id, secret_access_key: secret_access_key)
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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]
|
17
|
+
# if RequestStore.store[:if_modified]
|
18
|
+
# # env[:request_headers]['X-Request-Id'] = RequestStore.store[:request_id]
|
19
|
+
# # env[:request_headers]['X-Request-Id'] = Thread.current[:request_id]
|
20
|
+
# # NOTE: Not present when calling Tenant.create from rails console
|
21
|
+
env.request_headers['Authorization'] = Ros::Sdk::Credential.authorization # if Ros::Sdk.authorization
|
22
|
+
env.request_headers.merge!(Ros::Sdk::Credential.request_headers)
|
23
|
+
# env.request_headers['Authorization'] = RequestStore.store['Authorization']
|
24
|
+
response = @app.call(env)
|
25
|
+
# NOTE: when using this as a stand-alone sdk then the next three lines should be enabled
|
26
|
+
# TODO: Update this when testing as a stand-alone sdk
|
27
|
+
#
|
28
|
+
# if response.env.response_headers['authorization']
|
29
|
+
# Ros::Sdk::Credential.authorization = response.env.response_headers['authorization']
|
30
|
+
# end
|
31
|
+
# RequestStore.store['Authorization'] = env.request_headers['Authorization']
|
32
|
+
response
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ros
|
4
|
+
module Cognito
|
5
|
+
class Client < Ros::Platform::Client; end
|
6
|
+
class Base < Ros::Sdk::Base; end
|
7
|
+
|
8
|
+
class Tenant < Base; end
|
9
|
+
class Endpoint < Base; end
|
10
|
+
class Pool < Base; end
|
11
|
+
class User < Base; end
|
12
|
+
class Identifier < Base; end
|
13
|
+
class FileFingerprint < Base; end
|
14
|
+
class ChownRequest < Base; end
|
15
|
+
class ChownResult < Base; end
|
16
|
+
class MetabaseCard < Base; end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ros
|
4
|
+
module Comm
|
5
|
+
class Client < Ros::Platform::Client; end
|
6
|
+
class Base < Ros::Sdk::Base; end
|
7
|
+
|
8
|
+
class Tenant < Base; end
|
9
|
+
class Message < Base; end
|
10
|
+
class Channel < Base; end
|
11
|
+
class Event < Base; end
|
12
|
+
class Template < Base; end
|
13
|
+
class Provider < Base; end
|
14
|
+
class Campaign < Base; end
|
15
|
+
class FileFingerprint < Base; end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,29 @@
|
|
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
|
+
class FileFingerprint < Base; end
|
10
|
+
class Credential < Base; end
|
11
|
+
class PublicKey < Base; end
|
12
|
+
class User < Base
|
13
|
+
def self.find_by_urn(username); where(username: username).first end
|
14
|
+
end
|
15
|
+
|
16
|
+
class Root < Base
|
17
|
+
def self.find_by_urn(id); find(id) end
|
18
|
+
end
|
19
|
+
|
20
|
+
class Group < Base; end
|
21
|
+
class Role < Base; end
|
22
|
+
|
23
|
+
# p = IAM::Policy.includes(:actions).find(1)
|
24
|
+
# p.map(&:actions).flatten.first
|
25
|
+
class Policy < Base; end
|
26
|
+
class Action < Base; end
|
27
|
+
class ReadAction < Action; end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ros
|
4
|
+
module Storage
|
5
|
+
class Client < Ros::Platform::Client; end
|
6
|
+
class Base < Ros::Sdk::Base; end
|
7
|
+
|
8
|
+
class Tenant < Base; end
|
9
|
+
class FileFingerprint < Base; end
|
10
|
+
class Document < Base; end
|
11
|
+
class Image < Base; end
|
12
|
+
class Report < Base; end
|
13
|
+
end
|
14
|
+
end
|
data/lib/ros_sdk/sdk.rb
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'globalid'
|
4
|
+
|
5
|
+
module Ros
|
6
|
+
module Sdk
|
7
|
+
class << self
|
8
|
+
attr_accessor :configured_services
|
9
|
+
|
10
|
+
def service_endpoints
|
11
|
+
configured_services.each_with_object({}) do |service, hash|
|
12
|
+
hash[service[0]] = service[1]::Base.site
|
13
|
+
end
|
14
|
+
rescue StandardError
|
15
|
+
raise ClientConfigurationError
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class ClientConfigurationError < StandardError; end
|
20
|
+
|
21
|
+
class JsonApiPaginator < JsonApiClient::Paginating::Paginator
|
22
|
+
self.page_param = 'number'
|
23
|
+
self.per_page_param = 'size'
|
24
|
+
end
|
25
|
+
|
26
|
+
class Base < JsonApiClient::Resource
|
27
|
+
self.paginator = JsonApiPaginator
|
28
|
+
# TODO: the way our helpers are designed, find is called without params so
|
29
|
+
# we cannot set this to true, but we really should redesign the general
|
30
|
+
# resource helpers and change this
|
31
|
+
self.raise_on_blank_find_param = false
|
32
|
+
|
33
|
+
attr_writer :to_gid
|
34
|
+
|
35
|
+
def to_gid
|
36
|
+
@to_gid ||= GlobalID.new("gid://internal/#{self.class.name}/#{id}")
|
37
|
+
end
|
38
|
+
|
39
|
+
def url
|
40
|
+
return unless links.respond_to? :self
|
41
|
+
|
42
|
+
links.self
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_urn
|
46
|
+
urn
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
class Credential
|
51
|
+
class << self
|
52
|
+
attr_accessor :access_key_id, :secret_access_key, :region
|
53
|
+
attr_writer :partition, :authorization, :request_headers
|
54
|
+
|
55
|
+
def configure(access_key_id: nil, secret_access_key: nil)
|
56
|
+
self.access_key_id = access_key_id
|
57
|
+
self.secret_access_key = secret_access_key
|
58
|
+
end
|
59
|
+
|
60
|
+
def request_headers
|
61
|
+
@request_headers ||= {}
|
62
|
+
end
|
63
|
+
|
64
|
+
def partition
|
65
|
+
@partition ||= Settings.partition_name
|
66
|
+
end
|
67
|
+
|
68
|
+
def authorization
|
69
|
+
@authorization ||= "#{Settings.auth_type} #{access_key_id}:#{secret_access_key}"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
class Client
|
75
|
+
class << self
|
76
|
+
attr_accessor :scheme, :host, :domain, :port, :force_path_style, :service
|
77
|
+
|
78
|
+
# rubocop:disable Metrics/ParameterLists
|
79
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
80
|
+
def configure(scheme: 'https', host: nil, domain: nil, port: nil, force_path_style: false,
|
81
|
+
service: nil, connection_type: 'host', prefix: nil, postfix: nil)
|
82
|
+
if descendants.any?
|
83
|
+
descendants.map(&:to_s).sort.each do |client|
|
84
|
+
client.constantize.configure(scheme: scheme, host: host, domain: domain, port: port,
|
85
|
+
force_path_style: force_path_style, service: service)
|
86
|
+
port += 1 if connection_type.eql? 'port'
|
87
|
+
end
|
88
|
+
return
|
89
|
+
end
|
90
|
+
self.scheme = scheme
|
91
|
+
self.host = host
|
92
|
+
self.domain = domain
|
93
|
+
self.port = port
|
94
|
+
self.force_path_style = force_path_style
|
95
|
+
# NOTE: Converts the sdk class onto a hyphenated namespace, so we can have
|
96
|
+
# VoucherService => voucher-service
|
97
|
+
# InstantOutcome => instant-outcome
|
98
|
+
# Relates to https://github.com/rails-on-services/ros/issues/88
|
99
|
+
self.service = (service || module_parent.name.split('::').last.split(/(?=[A-Z][a-z].+)/).join('-')).downcase
|
100
|
+
Ros::Sdk.configured_services ||= {}
|
101
|
+
Ros::Sdk.configured_services[self.service] = module_parent
|
102
|
+
module_parent::Base.site = endpoint
|
103
|
+
module_parent::Base.connection.use Ros::Sdk::Middleware
|
104
|
+
Ros::Sdk.configured_services[self.service]
|
105
|
+
end
|
106
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
107
|
+
# rubocop:enable Metrics/ParameterLists
|
108
|
+
|
109
|
+
def endpoint
|
110
|
+
path = force_path_style ? "/#{service}" : nil
|
111
|
+
chost = force_path_style ? host : (host || service)
|
112
|
+
chost = [chost, domain].compact.join('.')
|
113
|
+
"URI::#{scheme.upcase}".constantize.build(host: chost, port: port, path: path).to_s
|
114
|
+
rescue StandardError
|
115
|
+
raise 'ClientConfigurationError'
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
module Platform
|
122
|
+
class Client < Ros::Sdk::Client; end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
Ros::Sdk::PryCommandSet = Pry::CommandSet.new
|
127
|
+
|
128
|
+
class ConsoleHelp < Pry::ClassCommand
|
129
|
+
match 'setup-client'
|
130
|
+
group 'ros'
|
131
|
+
description 'Setup client'
|
132
|
+
banner <<-BANNER
|
133
|
+
|
134
|
+
Client with service on localhost:
|
135
|
+
external: self.setup(scheme: 'http', host: 'localhost', domain: nil, port: 3000, force_path_style: false)
|
136
|
+
internal: self.setup(scheme: 'http', host: 'localhost', domain: nil, port: 3001, force_path_style: false)
|
137
|
+
|
138
|
+
Compose with nginx paths on single port for all services:
|
139
|
+
external: self.setup(scheme: 'http', host: 'localhost', domain: nil, port: 3000, force_path_style: true)
|
140
|
+
internal: self.setup(scheme: 'http', host: nil, domain: nil, port: 3000, force_path_style: false)
|
141
|
+
|
142
|
+
Kubernetes:
|
143
|
+
external: self.setup(scheme: nil, host: nil, domain: 'rails-on-services.io', port: nil, force_path_style: false)
|
144
|
+
internal: self.setup(scheme: 'http', host: nil, domain: nil, port: 3000, force_path_style: false)
|
145
|
+
BANNER
|
146
|
+
|
147
|
+
def process; end
|
148
|
+
Ros::Sdk::PryCommandSet.add_command(self)
|
149
|
+
end
|
150
|
+
|
151
|
+
class RServices < Pry::ClassCommand
|
152
|
+
match 'sdk'
|
153
|
+
group 'ros'
|
154
|
+
description 'show SDK configured services and endpoints'
|
155
|
+
command_options(keep_retval: true)
|
156
|
+
|
157
|
+
def process
|
158
|
+
config = OpenStruct.new(
|
159
|
+
services: Ros::Sdk.configured_services,
|
160
|
+
endpoints: Ros::Sdk.service_endpoints,
|
161
|
+
credential: Ros::Sdk::Credential.authorization
|
162
|
+
)
|
163
|
+
output.puts(config)
|
164
|
+
config
|
165
|
+
end
|
166
|
+
|
167
|
+
Ros::Sdk::PryCommandSet.add_command(self)
|
168
|
+
end
|
169
|
+
|
170
|
+
Pry.config.commands.import Ros::Sdk::PryCommandSet
|
data/settings.yml
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# The options for configuring internal connections to services
|
2
|
+
partition_name: ros
|
3
|
+
auth_type: Basic
|
4
|
+
|
5
|
+
connection:
|
6
|
+
type: path
|
7
|
+
# This is the default. Connections are on https
|
8
|
+
# export PLATFORM__CONNECTION__SERVICE__DOMAIN=api.example.com
|
9
|
+
service:
|
10
|
+
domain: api.rails-on-services.org
|
11
|
+
# Each service runs on port 3000 and is uniquely
|
12
|
+
# addressed by it's host name which is taken from the module name of the Client
|
13
|
+
# Can override values here with an ENV. For example, to use https instead of http:
|
14
|
+
# export PLATFORM__SERVICES__CONNECTION__HOST__SCHEME=https
|
15
|
+
host:
|
16
|
+
scheme: http
|
17
|
+
port: 3000
|
18
|
+
# port based means that each configured service has its own port on localhost
|
19
|
+
# port number starts at value of 'port' and increments by 1 for each additional service
|
20
|
+
# The port to service mapping is in alphabetical order by the service name
|
21
|
+
# e.g. 'comm' is a lower port number than 'iam'
|
22
|
+
# To use this connection type:
|
23
|
+
# export PLATFORM__SERVICES__CONNECTION__TYPE=port
|
24
|
+
port:
|
25
|
+
scheme: http
|
26
|
+
host: localhost
|
27
|
+
port: 3000
|
28
|
+
# For external connections to services behind and nginx reverse proxy that uses path names
|
29
|
+
# to proxy to services running on differnet ports
|
30
|
+
# export PLATFORM__SERVICES__CONNECTION__TYPE=path
|
31
|
+
# export PLATFORM__SERVICES__CONNECTION__PATH__PORT=3000
|
32
|
+
path:
|
33
|
+
scheme: http
|
34
|
+
host: localhost
|
35
|
+
port: 3000
|
36
|
+
force_path_style: true
|
metadata
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cnfs_sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.alpha
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Robert Roach
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.0.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.0.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 6.0.2.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 6.0.2.1
|
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: inifile
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.0.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: json_api_client
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.15.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.15.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jwt
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.2.1
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.2.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: awesome_print
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.8.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.8.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: bundler
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.12.2
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.12.2
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rake
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '12.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '12.0'
|
167
|
+
description: Authenticate and connect to remote services via REST
|
168
|
+
email:
|
169
|
+
- rjayroach@gmail.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- README.md
|
175
|
+
- Rakefile
|
176
|
+
- bin/console
|
177
|
+
- bin/setup
|
178
|
+
- cnfs_sdk.gemspec
|
179
|
+
- lib/ros_sdk.rb
|
180
|
+
- lib/ros_sdk/console.rb
|
181
|
+
- lib/ros_sdk/middleware.rb
|
182
|
+
- lib/ros_sdk/models.rb
|
183
|
+
- lib/ros_sdk/models/cognito.rb
|
184
|
+
- lib/ros_sdk/models/comm.rb
|
185
|
+
- lib/ros_sdk/models/iam.rb
|
186
|
+
- lib/ros_sdk/models/organization.rb
|
187
|
+
- lib/ros_sdk/models/storage.rb
|
188
|
+
- lib/ros_sdk/sdk.rb
|
189
|
+
- lib/ros_sdk/version.rb
|
190
|
+
- settings.yml
|
191
|
+
homepage: https://github.com/rails-on-services
|
192
|
+
licenses:
|
193
|
+
- MIT
|
194
|
+
metadata: {}
|
195
|
+
post_install_message:
|
196
|
+
rdoc_options: []
|
197
|
+
require_paths:
|
198
|
+
- lib
|
199
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
200
|
+
requirements:
|
201
|
+
- - ">="
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '0'
|
204
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.3.1
|
209
|
+
requirements: []
|
210
|
+
rubygems_version: 3.0.3
|
211
|
+
signing_key:
|
212
|
+
specification_version: 4
|
213
|
+
summary: Loads JSONAPI based models to connect with remote RESTful services
|
214
|
+
test_files: []
|