kpm 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d052b9c73fbb831cf7469a3f57ae21dfe733ededd65541f7b693117b857d4f7c
4
- data.tar.gz: a76a44cac1de427a83183be0d1d271f8f79e35f0945d9722576363a5644be690
3
+ metadata.gz: 850bd7e1ec547391cfb29fe983244ddb31cb1d13347b1a83f3bbe8a788594f5f
4
+ data.tar.gz: 81a9d7e00c46ec44bc7fc2f1ff011ad1cce8fcd1edd7e48a507115747ab14665
5
5
  SHA512:
6
- metadata.gz: f8c51c778cd35a93b2416c8eed3ba9e43d9307ab1df9b6d066ca67384b17c17b32f612445ce102433b261057a137fe5b95b13be5366ec73a79eeb40cedd588ba
7
- data.tar.gz: b634baf2edc85f1f0f0880dc4d1c81deb434affe7ee4065825f31fcffa53fe9f6a62fc5849e93b00d44cf9da64952a3e9c0431d89e73e6edd58541bd47175619
6
+ metadata.gz: 74378aee057793ae9d2053cdc41cb289651e04ef8f5f3d85e2a6defbec6265b2c8ff4d646d1a53a9681ba19fe1e638652699ed75d9d5ef9f249e8b275dd4d5fe
7
+ data.tar.gz: c2c307d2ac887215656b1d40da38b33b4482ade2a70818d72e65f6eb0e7bd9753d94104897ff55d2aee7cf9dbea56f8fef4d11c1357b480cc42bd3450f390c42
@@ -41,10 +41,15 @@ module KPM
41
41
  ssl_verify)
42
42
 
43
43
  # Extract the killbill-oss-parent version
44
- pom = REXML::Document.new(File.new(kb_pom_info[:file_path]))
45
- oss_parent_version = pom.root.elements['parent/version'].text
46
- kb_version = pom.root.elements['version'].text
47
-
44
+ file = File.new(kb_pom_info[:file_path])
45
+ begin
46
+ pom = REXML::Document.new(file)
47
+ oss_parent_version = pom.root.elements['parent/version'].text
48
+ kb_version = pom.root.elements['version'].text
49
+ ensure
50
+ file.close
51
+ FileUtils.rm_f(kb_pom_info[:file_path])
52
+ end
48
53
  versions['killbill'] = kb_version
49
54
  versions['killbill-oss-parent'] = oss_parent_version
50
55
 
@@ -61,13 +66,17 @@ module KPM
61
66
  verify_sha1,
62
67
  overrides,
63
68
  ssl_verify)
64
-
65
- pom = REXML::Document.new(File.new(oss_pom_info[:file_path]))
66
- properties_element = pom.root.elements['properties']
67
- %w[killbill-api killbill-plugin-api killbill-commons killbill-platform].each do |property|
68
- versions[property] = properties_element.elements["#{property}.version"].text
69
+ file = File.new(oss_pom_info[:file_path])
70
+ begin
71
+ pom = REXML::Document.new(file)
72
+ properties_element = pom.root.elements['properties']
73
+ %w[killbill-api killbill-plugin-api killbill-commons killbill-platform].each do |property|
74
+ versions[property] = properties_element.elements["#{property}.version"].text
75
+ end
76
+ ensure
77
+ file.close
78
+ FileUtils.rm_f(oss_pom_info[:file_path])
69
79
  end
70
-
71
80
  sha1_checker.cache_killbill_info(version, versions) if sha1_checker
72
81
  end
73
82
  versions
@@ -13,13 +13,13 @@
13
13
  :versions:
14
14
  :0.18: 4.2.5
15
15
  :0.20: 6.0.1
16
- :0.22: 7.1.1
16
+ :0.22: 7.2.3
17
17
  :avatax:
18
18
  :type: :java
19
19
  :versions:
20
20
  :0.18: 0.4.1
21
21
  :0.20: 0.6.1
22
- :0.22: 0.7.0
22
+ :0.22: 0.8.2
23
23
  :cybersource:
24
24
  :type: :ruby
25
25
  :versions:
@@ -27,7 +27,7 @@
27
27
  :deposit:
28
28
  :type: :java
29
29
  :versions:
30
- :0.22: 0.0.1
30
+ :0.22: 0.0.2
31
31
  :dwolla:
32
32
  :type: :java
33
33
  :versions:
@@ -38,7 +38,7 @@
38
38
  :versions:
39
39
  :0.18: 0.3.1
40
40
  :0.20: 0.5.1
41
- :0.22: 0.6.1
41
+ :0.22: 0.7.1
42
42
  :forte:
43
43
  :type: :java
44
44
  :versions:
@@ -10,6 +10,15 @@ module KPM
10
10
  @logger = logger
11
11
  end
12
12
 
13
+ def create_symbolic_link(path, link)
14
+ FileUtils.rm_f(link)
15
+ FileUtils.ln_s(path, link, force: true)
16
+ rescue Errno::EACCES
17
+ @logger.warn('Unable to create symbolic link LATEST, will copy the directory')
18
+ FileUtils.rm_rf(link)
19
+ FileUtils.cp_r(path, link)
20
+ end
21
+
13
22
  def set_active(plugin_name_or_path, plugin_version = nil)
14
23
  if plugin_name_or_path.nil?
15
24
  @logger.warn('Unable to mark a plugin as active: no name or path specified')
@@ -19,8 +28,7 @@ module KPM
19
28
  if plugin_version.nil?
20
29
  # Full path specified, with version
21
30
  link = Pathname.new(plugin_name_or_path).join('../SET_DEFAULT')
22
- FileUtils.rm_f(link)
23
- FileUtils.ln_s(plugin_name_or_path, link, force: true)
31
+ create_symbolic_link(plugin_name_or_path, link)
24
32
  else
25
33
  # Plugin name (fs directory) specified
26
34
  plugin_dir_glob = @plugins_dir.join('*').join(plugin_name_or_path)
@@ -28,8 +36,7 @@ module KPM
28
36
  Dir.glob(plugin_dir_glob).each do |plugin_dir_path|
29
37
  plugin_dir = Pathname.new(plugin_dir_path)
30
38
  link = plugin_dir.join('SET_DEFAULT')
31
- FileUtils.rm_f(link)
32
- FileUtils.ln_s(plugin_dir.join(plugin_version), link, force: true)
39
+ create_symbolic_link(plugin_dir.join(plugin_version), link)
33
40
  end
34
41
  end
35
42
 
@@ -179,7 +186,7 @@ module KPM
179
186
  end
180
187
  end
181
188
 
182
- # Note: the plugin name here is the directory name on the filesystem
189
+ # NOTE: the plugin name here is the directory name on the filesystem
183
190
  def update_fs(plugin_name_or_path, plugin_version = nil)
184
191
  if plugin_name_or_path.nil?
185
192
  @logger.warn('Unable to update the filesystem: no name or path specified')
data/lib/kpm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KPM
4
- VERSION = '0.10.1'
4
+ VERSION = '0.10.2'
5
5
  end
data/pom.xml CHANGED
@@ -22,7 +22,7 @@
22
22
  <modelVersion>4.0.0</modelVersion>
23
23
  <groupId>org.kill-bill.billing.installer</groupId>
24
24
  <artifactId>kpm</artifactId>
25
- <version>0.10.1</version>
25
+ <version>0.10.2</version>
26
26
  <packaging>pom</packaging>
27
27
  <name>KPM</name>
28
28
  <description>KPM: the Kill Bill Package Manager</description>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-13 00:00:00.000000000 Z
11
+ date: 2021-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline