cutlass 0.1.6 → 0.1.7

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: cdb173928f27587c6c7773c14449d42c074eab3903234d8d4721a67b0a99ffdf
4
- data.tar.gz: abe99ef36a53e6225facc87cdcf941abfd4a10eae84ca350c9f8f6f69e2b6483
3
+ metadata.gz: a26c39e3aed992a3bce384c77603c159473bdb1a0f39bd86e996806ce26c6c3e
4
+ data.tar.gz: d829ea4b01eef4b6ac709510cafcac39768b2470852a4db12f8b04fa26231a34
5
5
  SHA512:
6
- metadata.gz: 1c87fc56443a756fdbd26d4130b594d3e6f6133e85d1b5713bc37a01f6d26c3f6c2d198805eb92e6afa1f06c0f9a3f62a709d1a6f05a8162b33730e331b28e58
7
- data.tar.gz: 362930d0ae55e20b08628a979e83965ea5d91fca9a0406c026c581e342b720ef0447a2cae2f46af4ebbed8e6d608406856474d613600ad57268fc53be10c0170
6
+ metadata.gz: 39ceffa9e16f1b0c76e3894bdca69d6bd6a83a19ec90d4f34a593e7361935672800befb0761339571a2cb3dcf4434d8e21f5e96550160038adf9e4d4dc2789a1
7
+ data.tar.gz: f59429e16a53e8085dbf57fe86ef132e365df58bb014f13d2588814c0617235c9f3f6de389a302243f2cdfa6f6d28ea0f500e0f72e094837666825451fdfff37
data/CHANGELOG.md CHANGED
@@ -1,8 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ - Lock LocalBuildpack when generating images to prevent process race conditions https://github.com/heroku/cutlass/pull/9
4
+
3
5
  ## 0.1.6
4
6
 
5
- - Remove premature error checking from Cutlass.default_buildpack_paths
7
+ - Remove premature error checking from Cutlass.default_buildpack_paths https://github.com/heroku/cutlass/pull/8
6
8
 
7
9
  ## 0.1.5
8
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cutlass (0.1.6)
4
+ cutlass (0.1.7)
5
5
  docker-api (>= 2.0)
6
6
 
7
7
  GEM
@@ -29,6 +29,16 @@ module Cutlass
29
29
  @built = false
30
30
  @directory = Pathname(directory)
31
31
  @image_name = "cutlass_local_buildpack_#{SecureRandom.hex(10)}"
32
+
33
+ @mutex_file = Tempfile.new
34
+ end
35
+
36
+ def file_lock
37
+ file = File.open(@mutex_file.path, File::CREAT)
38
+ file.flock(File::LOCK_EX)
39
+ yield
40
+ ensure
41
+ file.close
32
42
  end
33
43
 
34
44
  def exist?
@@ -48,13 +58,14 @@ module Cutlass
48
58
  end
49
59
 
50
60
  def call
51
- return if built?
52
- raise "must be directory: #{@directory}" unless @directory.directory?
61
+ file_lock do
62
+ return if built?
63
+ raise "must be directory: #{@directory}" unless @directory.directory?
64
+ @built = true
53
65
 
54
- @built = true
55
-
56
- call_build_sh
57
- call_pack_buildpack_package
66
+ call_build_sh
67
+ call_pack_buildpack_package
68
+ end
58
69
 
59
70
  self
60
71
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cutlass
4
4
  # Version
5
- VERSION = "0.1.6"
5
+ VERSION = "0.1.7"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cutlass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - schneems
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-20 00:00:00.000000000 Z
11
+ date: 2021-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api