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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +21 -1
  3. data/.gitignore +2 -0
  4. data/CHANGELOG.md +36 -1
  5. data/README.md +774 -174
  6. data/bin/hatchet +13 -6
  7. data/etc/ci_setup.rb +16 -12
  8. data/etc/setup_heroku.sh +0 -2
  9. data/hatchet.gemspec +4 -6
  10. data/hatchet.json +3 -2
  11. data/hatchet.lock +11 -9
  12. data/lib/hatchet.rb +1 -2
  13. data/lib/hatchet/api_rate_limit.rb +13 -24
  14. data/lib/hatchet/app.rb +150 -41
  15. data/lib/hatchet/config.rb +1 -1
  16. data/lib/hatchet/git_app.rb +29 -2
  17. data/lib/hatchet/reaper.rb +159 -56
  18. data/lib/hatchet/reaper/app_age.rb +49 -0
  19. data/lib/hatchet/reaper/reaper_throttle.rb +55 -0
  20. data/lib/hatchet/shell_throttle.rb +71 -0
  21. data/lib/hatchet/test_run.rb +16 -9
  22. data/lib/hatchet/version.rb +1 -1
  23. data/{test → repo_fixtures}/different-folder-for-checked-in-repos/default_ruby/Gemfile +0 -0
  24. data/spec/hatchet/allow_failure_git_spec.rb +55 -0
  25. data/spec/hatchet/app_spec.rb +226 -0
  26. data/spec/hatchet/ci_spec.rb +67 -0
  27. data/spec/hatchet/config_spec.rb +34 -0
  28. data/spec/hatchet/edit_repo_spec.rb +17 -0
  29. data/spec/hatchet/git_spec.rb +9 -0
  30. data/spec/hatchet/heroku_api_spec.rb +30 -0
  31. data/spec/hatchet/local_repo_spec.rb +26 -0
  32. data/spec/hatchet/lock_spec.rb +81 -0
  33. data/spec/spec_helper.rb +25 -0
  34. data/spec/unit/reaper_spec.rb +169 -0
  35. data/spec/unit/shell_throttle.rb +28 -0
  36. metadata +43 -86
  37. data/test/fixtures/buildpacks/null-buildpack/bin/compile +0 -4
  38. data/test/fixtures/buildpacks/null-buildpack/bin/detect +0 -5
  39. data/test/fixtures/buildpacks/null-buildpack/bin/release +0 -3
  40. data/test/fixtures/buildpacks/null-buildpack/hatchet.json +0 -4
  41. data/test/fixtures/buildpacks/null-buildpack/readme.md +0 -41
  42. data/test/hatchet/allow_failure_git_test.rb +0 -16
  43. data/test/hatchet/app_test.rb +0 -96
  44. data/test/hatchet/ci_four_test.rb +0 -19
  45. data/test/hatchet/ci_test.rb +0 -11
  46. data/test/hatchet/ci_three_test.rb +0 -20
  47. data/test/hatchet/ci_too_test.rb +0 -19
  48. data/test/hatchet/config_test.rb +0 -51
  49. data/test/hatchet/edit_repo_test.rb +0 -20
  50. data/test/hatchet/git_test.rb +0 -16
  51. data/test/hatchet/heroku_api_test.rb +0 -30
  52. data/test/hatchet/labs_test.rb +0 -20
  53. data/test/hatchet/local_repo_test.rb +0 -26
  54. data/test/hatchet/lock_test.rb +0 -18
  55. data/test/hatchet/multi_cmd_runner_test.rb +0 -30
  56. 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
@@ -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