cartage 2.0 → 2.2.1

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
- SHA1:
3
- metadata.gz: 2eb844544a84e06ad6bccddcc0a728f0fbc60c4b
4
- data.tar.gz: ec610a1c7412e3be6f0bad168ba11bf7892f6d78
2
+ SHA256:
3
+ metadata.gz: 9d1667eee44d8b93640a3e2b55c0d78b99cb95bdbd07a1c258caf4202d18b9be
4
+ data.tar.gz: 310e2ea8b17d2a5fa189e2c9752d6e44fc2db4b69fcebad0f38397bbcba3a8ab
5
5
  SHA512:
6
- metadata.gz: 4d8b293126b129ed714459adce60cb5c8d6f856f8e3b37c26f2ccb1fc011a0a161a2eef901407a100929a882fb211290d42c4e3667d20380a15c83f726af5716
7
- data.tar.gz: a6ae8c8df8b6cc3612f60d3b59c0f367b033241c70a4185499f855d8fa2835c83b9b8aa330f04913f60ee797991ba58a591529fd2677c1095cc6da99e0ac9c86
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/KineticCafe/cartage.git`).
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
- what your change does and the why you think it should be merged.
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
- * Rewrite! Over the last year, a number of deficiencies have been found,
4
- especially related to the extensibility and the execution of various
5
- phases. Cartage 2.0 is a rewrite of major parts of the system and is
6
- intentionally not backwards compatible with Cartage 1.0. Documentation for
7
- upgrading is provided.
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
- * Changed from CmdParse to GLI for providing CLI interface structure.
48
+ - Changed from CmdParse to GLI for providing CLI interface structure.
10
49
 
11
- * Removed the -E/--environment flag and support for environment-tagged
12
- configuration.
50
+ - Removed the -E/--environment flag and support for environment-tagged
51
+ configuration.
13
52
 
14
- * Added compression configuration. Supported types are bzip2, gzip, and
15
- none. The default remains bzip2.
53
+ - Added compression configuration. Supported types are bzip2, gzip, and
54
+ none. The default remains bzip2.
16
55
 
17
- * The release_hashref file is no longer created. It has been replaced
18
- with release_metadata.json. This contains more information and requires
19
- cartage-rack 2.0 to display.
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
- * Plug-ins have changed:
60
+ - Plug-ins have changed:
22
61
 
23
- * Plug-in capabilities must be provided in the gem path
24
- <tt>lib/cartage/plugins</tt>.
62
+ - Plug-in capabilities must be provided in the gem path
63
+ <tt>lib/cartage/plugins</tt>.
25
64
 
26
- * Plug-ins declare their feature support to indicate the points that
27
- they will be called during the packaging process.
65
+ - Plug-ins declare their feature support to indicate the points that
66
+ they will be called during the packaging process.
28
67
 
29
- * Plug-in commands must be provided in the gem path
30
- <tt>lib/cartage/commands</tt>. These commands are always available.
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
- * Plug-ins are currently automatically enabled on discovery and may
33
- be explicitly disabled in configuration. Future versions of Cartage
34
- will support explicit plug-in selection in configuration.
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
- * Made more functions public for use by plug-ins.
75
+ - Made more functions public for use by plug-ins.
37
76
 
38
- * Removed support for default configuration files outside of a project
39
- directory. Only <tt>config/cartage.yml</tt>, <tt>.cartage.yml</tt>, and
40
- <tt>cartage.yml</tt> will be read now.
41
- <tt>$HOME/.config/cartage.yml</tt>, <tt>$HOME/.cartage.yml</tt>, and
42
- <tt>/etc/cartage.yml</tt> are no longer read. The previous behaviour
43
- can be obtained with ERB insertion into one of the project-specific
44
- files, as shown below. This pattern is not recommended.
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
- # cartage.yml
48
- % candidates = []
49
- % candidates << "#{ENV['HOME']}/.config/cartage.yml"
50
- % candidates << "#{ENV['HOME']}/.cartage.yml"
51
- % candidates << '/etc/cartage.yml'
52
- % global = candidate.select { |c| File.exist?(c) }
53
- <%= Cartage::Config.import(global) %>
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
- * Extracted bundler support as a new gem,
56
- [cartage-bundler]{https://github.com/KineticCafe/cartage-bundler}.
94
+ - Extracted bundler support as a new gem,
95
+ [cartage-bundler]{https://github.com/KineticCafe/cartage-bundler}.
57
96
 
58
- * Extracted tarball building as a built-in plug-in,
59
- Cartage::BuildTarball.
97
+ - Extracted tarball building as a built-in plug-in,
98
+ Cartage::BuildTarball.
60
99
 
61
- * Added Cartage::Minitest to provide methods to assist with testing Cartage
62
- and plug-ins using Minitest.
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
- * 1 minor enhancement:
105
+ - 1 minor enhancement:
67
106
 
68
- * Added the chosen timestamp as the second line of the release hashref
69
- files.
107
+ - Added the chosen timestamp as the second line of the release hashref
108
+ files.
70
109
 
71
- * 2 minor bugfixes:
110
+ - 2 minor bugfixes:
72
111
 
73
- * Fixed {#3}[https://github.com/KineticCafe/issues/3] so that spec and
74
- feature directories are excluded by default. Provided by @jsutlovic.
75
- * Fixed {#5}[https://github.com/KineticCafe/pulls/5] so that the manifest
76
- * is deduplicated prior to write. Provided by @jsutlovic.
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
- * 1 minor bugfix
119
+ - 1 minor bugfix
81
120
 
82
- * Fixed a Ruby syntax issue with Ruby 2.0.
121
+ - Fixed a Ruby syntax issue with Ruby 2.0.
83
122
 
84
123
  ### 1.1 / 2015-03-26
85
124
 
86
- * 1 major enhancement
125
+ - 1 major enhancement
87
126
 
88
- * Added a Cartage::StatusError with an exitstatus support.
89
- Cartage::QuietError is now based on this.
127
+ - Added a Cartage::StatusError with an exitstatus support.
128
+ Cartage::QuietError is now based on this.
90
129
 
91
- * 1 minor bugfix
130
+ - 1 minor bugfix
92
131
 
93
- * Restored an accidentally removed method,
94
- Cartage::#create_bundle_cache.
132
+ - Restored an accidentally removed method,
133
+ Cartage::#create_bundle_cache.
95
134
 
96
- * 2 documentation improvements
135
+ - 2 documentation improvements
97
136
 
98
- * Identified postbuild script stages.
137
+ - Identified postbuild script stages.
99
138
 
100
- * Improved the Slack notifier example postbuild script.
139
+ - Improved the Slack notifier example postbuild script.
101
140
 
102
141
  ### 1.0 / 2015-03-24
103
142
 
104
- * 1 major enhancement
143
+ - 1 major enhancement
105
144
 
106
- * Birthday!
145
+ - Birthday!
data/Manifest.txt CHANGED
@@ -15,6 +15,7 @@ lib/cartage/cli.rb
15
15
  lib/cartage/commands/echo.rb
16
16
  lib/cartage/commands/info.rb
17
17
  lib/cartage/commands/manifest.rb
18
+ lib/cartage/commands/metadata.rb
18
19
  lib/cartage/commands/pack.rb
19
20
  lib/cartage/config.rb
20
21
  lib/cartage/core.rb
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 a
22
- simple ignore file. From Capistrano, it learned to mark the Git hashref as a
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 'rubygems'
4
- require 'hoe'
5
- require 'rake/clean'
3
+ require "rubygems"
4
+ require "hoe"
5
+ require "rake/clean"
6
6
 
7
7
  Hoe.plugin :doofus
8
- Hoe.plugin :email unless ENV['CI'] || ENV['TRAVIS']
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 'cartage' do
16
- developer('Austin Ziegler', 'aziegler@kineticcafe.com')
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 = 'History.md'
19
- self.readme_file = 'README.rdoc'
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 'MIT'
34
+ license "MIT"
22
35
 
23
- ruby20!
36
+ spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
24
37
 
25
- extra_deps << ['gli', '~> 2.13']
38
+ extra_deps << ["gli", "~> 2.13"]
26
39
 
27
- extra_dev_deps << ['rake', '>= 10.0']
28
- extra_dev_deps << ['rdoc', '~> 4.2']
29
- extra_dev_deps << ['hoe-doofus', '~> 1.0']
30
- extra_dev_deps << ['hoe-gemspec2', '~> 1.1']
31
- extra_dev_deps << ['hoe-git', '~> 1.5']
32
- extra_dev_deps << ['hoe-travis', '~> 1.2']
33
- extra_dev_deps << ['minitest', '~> 5.4']
34
- extra_dev_deps << ['minitest-autotest', '~> 1.0']
35
- extra_dev_deps << ['minitest-bisect', '~> 1.2']
36
- extra_dev_deps << ['minitest-bonus-assertions', '~> 2.0']
37
- extra_dev_deps << ['minitest-focus', '~> 1.1']
38
- extra_dev_deps << ['minitest-moar', '~> 0.0']
39
- extra_dev_deps << ['minitest-pretty_diff', '~> 0.1']
40
- extra_dev_deps << ['simplecov', '~> 0.7']
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['RUBYOPT'] = '-W0'
56
+ ENV["RUBYOPT"] = "-W0"
44
57
 
45
- module Hoe::Publish #:nodoc:
46
- alias __make_rdoc_cmd__cartage__ make_rdoc_cmd
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 == 'Manifest.txt' }
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
- namespace :test do
55
- task :coverage do
56
- spec.test_prelude = 'load ".simplecov-prelude.rb"'
57
- Rake::Task['test'].execute
58
- end
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
- CLOBBER << 'coverage'
61
- end if File.exist?('.simplecov-prelude.rb')
74
+ CLOBBER << "coverage"
75
+ end
76
+ end
62
77
 
63
- CLOBBER << 'tmp'
78
+ CLOBBER << "tmp"
@@ -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('2.3')
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 #:nodoc:
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 #:nodoc:
58
+ module Cartage::PathnameWrite # :nodoc:
59
59
  def write(*args)
60
60
  IO.write(to_s, *args)
61
61
  end