kpm 0.11.1 → 0.11.2

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
  SHA256:
3
- metadata.gz: 92f89695b531e939275ac653417d228d51b897570504418032418797a56674bf
4
- data.tar.gz: acd577c2a29a56c50c0daeacb09a62f7fcf6068650d1ba8ed2e527d6f9db2962
3
+ metadata.gz: 52403662d712a2a4e5d5f4858f9f5fdec00cfae193fb0fa584ac9e4ad0915b88
4
+ data.tar.gz: f44f9d18991344583ca2cf6edcea3973930396d8ed72781c6d178afa07c42e0f
5
5
  SHA512:
6
- metadata.gz: c44713659fe2517572916f45722df1d6ae7b8d639cb24b227ba161386e104df0c2dcf3f38f7a735cfe0f399cbe5d791dc5802cda6a8a73ec791c5ba9853adfd7
7
- data.tar.gz: fd47e470a0df6c75785383a45857a93909ff44d4464136a57ad3f4d27e9331a2b9d31cb4a08834885ee099292a7df5ea6ee9417bfa94fa3c93801114c3af15d3
6
+ metadata.gz: 3f1197e9c21b9ff52f6938a329af118434243e8fceb8145826139e00598f68c1ae9567347cc3d2e462ad2fe6d2e26bc116037b259698656207a61366eda24e28
7
+ data.tar.gz: 1b48ddb9aa45a443c2d5a2af4ea8b38b2b3e8dfb66dbffe44ab5b8249dedad13a1cb68398f3f0ed2cef668b7731cc1bfcbf6029ea1bf2b700def47a6e7c2fa7b
data/README.adoc CHANGED
@@ -26,10 +26,13 @@ Note that this installation method assumes `/bin/bash` to be available on your s
26
26
  === Through Rubygems
27
27
  image:https://img.shields.io/gem/v/kpm?color=blue&label=kpm[kpm]
28
28
 
29
- On Windows, you can install KPM via https://rubygems.org/gems/kpm[RubyGems.org]. For this, you need to first install Ruby. Ruby can be installed via https://rubyinstaller.org/[RubyInstaller]. Once installed, you can run the following command to install KPM:
29
+ On Windows, you can install KPM via https://rubygems.org/gems/kpm[RubyGems.org]. For this, you need to first install Ruby 2.x.x. We recommend installing Ruby 2.7.7.
30
+
31
+ Ruby can be installed via https://rubyinstaller.org/[RubyInstaller]. Once installed, you can run the following command to install KPM:
30
32
  [source,bash]
31
33
  gem install kpm
32
34
 
35
+ Note: KPM is not tested with Ruby 3.x.x or later versions.
33
36
 
34
37
 
35
38
  [[kpm-commands]]
@@ -3,7 +3,7 @@ version: '3.8'
3
3
  services:
4
4
  killbill:
5
5
  network_mode: host
6
- image: killbill/killbill:0.22.1
6
+ image: killbill/killbill:0.24.0
7
7
  environment:
8
8
  - KILLBILL_CATALOG_URI=SpyCarAdvanced.xml
9
9
  - KILLBILL_DAO_URL=jdbc:mysql://0.0.0.0:3306/killbill
@@ -16,6 +16,6 @@ services:
16
16
  - db
17
17
  db:
18
18
  network_mode: host
19
- image: killbill/mariadb:0.22
19
+ image: killbill/mariadb:0.24
20
20
  environment:
21
21
  - MYSQL_ROOT_PASSWORD=root
data/kpm.gemspec CHANGED
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
42
42
  s.rdoc_options << '--exclude' << '.'
43
43
 
44
44
  s.add_dependency 'highline', '>= 1.6.21', '< 2.1.0'
45
- s.add_dependency 'killbill-client', '~> 3.2'
45
+ s.add_dependency 'killbill-client'
46
46
  s.add_dependency 'rubyzip', '>= 1.3', '< 2.4'
47
47
  s.add_dependency 'thor', '>= 0.19.1', '< 1.3.0'
48
48
 
@@ -23,15 +23,11 @@ module KPM
23
23
  ZIP_LOG_FILE = 'logs.zip'
24
24
 
25
25
  def initialize(config_file = nil, killbill_api_credentials = nil, killbill_credentials = nil, killbill_url = nil,
26
- database_name = nil, database_credentials = nil, database_host = nil, database_port = nil, kaui_web_path = nil,
26
+ kaui_web_path = nil,
27
27
  killbill_web_path = nil, bundles_dir = nil, logger = nil)
28
28
  @killbill_api_credentials = killbill_api_credentials
29
29
  @killbill_credentials = killbill_credentials
30
30
  @killbill_url = killbill_url
31
- @database_name = database_name
32
- @database_credentials = database_credentials
33
- @database_host = database_host
34
- @database_port = database_port
35
31
  @config_file = config_file
36
32
  @kaui_web_path = kaui_web_path
37
33
  @killbill_web_path = killbill_web_path
@@ -109,8 +105,8 @@ module KPM
109
105
  @logger.level = Logger::WARN
110
106
 
111
107
  account = KPM::Account.new(@config_file, @killbill_api_credentials, @killbill_credentials,
112
- @killbill_url, @database_name,
113
- @database_credentials, @database_host, @database_port, nil, @logger)
108
+ @killbill_url, nil,
109
+ nil, nil, nil, nil, @logger)
114
110
  export_file = account.export_data(account_id)
115
111
 
116
112
  final = TMP_DIR + File::Separator + ACCOUNT_FILE
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rexml/document'
4
- require 'set'
5
4
 
6
5
  module KPM
7
6
  class KauiArtifact < BaseArtifact
@@ -11,9 +10,9 @@ module KPM
11
10
 
12
11
  coordinates = KPM::Coordinates.build_coordinates(coordinate_map)
13
12
  response = REXML::Document.new nexus_remote(overrides, ssl_verify).search_for_artifacts(coordinates)
14
- versions = SortedSet.new
13
+ versions = []
15
14
  response.elements.each('searchNGResponse/data/artifact/version') { |element| versions << element.text }
16
- versions
15
+ versions.sort!.uniq
17
16
  end
18
17
  end
19
18
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rexml/document'
4
- require 'set'
5
4
 
6
5
  module KPM
7
6
  class KillbillPluginArtifact < BaseArtifact
@@ -20,8 +19,9 @@ module KPM
20
19
  response = REXML::Document.new nexus.search_for_artifacts(type_and_group_id[1])
21
20
  response.elements.each('searchNGResponse/data/artifact') do |element|
22
21
  artifact_id = element.elements['artifactId'].text
23
- plugins[type_and_group_id[0]][artifact_id] ||= SortedSet.new
22
+ plugins[type_and_group_id[0]][artifact_id] ||= []
24
23
  plugins[type_and_group_id[0]][artifact_id] << element.elements['version'].text
24
+ plugins[type_and_group_id[0]][artifact_id].sort!.uniq!
25
25
  end
26
26
  end
27
27
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rexml/document'
4
- require 'set'
5
4
 
6
5
  module KPM
7
6
  class KillbillServerArtifact < BaseArtifact
@@ -10,9 +9,9 @@ module KPM
10
9
  coordinate_map = { group_id: KPM::BaseArtifact::KILLBILL_GROUP_ID, artifact_id: artifact_id, packaging: packaging, classifier: classifier }
11
10
  coordinates = KPM::Coordinates.build_coordinates(coordinate_map)
12
11
  response = REXML::Document.new nexus_remote(overrides, ssl_verify).search_for_artifacts(coordinates)
13
- versions = SortedSet.new
12
+ versions = []
14
13
  response.elements.each('searchNGResponse/data/artifact/version') { |element| versions << element.text }
15
- versions
14
+ versions.sort!.uniq
16
15
  end
17
16
 
18
17
  def info(version = 'LATEST', sha1_file = nil, force_download = false, verify_sha1 = true, overrides = {}, ssl_verify = true)
@@ -8,18 +8,22 @@
8
8
  :versions:
9
9
  :0.18: 0.5.26
10
10
  :0.20: 0.7.0
11
+ :0.22: 0.9.0
12
+ :0.24: 0.10.0
11
13
  :analytics:
12
14
  :type: :java
13
15
  :versions:
14
16
  :0.18: 4.2.5
15
17
  :0.20: 6.0.1
16
18
  :0.22: 7.2.7
19
+ :0.24: 8.1.1
17
20
  :avatax:
18
21
  :type: :java
19
22
  :versions:
20
23
  :0.18: 0.4.1
21
24
  :0.20: 0.6.1
22
25
  :0.22: 0.8.4
26
+ :0.24: 0.9.0
23
27
  :cybersource:
24
28
  :type: :ruby
25
29
  :versions:
@@ -28,6 +32,7 @@
28
32
  :type: :java
29
33
  :versions:
30
34
  :0.22: 0.0.2
35
+ :0.24: 0.1.0
31
36
  :dwolla:
32
37
  :type: :java
33
38
  :versions:
@@ -39,6 +44,7 @@
39
44
  :0.18: 0.3.1
40
45
  :0.20: 0.5.1
41
46
  :0.22: 0.7.2
47
+ :0.24: 0.8.0
42
48
  :forte:
43
49
  :type: :java
44
50
  :versions:
@@ -73,6 +79,7 @@
73
79
  :artifact_id: payment-test-plugin
74
80
  :versions:
75
81
  :0.22: 7.0.4
82
+ :0.24: 8.0.0
76
83
  :securenet:
77
84
  :type: :ruby
78
85
  :versions:
@@ -81,3 +88,25 @@
81
88
  :type: :java
82
89
  :versions:
83
90
  :0.22: 7.3.3
91
+ :0.24: 8.0.2
92
+ :braintree:
93
+ :type: :java
94
+ :versions:
95
+ :0.24: 1.0.0
96
+ :catalog-test:
97
+ :type: :java
98
+ :versions:
99
+ :0.24: 0.5.1
100
+ :gocardless:
101
+ :type: :java
102
+ :versions:
103
+ :0.24: 1.0.1
104
+ :qualpay:
105
+ :type: :java
106
+ :versions:
107
+ :0.22: 0.0.1
108
+ :0.24: 1.0.0
109
+ :invgrp:
110
+ :type: :java
111
+ :versions:
112
+ :0.24: 1.0.7
data/lib/kpm/tasks.rb CHANGED
@@ -17,16 +17,6 @@ module KPM
17
17
  say "KPM version #{KPM::VERSION}"
18
18
  end
19
19
 
20
- class_option :overrides,
21
- type: :hash,
22
- default: nil,
23
- desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
24
-
25
- class_option :ssl_verify,
26
- type: :boolean,
27
- default: true,
28
- desc: 'Set to false to disable SSL Verification.'
29
-
30
20
  method_option :force_download,
31
21
  type: :boolean,
32
22
  default: false,
@@ -104,6 +94,14 @@ module KPM
104
94
  type: :boolean,
105
95
  default: true,
106
96
  desc: 'Validate sha1 sum'
97
+ method_option :overrides,
98
+ type: :hash,
99
+ default: nil,
100
+ desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
101
+ method_option :ssl_verify,
102
+ type: :boolean,
103
+ default: true,
104
+ desc: 'Set to false to disable SSL Verification.'
107
105
  desc 'pull_kb_server_war <version>', 'Pulls Kill Bill server war and places it on your machine. If version was not specified it uses the latest released version.'
108
106
  def pull_kb_server_war(version = 'LATEST')
109
107
  installer = BaseInstaller.new(logger,
@@ -121,6 +119,14 @@ module KPM
121
119
  say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
122
120
  end
123
121
 
122
+ method_option :overrides,
123
+ type: :hash,
124
+ default: nil,
125
+ desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
126
+ method_option :ssl_verify,
127
+ type: :boolean,
128
+ default: true,
129
+ desc: 'Set to false to disable SSL Verification.'
124
130
  desc 'search_for_kb_server', 'Searches for all versions of Kill Bill server and prints them to the screen.'
125
131
  def search_for_kb_server
126
132
  say "Available versions: #{KillbillServerArtifact.versions(KillbillServerArtifact::KILLBILL_ARTIFACT_ID,
@@ -207,6 +213,14 @@ module KPM
207
213
  type: :boolean,
208
214
  default: true,
209
215
  desc: 'Validates sha1 sum'
216
+ method_option :overrides,
217
+ type: :hash,
218
+ default: nil,
219
+ desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
220
+ method_option :ssl_verify,
221
+ type: :boolean,
222
+ default: true,
223
+ desc: 'Set to false to disable SSL Verification.'
210
224
  desc 'pull_defaultbundles <kb-version>', 'Pulls the default OSGI bundles and places it on your machine. If the kb-version has been specified, it is used to download the matching platform artifact; if not, it uses the latest released version.'
211
225
  def pull_defaultbundles(kb_version = 'LATEST')
212
226
  response = BaseInstaller.new(logger,
@@ -219,7 +233,14 @@ module KPM
219
233
  options[:verify_sha1])
220
234
  say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
221
235
  end
222
-
236
+ method_option :overrides,
237
+ type: :hash,
238
+ default: nil,
239
+ desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
240
+ method_option :ssl_verify,
241
+ type: :boolean,
242
+ default: true,
243
+ desc: 'Set to false to disable SSL Verification.'
223
244
  desc 'search_for_plugins', 'Searches for all available plugins and prints them to the screen.'
224
245
  def search_for_plugins
225
246
  all_plugins = KillbillPluginArtifact.versions(options[:overrides], options[:ssl_verify])
@@ -251,6 +272,14 @@ module KPM
251
272
  type: :boolean,
252
273
  default: true,
253
274
  desc: 'Validates sha1 sum'
275
+ method_option :overrides,
276
+ type: :hash,
277
+ default: nil,
278
+ desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
279
+ method_option :ssl_verify,
280
+ type: :boolean,
281
+ default: true,
282
+ desc: 'Set to false to disable SSL Verification.'
254
283
  desc 'pull_kaui_war <version>', 'Pulls Kaui war and places it on your machine. If version was not specified it uses the latest released version.'
255
284
  def pull_kaui_war(version = 'LATEST')
256
285
  response = KauiArtifact.pull(logger,
@@ -293,6 +322,14 @@ module KPM
293
322
  type: :boolean,
294
323
  default: false,
295
324
  desc: 'Set the output format as JSON when true'
325
+ method_option :overrides,
326
+ type: :hash,
327
+ default: nil,
328
+ desc: "A hashed list of overrides. Available options are 'url', 'repository', 'username', and 'password'."
329
+ method_option :ssl_verify,
330
+ type: :boolean,
331
+ default: true,
332
+ desc: 'Set to false to disable SSL Verification.'
296
333
  desc 'info', 'Describe information about a Kill Bill version'
297
334
  def info
298
335
  versions_info = KillbillServerArtifact.info(options[:version],
@@ -525,22 +562,6 @@ module KPM
525
562
  type: :string,
526
563
  default: nil,
527
564
  desc: 'Killbill URL ex. http://127.0.0.1:8080'
528
- method_option :database_name,
529
- type: :string,
530
- default: nil,
531
- desc: 'DB name to connect'
532
- method_option :database_credentials,
533
- type: :array,
534
- default: nil,
535
- desc: 'DB credentials <user> <password>'
536
- method_option :database_host,
537
- type: :string,
538
- default: nil,
539
- desc: 'Database Host name'
540
- method_option :database_port,
541
- type: :string,
542
- default: nil,
543
- desc: 'Database port'
544
565
  method_option :kaui_web_path,
545
566
  type: :string,
546
567
  default: nil,
@@ -563,17 +584,12 @@ module KPM
563
584
 
564
585
  raise Interrupt, '--killbill_credentials, required format -> <user> <password>' if options[:killbill_credentials] && options[:killbill_credentials].size != 2
565
586
 
566
- raise Interrupt, '--database_credentials, required format -> <user> <password>' if options[:database_credentials] && options[:database_credentials].size != 2
567
-
568
- raise Interrupt, '--database_credentials, please provide a valid database name' if options[:database_name] && options[:database_name] == :database_name.to_s
569
-
570
587
  raise Interrupt, '--kaui_web_path, please provide a valid kaui web path ' if options[:kaui_web_path] && options[:kaui_web_path] == :kaui_web_path.to_s
571
588
 
572
589
  raise Interrupt, '--killbill_web_path, please provide a valid killbill web path' if options[:killbill_web_path] && options[:killbill_web_path] == :killbill_web_path.to_s
573
590
 
574
591
  diagnostic = KPM::DiagnosticFile.new(options[:config_file], options[:killbill_api_credentials], options[:killbill_credentials],
575
- options[:killbill_url], options[:database_name], options[:database_credentials],
576
- options[:database_host], options[:database_port], options[:kaui_web_path], options[:killbill_web_path], options[:bundles_dir], logger)
592
+ options[:killbill_url], options[:kaui_web_path], options[:killbill_web_path], options[:bundles_dir], logger)
577
593
  diagnostic.export_data(options[:account_export], options[:log_dir])
578
594
  rescue StandardError => e
579
595
  logger.error "\e[91;1m#{e.message}\e[0m"
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.11.1'
4
+ VERSION = '0.11.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.11.1</version>
25
+ <version>0.11.2</version>
26
26
  <packaging>pom</packaging>
27
27
  <name>KPM</name>
28
28
  <description>KPM: the Kill Bill Package Manager</description>
data/tasks/package.rake CHANGED
@@ -10,9 +10,9 @@ require './lib/kpm/version'
10
10
  VERSION = KPM::VERSION
11
11
 
12
12
  # See https://www.jruby.org/download
13
- JRUBY_VERSION = '9.3.4.0'
13
+ JRUBY_VERSION = '9.4.5.0'
14
14
  # See https://github.com/Homebrew/homebrew-portable-ruby/releases
15
- HOMEBREW_PORTABLE_RUBY_VERSION = '2.6.8_1'
15
+ HOMEBREW_PORTABLE_RUBY_VERSION = '3.1.4'
16
16
 
17
17
  # Remove unused files to reduce package size
18
18
  GEMS_PATH = 'packaging/vendor/ruby/*/gems/*/'
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.11.1
4
+ version: 0.11.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: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2025-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -34,16 +34,16 @@ dependencies:
34
34
  name: killbill-client
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '3.2'
39
+ version: '0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '3.2'
46
+ version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rubyzip
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
254
  requirements: []
255
- rubygems_version: 3.0.3.1
255
+ rubygems_version: 3.3.26
256
256
  signing_key:
257
257
  specification_version: 4
258
258
  summary: Kill Bill package manager.