kpm 0.5.1 → 0.5.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
  SHA1:
3
- metadata.gz: 6be3b3dacc891388365ba4094b09108090506210
4
- data.tar.gz: 851500df67953047390b991a8379861adf8fcd6d
3
+ metadata.gz: a487717568c5814d90fd062a8b006b66ec550dbb
4
+ data.tar.gz: 3c533f57e8f2bf257bd36f66553cdd49d43be34e
5
5
  SHA512:
6
- metadata.gz: 26ac12031991b00e25eb1c790801a7dfb624ec54d0eb745ee0c860aa01ebfdf27a34154a028002dde4c9aed100883ee8bc6a7cc935d3cc41bae755193d637b69
7
- data.tar.gz: 3279ae222cfdf26b8b1d844ef286d157b1dff9c5a660e9b188ec9db4d14ba3b6b07d6dfff43f77e14c642265228c627c63c9c339e5a0089aaa429663b879f104
6
+ metadata.gz: 0802e436f2889109ce4a05ad99e220a4e051ff5e34c96589611ea77a479aebf6ee8727ef5afe1e5ad0fa32e24ccecebd27629d9a02a6295b2ebef393be1e582a
7
+ data.tar.gz: 122a71247e5a187d3b440d1cc600215920c80d98599258a36986a19a04f1d2ea5fb9b3d660a0e699f8cd27514cdfddd566431e59a55ef9cf731dced9f84b605d
data/.gitignore CHANGED
@@ -1,2 +1,8 @@
1
1
  Gemfile.lock
2
2
  pkg
3
+ packaging/tmp
4
+ packaging/vendor
5
+ kpm-*-linux-x86.tar.gz
6
+ kpm-*-linux-x86_64.tar.gz
7
+ kpm-*-osx.tar.gz
8
+ traveling-ruby-*.tar.gz
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
data/README.md CHANGED
@@ -6,7 +6,21 @@ kpm can be used interactively to search and download individual artifacts (Kill
6
6
 
7
7
  ## Prerequisites
8
8
 
9
- ### Ruby
9
+ ### Java
10
+
11
+ Kill Bill runs on the [Java](https://www.java.com/en/download/) platform, version 6 and above (8 is recommended).
12
+
13
+ ## Installation
14
+
15
+ ### Pre-built binaries (recommended, Linux and MacOS only)
16
+
17
+ Note that this installation method assumes `/bin/bash` to be available on your system.
18
+
19
+ KPM builds are available on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.kill-bill.billing.installer%22%20AND%20a%3A%22kpm%22) with coordinates `org.kill-bill.billing.installer:kpm`.
20
+
21
+ Download the package matching your architecture.
22
+
23
+ ### Through Rubygems
10
24
 
11
25
  Ruby is required to run KPM itself (it is not a dependency of Kill Bill).
12
26
 
@@ -19,11 +33,7 @@ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB8
19
33
 
20
34
  After following the post-installation instructions, you should have access to the `ruby` and `gem` executables.
21
35
 
22
- ### Java
23
-
24
- Kill Bill runs on the [Java](https://www.java.com/en/download/) platform, version 6 and above (8 is recommended).
25
-
26
- ## Installation
36
+ You can then run:
27
37
 
28
38
  gem install kpm
29
39
 
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env rake
2
2
 
3
+ Dir.glob('tasks/*.rake').each { |r| import r }
4
+
3
5
  # Install tasks to build and release the plugin
4
6
  require 'bundler/setup'
5
7
  Bundler::GemHelper.install_tasks
@@ -20,7 +22,7 @@ namespace :test do
20
22
  task.pattern = './spec/*/remote/*_spec.rb'
21
23
  end
22
24
  end
23
-
25
+
24
26
  namespace :mysql do
25
27
  desc 'Run RSpec MySql related tests'
26
28
  RSpec::Core::RakeTask.new do |task|
@@ -16,7 +16,7 @@
16
16
  :0.15: 0.2.1
17
17
  :0.16: 0.3.2
18
18
  :0.17: 0.4.10
19
- :0.18: 0.5.3
19
+ :0.18: 0.5.4
20
20
  :require:
21
21
  - :org.killbill.billing.plugin.adyen.merchantAccount
22
22
  - :org.killbill.billing.plugin.adyen.username
@@ -63,7 +63,7 @@
63
63
  :0.14: 1.0.0
64
64
  :0.15: 3.3.0
65
65
  :0.16: 4.0.12
66
- :0.18: 5.2.1
66
+ :0.18: 5.2.2
67
67
  :require:
68
68
  - :login
69
69
  - :password
@@ -138,7 +138,7 @@
138
138
  :type: :ruby
139
139
  :versions:
140
140
  :0.16: 0.0.2
141
- :0.18: 0.1.4
141
+ :0.18: 0.1.5
142
142
  :require:
143
143
  - :login
144
144
  - :password
@@ -1,3 +1,3 @@
1
1
  module KPM
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'kpm'
4
+
5
+ group :development do
6
+ gem 'rake'
7
+ end
@@ -0,0 +1,3 @@
1
+ BUNDLE_PATH: .
2
+ BUNDLE_WITHOUT: development
3
+ BUNDLE_DISABLE_SHARED_GEMS: '1'
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ # Figure out where this script is located.
5
+ SELFDIR="`dirname \"$0\"`"
6
+ SELFDIR="`cd \"$SELFDIR\" && pwd`"
7
+
8
+ # Tell Bundler where the Gemfile and gems are.
9
+ export BUNDLE_GEMFILE="$SELFDIR/lib/vendor/Gemfile"
10
+ unset BUNDLE_IGNORE_CONFIG
11
+
12
+ # Run the actual app using the bundled Ruby interpreter, with Bundler activated.
13
+ # See https://github.com/phusion/traveling-ruby/issues/58
14
+ exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup -rreadline $SELFDIR/lib/vendor/ruby/2.*/bin/kpm $@
data/pom.xml ADDED
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ ~ Copyright 2014-2017 The Billing Project, LLC
4
+ ~
5
+ ~ The Billing Project licenses this file to you under the Apache License, version 2.0
6
+ ~ (the "License"); you may not use this file except in compliance with the
7
+ ~ License. You may obtain a copy of the License at:
8
+ ~
9
+ ~ http://www.apache.org/licenses/LICENSE-2.0
10
+ ~
11
+ ~ Unless required by applicable law or agreed to in writing, software
12
+ ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ ~ License for the specific language governing permissions and limitations
15
+ ~ under the License.
16
+ -->
17
+
18
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20
+ <parent>
21
+ <groupId>org.sonatype.oss</groupId>
22
+ <artifactId>oss-parent</artifactId>
23
+ <version>5</version>
24
+ </parent>
25
+ <modelVersion>4.0.0</modelVersion>
26
+ <groupId>org.kill-bill.billing.installer</groupId>
27
+ <artifactId>kpm</artifactId>
28
+ <packaging>pom</packaging>
29
+ <version>0.5.2</version>
30
+ <name>KPM</name>
31
+ <url>http://github.com/killbill/killbill-cloud</url>
32
+ <description>KPM: the Kill Bill Package Manager</description>
33
+ <licenses>
34
+ <license>
35
+ <name>Apache License 2.0</name>
36
+ <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
37
+ <distribution>repo</distribution>
38
+ </license>
39
+ </licenses>
40
+ <scm>
41
+ <connection>scm:git:git://github.com/killbill/killbill-cloud.git</connection>
42
+ <url>https://github.com/killbill/killbill-cloud/</url>
43
+ <developerConnection>scm:git:git@github.com:killbill/killbill-cloud.git</developerConnection>
44
+ </scm>
45
+ </project>
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ BUNDLE=${BUNDLE-"bundle exec"}
6
+ MVN=${MVN-"mvn"}
7
+
8
+ if [ 'GNU' != "$(tar --help | grep GNU | head -1 | awk '{print $1}')" ]; then
9
+ echo 'Unable to release: make sure to use GNU tar'
10
+ exit 1
11
+ fi
12
+
13
+ # See TRAVELING_RUBY_VERSION in tasks/package.rake
14
+ if [[ "$(ruby --version 2>&1 | tail -1 | awk '{print $2}')" != 2.2.2* ]]; then
15
+ echo 'Ruby version 2.2.2 is required'
16
+ exit 1
17
+ fi
18
+
19
+ VERSION=`grep -E '<version>([0-9]+\.[0-9]+\.[0-9]+)</version>' pom.xml | sed 's/[\t \n]*<version>\(.*\)<\/version>[\t \n]*/\1/'`
20
+ if [[ -z "$NO_RELEASE" && "$VERSION" != "$(ruby -r./lib/kpm/version.rb -e "print KPM::VERSION")" ]]; then
21
+ echo 'Unable to release: make sure the versions in pom.xml and VERSION match'
22
+ exit 1
23
+ fi
24
+
25
+ if [[ -z "$NO_RELEASE" ]]; then
26
+ echo 'Pushing the gem to Rubygems'
27
+ $BUNDLE rake release
28
+ fi
29
+
30
+ if [[ -z "$NO_RELEASE" ]]; then
31
+ GOAL=gpg:sign-and-deploy-file
32
+ REPOSITORY_ID=ossrh-releases
33
+ URL=https://oss.sonatype.org/service/local/staging/deploy/maven2/
34
+ REPO_VERSION=$VERSION
35
+ else
36
+ GOAL=deploy:deploy-file
37
+ REPOSITORY_ID=sonatype-nexus-snapshots
38
+ URL=https://oss.sonatype.org/content/repositories/snapshots/
39
+ REPO_VERSION="$VERSION-SNAPSHOT"
40
+ fi
41
+
42
+ echo "Pushing artifacts to Maven Central"
43
+ $MVN $GOAL \
44
+ -DgroupId=org.kill-bill.billing.installer \
45
+ -DartifactId=kpm \
46
+ -Dversion=$REPO_VERSION \
47
+ -Dpackaging=tar.gz \
48
+ -DrepositoryId=$REPOSITORY_ID \
49
+ -Durl=$URL \
50
+ -Dfile=kpm-$VERSION-linux-x86_64.tar.gz \
51
+ -Dclassifier=linux-x86_64 \
52
+ -Dfiles=kpm-$VERSION-linux-x86.tar.gz,kpm-$VERSION-osx.tar.gz \
53
+ -Dclassifiers=linux-x86,osx \
54
+ -Dtypes=tar.gz,tar.gz \
55
+ -DpomFile=pom.xml
@@ -0,0 +1,114 @@
1
+ # For Bundler.with_clean_env
2
+ require 'bundler/setup'
3
+
4
+ PACKAGE_NAME = 'kpm'
5
+
6
+ require './lib/kpm/version'
7
+ VERSION = KPM::VERSION
8
+
9
+ # See https://traveling-ruby.s3-us-west-2.amazonaws.com/list.html
10
+ TRAVELING_RUBY_VERSION = '20150715-2.2.2'
11
+
12
+ # Remove unused files to reduce package size
13
+ GEMS_PATH = 'packaging/vendor/ruby/*/gems/*/'
14
+ REMOVE_FILES = %w(test tests spec README* CHANGE* Change* COPYING* LICENSE* MIT-LICENSE* doc docs examples ext/*/Makefile .gitignore .travis.yml)
15
+ REMOVE_EXTENSIONS = %w(*.md *.c *.h *.rl extconf.rb *.java *.class *.so *.o)
16
+
17
+ desc 'Package your app'
18
+ task :package => %w(package:linux:x86 package:linux:x86_64 package:osx)
19
+
20
+ namespace :package do
21
+ namespace :linux do
22
+ desc 'Package KPM for Linux x86'
23
+ task :x86 => [:bundle_install, "packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-linux-x86.tar.gz"] do
24
+ create_package('linux-x86')
25
+ end
26
+
27
+ desc 'Package KPM for Linux x86_64'
28
+ task :x86_64 => [:bundle_install, "packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-linux-x86_64.tar.gz"] do
29
+ create_package('linux-x86_64')
30
+ end
31
+ end
32
+
33
+ desc 'Package KPM for OS X'
34
+ task :osx => [:bundle_install, "packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-osx.tar.gz"] do
35
+ create_package('osx')
36
+ end
37
+
38
+ desc 'Install gems to local directory'
39
+ task :bundle_install do
40
+ # Note! Must match TRAVELING_RUBY_VERSION above
41
+ expected_ruby_version = TRAVELING_RUBY_VERSION.split('-')[-1]
42
+ if RUBY_VERSION !~ /#{Regexp.quote(expected_ruby_version)}/
43
+ abort "You can only 'bundle install' using Ruby #{expected_ruby_version}, because that's what Traveling Ruby uses."
44
+ end
45
+ sh 'rm -rf packaging/tmp'
46
+ sh 'mkdir -p packaging/tmp'
47
+ sh 'cp packaging/Gemfile packaging/tmp/'
48
+
49
+ sh "rm -rf packaging/vendor/ruby/#{expected_ruby_version}/bundler" # if multiple clones of same repo, may load in wrong one
50
+
51
+ Bundler.with_clean_env do
52
+ sh 'cd packaging/tmp && env BUNDLE_IGNORE_CONFIG=1 bundle install --path ../vendor --without development'
53
+ end
54
+
55
+ sh 'rm -rf packaging/tmp'
56
+ sh 'rm -rf packaging/vendor/*/*/cache/*'
57
+ sh 'rm -rf packaging/vendor/ruby/*/extensions'
58
+
59
+ # Remove unused files to reduce package size
60
+ REMOVE_FILES.each do |path|
61
+ sh "rm -rf #{GEMS_PATH}#{path}"
62
+ end
63
+
64
+ # Remove unused file extensions to reduce package size
65
+ REMOVE_EXTENSIONS.each do |extension|
66
+ sh "find packaging/vendor/ruby -name '#{extension}' | xargs rm -f"
67
+ end
68
+ end
69
+
70
+ desc 'Clean up created releases'
71
+ task :clean do
72
+ sh "rm -f #{PACKAGE_NAME}*.tar.gz"
73
+ sh 'rm -rf packaging/vendor'
74
+ sh 'rm -rf packaging/*.tar.gz'
75
+ end
76
+ end
77
+
78
+ file "packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-linux-x86.tar.gz" do
79
+ download_runtime('linux-x86')
80
+ end
81
+
82
+ file "packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-linux-x86_64.tar.gz" do
83
+ download_runtime('linux-x86_64')
84
+ end
85
+
86
+ file "packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-osx.tar.gz" do
87
+ download_runtime('osx')
88
+ end
89
+
90
+ def create_package(target)
91
+ package_dir = "#{PACKAGE_NAME}-#{VERSION}-#{target}"
92
+ sh "rm -rf #{package_dir}"
93
+ sh "mkdir -p #{package_dir}/lib/ruby"
94
+ sh "tar -xzf packaging/traveling-ruby-#{TRAVELING_RUBY_VERSION}-#{target}.tar.gz -C #{package_dir}/lib/ruby"
95
+
96
+ sh "cp packaging/kpm.sh #{package_dir}/kpm"
97
+ sh "chmod +x packaging/kpm.sh #{package_dir}/kpm"
98
+
99
+ sh "cp -pR packaging/vendor #{package_dir}/lib/"
100
+
101
+ sh "cp packaging/Gemfile* #{package_dir}/lib/vendor/"
102
+ sh "mkdir #{package_dir}/lib/vendor/.bundle"
103
+ sh "cp packaging/bundler-config #{package_dir}/lib/vendor/.bundle/config"
104
+
105
+ if !ENV['DIR_ONLY']
106
+ sh "tar -czf #{package_dir}.tar.gz #{package_dir}"
107
+ sh "rm -rf #{package_dir}"
108
+ end
109
+ end
110
+
111
+ def download_runtime(target)
112
+ sh 'mkdir -p packaging && cd packaging && curl -L -O --fail ' +
113
+ "https://d6r77u77i8pq3.cloudfront.net/releases/traveling-ruby-#{TRAVELING_RUBY_VERSION}-#{target}.tar.gz"
114
+ end
metadata CHANGED
@@ -1,86 +1,87 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-17 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: highline
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
19
  version: 1.6.21
19
- name: highline
20
- prerelease: false
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.6.21
27
27
  - !ruby/object:Gem::Dependency
28
+ name: nexus_cli
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - "~>"
31
32
  - !ruby/object:Gem::Version
32
33
  version: 4.1.0
33
- name: nexus_cli
34
- prerelease: false
35
34
  type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.1.0
41
41
  - !ruby/object:Gem::Dependency
42
+ name: thor
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
47
  version: 0.19.1
47
- name: thor
48
- prerelease: false
49
48
  type: :runtime
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.19.1
55
55
  - !ruby/object:Gem::Dependency
56
+ name: rubyzip
56
57
  requirement: !ruby/object:Gem::Requirement
57
58
  requirements:
58
59
  - - "~>"
59
60
  - !ruby/object:Gem::Version
60
61
  version: 1.2.0
61
- name: rubyzip
62
- prerelease: false
63
62
  type: :runtime
63
+ prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.0
69
69
  - !ruby/object:Gem::Dependency
70
+ name: killbill-client
70
71
  requirement: !ruby/object:Gem::Requirement
71
72
  requirements:
72
73
  - - "~>"
73
74
  - !ruby/object:Gem::Version
74
75
  version: '1.0'
75
- name: killbill-client
76
- prerelease: false
77
76
  type: :runtime
77
+ prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
+ name: rake
84
85
  requirement: !ruby/object:Gem::Requirement
85
86
  requirements:
86
87
  - - ">="
@@ -89,9 +90,8 @@ dependencies:
89
90
  - - "<"
90
91
  - !ruby/object:Gem::Version
91
92
  version: 11.0.0
92
- name: rake
93
- prerelease: false
94
93
  type: :development
94
+ prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
@@ -101,14 +101,14 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: 11.0.0
103
103
  - !ruby/object:Gem::Dependency
104
+ name: rspec
104
105
  requirement: !ruby/object:Gem::Requirement
105
106
  requirements:
106
107
  - - "~>"
107
108
  - !ruby/object:Gem::Version
108
109
  version: 2.12.0
109
- name: rspec
110
- prerelease: false
111
110
  type: :development
111
+ prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
@@ -154,6 +154,11 @@ files:
154
154
  - lib/kpm/uninstaller.rb
155
155
  - lib/kpm/utils.rb
156
156
  - lib/kpm/version.rb
157
+ - packaging/Gemfile
158
+ - packaging/bundler-config
159
+ - packaging/kpm.sh
160
+ - pom.xml
161
+ - release.sh
157
162
  - spec/kpm/remote/base_artifact_spec.rb
158
163
  - spec/kpm/remote/base_installer_spec.rb
159
164
  - spec/kpm/remote/installer_spec.rb
@@ -176,11 +181,12 @@ files:
176
181
  - spec/kpm/unit_mysql/account_spec.yml
177
182
  - spec/kpm/unit_mysql/account_test_ddl.sql
178
183
  - spec/spec_helper.rb
184
+ - tasks/package.rake
179
185
  homepage: http://kill-bill.org
180
186
  licenses:
181
187
  - Apache License (2.0)
182
188
  metadata: {}
183
- post_install_message:
189
+ post_install_message:
184
190
  rdoc_options:
185
191
  - "--exclude"
186
192
  - "."
@@ -197,9 +203,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
203
  - !ruby/object:Gem::Version
198
204
  version: '0'
199
205
  requirements: []
200
- rubyforge_project:
201
- rubygems_version: 2.4.8
202
- signing_key:
206
+ rubyforge_project:
207
+ rubygems_version: 2.6.12
208
+ signing_key:
203
209
  specification_version: 4
204
210
  summary: Kill Bill package manager.
205
211
  test_files: []