cartage 2.2 → 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 +4 -4
- data/History.md +99 -80
- data/README.rdoc +13 -7
- data/Rakefile +52 -38
- 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 +2 -2
- 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 +10 -9
- data/lib/cartage/plugins/build_tarball.rb +2 -2
- data/lib/cartage/plugins/manifest.rb +85 -85
- data/lib/cartage.rb +67 -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 +37 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
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/History.md
CHANGED
@@ -1,126 +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
|
+
|
1
20
|
### 2.1 / 2017-02-18
|
2
21
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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.
|
8
27
|
|
9
|
-
|
10
|
-
|
28
|
+
- The hidden command, `cartage info plugins`, will now correctly report
|
29
|
+
plug-in versions.
|
11
30
|
|
12
|
-
|
13
|
-
|
14
|
-
|
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.
|
15
34
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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.
|
20
39
|
|
21
40
|
### 2.0 / 2016-05-31
|
22
41
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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.
|
28
47
|
|
29
|
-
|
48
|
+
- Changed from CmdParse to GLI for providing CLI interface structure.
|
30
49
|
|
31
|
-
|
32
|
-
|
50
|
+
- Removed the -E/--environment flag and support for environment-tagged
|
51
|
+
configuration.
|
33
52
|
|
34
|
-
|
35
|
-
|
53
|
+
- Added compression configuration. Supported types are bzip2, gzip, and
|
54
|
+
none. The default remains bzip2.
|
36
55
|
|
37
|
-
|
38
|
-
|
39
|
-
|
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.
|
40
59
|
|
41
|
-
|
60
|
+
- Plug-ins have changed:
|
42
61
|
|
43
|
-
|
44
|
-
|
62
|
+
- Plug-in capabilities must be provided in the gem path
|
63
|
+
<tt>lib/cartage/plugins</tt>.
|
45
64
|
|
46
|
-
|
47
|
-
|
65
|
+
- Plug-ins declare their feature support to indicate the points that
|
66
|
+
they will be called during the packaging process.
|
48
67
|
|
49
|
-
|
50
|
-
|
68
|
+
- Plug-in commands must be provided in the gem path
|
69
|
+
<tt>lib/cartage/commands</tt>. These commands are always available.
|
51
70
|
|
52
|
-
|
53
|
-
|
54
|
-
|
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.
|
55
74
|
|
56
|
-
|
75
|
+
- Made more functions public for use by plug-ins.
|
57
76
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
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.
|
65
84
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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) %>
|
74
93
|
|
75
|
-
|
76
|
-
|
94
|
+
- Extracted bundler support as a new gem,
|
95
|
+
[cartage-bundler]{https://github.com/KineticCafe/cartage-bundler}.
|
77
96
|
|
78
|
-
|
79
|
-
|
97
|
+
- Extracted tarball building as a built-in plug-in,
|
98
|
+
Cartage::BuildTarball.
|
80
99
|
|
81
|
-
|
82
|
-
|
100
|
+
- Added Cartage::Minitest to provide methods to assist with testing Cartage
|
101
|
+
and plug-ins using Minitest.
|
83
102
|
|
84
103
|
### 1.2 / 2015-05-27
|
85
104
|
|
86
|
-
|
105
|
+
- 1 minor enhancement:
|
87
106
|
|
88
|
-
|
89
|
-
|
107
|
+
- Added the chosen timestamp as the second line of the release hashref
|
108
|
+
files.
|
90
109
|
|
91
|
-
|
110
|
+
- 2 minor bugfixes:
|
92
111
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
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.
|
97
116
|
|
98
117
|
### 1.1.1 / 2015-03-26
|
99
118
|
|
100
|
-
|
119
|
+
- 1 minor bugfix
|
101
120
|
|
102
|
-
|
121
|
+
- Fixed a Ruby syntax issue with Ruby 2.0.
|
103
122
|
|
104
123
|
### 1.1 / 2015-03-26
|
105
124
|
|
106
|
-
|
125
|
+
- 1 major enhancement
|
107
126
|
|
108
|
-
|
109
|
-
|
127
|
+
- Added a Cartage::StatusError with an exitstatus support.
|
128
|
+
Cartage::QuietError is now based on this.
|
110
129
|
|
111
|
-
|
130
|
+
- 1 minor bugfix
|
112
131
|
|
113
|
-
|
114
|
-
|
132
|
+
- Restored an accidentally removed method,
|
133
|
+
Cartage::#create_bundle_cache.
|
115
134
|
|
116
|
-
|
135
|
+
- 2 documentation improvements
|
117
136
|
|
118
|
-
|
137
|
+
- Identified postbuild script stages.
|
119
138
|
|
120
|
-
|
139
|
+
- Improved the Slack notifier example postbuild script.
|
121
140
|
|
122
141
|
### 1.0 / 2015-03-24
|
123
142
|
|
124
|
-
|
143
|
+
- 1 major enhancement
|
125
144
|
|
126
|
-
|
145
|
+
- Birthday!
|
data/README.rdoc
CHANGED
@@ -13,18 +13,24 @@ dependencies so that it can be deployed in environments with strict access
|
|
13
13
|
control rules and without requiring development tool presence on the target
|
14
14
|
server(s).
|
15
15
|
|
16
|
-
This
|
17
|
-
|
18
|
-
|
19
|
-
|
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.
|
20
26
|
|
21
27
|
=== Overview
|
22
28
|
|
23
29
|
Cartage has learned its tricks from Heroku’s build process, Capistrano
|
24
30
|
deployments, and Hoe. From Hoe, it learned to keep a manifest to control what
|
25
|
-
is packaged (as well as its plug-in system). From Heroku, it learned to keep
|
26
|
-
simple ignore file. From Capistrano, it learned to mark the Git hashref as
|
27
|
-
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.
|
28
34
|
|
29
35
|
Cartage follows a relatively simple set of steps when creating a package:
|
30
36
|
|
data/Rakefile
CHANGED
@@ -1,64 +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(
|
17
|
-
developer(
|
15
|
+
spec = Hoe.spec "cartage" do
|
16
|
+
developer("Austin Ziegler", "aziegler@kineticcafe.com")
|
17
|
+
developer("Kinetic Cafe", "dev@kineticcafe.com")
|
18
18
|
|
19
|
-
self.history_file =
|
20
|
-
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
|
21
33
|
|
22
|
-
license
|
34
|
+
license "MIT"
|
23
35
|
|
24
|
-
|
36
|
+
spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
|
25
37
|
|
26
|
-
extra_deps << [
|
38
|
+
extra_deps << ["gli", "~> 2.13"]
|
27
39
|
|
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 << [
|
41
|
-
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"]
|
42
54
|
end
|
43
55
|
|
44
|
-
ENV[
|
56
|
+
ENV["RUBYOPT"] = "-W0"
|
45
57
|
|
46
|
-
module Hoe::Publish
|
47
|
-
|
58
|
+
module Hoe::Publish # :nodoc:
|
59
|
+
alias_method :__make_rdoc_cmd__cartage__, :make_rdoc_cmd
|
48
60
|
|
49
61
|
def make_rdoc_cmd(*extra_args) # :nodoc:
|
50
|
-
spec.extra_rdoc_files.delete_if { |f| f ==
|
62
|
+
spec.extra_rdoc_files.delete_if { |f| f == "Manifest.txt" }
|
51
63
|
__make_rdoc_cmd__cartage__(*extra_args)
|
52
64
|
end
|
53
65
|
end
|
54
66
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
60
73
|
|
61
|
-
|
62
|
-
end
|
74
|
+
CLOBBER << "coverage"
|
75
|
+
end
|
76
|
+
end
|
63
77
|
|
64
|
-
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
|