heroku_hatchet 4.0.4 → 4.0.5
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 +4 -0
- data/lib/hatchet/app.rb +10 -1
- data/lib/hatchet/version.rb +1 -1
- data/test/different-folder-for-checked-in-repos/default_ruby/Gemfile +1 -0
- data/test/hatchet/local_repo_test.rb +14 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f291b6db177c6d7a5077a8737ea4d059bf4d45fcb488f1d0cdd191afc86b9112
|
4
|
+
data.tar.gz: dd7437aa06e8b99e5a2ebeb1ee4fdec8fe1469c3fa8500e01376494df62b236c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb6bcc97860fe4f3d6d8ae37ade5ad6d2f8e66c2338730ebf6c1643ee848787aedf4e09e99280ef56b1c8c7c337c0e94ebf6bb6ca439ec6a16ce8645c58b500e
|
7
|
+
data.tar.gz: ff1ddf35e6c2331d7db2430637967f36272333af3d18d8ea0c3a83a16995cf5389fe27635fef69630c9a30f96c5967afa7cd480478edfdf60c33bb61fee2dbd5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## HEAD
|
2
2
|
|
3
|
+
## 4.0.5
|
4
|
+
|
5
|
+
- Allow for using locally checked in repo and skip the hatchet.lock dance (https://github.com/heroku/hatchet/pull/53)
|
6
|
+
|
3
7
|
## 4.0.4 - release not found
|
4
8
|
|
5
9
|
- Allow setting config when object is initialized (https://github.com/heroku/hatchet/pull/52)
|
data/lib/hatchet/app.rb
CHANGED
@@ -160,6 +160,7 @@ module Hatchet
|
|
160
160
|
def setup!
|
161
161
|
return self if @app_is_setup
|
162
162
|
puts "Hatchet setup: #{name.inspect} for #{repo_name.inspect}"
|
163
|
+
create_git_repo! unless is_git_repo?
|
163
164
|
create_app
|
164
165
|
set_labs!
|
165
166
|
buildpack_list = @buildpacks.map { |pack| { buildpack: pack } }
|
@@ -179,7 +180,6 @@ module Hatchet
|
|
179
180
|
self
|
180
181
|
end
|
181
182
|
|
182
|
-
|
183
183
|
def commit!
|
184
184
|
local_cmd_exec!('git add .; git commit -m next')
|
185
185
|
end
|
@@ -327,12 +327,21 @@ module Hatchet
|
|
327
327
|
true
|
328
328
|
end
|
329
329
|
|
330
|
+
private def is_git_repo?
|
331
|
+
out = `git rev-parse --git-dir > /dev/null 2>&1`
|
332
|
+
$?.success?
|
333
|
+
end
|
334
|
+
|
330
335
|
private def local_cmd_exec!(cmd)
|
331
336
|
out = `#{cmd}`
|
332
337
|
raise "Command: #{cmd} failed: #{out}" unless $?.success?
|
333
338
|
out
|
334
339
|
end
|
335
340
|
|
341
|
+
private def create_git_repo!
|
342
|
+
local_cmd_exec!('git init; git add .; git commit -m "init"')
|
343
|
+
end
|
344
|
+
|
336
345
|
private def default_name
|
337
346
|
"hatchet-t-#{SecureRandom.hex(10)}"
|
338
347
|
end
|
data/lib/hatchet/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
source 'https://rubygems.org'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AppTest < Minitest::Test
|
4
|
+
def test_repos_checked_into_git
|
5
|
+
app = Hatchet::App.new("test/different-folder-for-checked-in-repos/default_ruby")
|
6
|
+
app.in_directory do
|
7
|
+
assert_equal false, Dir.exist?(".git")
|
8
|
+
app.setup!
|
9
|
+
assert_equal true, Dir.exist?(".git")
|
10
|
+
end
|
11
|
+
ensure
|
12
|
+
app.teardown! if app
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_hatchet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|
@@ -207,6 +207,8 @@ files:
|
|
207
207
|
- lib/hatchet/tasks.rb
|
208
208
|
- lib/hatchet/test_run.rb
|
209
209
|
- lib/hatchet/version.rb
|
210
|
+
- test/different-folder-for-checked-in-repos/default_ruby/Gemfile
|
211
|
+
- test/different-folder-for-checked-in-repos/default_ruby/Gemfile.lock
|
210
212
|
- test/fixtures/buildpacks/null-buildpack/bin/compile
|
211
213
|
- test/fixtures/buildpacks/null-buildpack/bin/detect
|
212
214
|
- test/fixtures/buildpacks/null-buildpack/bin/release
|
@@ -220,6 +222,7 @@ files:
|
|
220
222
|
- test/hatchet/git_test.rb
|
221
223
|
- test/hatchet/heroku_api_test.rb
|
222
224
|
- test/hatchet/labs_test.rb
|
225
|
+
- test/hatchet/local_repo_test.rb
|
223
226
|
- test/hatchet/lock_test.rb
|
224
227
|
- test/hatchet/multi_cmd_runner_test.rb
|
225
228
|
- test/test_helper.rb
|
@@ -248,6 +251,8 @@ signing_key:
|
|
248
251
|
specification_version: 4
|
249
252
|
summary: Hatchet is a an integration testing library for developing Heroku buildpacks.
|
250
253
|
test_files:
|
254
|
+
- test/different-folder-for-checked-in-repos/default_ruby/Gemfile
|
255
|
+
- test/different-folder-for-checked-in-repos/default_ruby/Gemfile.lock
|
251
256
|
- test/fixtures/buildpacks/null-buildpack/bin/compile
|
252
257
|
- test/fixtures/buildpacks/null-buildpack/bin/detect
|
253
258
|
- test/fixtures/buildpacks/null-buildpack/bin/release
|
@@ -261,6 +266,7 @@ test_files:
|
|
261
266
|
- test/hatchet/git_test.rb
|
262
267
|
- test/hatchet/heroku_api_test.rb
|
263
268
|
- test/hatchet/labs_test.rb
|
269
|
+
- test/hatchet/local_repo_test.rb
|
264
270
|
- test/hatchet/lock_test.rb
|
265
271
|
- test/hatchet/multi_cmd_runner_test.rb
|
266
272
|
- test/test_helper.rb
|