conjur-cli 5.1.0 → 5.1.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: 33a3e3fad78dc2dd87aa3fa6a243f0b14803c5e5
4
- data.tar.gz: d6df01dfa23da5c6c70a404c18cf2649ee7714b6
3
+ metadata.gz: fd2fdc274eeb24f6aebb71b086d5423d4525fa46
4
+ data.tar.gz: eca6d5c3dc2a592e85c83489d83f0107ba248727
5
5
  SHA512:
6
- metadata.gz: f461169a657242cf740174c974fb86c2bfdf1b956eb7e81ef0697056426efaa3280b8e33bbcf2e285200b43c0231923bf582f14fbd8fac57a756ce8ace392dcd
7
- data.tar.gz: ba975bee2a0cb9ad5131ebbdc0e53850e194e196daaa45b7cd84d0270f8aa53af13742e87efe17d9beff4d65c725ceabce6d9781d2e83c6dd1c70fa1d3e368d1
6
+ metadata.gz: 9600929f300b75cbafd5345ddc7e9a8ec1af8d3a37c669c44085aa8144b04ff872a0f10cb0a124caf2208b6dd63e64f0deadc68e8d6a0987c2a9c9e4e4a9d144
7
+ data.tar.gz: 05bab089a0c28700dd81f586dcbc2d9541246212380bb927b594f0836ada296b219223496860fdb3e9f61fdfe7f4c52f08a77e4766a73124c67bd11647171e7e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # 5.1.0
1
+ # 5.1.1
2
2
 
3
- * CLI plugin config is now stored in `~/.conjur-plugins.yml`.
3
+ * Global CLI plugin config is now stored in `/opt/conjur/etc/plugins.yml`.
4
4
 
5
5
  # 5.0.0
6
6
 
@@ -41,7 +41,7 @@ class Conjur::Command::Plugin < Conjur::Command
41
41
  Conjur::Config.plugins.each do |p|
42
42
  begin
43
43
  gem = Gem::Specification.find_by_name "conjur-asset-#{p}"
44
- puts "#{p} (#{gem.version})"
44
+ puts "#{p} (#{gem.version}) - #{gem.summary}"
45
45
  rescue Gem::LoadError
46
46
  nil
47
47
  end
@@ -121,18 +121,19 @@ def uninstall_plugin(name)
121
121
  end
122
122
 
123
123
  def modify_plugin_list(op, plugin_name)
124
- config_exists = false
125
- Conjur::Config.plugin_config_files.each do |f|
126
- if !File.file?(f)
127
- FileUtils.touch(f)
124
+ config_found = false
125
+ # Check the dedicated plugin config file first
126
+ (Conjur::Config.plugin_config_files + Conjur::Config.default_config_files).uniq!.each do |f|
127
+ if File.exists?(f) and not config_found # only write to the first file found
128
+ config_found = true
129
+ config = YAML.load(IO.read(f)).stringify_keys rescue {}
130
+ config['plugins'] ||= []
131
+ config['plugins'] += [plugin_name] if op == 'add'
132
+ config['plugins'] -= [plugin_name] if op == 'remove'
133
+ config['plugins'].uniq!
134
+
135
+ File.write(f, YAML.dump(config))
128
136
  end
129
-
130
- config = YAML.load(IO.read(f)).stringify_keys rescue {}
131
- config['plugins'] ||= []
132
- config['plugins'] += [plugin_name] if op == 'add'
133
- config['plugins'] -= [plugin_name] if op == 'remove'
134
- config['plugins'].uniq!
135
-
136
- File.write(f, YAML.dump(config))
137
+ exit_now! 'No Conjur config file found for plugin installation' unless config_found
137
138
  end
138
139
  end
data/lib/conjur/config.rb CHANGED
@@ -31,7 +31,7 @@ module Conjur
31
31
  end
32
32
 
33
33
  def plugin_config_files
34
- [ File.expand_path("~/.conjur-plugins.yml") ]
34
+ [ '/opt/conjur/etc/plugins.yml' ]
35
35
  end
36
36
 
37
37
  def user_config_files
@@ -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.1.0'
22
+ VERSION = '5.1.1'
23
23
  ::Version=VERSION
24
24
  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.1.0
4
+ version: 5.1.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-03-30 00:00:00.000000000 Z
12
+ date: 2016-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport