conjur-api 2.1.8 → 2.2.1
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.
- data/.gitignore +1 -0
- data/.kateproject +5 -0
- data/README.md +10 -1
- data/lib/conjur-api/version.rb +1 -1
- data/lib/conjur/api/groups.rb +2 -6
- data/lib/conjur/host.rb +1 -0
- data/spec/lib/api_spec.rb +0 -2
- data/spec/lib/host_spec.rb +14 -0
- data/spec/lib/resource_spec.rb +0 -2
- data/spec/lib/role_spec.rb +0 -2
- data/spec/lib/user_spec.rb +0 -2
- data/spec/spec_helper.rb +2 -0
- metadata +7 -4
data/.gitignore
CHANGED
data/.kateproject
ADDED
data/README.md
CHANGED
@@ -18,7 +18,16 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Default service ports:
|
22
|
+
- authn: 5000,
|
23
|
+
- authz: 5100.
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
ENV['CONJUR_ACCOUNT'] = 'account'
|
27
|
+
conjur = Conjur::API.new_from_key 'admin', 'vJfQbiieBcv4SlxTZ7ULznc1zHZ4z+0sx5to3hLOic0='
|
28
|
+
some_user = conjur.user 'foo'
|
29
|
+
|
30
|
+
```
|
22
31
|
|
23
32
|
## Contributing
|
24
33
|
|
data/lib/conjur-api/version.rb
CHANGED
data/lib/conjur/api/groups.rb
CHANGED
@@ -2,12 +2,8 @@ require 'conjur/group'
|
|
2
2
|
|
3
3
|
module Conjur
|
4
4
|
class API
|
5
|
-
def groups
|
6
|
-
|
7
|
-
# TODO: remove this hack
|
8
|
-
json = JSON.parse json['json']
|
9
|
-
group(json['id'])
|
10
|
-
end
|
5
|
+
def groups(options={})
|
6
|
+
standard_list Conjur::Core::API.host, :group, options
|
11
7
|
end
|
12
8
|
|
13
9
|
def create_group(id, options = {})
|
data/lib/conjur/host.rb
CHANGED
data/spec/lib/api_spec.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Conjur::Host do
|
4
|
+
let(:login) { 'the-login' }
|
5
|
+
let(:api_key) { 'the-api-key' }
|
6
|
+
let(:credentials) { { user: login, password: api_key } }
|
7
|
+
let(:account) { 'test-account' }
|
8
|
+
|
9
|
+
before { Conjur::Core::API.stub conjur_account: account }
|
10
|
+
|
11
|
+
subject { Conjur::Host.new 'hostname', credentials }
|
12
|
+
|
13
|
+
its(:resource) { should be }
|
14
|
+
end
|
data/spec/lib/resource_spec.rb
CHANGED
data/spec/lib/role_spec.rb
CHANGED
data/spec/lib/user_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjur-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1
|
4
|
+
version: 2.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-05-
|
13
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -133,6 +133,7 @@ extensions: []
|
|
133
133
|
extra_rdoc_files: []
|
134
134
|
files:
|
135
135
|
- .gitignore
|
136
|
+
- .kateproject
|
136
137
|
- .project
|
137
138
|
- .rspec
|
138
139
|
- .rvmrc
|
@@ -185,6 +186,7 @@ files:
|
|
185
186
|
- lib/conjur/user.rb
|
186
187
|
- lib/conjur/variable.rb
|
187
188
|
- spec/lib/api_spec.rb
|
189
|
+
- spec/lib/host_spec.rb
|
188
190
|
- spec/lib/resource_spec.rb
|
189
191
|
- spec/lib/role_spec.rb
|
190
192
|
- spec/lib/user_spec.rb
|
@@ -206,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
206
208
|
version: '0'
|
207
209
|
segments:
|
208
210
|
- 0
|
209
|
-
hash:
|
211
|
+
hash: 2312433878886306886
|
210
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
213
|
none: false
|
212
214
|
requirements:
|
@@ -215,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
217
|
version: '0'
|
216
218
|
segments:
|
217
219
|
- 0
|
218
|
-
hash:
|
220
|
+
hash: 2312433878886306886
|
219
221
|
requirements: []
|
220
222
|
rubyforge_project:
|
221
223
|
rubygems_version: 1.8.24
|
@@ -228,6 +230,7 @@ test_files:
|
|
228
230
|
- features/ping_as_server.feature
|
229
231
|
- features/ping_as_user.feature
|
230
232
|
- spec/lib/api_spec.rb
|
233
|
+
- spec/lib/host_spec.rb
|
231
234
|
- spec/lib/resource_spec.rb
|
232
235
|
- spec/lib/role_spec.rb
|
233
236
|
- spec/lib/user_spec.rb
|