conjur-cli 5.2.0 → 5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Dockerfile +6 -1
- data/conjur.gemspec +1 -0
- data/lib/conjur/command/ldapsync.rb +5 -1
- data/lib/conjur/version.rb +1 -1
- data/spec/command/ldapsync_spec.rb +29 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b1e4204f00a0e45272ef0ea6a2e051e2e718d94
|
4
|
+
data.tar.gz: 980a03e7ad8b258e747c32a3f7eb058f0cff72fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d52c210b51e14b7a56a369c468195c2f2afcf75643be234cae9f0a6cc5f01b5297cfe16629c965ebd657532eb78fc13558682c0abde087c60f04a507d1b66d8
|
7
|
+
data.tar.gz: ada494c4e8d7b1f39130d753fd8941cbf02e63e2254616a5c61f54d4579b991a18257de9156043bbb474155b367cdc07d90ce9996dba5c7954844b212478563c
|
data/CHANGELOG.md
CHANGED
data/Dockerfile
CHANGED
@@ -7,4 +7,9 @@ COPY Gemfile Gemfile
|
|
7
7
|
COPY conjur.gemspec conjur.gemspec
|
8
8
|
COPY lib/conjur/version.rb lib/conjur/version.rb
|
9
9
|
|
10
|
-
|
10
|
+
# Make sure only one version of bundler is available
|
11
|
+
RUN gem uninstall bundler -i /usr/local/lib/ruby/gems/2.1.0 bundler || true && \
|
12
|
+
gem uninstall bundler -i /usr/local/lib/ruby/gems/2.2.0 bundler || true && \
|
13
|
+
gem uninstall bundler -aIx && \
|
14
|
+
gem install bundler -v 1.11.2 && \
|
15
|
+
bundle install
|
data/conjur.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = Conjur::VERSION
|
17
17
|
|
18
18
|
gem.add_dependency 'activesupport', '~> 4.2'
|
19
|
+
gem.add_dependency 'bundler', '< 1.12.0'
|
19
20
|
gem.add_dependency 'conjur-api', '~> 4.21'
|
20
21
|
gem.add_dependency 'gli', '>=2.8.0'
|
21
22
|
gem.add_dependency 'highline', '~> 1.7'
|
@@ -24,8 +24,12 @@ class Conjur::Command::LDAPSync < Conjur::Command
|
|
24
24
|
assert_empty args
|
25
25
|
|
26
26
|
format = options[:format] == 'text' ? 'application/json' : 'text/yaml'
|
27
|
+
|
28
|
+
# options[:'dry-run'] is nil when dry_run should be disabled (either --no-dry-run
|
29
|
+
# or no option given at all). It is true when --dry-run is given.
|
27
30
|
dry_run = options[:'dry-run']
|
28
|
-
|
31
|
+
dry_run = false if dry_run.nil?
|
32
|
+
|
29
33
|
$stderr.puts "Performing #{dry_run ? 'dry run ' : ''}LDAP sync"
|
30
34
|
|
31
35
|
response = api.ldap_sync_now(options[:profile], format, dry_run)
|
data/lib/conjur/version.rb
CHANGED
@@ -40,4 +40,33 @@ describe Conjur::Command::LDAPSync, logged_in: true do
|
|
40
40
|
expect { invoke }.to write(yaml_response)
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
context 'when testing dry-run' do
|
45
|
+
before do
|
46
|
+
expect_any_instance_of(Conjur::API).to receive(:ldap_sync_now)
|
47
|
+
.with('default', 'application/json', dry_run)
|
48
|
+
.and_return json_response
|
49
|
+
end
|
50
|
+
|
51
|
+
describe_command 'ldap-sync now' do
|
52
|
+
let(:dry_run) { false }
|
53
|
+
it 'passes falsey dry-run value' do
|
54
|
+
invoke
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe_command 'ldap-sync now --no-dry-run' do
|
59
|
+
let(:dry_run) { false }
|
60
|
+
it 'passes falsey dry-run value' do
|
61
|
+
invoke
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe_command 'ldap-sync now --dry-run' do
|
66
|
+
let(:dry_run) { true }
|
67
|
+
it 'passes truthy dry-run value' do
|
68
|
+
invoke
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
43
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjur-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafal Rzepecki
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '4.2'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - <
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.12.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - <
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.12.0
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: conjur-api
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|