zaikio-directory 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -3
- data/README.md +10 -1
- data/lib/zaikio/directory.rb +2 -0
- data/lib/zaikio/directory/configuration.rb +1 -1
- data/lib/zaikio/directory/test_account.rb +15 -0
- data/lib/zaikio/directory/version.rb +1 -1
- data/lib/zaikio/error.rb +2 -0
- metadata +13 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dc2956d9034111c7ad80906d9f705c98503817f6cc6cb938f787646ca31cd7f
|
4
|
+
data.tar.gz: f8418bfc9b9c98ae9d245f24c50d5ac5f62493a56f36d5a1bfd5b769a24d7e9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00a3f4b24da97e0a6b7ecf041fe466e4ea30554f4ccc0b05cb51a5b1f14051c9c4516fec892b675d54f747b524b0dd0cf8b3eea8bdeaefc22388cf731762a0a1
|
7
|
+
data.tar.gz: a28cb5c4cae83c646c815019a41b0f6f0e592a7398caeaf582cbe52c2b7ba492e817d98255649c119a00ad1d25f88343897ffe1d40f16ae4cb0064770c066884
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.2.0] - 2020-01-21
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- `Zaikio::Directory::TestAccount`
|
15
|
+
|
10
16
|
## [0.1.1] - 2020-09-02
|
11
17
|
|
12
18
|
### Fixed
|
@@ -17,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
17
23
|
### Added
|
18
24
|
- Added subscriptions (migration required)
|
19
25
|
|
20
|
-
[Unreleased]: https://github.com/
|
21
|
-
[0.
|
22
|
-
[0.1.
|
26
|
+
[Unreleased]: https://github.com/zaikio/zaikio-directory-ruby/compare/v0.2.0...HEAD
|
27
|
+
[0.2.0]: https://github.com/zaikio/zaikio-directory-ruby/compare/v0.1.1...v.0.2.0
|
28
|
+
[0.1.1]: https://github.com/zaikio/zaikio-directory-ruby/compare/5c6cb4dbcac316733560ddb2b1e13b53e55eb66e...v0.1.1
|
29
|
+
[0.1.0]: https://github.com/zaikio/zaikio-directory-ruby/compare/d149fb4c0abe6005f123def3952d2dd2ef6404bb...29889d8a6a496542a81e05688da2a46cf4c44188
|
data/README.md
CHANGED
@@ -35,7 +35,7 @@ end
|
|
35
35
|
|
36
36
|
The Directory Client has an ORM like design. However, we distinguish between the contexts of the organization and the person.
|
37
37
|
|
38
|
-
For the requests to work, a valid JSON Web token with the correct OAuth Scopes must always be provided. Please refer to [zakio-oauth_client](https://github.com/
|
38
|
+
For the requests to work, a valid JSON Web token with the correct OAuth Scopes must always be provided. Please refer to [zakio-oauth_client](https://github.com/zaikio/zaikio-oauth_client).
|
39
39
|
|
40
40
|
If you want to know which actions are available and which scopes are required, please refer to the [Directory API Reference](https://docs.zaikio.com/api/directory/directory.html).
|
41
41
|
|
@@ -103,6 +103,15 @@ Zaikio::Directory.with_basic_auth(client_id, client_secret) do
|
|
103
103
|
subscription.increment_usage_by!(:orders_created, 12)
|
104
104
|
end
|
105
105
|
|
106
|
+
Zaikio::Directory.with_basic_auth(client_id, client_secret) do
|
107
|
+
Zaikio::Directory::TestAccount.create(
|
108
|
+
name: "My Test Org",
|
109
|
+
country_code: "DE",
|
110
|
+
kinds: ["printer"],
|
111
|
+
connection_attributes: ["procurement_consumer"]
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
106
115
|
roles = Zaikio::Directory::Role.all
|
107
116
|
revoked_access_tokens = Zaikio::Directory::RevokedAccessToken.all
|
108
117
|
|
data/lib/zaikio/directory.rb
CHANGED
@@ -24,11 +24,13 @@ require "zaikio/directory/role"
|
|
24
24
|
require "zaikio/directory/revoked_access_token"
|
25
25
|
require "zaikio/directory/connection"
|
26
26
|
require "zaikio/directory/subscription"
|
27
|
+
require "zaikio/directory/test_account"
|
27
28
|
|
28
29
|
module Zaikio
|
29
30
|
module Directory
|
30
31
|
class << self
|
31
32
|
attr_accessor :configuration
|
33
|
+
|
32
34
|
class_attribute :connection
|
33
35
|
|
34
36
|
def configure
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Zaikio
|
2
|
+
module Directory
|
3
|
+
class TestAccount < Base
|
4
|
+
uri "test_accounts(/:id)"
|
5
|
+
|
6
|
+
include_root_in_json :test_account
|
7
|
+
|
8
|
+
# Associations
|
9
|
+
has_many :memberships, class_name: "Zaikio::Directory::Membership",
|
10
|
+
uri: nil
|
11
|
+
has_many :sites, class_name: "Zaikio::Directory::Site",
|
12
|
+
uri: nil
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/zaikio/error.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zaikio-directory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- crispymtn
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: concurrent-ruby
|
@@ -64,16 +64,22 @@ dependencies:
|
|
64
64
|
name: oj
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 3.10.5
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 3.12.0
|
70
73
|
type: :runtime
|
71
74
|
prerelease: false
|
72
75
|
version_requirements: !ruby/object:Gem::Requirement
|
73
76
|
requirements:
|
74
|
-
- - "
|
77
|
+
- - ">="
|
75
78
|
- !ruby/object:Gem::Version
|
76
79
|
version: 3.10.5
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.12.0
|
77
83
|
- !ruby/object:Gem::Dependency
|
78
84
|
name: spyke
|
79
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,13 +129,14 @@ files:
|
|
123
129
|
- lib/zaikio/directory/software.rb
|
124
130
|
- lib/zaikio/directory/specialist.rb
|
125
131
|
- lib/zaikio/directory/subscription.rb
|
132
|
+
- lib/zaikio/directory/test_account.rb
|
126
133
|
- lib/zaikio/directory/version.rb
|
127
134
|
- lib/zaikio/error.rb
|
128
135
|
homepage: https://www.zaikio.com/
|
129
136
|
licenses:
|
130
137
|
- MIT
|
131
138
|
metadata:
|
132
|
-
changelog_uri: https://github.com/
|
139
|
+
changelog_uri: https://github.com/zaikio/zaikio-directory-ruby/blob/master/CHANGELOG.md
|
133
140
|
post_install_message:
|
134
141
|
rdoc_options: []
|
135
142
|
require_paths:
|
@@ -138,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
145
|
requirements:
|
139
146
|
- - ">="
|
140
147
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
148
|
+
version: 2.6.5
|
142
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
150
|
requirements:
|
144
151
|
- - ">="
|