heroku_hatchet 5.0.0 → 7.0.0

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