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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4737c65684b90ddd2b62d5fb186573b7099e496b
4
- data.tar.gz: c6ff97b50c512c96568e0361991af49309b868ac
3
+ metadata.gz: 0b1e4204f00a0e45272ef0ea6a2e051e2e718d94
4
+ data.tar.gz: 980a03e7ad8b258e747c32a3f7eb058f0cff72fc
5
5
  SHA512:
6
- metadata.gz: 6bcb80c73f81df2f96f1d18780c2d94f69c1fe3d8ec9153e6276b529ecd21429836a8ec08a058c2975471d751e9f6cc5bf3332a1f0e9640fbc67ca48ac1a3ca1
7
- data.tar.gz: 3a355ec8286f3b4d198777b5f34666c4cfaf6dbf9db3a9f558c47ee54166439e259a3aabd3a5ae3bcc12086137a434bba2d415ac8c2c4e47c27bd279ff1392a7
6
+ metadata.gz: 3d52c210b51e14b7a56a369c468195c2f2afcf75643be234cae9f0a6cc5f01b5297cfe16629c965ebd657532eb78fc13558682c0abde087c60f04a507d1b66d8
7
+ data.tar.gz: ada494c4e8d7b1f39130d753fd8941cbf02e63e2254616a5c61f54d4579b991a18257de9156043bbb474155b367cdc07d90ce9996dba5c7954844b212478563c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 5.2.1
2
+
3
+ * Fix handling of `ldap-sync` dry-run argument.
4
+
1
5
  # 5.2.0
2
6
 
3
7
  * Add `ldap-sync` management commands (requires Conjur 4.7 or later).
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
- RUN gem install bundler -v 1.11.2 && bundle install
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)
@@ -19,6 +19,6 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
  module Conjur
22
- VERSION = '5.2.0'
22
+ VERSION = '5.2.1'
23
23
  ::Version=VERSION
24
24
  end
@@ -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.0
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-05-24 00:00:00.000000000 Z
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