heroku_hatchet 5.0.3 → 7.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +21 -1
- data/.gitignore +2 -0
- data/CHANGELOG.md +36 -1
- data/README.md +774 -174
- data/bin/hatchet +13 -6
- data/etc/ci_setup.rb +16 -12
- data/etc/setup_heroku.sh +0 -2
- data/hatchet.gemspec +4 -6
- data/hatchet.json +3 -2
- data/hatchet.lock +11 -9
- data/lib/hatchet.rb +1 -2
- data/lib/hatchet/api_rate_limit.rb +13 -24
- data/lib/hatchet/app.rb +150 -41
- data/lib/hatchet/config.rb +1 -1
- data/lib/hatchet/git_app.rb +29 -2
- data/lib/hatchet/reaper.rb +159 -56
- data/lib/hatchet/reaper/app_age.rb +49 -0
- data/lib/hatchet/reaper/reaper_throttle.rb +55 -0
- data/lib/hatchet/shell_throttle.rb +71 -0
- data/lib/hatchet/test_run.rb +16 -9
- data/lib/hatchet/version.rb +1 -1
- data/{test → repo_fixtures}/different-folder-for-checked-in-repos/default_ruby/Gemfile +0 -0
- data/spec/hatchet/allow_failure_git_spec.rb +55 -0
- data/spec/hatchet/app_spec.rb +226 -0
- data/spec/hatchet/ci_spec.rb +67 -0
- data/spec/hatchet/config_spec.rb +34 -0
- data/spec/hatchet/edit_repo_spec.rb +17 -0
- data/spec/hatchet/git_spec.rb +9 -0
- data/spec/hatchet/heroku_api_spec.rb +30 -0
- data/spec/hatchet/local_repo_spec.rb +26 -0
- data/spec/hatchet/lock_spec.rb +81 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/unit/reaper_spec.rb +169 -0
- data/spec/unit/shell_throttle.rb +28 -0
- metadata +43 -86
- data/test/fixtures/buildpacks/null-buildpack/bin/compile +0 -4
- data/test/fixtures/buildpacks/null-buildpack/bin/detect +0 -5
- data/test/fixtures/buildpacks/null-buildpack/bin/release +0 -3
- data/test/fixtures/buildpacks/null-buildpack/hatchet.json +0 -4
- data/test/fixtures/buildpacks/null-buildpack/readme.md +0 -41
- data/test/hatchet/allow_failure_git_test.rb +0 -16
- data/test/hatchet/app_test.rb +0 -96
- data/test/hatchet/ci_four_test.rb +0 -19
- data/test/hatchet/ci_test.rb +0 -11
- data/test/hatchet/ci_three_test.rb +0 -20
- data/test/hatchet/ci_too_test.rb +0 -19
- data/test/hatchet/config_test.rb +0 -51
- data/test/hatchet/edit_repo_test.rb +0 -20
- data/test/hatchet/git_test.rb +0 -16
- data/test/hatchet/heroku_api_test.rb +0 -30
- data/test/hatchet/labs_test.rb +0 -20
- data/test/hatchet/local_repo_test.rb +0 -26
- data/test/hatchet/lock_test.rb +0 -18
- data/test/hatchet/multi_cmd_runner_test.rb +0 -30
- data/test/test_helper.rb +0 -28
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class MultiCmdRunnerTest < Minitest::Test
|
4
|
-
# slow but needed, there are ghosts in the machine
|
5
|
-
# by running common command multiple times we can find them
|
6
|
-
def test_multi_repl_commands
|
7
|
-
require 'repl_runner'
|
8
|
-
Hatchet::GitApp.new("default_ruby").deploy do |app|
|
9
|
-
assert_raise(ReplRunner::UnregisteredCommand) do
|
10
|
-
app.run("ls", 2) do |ls| # will return right away, should raise error
|
11
|
-
ls.run("cat")
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
rand(3..7).times do
|
16
|
-
app.run("irb") do |console|
|
17
|
-
console.run("`ls`")
|
18
|
-
console.run("'foo' * 5") {|r| assert_match "foofoofoofoofoo", r }
|
19
|
-
console.run("'hello ' + 'world'") {|r| assert_match "hello world", r }
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
rand(3..7).times do
|
24
|
-
app.run("bash") do |bash|
|
25
|
-
bash.run("ls") { |r| assert_match "Gemfile", r }
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
-
require 'hatchet'
|
3
|
-
|
4
|
-
require 'bundler'
|
5
|
-
Bundler.require
|
6
|
-
|
7
|
-
# require 'test/unit'
|
8
|
-
|
9
|
-
require 'minitest/autorun'
|
10
|
-
require "mocha/minitest"
|
11
|
-
|
12
|
-
require 'minitest/retry'
|
13
|
-
Minitest::Retry.use!
|
14
|
-
|
15
|
-
def assert_raise(*args, &block)
|
16
|
-
assert_raises(*args, &block)
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
ENV['HATCHET_BUILDPACK_BRANCH'] = "master"
|
21
|
-
|
22
|
-
require 'parallel_tests/test/runtime_logger' if ENV['RECORD_RUNTIME']
|
23
|
-
|
24
|
-
def run!(cmd)
|
25
|
-
out = `#{cmd}`
|
26
|
-
raise "Error running #{cmd}, output: #{out}" unless $?.success?
|
27
|
-
out
|
28
|
-
end
|