kpm 0.10.1 → 0.10.4
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/kpm.gemspec +1 -1
- data/lib/kpm/blob.rb +4 -0
- data/lib/kpm/inspector.rb +8 -1
- data/lib/kpm/killbill_server_artifact.rb +19 -10
- data/lib/kpm/nexus_helper/nexus_api_calls_v2.rb +1 -1
- data/lib/kpm/plugins_directory.yml +5 -5
- data/lib/kpm/plugins_manager.rb +12 -5
- data/lib/kpm/version.rb +1 -1
- data/pom.xml +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e69269a01b07d01247f91c4928f795a6082798e29b7dc80e0f9dcff7bbf052ff
|
4
|
+
data.tar.gz: 474ccaea9db693606babde9a94ba21d3f53c087bd0735c6c93c36e38451ad264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4b59ab0cfc80647365f04679782e4dbe089948d54b900e7a677989f4b36fc021a5c02210985f7773d139ca4644f1c2c572e6eb39c28d754eb6986856af6f4ef
|
7
|
+
data.tar.gz: 66a4b7a14509ae8ef03d05636bf37312e11363b9e6da5de743d46bd78c7fd096dff2d81ef9466ba13c2661b4dc166d51d502d540f38c1532872a1816708a0648
|
data/kpm.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
|
44
44
|
s.add_dependency 'highline', '~> 1.6.21'
|
45
45
|
s.add_dependency 'killbill-client', '~> 3.2'
|
46
|
-
s.add_dependency 'rubyzip', '~>1.
|
46
|
+
s.add_dependency 'rubyzip', '~> 1.3.0'
|
47
47
|
s.add_dependency 'thor', '~> 0.19.1'
|
48
48
|
|
49
49
|
s.add_development_dependency 'gem-release', '~> 2.2'
|
data/lib/kpm/blob.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'fileutils'
|
4
|
+
|
3
5
|
module KPM
|
4
6
|
class Blob
|
5
7
|
def initialize(value, tmp_dir)
|
6
8
|
@tmp_dir = tmp_dir
|
7
9
|
@blob_file = @tmp_dir + File::SEPARATOR + rand.to_s
|
10
|
+
# Make sure directory is 'rx' for others to allow LOAD_FILE to work
|
11
|
+
FileUtils.chmod('a+rx', @tmp_dir)
|
8
12
|
store_value(value)
|
9
13
|
end
|
10
14
|
|
data/lib/kpm/inspector.rb
CHANGED
@@ -75,7 +75,14 @@ module KPM
|
|
75
75
|
plugin_map = { plugin_name: plugin_name, plugin_path: plugin_path.to_s, type: type }
|
76
76
|
entries = get_entries(plugin_path)
|
77
77
|
set_default = entries.select { |e| e == 'SET_DEFAULT' }[0]
|
78
|
-
default_version =
|
78
|
+
default_version = nil
|
79
|
+
if set_default
|
80
|
+
begin
|
81
|
+
default_version = File.basename(File.readlink(plugin_path.join(set_default)))
|
82
|
+
rescue StandardError
|
83
|
+
# On Windows, SET_DEFAULT is a directory, not a symbolic link
|
84
|
+
end
|
85
|
+
end
|
79
86
|
|
80
87
|
non_default = entries.reject do |e|
|
81
88
|
e == 'SET_DEFAULT'
|
@@ -41,10 +41,15 @@ module KPM
|
|
41
41
|
ssl_verify)
|
42
42
|
|
43
43
|
# Extract the killbill-oss-parent version
|
44
|
-
|
45
|
-
|
46
|
-
|
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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
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
|
@@ -92,7 +92,7 @@ module KPM
|
|
92
92
|
|
93
93
|
def build_query_params(coordinates, what_parameters = nil)
|
94
94
|
artifact = parse_coordinates(coordinates)
|
95
|
-
@version = artifact[:version].to_s
|
95
|
+
@version = artifact[:version].to_s
|
96
96
|
|
97
97
|
query = { g: artifact[:group_id], a: artifact[:artifact_id], e: artifact[:extension], v: version, r: configuration[:repository] }
|
98
98
|
query.merge!(c: artifact[:classifier]) unless artifact[:classifier].nil?
|
@@ -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.
|
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.
|
22
|
+
:0.22: 0.8.4
|
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.
|
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.
|
41
|
+
:0.22: 0.7.2
|
42
42
|
:forte:
|
43
43
|
:type: :java
|
44
44
|
:versions:
|
@@ -80,4 +80,4 @@
|
|
80
80
|
:stripe:
|
81
81
|
:type: :java
|
82
82
|
:versions:
|
83
|
-
:0.22: 7.3.
|
83
|
+
:0.22: 7.3.1
|
data/lib/kpm/plugins_manager.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
#
|
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
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.
|
25
|
+
<version>0.10.4</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.
|
4
|
+
version: 0.10.4
|
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:
|
11
|
+
date: 2022-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.3.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|