soar-registry-staff 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13f348fb2b2fbfb9f2478f9276e36639b3ac8354
4
- data.tar.gz: a84a2ed7a4a834213eaf306ff8c6e041548ccdd9
3
+ metadata.gz: ff85279b0a65cd6d15ca7275fffc739be2b7f913
4
+ data.tar.gz: 521aaf003b97f120250ef75f538c8c34cb1d9f4f
5
5
  SHA512:
6
- metadata.gz: b93cfc59302371eb8271636a23f826bcf240a0900b1c7a4e83ff99603e8968fcbe5f5a9ef18eb455254bf7acbf10be900d88e80f6410d98576ae10fd7787d99f
7
- data.tar.gz: 3db6766a4e0a8c227cc3e02c1ffac4d541925c99f4dd2ccb15d507b5d4310d7d54a4b549f01c21bc542948dcb7e489d6048780db9bc3ee7dcc678700a3bd33f4
6
+ metadata.gz: 7e010d474b633e0ae720c16b268b5e765a92a786d060ebcec2ff4b29b0c343d5cd172de14b3ec1dcfc6425e06b56e555112379ddf2c0de44a43fa1c20043b3fb
7
+ data.tar.gz: edb16269bea593b6e39136eac5c7aba9e711f62508da506fe77e6498a7a7ace9261a21b5e2c2ccd219c9ce8cb6c2d3c945fb20625a7b2d035891962c33800d23
data/README.md CHANGED
@@ -6,10 +6,8 @@ Allows you to find staff identities by id using *Soar::Registry::Staff::Identity
6
6
  ### Required configuration
7
7
  See config/config.yml
8
8
  ```yaml
9
- rule_set:
10
- adaptor: 'Soar::Registry::Staff::Translator::DynamoDb'
11
9
  provider:
12
- adaptor: 'Soar::Registry::Staff::Directory::DynamoDb::Identity'
10
+ class: 'Soar::Registry::Staff::Directory::DynamoDb::Identity'
13
11
  config:
14
12
  table: 'identities'
15
13
  region: 'us-west-2'
@@ -100,14 +98,14 @@ TEST_ORCHESTRATION_PROVIDER=Stub rspec
100
98
 
101
99
  ### DynamoDb
102
100
  ```
103
- $ TEST_ORCHESTRATION_PROVIDER=DynamoDb docker-compose --file docker-compose.test.yml up --abort-on-container-exit --remove-orphans
101
+ $ docker-compose --file docker-compose.test.yml up
102
+ $ CONFIG_FILE=config.test.yml TEST_ORCHESTRATION_PROVIDER=DynamoDb rspec
104
103
  ```
105
104
 
106
105
  ### CI
107
106
  *NB:* container_name in docker-compose.ci.yml corresponds with name parameter of docker ps command in below bash script.
108
107
  ```bash
109
- #!/bin/bash
110
- TEST_ORCHESTRATION_PROVIDER=DynamoDb docker-compose --file docker-compose.test.yml up --build --abort-on-container-exit --remove-orphans --force-recreate;
108
+ USER_NAME=$USER USER_ID=$(id -u) docker-compose --file docker-compose.ci.yml up --abort-on-container-exit --remove-orphans --build --force-recreate
111
109
  EXIT_CODE=$(docker ps -a -f "name=soar-registry-staff" -q | xargs docker inspect -f "{{ .State.ExitCode }}");
112
110
  exit $EXIT_CODE;
113
111
  ```
@@ -1,5 +1,5 @@
1
1
  require 'soar_idm/soar_idm'
2
- require 'soar/registry/staff/translator/dynamo_db'
2
+ require 'soar/registry/staff/translator/default'
3
3
  require 'soar/registry/staff/directory/dynamo_db'
4
4
  require 'soar/registry/staff/directory/stub'
5
5
 
@@ -20,8 +20,8 @@ module Soar
20
20
  # for example see config/config.yml
21
21
  ##
22
22
  def initialize(configuration)
23
- @translator = Object.const_get(configuration['rule_set']['adaptor']).new
24
- @directory = Object::const_get(configuration['provider']['adaptor']).new
23
+ @translator = configuration.key?('translator') ? Object.const_get(configuration['translator']['class']).new : Soar::Registry::Staff::Translator::Default.new
24
+ @directory = Object::const_get(configuration['provider']['class']).new
25
25
  @directory.bootstrap(configuration['provider']['config'])
26
26
  @directory.authenticate(configuration['provider']['credentials'])
27
27
  @client = @directory.connect
@@ -2,7 +2,7 @@ module Soar
2
2
  module Registry
3
3
  module Staff
4
4
  module Translator
5
- class DynamoDb
5
+ class Default
6
6
 
7
7
  ##
8
8
  # @param [Hash] entry a single entry from datasource
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar-registry-staff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Mulder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-15 00:00:00.000000000 Z
11
+ date: 2016-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashy_db
@@ -81,7 +81,7 @@ dependencies:
81
81
  version: '2.6'
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 2.6.11
84
+ version: 2.6.28
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
@@ -91,7 +91,7 @@ dependencies:
91
91
  version: '2.6'
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: 2.6.11
94
+ version: 2.6.28
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: hashie
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -131,7 +131,7 @@ files:
131
131
  - lib/soar/registry/staff/test/directory/provider/stub.rb
132
132
  - lib/soar/registry/staff/test/fixtures/identity_data.json
133
133
  - lib/soar/registry/staff/test/fixtures/identity_table.json
134
- - lib/soar/registry/staff/translator/dynamo_db.rb
134
+ - lib/soar/registry/staff/translator/default.rb
135
135
  homepage: https://gitlab.host-h.net/registries/staff
136
136
  licenses:
137
137
  - MIT