cartage 2.0 → 2.2.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 +5 -5
- data/Contributing.md +3 -3
- data/History.md +105 -66
- data/Manifest.txt +1 -0
- data/README.rdoc +15 -5
- data/Rakefile +52 -37
- data/lib/cartage/backport.rb +3 -3
- data/lib/cartage/cli.rb +76 -76
- data/lib/cartage/commands/echo.rb +6 -6
- data/lib/cartage/commands/info.rb +17 -17
- data/lib/cartage/commands/manifest.rb +46 -46
- data/lib/cartage/commands/metadata.rb +10 -0
- data/lib/cartage/commands/pack.rb +6 -6
- data/lib/cartage/config.rb +27 -25
- data/lib/cartage/core.rb +18 -18
- data/lib/cartage/gli_ext.rb +10 -10
- data/lib/cartage/minitest.rb +7 -7
- data/lib/cartage/plugin.rb +14 -10
- data/lib/cartage/plugins/build_tarball.rb +2 -2
- data/lib/cartage/plugins/manifest.rb +85 -85
- data/lib/cartage.rb +138 -67
- data/test/minitest_config.rb +8 -8
- data/test/test_cartage.rb +130 -130
- data/test/test_cartage_build_tarball.rb +22 -22
- data/test/test_cartage_config.rb +27 -27
- data/test/test_cartage_core.rb +36 -36
- data/test/test_cartage_manifest.rb +51 -53
- data/test/test_cartage_plugin.rb +21 -21
- metadata +52 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9d1667eee44d8b93640a3e2b55c0d78b99cb95bdbd07a1c258caf4202d18b9be
|
4
|
+
data.tar.gz: 310e2ea8b17d2a5fa189e2c9752d6e44fc2db4b69fcebad0f38397bbcba3a8ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9df4faa1382dc1b059c0172a03d7ff36fd3f87ee474af6ed49b655018eef2bc3848350ede864a348b295d7f6d3d9c4b4e47f25e5f6879db95e740b9a67cb0b4b
|
7
|
+
data.tar.gz: 5f915b43b48cae2ecf97ad63141580870ebb778c1c16602eafac57fda764a0c420ca043f175c49191882565c554b664eb981264851905432641a7796d21ccbf5
|
data/Contributing.md
CHANGED
@@ -51,15 +51,15 @@ Here's the most direct way to get your work merged into the project:
|
|
51
51
|
|
52
52
|
* Fork the project.
|
53
53
|
* Clone down your fork (`git clone
|
54
|
-
git://github.com
|
54
|
+
git://github.com/<username>/cartage.git`).
|
55
55
|
* Create a topic branch to contain your change (`git checkout -b
|
56
56
|
my_awesome_feature`).
|
57
57
|
* Hack away, add tests. Not necessarily in that order.
|
58
58
|
* Make sure everything still passes by running `rake`.
|
59
59
|
* If necessary, rebase your commits into logical chunks, without errors.
|
60
60
|
* Push the branch up (`git push origin my_awesome_feature`).
|
61
|
-
* Create a pull request against KineticCafe/cartage and describe
|
62
|
-
|
61
|
+
* Create a pull request against KineticCafe/cartage and describe your change
|
62
|
+
does and the why you think it should be merged.
|
63
63
|
|
64
64
|
### Contributors
|
65
65
|
|
data/History.md
CHANGED
@@ -1,106 +1,145 @@
|
|
1
|
+
### 2.2.1 / 2022-05-08
|
2
|
+
|
3
|
+
- This is the last release of cartage. It's been a fun ride, but Docker-based
|
4
|
+
images are our future at Kinetic Commerce. There is one feature that remains
|
5
|
+
useful, the release-metadata output. We have created a new, more extensible
|
6
|
+
format for which we will be creating a gem to manage this. One example of the
|
7
|
+
implementation can be found at:
|
8
|
+
|
9
|
+
https://github.com/KineticCafe/release-metadata-ts
|
10
|
+
|
11
|
+
We will also be replacing `cartage-rack` with a new gem supporting this new
|
12
|
+
format.
|
13
|
+
|
14
|
+
### 2.2 / 2020-03-18
|
15
|
+
|
16
|
+
- Added a `metadata` command.
|
17
|
+
|
18
|
+
- Indicated that development on `cartage` was winding down.
|
19
|
+
|
20
|
+
### 2.1 / 2017-02-18
|
21
|
+
|
22
|
+
- Cartage 2.1 now knows how to load plug-ins relative to the project root
|
23
|
+
path. If you have a plug-in that you aren't ready to release as a gem, just
|
24
|
+
put it in your project as `<ROOT_PATH>/lib/cartage/plugins/foo.rb`; Cartage
|
25
|
+
will find it automatically. This feature does not work with command
|
26
|
+
extensions.
|
27
|
+
|
28
|
+
- The hidden command, `cartage info plugins`, will now correctly report
|
29
|
+
plug-in versions.
|
30
|
+
|
31
|
+
- Cartage tries to restore files that were modified by a build system prior
|
32
|
+
to packaging. This would fail on files that were not part of the resulting
|
33
|
+
tarball (because they were in .cartignore). This has been fixed.
|
34
|
+
|
35
|
+
- A new utility function, Cartage#recursive_copy has been added to
|
36
|
+
recursively copy directories from disk into the work path. The interaction
|
37
|
+
of relative and absolute directories is subtle but documented on the method
|
38
|
+
itself.
|
39
|
+
|
1
40
|
### 2.0 / 2016-05-31
|
2
41
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
42
|
+
- Rewrite! Over the last year, a number of deficiencies have been found,
|
43
|
+
especially related to the extensibility and the execution of various
|
44
|
+
phases. Cartage 2.0 is a rewrite of major parts of the system and is
|
45
|
+
intentionally not backwards compatible with Cartage 1.0. Documentation for
|
46
|
+
upgrading is provided.
|
8
47
|
|
9
|
-
|
48
|
+
- Changed from CmdParse to GLI for providing CLI interface structure.
|
10
49
|
|
11
|
-
|
12
|
-
|
50
|
+
- Removed the -E/--environment flag and support for environment-tagged
|
51
|
+
configuration.
|
13
52
|
|
14
|
-
|
15
|
-
|
53
|
+
- Added compression configuration. Supported types are bzip2, gzip, and
|
54
|
+
none. The default remains bzip2.
|
16
55
|
|
17
|
-
|
18
|
-
|
19
|
-
|
56
|
+
- The release_hashref file is no longer created. It has been replaced
|
57
|
+
with release_metadata.json. This contains more information and requires
|
58
|
+
cartage-rack 2.0 to display.
|
20
59
|
|
21
|
-
|
60
|
+
- Plug-ins have changed:
|
22
61
|
|
23
|
-
|
24
|
-
|
62
|
+
- Plug-in capabilities must be provided in the gem path
|
63
|
+
<tt>lib/cartage/plugins</tt>.
|
25
64
|
|
26
|
-
|
27
|
-
|
65
|
+
- Plug-ins declare their feature support to indicate the points that
|
66
|
+
they will be called during the packaging process.
|
28
67
|
|
29
|
-
|
30
|
-
|
68
|
+
- Plug-in commands must be provided in the gem path
|
69
|
+
<tt>lib/cartage/commands</tt>. These commands are always available.
|
31
70
|
|
32
|
-
|
33
|
-
|
34
|
-
|
71
|
+
- Plug-ins are currently automatically enabled on discovery and may
|
72
|
+
be explicitly disabled in configuration. Future versions of Cartage
|
73
|
+
will support explicit plug-in selection in configuration.
|
35
74
|
|
36
|
-
|
75
|
+
- Made more functions public for use by plug-ins.
|
37
76
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
77
|
+
- Removed support for default configuration files outside of a project
|
78
|
+
directory. Only <tt>config/cartage.yml</tt>, <tt>.cartage.yml</tt>, and
|
79
|
+
<tt>cartage.yml</tt> will be read now.
|
80
|
+
<tt>$HOME/.config/cartage.yml</tt>, <tt>$HOME/.cartage.yml</tt>, and
|
81
|
+
<tt>/etc/cartage.yml</tt> are no longer read. The previous behaviour
|
82
|
+
can be obtained with ERB insertion into one of the project-specific
|
83
|
+
files, as shown below. This pattern is not recommended.
|
45
84
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
85
|
+
---
|
86
|
+
# cartage.yml
|
87
|
+
% candidates = []
|
88
|
+
% candidates << "#{ENV['HOME']}/.config/cartage.yml"
|
89
|
+
% candidates << "#{ENV['HOME']}/.cartage.yml"
|
90
|
+
% candidates << '/etc/cartage.yml'
|
91
|
+
% global = candidate.select { |c| File.exist?(c) }
|
92
|
+
<%= Cartage::Config.import(global) %>
|
54
93
|
|
55
|
-
|
56
|
-
|
94
|
+
- Extracted bundler support as a new gem,
|
95
|
+
[cartage-bundler]{https://github.com/KineticCafe/cartage-bundler}.
|
57
96
|
|
58
|
-
|
59
|
-
|
97
|
+
- Extracted tarball building as a built-in plug-in,
|
98
|
+
Cartage::BuildTarball.
|
60
99
|
|
61
|
-
|
62
|
-
|
100
|
+
- Added Cartage::Minitest to provide methods to assist with testing Cartage
|
101
|
+
and plug-ins using Minitest.
|
63
102
|
|
64
103
|
### 1.2 / 2015-05-27
|
65
104
|
|
66
|
-
|
105
|
+
- 1 minor enhancement:
|
67
106
|
|
68
|
-
|
69
|
-
|
107
|
+
- Added the chosen timestamp as the second line of the release hashref
|
108
|
+
files.
|
70
109
|
|
71
|
-
|
110
|
+
- 2 minor bugfixes:
|
72
111
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
112
|
+
- Fixed {#3}[https://github.com/KineticCafe/issues/3] so that spec and
|
113
|
+
feature directories are excluded by default. Provided by @jsutlovic.
|
114
|
+
- Fixed {#5}[https://github.com/KineticCafe/pulls/5] so that the manifest
|
115
|
+
- is deduplicated prior to write. Provided by @jsutlovic.
|
77
116
|
|
78
117
|
### 1.1.1 / 2015-03-26
|
79
118
|
|
80
|
-
|
119
|
+
- 1 minor bugfix
|
81
120
|
|
82
|
-
|
121
|
+
- Fixed a Ruby syntax issue with Ruby 2.0.
|
83
122
|
|
84
123
|
### 1.1 / 2015-03-26
|
85
124
|
|
86
|
-
|
125
|
+
- 1 major enhancement
|
87
126
|
|
88
|
-
|
89
|
-
|
127
|
+
- Added a Cartage::StatusError with an exitstatus support.
|
128
|
+
Cartage::QuietError is now based on this.
|
90
129
|
|
91
|
-
|
130
|
+
- 1 minor bugfix
|
92
131
|
|
93
|
-
|
94
|
-
|
132
|
+
- Restored an accidentally removed method,
|
133
|
+
Cartage::#create_bundle_cache.
|
95
134
|
|
96
|
-
|
135
|
+
- 2 documentation improvements
|
97
136
|
|
98
|
-
|
137
|
+
- Identified postbuild script stages.
|
99
138
|
|
100
|
-
|
139
|
+
- Improved the Slack notifier example postbuild script.
|
101
140
|
|
102
141
|
### 1.0 / 2015-03-24
|
103
142
|
|
104
|
-
|
143
|
+
- 1 major enhancement
|
105
144
|
|
106
|
-
|
145
|
+
- Birthday!
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
code :: https://github.com/KineticCafe/cartage/
|
4
4
|
issues :: https://github.com/KineticCafe/cartage/issues
|
5
5
|
docs :: http://www.rubydoc.info/github/KineticCafe/cartage/master
|
6
|
-
continuous integration :: {<img src="https://travis-ci.org/KineticCafe/cartage.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/KineticCafe/cartage]
|
7
6
|
|
8
7
|
== Description
|
9
8
|
|
@@ -14,13 +13,24 @@ dependencies so that it can be deployed in environments with strict access
|
|
14
13
|
control rules and without requiring development tool presence on the target
|
15
14
|
server(s).
|
16
15
|
|
16
|
+
This is the last release of cartage. It's been a fun ride, but Docker-based
|
17
|
+
images are our future at Kinetic Commerce. There is one feature that remains
|
18
|
+
useful, the release-metadata output. We have created a new, more extensible
|
19
|
+
format for which we will be creating a gem to manage this. One example of the
|
20
|
+
implementation can be found at:
|
21
|
+
|
22
|
+
https://github.com/KineticCafe/release-metadata-ts
|
23
|
+
|
24
|
+
We will also be replacing `cartage-rack` with a new gem supporting this new
|
25
|
+
format.
|
26
|
+
|
17
27
|
=== Overview
|
18
28
|
|
19
29
|
Cartage has learned its tricks from Heroku’s build process, Capistrano
|
20
30
|
deployments, and Hoe. From Hoe, it learned to keep a manifest to control what
|
21
|
-
is packaged (as well as its plug-in system). From Heroku, it learned to keep
|
22
|
-
simple ignore file. From Capistrano, it learned to mark the Git hashref as
|
23
|
-
file in its built package, and to timestamp the packages.
|
31
|
+
is packaged (as well as its plug-in system). From Heroku, it learned to keep
|
32
|
+
a simple ignore file. From Capistrano, it learned to mark the Git hashref as
|
33
|
+
a file in its built package, and to timestamp the packages.
|
24
34
|
|
25
35
|
Cartage follows a relatively simple set of steps when creating a package:
|
26
36
|
|
@@ -117,7 +127,7 @@ Cartage offers advantages over Pkgr:
|
|
117
127
|
* Cartage offers plug-in based extensions. Support for remote builds
|
118
128
|
(+cartage-remote+), uploads to S3 (+cartage-s3+), and bundler
|
119
129
|
(+cartage-bundler+) already exist and new plug-ins are not hard to add
|
120
|
-
(+cartage-npm+ is in development).
|
130
|
+
(+cartage-npm+ is in development).
|
121
131
|
|
122
132
|
* Cartage offers more accessible information about *what* was built into the
|
123
133
|
release package. There is a Rack application (+cartage-rack+) that will
|
data/Rakefile
CHANGED
@@ -1,63 +1,78 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
require "rake/clean"
|
6
6
|
|
7
7
|
Hoe.plugin :doofus
|
8
|
-
Hoe.plugin :email unless ENV[
|
8
|
+
Hoe.plugin :email unless ENV["CI"] || ENV["TRAVIS"]
|
9
9
|
Hoe.plugin :gemspec2
|
10
10
|
Hoe.plugin :git
|
11
11
|
Hoe.plugin :minitest
|
12
12
|
Hoe.plugin :rubygems
|
13
13
|
Hoe.plugin :travis
|
14
14
|
|
15
|
-
spec = Hoe.spec
|
16
|
-
developer(
|
15
|
+
spec = Hoe.spec "cartage" do
|
16
|
+
developer("Austin Ziegler", "aziegler@kineticcafe.com")
|
17
|
+
developer("Kinetic Cafe", "dev@kineticcafe.com")
|
17
18
|
|
18
|
-
self.history_file =
|
19
|
-
self.readme_file =
|
19
|
+
self.history_file = "History.md"
|
20
|
+
self.readme_file = "README.rdoc"
|
21
|
+
self.post_install_message = <<~EOS
|
22
|
+
This is the last release of cartage. It's been a fun ride, but Docker-
|
23
|
+
based images are our future at Kinetic Commerce. There is one feature
|
24
|
+
that remains useful, the release-metadata output. We have created a
|
25
|
+
new, more extensible format for which we will be creating a gem to
|
26
|
+
manage this. One example of the implementation can be found at:
|
27
|
+
|
28
|
+
https://github.com/KineticCafe/release-metadata-ts
|
29
|
+
|
30
|
+
We will also be replacing `cartage-rack` with a new gem supporting
|
31
|
+
this new format.
|
32
|
+
EOS
|
20
33
|
|
21
|
-
license
|
34
|
+
license "MIT"
|
22
35
|
|
23
|
-
|
36
|
+
spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
|
24
37
|
|
25
|
-
extra_deps << [
|
38
|
+
extra_deps << ["gli", "~> 2.13"]
|
26
39
|
|
27
|
-
extra_dev_deps << [
|
28
|
-
extra_dev_deps << [
|
29
|
-
extra_dev_deps << [
|
30
|
-
extra_dev_deps << [
|
31
|
-
extra_dev_deps << [
|
32
|
-
extra_dev_deps << [
|
33
|
-
extra_dev_deps << [
|
34
|
-
extra_dev_deps << [
|
35
|
-
extra_dev_deps << [
|
36
|
-
extra_dev_deps << [
|
37
|
-
extra_dev_deps << [
|
38
|
-
extra_dev_deps << [
|
39
|
-
extra_dev_deps << [
|
40
|
-
extra_dev_deps << [
|
40
|
+
extra_dev_deps << ["rake", ">= 10.0"]
|
41
|
+
extra_dev_deps << ["rdoc", "~> 6.4"]
|
42
|
+
extra_dev_deps << ["hoe-doofus", "~> 1.0"]
|
43
|
+
extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
|
44
|
+
extra_dev_deps << ["hoe-git", "~> 1.5"]
|
45
|
+
extra_dev_deps << ["hoe-travis", "~> 1.2"]
|
46
|
+
extra_dev_deps << ["minitest", "~> 5.4"]
|
47
|
+
extra_dev_deps << ["minitest-autotest", "~> 1.0"]
|
48
|
+
extra_dev_deps << ["minitest-bisect", "~> 1.2"]
|
49
|
+
extra_dev_deps << ["minitest-bonus-assertions", "~> 3.0"]
|
50
|
+
extra_dev_deps << ["minitest-focus", "~> 1.1"]
|
51
|
+
extra_dev_deps << ["minitest-moar", "~> 0.0"]
|
52
|
+
extra_dev_deps << ["minitest-pretty_diff", "~> 0.1"]
|
53
|
+
extra_dev_deps << ["simplecov", "~> 0.7"]
|
41
54
|
end
|
42
55
|
|
43
|
-
ENV[
|
56
|
+
ENV["RUBYOPT"] = "-W0"
|
44
57
|
|
45
|
-
module Hoe::Publish
|
46
|
-
|
58
|
+
module Hoe::Publish # :nodoc:
|
59
|
+
alias_method :__make_rdoc_cmd__cartage__, :make_rdoc_cmd
|
47
60
|
|
48
61
|
def make_rdoc_cmd(*extra_args) # :nodoc:
|
49
|
-
spec.extra_rdoc_files.delete_if { |f| f ==
|
62
|
+
spec.extra_rdoc_files.delete_if { |f| f == "Manifest.txt" }
|
50
63
|
__make_rdoc_cmd__cartage__(*extra_args)
|
51
64
|
end
|
52
65
|
end
|
53
66
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
67
|
+
if File.exist?(".simplecov-prelude.rb")
|
68
|
+
namespace :test do
|
69
|
+
task :coverage do
|
70
|
+
spec.test_prelude = 'load ".simplecov-prelude.rb"'
|
71
|
+
Rake::Task["test"].execute
|
72
|
+
end
|
59
73
|
|
60
|
-
|
61
|
-
end
|
74
|
+
CLOBBER << "coverage"
|
75
|
+
end
|
76
|
+
end
|
62
77
|
|
63
|
-
CLOBBER <<
|
78
|
+
CLOBBER << "tmp"
|
data/lib/cartage/backport.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# :nocov:
|
4
|
-
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(
|
4
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.3")
|
5
5
|
# An implementation of #dig for Ruby pre-2.3. Based originally on
|
6
6
|
# {Invoca/ruby_dig}[https://github.com/Invoca/ruby_dig] with some inspiration
|
7
7
|
# from {jrochkind/dig_rb}[https://github.com/jrochkind/dig_rb].
|
8
|
-
module Cartage::Dig
|
8
|
+
module Cartage::Dig # :nodoc:
|
9
9
|
def dig(key, *rest)
|
10
10
|
value = self[key]
|
11
11
|
|
@@ -55,7 +55,7 @@ end
|
|
55
55
|
|
56
56
|
unless Pathname.public_method_defined?(:write)
|
57
57
|
##
|
58
|
-
module Cartage::PathnameWrite
|
58
|
+
module Cartage::PathnameWrite # :nodoc:
|
59
59
|
def write(*args)
|
60
60
|
IO.write(to_s, *args)
|
61
61
|
end
|