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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37d5a2eca394ec89a59906c1c5146b73596912198f8eea6e8cc9f97604512907
4
- data.tar.gz: 46f89fb2766576f84958aa163de11d9fe661829641a9b2c2f814b1aa9b74271d
3
+ metadata.gz: 961e907148a5b772e1b645f2d7e85d6740cd65f7cb30d6e349f06c4fb4b02d93
4
+ data.tar.gz: f9d03dbdcbd11888f27ebbf8ce31f476a6bf6d0255ad8f6104aa582cf7d7a9f1
5
5
  SHA512:
6
- metadata.gz: 634836ec72d9c6e0dd3acbd04c4b9dbcbb678ebfa9245ed9f5b1118096293e574b6e603e748575b02c85fc4d7a7ad81c805f5b6566d66d3bbdc144725cca8e04
7
- data.tar.gz: 31f373061f0a75ef9efa2eaa2d332f7aa98b856ab7408070bfcb37302f7e38d459b1b96a13566d44ef0ca2c9d3c7b390de77cf6f0453b6b09e90502e0e579e0f
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cutlass (0.1.1)
4
+ cutlass (0.1.2)
5
5
  docker-api (>= 2.0)
6
6
 
7
7
  GEM
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
- # Cutlass.default_buildpack_paths
24
- attr_accessor :default_builder, :default_buildpack_paths
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cutlass
4
4
  # Version
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cutlass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - schneems