cutlass 0.1.1 → 0.1.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/cutlass.rb +17 -2
- data/lib/cutlass/app.rb +1 -1
- data/lib/cutlass/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 961e907148a5b772e1b645f2d7e85d6740cd65f7cb30d6e349f06c4fb4b02d93
|
4
|
+
data.tar.gz: f9d03dbdcbd11888f27ebbf8ce31f476a6bf6d0255ad8f6104aa582cf7d7a9f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 296d6173de09abeb96b1db5c2a6aa7bf76b6e8f0b989ca56209fca31fd7316b1a6286f4f4fa7b4cd803c91d588fa239402bc1b2590212322849eaf6390d7167f
|
7
|
+
data.tar.gz: a9b811887444f5ac573df9b456119d834fff5ad86b36f3f6809e0ef4590f788ed43bfe6095371563fc548058c9d030e5ccfb92e697841123eeb6e1d9382c08ed
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## 0.1.2
|
4
|
+
|
5
|
+
- App.new accepts a buildpack array with the `:default` symbol which acts as a shortcut for `Cutlass.default_buildpack_paths` https://github.com/heroku/cutlass/pull/4
|
6
|
+
- `Cutlass.default_buildpack_paths=` raises an error if you pass in a path that does not exist. https://github.com/heroku/cutlass/pull/4
|
7
|
+
|
3
8
|
## 0.1.1
|
4
9
|
|
5
10
|
- Fix App#pack_build with no block https://github.com/heroku/cutlass/pull/3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -135,7 +135,7 @@ In additon to the standard `package.toml` interface, if this directory has a `bu
|
|
135
135
|
|
136
136
|
- @param repo_name [String] the path to a directory on disk, or the name of a directory inside of the `config.default_repos_dir`.
|
137
137
|
- @param builder [String] the name of a CNB "builder" used to build the app against. Defaults to `config.default_builder`.
|
138
|
-
- @param buildpacks [Array<String>] the array of buildpacks to build the app against. Defaults to `config.default_buildpack_paths`.
|
138
|
+
- @param buildpacks [Array<String>] the array of buildpacks to build the app against. Defaults to `config.default_buildpack_paths`. If you pass in a symbol of `:default` it will substitute `Cutlass.default_buildpack_paths`. That means passing in `["heroku/nodejs", :default]` is a shortcut for `["heroku/nodejs, Cutlass.default_buildpack_paths].flatten`.
|
139
139
|
- @param config [Hash{Symbol => String}, Hash{String => String}] env vars to set against the app before it is built.
|
140
140
|
- @param exception_on_failure: [Boolean] when truthy failures on `app.pack_build` will result in an exception. Default is true.
|
141
141
|
|
data/lib/cutlass.rb
CHANGED
@@ -20,8 +20,23 @@ module Cutlass
|
|
20
20
|
|
21
21
|
class << self
|
22
22
|
# Cutlass.default_builder
|
23
|
-
|
24
|
-
|
23
|
+
attr_accessor :default_builder
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.default_buildpack_paths=(paths)
|
27
|
+
paths = Array(paths).map { |path| Pathname(path) }
|
28
|
+
|
29
|
+
paths.each do |path|
|
30
|
+
raise "Path must exist on disk #{path}" unless path.exist?
|
31
|
+
end
|
32
|
+
|
33
|
+
@default_buildpack_paths = paths
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.default_buildpack_paths
|
37
|
+
raise "Must set Cutlass.default_buildpack_paths to a non-empty value" if @default_buildpack_paths.empty? || @default_buildpack_paths.nil?
|
38
|
+
|
39
|
+
@default_buildpack_paths
|
25
40
|
end
|
26
41
|
|
27
42
|
@default_buildpack_paths = []
|
data/lib/cutlass/app.rb
CHANGED
@@ -34,7 +34,7 @@ module Cutlass
|
|
34
34
|
@warn_io = warn_io
|
35
35
|
@builder = builder
|
36
36
|
@image_name = image_name
|
37
|
-
@buildpacks = buildpacks
|
37
|
+
@buildpacks = Array(buildpacks).map { |buildpack| buildpack == :default ? Cutlass.default_buildpack_paths : buildpack }.flatten
|
38
38
|
@source_path_name = source_path_name
|
39
39
|
@exception_on_failure = exception_on_failure
|
40
40
|
end
|
data/lib/cutlass/version.rb
CHANGED