shipit-engine 0.31.0 → 0.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/Rakefile +4 -2
- data/app/assets/stylesheets/_pages/_stacks.scss +0 -3
- data/app/assets/stylesheets/merge_status.scss +0 -3
- data/app/controllers/concerns/shipit/active_model_serializers_patch.rb +1 -0
- data/app/controllers/concerns/shipit/api/cacheable.rb +1 -0
- data/app/controllers/concerns/shipit/api/paginable.rb +3 -2
- data/app/controllers/concerns/shipit/api/rendering.rb +5 -4
- data/app/controllers/concerns/shipit/authentication.rb +3 -2
- data/app/controllers/concerns/shipit/pagination.rb +2 -1
- data/app/controllers/shipit/api/base_controller.rb +11 -6
- data/app/controllers/shipit/api/ccmenu_controller.rb +2 -1
- data/app/controllers/shipit/api/commits_controller.rb +2 -1
- data/app/controllers/shipit/api/deploys_controller.rb +4 -3
- data/app/controllers/shipit/api/hooks_controller.rb +6 -5
- data/app/controllers/shipit/api/locks_controller.rb +5 -4
- data/app/controllers/shipit/api/outputs_controller.rb +2 -1
- data/app/controllers/shipit/api/pull_requests_controller.rb +7 -6
- data/app/controllers/shipit/api/release_statuses_controller.rb +3 -2
- data/app/controllers/shipit/api/rollbacks_controller.rb +33 -0
- data/app/controllers/shipit/api/stacks_controller.rb +18 -5
- data/app/controllers/shipit/api/tasks_controller.rb +6 -5
- data/app/controllers/shipit/api_clients_controller.rb +4 -3
- data/app/controllers/shipit/ccmenu_url_controller.rb +4 -3
- data/app/controllers/shipit/commit_checks_controller.rb +2 -1
- data/app/controllers/shipit/commits_controller.rb +2 -1
- data/app/controllers/shipit/deploys_controller.rb +3 -2
- data/app/controllers/shipit/github_authentication_controller.rb +4 -3
- data/app/controllers/shipit/merge_status_controller.rb +17 -16
- data/app/controllers/shipit/pull_requests_controller.rb +3 -2
- data/app/controllers/shipit/release_statuses_controller.rb +3 -2
- data/app/controllers/shipit/rollbacks_controller.rb +3 -2
- data/app/controllers/shipit/shipit_controller.rb +2 -1
- data/app/controllers/shipit/stacks_controller.rb +22 -7
- data/app/controllers/shipit/status_controller.rb +2 -1
- data/app/controllers/shipit/tasks_controller.rb +6 -5
- data/app/controllers/shipit/webhooks_controller.rb +3 -2
- data/app/helpers/shipit/chunks_helper.rb +1 -0
- data/app/helpers/shipit/deploys_helper.rb +4 -3
- data/app/helpers/shipit/github_url_helper.rb +1 -0
- data/app/helpers/shipit/merge_status_helper.rb +1 -0
- data/app/helpers/shipit/shipit_helper.rb +1 -0
- data/app/helpers/shipit/stacks_helper.rb +1 -0
- data/app/helpers/shipit/tasks_helper.rb +1 -0
- data/app/jobs/shipit/background_job.rb +4 -0
- data/app/jobs/shipit/background_job/unique.rb +1 -0
- data/app/jobs/shipit/cache_deploy_spec_job.rb +1 -0
- data/app/jobs/shipit/chunk_rollup_job.rb +4 -0
- data/app/jobs/shipit/clear_git_cache_job.rb +1 -0
- data/app/jobs/shipit/continuous_delivery_job.rb +2 -1
- data/app/jobs/shipit/create_on_github_job.rb +6 -1
- data/app/jobs/shipit/create_release_statuses_job.rb +1 -0
- data/app/jobs/shipit/deferred_touch_job.rb +4 -0
- data/app/jobs/shipit/deliver_hook_job.rb +1 -0
- data/app/jobs/shipit/destroy_job.rb +1 -0
- data/app/jobs/shipit/destroy_stack_job.rb +1 -0
- data/app/jobs/shipit/emit_event_job.rb +2 -1
- data/app/jobs/shipit/fetch_commit_stats_job.rb +1 -0
- data/app/jobs/shipit/fetch_deployed_revision_job.rb +1 -0
- data/app/jobs/shipit/github_sync_job.rb +2 -1
- data/app/jobs/shipit/mark_deploy_healthy_job.rb +1 -0
- data/app/jobs/shipit/merge_pull_requests_job.rb +1 -0
- data/app/jobs/shipit/perform_commit_checks_job.rb +1 -0
- data/app/jobs/shipit/perform_task_job.rb +12 -5
- data/app/jobs/shipit/purge_old_deliveries_job.rb +1 -0
- data/app/jobs/shipit/reap_dead_tasks_job.rb +21 -0
- data/app/jobs/shipit/refresh_check_runs_job.rb +1 -0
- data/app/jobs/shipit/refresh_github_user_job.rb +1 -0
- data/app/jobs/shipit/refresh_pull_request_job.rb +1 -0
- data/app/jobs/shipit/refresh_statuses_job.rb +1 -0
- data/app/jobs/shipit/setup_github_hook_job.rb +1 -0
- data/app/jobs/shipit/update_estimated_deploy_duration_job.rb +1 -0
- data/app/jobs/shipit/update_github_last_deployed_ref_job.rb +4 -3
- data/app/models/concerns/shipit/deferred_touch.rb +4 -3
- data/app/models/shipit/anonymous_user.rb +5 -0
- data/app/models/shipit/api_client.rb +3 -2
- data/app/models/shipit/application_record.rb +2 -1
- data/app/models/shipit/check_run.rb +4 -3
- data/app/models/shipit/command_line_user.rb +1 -0
- data/app/models/shipit/commit.rb +11 -4
- data/app/models/shipit/commit_checks.rb +1 -0
- data/app/models/shipit/commit_deployment.rb +3 -2
- data/app/models/shipit/commit_deployment_status.rb +2 -1
- data/app/models/shipit/commit_message.rb +1 -0
- data/app/models/shipit/delivery.rb +4 -3
- data/app/models/shipit/deploy.rb +6 -17
- data/app/models/shipit/deploy_spec.rb +22 -3
- data/app/models/shipit/deploy_spec/bundler_discovery.rb +1 -0
- data/app/models/shipit/deploy_spec/capistrano_discovery.rb +1 -0
- data/app/models/shipit/deploy_spec/file_system.rb +10 -3
- data/app/models/shipit/deploy_spec/kubernetes_discovery.rb +1 -0
- data/app/models/shipit/deploy_spec/lerna_discovery.rb +1 -0
- data/app/models/shipit/deploy_spec/npm_discovery.rb +5 -4
- data/app/models/shipit/deploy_spec/pypi_discovery.rb +1 -0
- data/app/models/shipit/deploy_spec/rubygems_discovery.rb +1 -0
- data/app/models/shipit/deploy_stats.rb +2 -1
- data/app/models/shipit/duration.rb +3 -2
- data/app/models/shipit/ephemeral_commit_checks.rb +1 -0
- data/app/models/shipit/github_hook.rb +2 -1
- data/app/models/shipit/github_status.rb +2 -1
- data/app/models/shipit/hook.rb +6 -5
- data/app/models/shipit/membership.rb +3 -2
- data/app/models/shipit/output_chunk.rb +7 -2
- data/app/models/shipit/pull_request.rb +6 -5
- data/app/models/shipit/record.rb +18 -0
- data/app/models/shipit/release_status.rb +3 -2
- data/app/models/shipit/repository.rb +10 -5
- data/app/models/shipit/rollback.rb +1 -0
- data/app/models/shipit/stack.rb +50 -16
- data/app/models/shipit/status.rb +3 -2
- data/app/models/shipit/status/common.rb +7 -6
- data/app/models/shipit/status/group.rb +1 -0
- data/app/models/shipit/status/missing.rb +2 -1
- data/app/models/shipit/status/unknown.rb +2 -1
- data/app/models/shipit/task.rb +38 -5
- data/app/models/shipit/task_definition.rb +1 -0
- data/app/models/shipit/team.rb +2 -1
- data/app/models/shipit/undeployed_commit.rb +1 -0
- data/app/models/shipit/unlimited_api_client.rb +1 -0
- data/app/models/shipit/user.rb +10 -8
- data/app/models/shipit/variable_definition.rb +1 -0
- data/app/models/shipit/webhooks.rb +1 -0
- data/app/models/shipit/webhooks/handlers/check_suite_handler.rb +1 -0
- data/app/models/shipit/webhooks/handlers/handler.rb +1 -0
- data/app/models/shipit/webhooks/handlers/membership_handler.rb +1 -0
- data/app/models/shipit/webhooks/handlers/push_handler.rb +1 -0
- data/app/models/shipit/webhooks/handlers/status_handler.rb +1 -0
- data/app/serializers/concerns/shipit/conditional_attributes.rb +1 -0
- data/app/serializers/shipit/anonymous_user_serializer.rb +1 -0
- data/app/serializers/shipit/command_line_user_serializer.rb +1 -0
- data/app/serializers/shipit/commit_serializer.rb +1 -0
- data/app/serializers/shipit/deploy_serializer.rb +2 -1
- data/app/serializers/shipit/hook_serializer.rb +1 -0
- data/app/serializers/shipit/pull_request_serializer.rb +1 -0
- data/app/serializers/shipit/rollback_serializer.rb +1 -0
- data/app/serializers/shipit/short_commit_serializer.rb +1 -0
- data/app/serializers/shipit/stack_serializer.rb +1 -0
- data/app/serializers/shipit/tail_task_serializer.rb +1 -0
- data/app/serializers/shipit/task_serializer.rb +2 -17
- data/app/serializers/shipit/user_serializer.rb +6 -1
- data/app/validators/ascii_only_validator.rb +1 -0
- data/app/validators/subset_validator.rb +1 -0
- data/app/views/layouts/shipit.html.erb +1 -1
- data/app/views/shipit/_variables.html.erb +1 -1
- data/app/views/shipit/ccmenu/project.xml.builder +2 -1
- data/app/views/shipit/deploys/show.html.erb +2 -2
- data/app/views/shipit/stacks/_header.html.erb +3 -0
- data/app/views/shipit/stacks/all_tasks.html.erb +28 -0
- data/app/views/shipit/stacks/index.html.erb +1 -1
- data/app/views/shipit/tasks/show.html.erb +1 -1
- data/config/initializers/inflections.rb +2 -1
- data/config/locales/en.yml +3 -3
- data/config/routes.rb +10 -2
- data/db/migrate/20200226211925_add_index_to_tasks_status.rb +5 -0
- data/db/migrate/20200427135152_add_pull_request_head_sha_to_commit.rb +5 -0
- data/db/migrate/20200615181558_add_rollback_once_aborted_to.rb +5 -0
- data/lib/shipit.rb +12 -2
- data/lib/shipit/cast_value.rb +1 -0
- data/lib/shipit/command.rb +13 -12
- data/lib/shipit/commands.rb +5 -4
- data/lib/shipit/csv_serializer.rb +1 -0
- data/lib/shipit/deploy_commands.rb +1 -0
- data/lib/shipit/engine.rb +7 -2
- data/lib/shipit/environment_variables.rb +2 -1
- data/lib/shipit/first_parent_commits_iterator.rb +1 -0
- data/lib/shipit/flock.rb +1 -0
- data/lib/shipit/github_app.rb +7 -6
- data/lib/shipit/github_http_cache_middleware.rb +1 -0
- data/lib/shipit/null_serializer.rb +1 -0
- data/lib/shipit/octokit_check_runs.rb +3 -2
- data/lib/shipit/octokit_iterator.rb +3 -2
- data/lib/shipit/paginator.rb +3 -2
- data/lib/shipit/rollback_commands.rb +1 -0
- data/lib/shipit/same_site_cookie_middleware.rb +29 -0
- data/lib/shipit/simple_message_verifier.rb +1 -0
- data/lib/shipit/stack_commands.rb +3 -2
- data/lib/shipit/stat.rb +1 -0
- data/lib/shipit/task_commands.rb +2 -0
- data/lib/shipit/version.rb +2 -1
- data/lib/snippets/release-gem +5 -1
- data/lib/tasks/cron.rake +2 -0
- data/lib/tasks/dev.rake +3 -2
- data/lib/tasks/shipit.rake +15 -14
- data/lib/tasks/teams.rake +1 -0
- data/test/controllers/api/base_controller_test.rb +3 -2
- data/test/controllers/api/ccmenu_controller_test.rb +8 -7
- data/test/controllers/api/commits_controller_test.rb +3 -2
- data/test/controllers/api/deploys_controller_test.rb +15 -14
- data/test/controllers/api/hooks_controller_test.rb +8 -7
- data/test/controllers/api/locks_controller_test.rb +7 -6
- data/test/controllers/api/outputs_controller_test.rb +2 -1
- data/test/controllers/api/pull_requests_controller_test.rb +8 -7
- data/test/controllers/api/release_statuses_controller_test.rb +2 -1
- data/test/controllers/api/rollback_controller_test.rb +113 -0
- data/test/controllers/api/stacks_controller_test.rb +30 -9
- data/test/controllers/api/tasks_controller_test.rb +13 -12
- data/test/controllers/api_clients_controller_test.rb +5 -4
- data/test/controllers/ccmenu_controller_test.rb +4 -3
- data/test/controllers/commit_checks_controller_test.rb +4 -3
- data/test/controllers/commits_controller_test.rb +3 -2
- data/test/controllers/deploys_controller_test.rb +32 -21
- data/test/controllers/github_authentication_controller_test.rb +1 -0
- data/test/controllers/merge_status_controller_test.rb +7 -6
- data/test/controllers/pull_requests_controller_test.rb +4 -3
- data/test/controllers/release_statuses_controller_test.rb +3 -2
- data/test/controllers/rollbacks_controller_test.rb +9 -8
- data/test/controllers/stacks_controller_test.rb +33 -19
- data/test/controllers/status_controller_test.rb +1 -0
- data/test/controllers/tasks_controller_test.rb +19 -18
- data/test/controllers/webhooks_controller_test.rb +11 -10
- data/test/dummy/config/environments/development.rb +2 -0
- data/test/dummy/config/environments/test.rb +2 -0
- data/test/dummy/db/schema.rb +4 -1
- data/test/fixtures/shipit/commits.yml +15 -0
- data/test/fixtures/shipit/repositories.yml +4 -0
- data/test/fixtures/shipit/stacks.yml +90 -14
- data/test/fixtures/timeout +2 -1
- data/test/helpers/api_helper.rb +1 -0
- data/test/helpers/fixture_aliases_helper.rb +1 -0
- data/test/helpers/hooks_helper.rb +2 -1
- data/test/helpers/json_helper.rb +15 -11
- data/test/helpers/links_helper.rb +4 -3
- data/test/helpers/payloads_helper.rb +1 -0
- data/test/helpers/queries_helper.rb +3 -2
- data/test/jobs/cache_deploy_spec_job_test.rb +2 -1
- data/test/jobs/chunk_rollup_job_test.rb +1 -0
- data/test/jobs/deliver_hook_job_test.rb +1 -0
- data/test/jobs/destroy_stack_job_test.rb +1 -0
- data/test/jobs/emit_event_job_test.rb +2 -1
- data/test/jobs/fetch_commit_stats_job_test.rb +1 -0
- data/test/jobs/fetch_deployed_revision_job_test.rb +1 -0
- data/test/jobs/github_sync_job_test.rb +1 -0
- data/test/jobs/mark_deploy_healthy_job_test.rb +1 -0
- data/test/jobs/merge_pull_requests_job_test.rb +1 -0
- data/test/jobs/perform_task_job_test.rb +4 -3
- data/test/jobs/purge_old_deliveries_job_test.rb +1 -0
- data/test/jobs/reap_dead_tasks_job_test.rb +68 -0
- data/test/jobs/refresh_github_user_job_test.rb +1 -0
- data/test/jobs/refresh_status_job_test.rb +1 -0
- data/test/jobs/unique_job_test.rb +1 -0
- data/test/jobs/update_github_last_deployed_ref_job_test.rb +1 -0
- data/test/middleware/same_site_cookie_middleware_test.rb +52 -0
- data/test/models/api_client_test.rb +1 -0
- data/test/models/commit_checks_test.rb +1 -0
- data/test/models/commit_deployment_status_test.rb +1 -0
- data/test/models/commit_deployment_test.rb +2 -1
- data/test/models/commits_test.rb +72 -6
- data/test/models/delivery_test.rb +2 -1
- data/test/models/deploy_spec_test.rb +47 -42
- data/test/models/deploy_stats_test.rb +1 -0
- data/test/models/deploys_test.rb +31 -22
- data/test/models/duration_test.rb +1 -0
- data/test/models/github_hook_test.rb +1 -0
- data/test/models/hook_test.rb +18 -10
- data/test/models/membership_test.rb +1 -0
- data/test/models/output_chunk_test.rb +1 -0
- data/test/models/pull_request_test.rb +4 -3
- data/test/models/release_statuses_test.rb +1 -0
- data/test/models/rollbacks_test.rb +1 -0
- data/test/models/shipit/check_run_test.rb +1 -0
- data/test/models/shipit/repository_test.rb +1 -0
- data/test/models/shipit/wehbooks/handlers_test.rb +1 -0
- data/test/models/stacks_test.rb +30 -8
- data/test/models/status/group_test.rb +1 -0
- data/test/models/status/missing_test.rb +1 -0
- data/test/models/status_test.rb +1 -0
- data/test/models/task_definitions_test.rb +9 -8
- data/test/models/tasks_test.rb +18 -1
- data/test/models/team_test.rb +4 -2
- data/test/models/undeployed_commits_test.rb +1 -0
- data/test/models/users_test.rb +13 -5
- data/test/test_command_integration.rb +3 -2
- data/test/test_helper.rb +34 -31
- data/test/unit/anonymous_user_serializer_test.rb +14 -0
- data/test/unit/command_test.rb +8 -7
- data/test/unit/commands_test.rb +1 -0
- data/test/unit/commit_serializer_test.rb +16 -0
- data/test/unit/csv_serializer_test.rb +3 -2
- data/test/unit/deploy_commands_test.rb +5 -4
- data/test/unit/deploy_serializer_test.rb +17 -0
- data/test/unit/environment_variables_test.rb +5 -4
- data/test/unit/github_app_test.rb +1 -0
- data/test/unit/github_url_helper_test.rb +1 -0
- data/test/unit/rollback_commands_test.rb +2 -1
- data/test/unit/shipit_helper_test.rb +17 -0
- data/test/unit/shipit_test.rb +1 -0
- data/test/unit/user_serializer_test.rb +14 -0
- data/test/unit/variable_definition_test.rb +1 -0
- metadata +155 -130
@@ -1,8 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
path = './fixtures/timeout'
|
4
5
|
buffer = []
|
5
|
-
command = Shipit::Command.new({path => {'timeout' => 2}}, env: {}, chdir: __dir__)
|
6
|
+
command = Shipit::Command.new({ path => { 'timeout' => 2 } }, env: {}, chdir: __dir__)
|
6
7
|
begin
|
7
8
|
command.stream! do |chunk|
|
8
9
|
buffer << chunk
|
@@ -24,5 +25,5 @@ unless buffer.join == expected_output.join
|
|
24
25
|
puts "Got: ------------"
|
25
26
|
puts buffer.map(&:inspect).join("\n")
|
26
27
|
puts "-----------------"
|
27
|
-
exit
|
28
|
+
exit(1)
|
28
29
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
ENV["RAILS_ENV"] ||= "test"
|
2
3
|
|
3
4
|
require 'simplecov'
|
4
|
-
SimpleCov.start
|
5
|
+
SimpleCov.start('rails') do
|
5
6
|
enable_coverage :branch
|
6
7
|
end
|
7
8
|
|
@@ -19,7 +20,7 @@ require 'spy/integration'
|
|
19
20
|
# Load fixtures from the engine
|
20
21
|
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
21
22
|
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
22
|
-
ActiveSupport::TestCase.fixtures
|
23
|
+
ActiveSupport::TestCase.fixtures(:all)
|
23
24
|
end
|
24
25
|
|
25
26
|
Dir[File.expand_path('../helpers/**/*.rb', __FILE__)].each do |helper|
|
@@ -31,41 +32,43 @@ begin
|
|
31
32
|
rescue LoadError
|
32
33
|
end
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
module ActiveSupport
|
36
|
+
class TestCase
|
37
|
+
include PayloadsHelper
|
38
|
+
include FixtureAliasesHelper
|
39
|
+
include QueriesHelper
|
40
|
+
include JSONHelper
|
41
|
+
include LinksHelper
|
42
|
+
include ApiHelper
|
43
|
+
include HooksHelper
|
44
|
+
include ActiveJob::TestHelper
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
setup do
|
47
|
+
@routes = Shipit::Engine.routes
|
48
|
+
Shipit.github.api.stubs(:login).returns('shipit')
|
49
|
+
end
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
teardown do
|
52
|
+
Shipit.redis.flushdb
|
53
|
+
Shipit.instance_variable_names.each do |name|
|
54
|
+
next if %w(@mocha @redis).include?(name)
|
55
|
+
Shipit.remove_instance_variable(name)
|
56
|
+
end
|
54
57
|
end
|
55
|
-
end
|
56
58
|
|
57
|
-
|
59
|
+
ActiveRecord::Migration.check_pending!
|
58
60
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
62
|
+
#
|
63
|
+
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
64
|
+
# -- they do not yet inherit this setting
|
65
|
+
fixtures :all
|
64
66
|
|
65
|
-
|
66
|
-
|
67
|
+
# Add more helper methods to be used by all tests here...
|
68
|
+
private
|
67
69
|
|
68
|
-
|
69
|
-
|
70
|
+
def resource(data)
|
71
|
+
Sawyer::Resource.new(Sawyer::Agent.new('http://example.com'), data)
|
72
|
+
end
|
70
73
|
end
|
71
74
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
module Shipit
|
5
|
+
class AnonymousUserSerializerTest < ActiveSupport::TestCase
|
6
|
+
test 'sets anonymous to true' do
|
7
|
+
user = AnonymousUser.new
|
8
|
+
serializer = ActiveModel::Serializer.serializer_for(user)
|
9
|
+
assert_equal AnonymousUserSerializer, serializer
|
10
|
+
serialized = serializer.new(user).to_json
|
11
|
+
assert_json("anonymous", true, document: serialized)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/test/unit/command_test.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'test_helper'
|
2
3
|
|
3
4
|
module Shipit
|
@@ -9,32 +10,32 @@ module Shipit
|
|
9
10
|
end
|
10
11
|
|
11
12
|
test "#interpolate_environment_variables replace environment variables by their value" do
|
12
|
-
command = Command.new('cap $ENVIRONMENT deploy', env: {'ENVIRONMENT' => 'production'}, chdir: '.')
|
13
|
+
command = Command.new('cap $ENVIRONMENT deploy', env: { 'ENVIRONMENT' => 'production' }, chdir: '.')
|
13
14
|
assert_equal [%(cap production deploy)], command.interpolated_arguments
|
14
15
|
end
|
15
16
|
|
16
17
|
test "#interpolate_environment_variables coerce nil to empty string" do
|
17
|
-
command = Command.new('cap $FOO deploy', env: {'ENVIRONMENT' => 'production'}, chdir: '.')
|
18
|
+
command = Command.new('cap $FOO deploy', env: { 'ENVIRONMENT' => 'production' }, chdir: '.')
|
18
19
|
assert_equal [%(cap '' deploy)], command.interpolated_arguments
|
19
20
|
end
|
20
21
|
|
21
22
|
test '#interpolate_environment_variables escape the variable contents' do
|
22
23
|
malicious_string = '$(echo pwnd)'
|
23
|
-
command = Command.new('echo $FOO', env: {'FOO' => malicious_string}, chdir: '.')
|
24
|
+
command = Command.new('echo $FOO', env: { 'FOO' => malicious_string }, chdir: '.')
|
24
25
|
assert_equal malicious_string, command.run.chomp
|
25
26
|
end
|
26
27
|
|
27
28
|
test "#interpolate_environment_variables fallback to ENV" do
|
28
29
|
previous = ENV['SHIPIT_TEST']
|
29
30
|
ENV['SHIPIT_TEST'] = 'quux'
|
30
|
-
command = Command.new('cap $SHIPIT_TEST deploy', env: {'ENVIRONMENT' => 'production'}, chdir: '.')
|
31
|
-
assert_equal
|
31
|
+
command = Command.new('cap $SHIPIT_TEST deploy', env: { 'ENVIRONMENT' => 'production' }, chdir: '.')
|
32
|
+
assert_equal([%(cap quux deploy)], command.interpolated_arguments)
|
32
33
|
ensure
|
33
34
|
ENV['SHIPIT_TEST'] = previous
|
34
35
|
end
|
35
36
|
|
36
37
|
test "#timeout is 5 minutes by default" do
|
37
|
-
command = Command.new('cap $LANG deploy', env: {'ENVIRONMENT' => 'production'}, chdir: '.')
|
38
|
+
command = Command.new('cap $LANG deploy', env: { 'ENVIRONMENT' => 'production' }, chdir: '.')
|
38
39
|
assert_equal 5.minutes.to_i, command.timeout
|
39
40
|
end
|
40
41
|
|
@@ -44,7 +45,7 @@ module Shipit
|
|
44
45
|
end
|
45
46
|
|
46
47
|
test "#timeout returns the command option timeout over the `default_timeout` if present" do
|
47
|
-
command = Command.new({'cap $LANG deploy' => {'timeout' => 10}}, default_timeout: 5, env: {}, chdir: '.')
|
48
|
+
command = Command.new({ 'cap $LANG deploy' => { 'timeout' => 10 } }, default_timeout: 5, env: {}, chdir: '.')
|
48
49
|
assert_equal 10, command.timeout
|
49
50
|
end
|
50
51
|
|
data/test/unit/commands_test.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
module Shipit
|
5
|
+
class CommitSerializerTest < ActiveSupport::TestCase
|
6
|
+
test 'commit includes author object' do
|
7
|
+
commit = shipit_commits(:first)
|
8
|
+
|
9
|
+
serializer = ActiveModel::Serializer.serializer_for(commit)
|
10
|
+
assert_equal CommitSerializer, serializer
|
11
|
+
serialized = serializer.new(commit).to_json
|
12
|
+
|
13
|
+
assert_json("author.name", commit.author.name, document: serialized)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'test_helper'
|
2
3
|
|
3
4
|
module Shipit
|
@@ -28,7 +29,7 @@ module Shipit
|
|
28
29
|
def assert_dumped(expected, object)
|
29
30
|
message = "Expected CSVSerializer.dump(#{object.inspect}) to eq #{expected.inspect}"
|
30
31
|
if expected.nil?
|
31
|
-
assert_nil
|
32
|
+
assert_nil(Shipit::CSVSerializer.dump(object), message)
|
32
33
|
else
|
33
34
|
assert_equal(expected, Shipit::CSVSerializer.dump(object), message)
|
34
35
|
end
|
@@ -37,7 +38,7 @@ module Shipit
|
|
37
38
|
def assert_loaded(expected, payload)
|
38
39
|
message = "Expected CSVSerializer.load(#{payload.inspect}) to eq #{expected.inspect}"
|
39
40
|
if expected.nil?
|
40
|
-
assert_nil
|
41
|
+
assert_nil(Shipit::CSVSerializer.load(payload), message)
|
41
42
|
else
|
42
43
|
assert_equal(expected, Shipit::CSVSerializer.load(payload), message)
|
43
44
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'test_helper'
|
2
3
|
|
3
4
|
module Shipit
|
@@ -10,7 +11,7 @@ module Shipit
|
|
10
11
|
dependencies_steps!: ['bundle install --some-args'],
|
11
12
|
deploy_steps!: ['bundle exec cap $ENVIRONMENT deploy'],
|
12
13
|
rollback_steps!: ['bundle exec cap $ENVIRONMENT deploy:rollback'],
|
13
|
-
machine_env: {'GLOBAL' => '1'},
|
14
|
+
machine_env: { 'GLOBAL' => '1' },
|
14
15
|
directory: nil,
|
15
16
|
clear_working_directory?: true,
|
16
17
|
)
|
@@ -62,8 +63,8 @@ module Shipit
|
|
62
63
|
commands = @commands.clone
|
63
64
|
assert_equal 2, commands.size
|
64
65
|
clone_args = [
|
65
|
-
'git', 'clone', '--
|
66
|
-
'--origin', 'cache',
|
66
|
+
'git', 'clone', '--quiet',
|
67
|
+
'--local', '--origin', 'cache',
|
67
68
|
@stack.git_path, @deploy.working_directory
|
68
69
|
]
|
69
70
|
assert_equal clone_args, commands.first.args
|
@@ -190,7 +191,7 @@ module Shipit
|
|
190
191
|
end
|
191
192
|
|
192
193
|
test "the deploy's `env` is merged in ENVIRONMENT" do
|
193
|
-
@deploy.env = {'FOO' => 'BAR'}
|
194
|
+
@deploy.env = { 'FOO' => 'BAR' }
|
194
195
|
command = @commands.install_dependencies.first
|
195
196
|
assert_equal 'BAR', command.env['FOO']
|
196
197
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
module Shipit
|
5
|
+
class DeploySerializerTest < ActiveSupport::TestCase
|
6
|
+
test 'deploy commits includes author object' do
|
7
|
+
deploy = shipit_deploys(:shipit)
|
8
|
+
first_commit_author = deploy.commits.first.author
|
9
|
+
|
10
|
+
serializer = ActiveModel::Serializer.serializer_for(deploy)
|
11
|
+
assert_equal DeploySerializer, serializer
|
12
|
+
serialized = serializer.new(deploy).to_json
|
13
|
+
|
14
|
+
assert_json("commits.0.author.name", first_commit_author.name, document: serialized)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,11 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'test_helper'
|
2
3
|
|
3
4
|
module Shipit
|
4
5
|
class EnvironmentVariablesTest < ActiveSupport::TestCase
|
5
6
|
def setup
|
6
7
|
variable_defs = [
|
7
|
-
{"name" => "FOO", "title" => "Set to 0 to foo", "default" => 1},
|
8
|
-
{"name" => "BAR", "title" => "Set to 1 to bar", "default" => 0},
|
8
|
+
{ "name" => "FOO", "title" => "Set to 0 to foo", "default" => 1 },
|
9
|
+
{ "name" => "BAR", "title" => "Set to 1 to bar", "default" => 0 },
|
9
10
|
]
|
10
11
|
@variable_definitions = variable_defs.map(&VariableDefinition.method(:new))
|
11
12
|
end
|
@@ -16,7 +17,7 @@ module Shipit
|
|
16
17
|
end
|
17
18
|
|
18
19
|
test 'correctly sanitizes env variables' do
|
19
|
-
env = {'FOO' => 1, 'BAR' => 1}
|
20
|
+
env = { 'FOO' => 1, 'BAR' => 1 }
|
20
21
|
assert_equal env, EnvironmentVariables.with(env).permit(@variable_definitions)
|
21
22
|
end
|
22
23
|
|
@@ -27,7 +28,7 @@ module Shipit
|
|
27
28
|
end
|
28
29
|
|
29
30
|
test 'throws an exception when a variable is not whitelisted' do
|
30
|
-
env = {'UNSAFE_VARIABLE' => 1}
|
31
|
+
env = { 'UNSAFE_VARIABLE' => 1 }
|
31
32
|
assert_raises(EnvironmentVariables::NotPermitted) do
|
32
33
|
EnvironmentVariables.with(env).permit(@variable_definitions)
|
33
34
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'test_helper'
|
2
3
|
|
3
4
|
module Shipit
|
@@ -10,7 +11,7 @@ module Shipit
|
|
10
11
|
dependencies_steps!: ['bundle install --some-args'],
|
11
12
|
deploy_steps!: ['bundle exec cap $ENVIRONMENT deploy'],
|
12
13
|
rollback_steps!: ['bundle exec cap $ENVIRONMENT deploy:rollback'],
|
13
|
-
machine_env: {'GLOBAL' => '1'},
|
14
|
+
machine_env: { 'GLOBAL' => '1' },
|
14
15
|
directory: nil,
|
15
16
|
clear_working_directory?: true,
|
16
17
|
)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
module Shipit
|
5
|
+
class ShipitHelperTest < ActionView::TestCase
|
6
|
+
include Shipit::ShipitHelper
|
7
|
+
include ERB::Util
|
8
|
+
|
9
|
+
test "#emojify embeds known emojis" do
|
10
|
+
assert_includes emojify(':smile:'), '<img'
|
11
|
+
end
|
12
|
+
|
13
|
+
test "#emojify returns unknown emojis" do
|
14
|
+
assert_equal ':unknown:', emojify(':unknown:')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/test/unit/shipit_test.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
module Shipit
|
5
|
+
class UserSerializerTest < ActiveSupport::TestCase
|
6
|
+
test 'includes anonymous key' do
|
7
|
+
user = User.new
|
8
|
+
serializer = ActiveModel::Serializer.serializer_for(user)
|
9
|
+
assert_equal UserSerializer, serializer
|
10
|
+
serialized = serializer.new(user).to_json
|
11
|
+
assert_json("anonymous", false, document: serialized)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipit-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -252,16 +252,16 @@ dependencies:
|
|
252
252
|
name: rake
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
|
-
- - "
|
255
|
+
- - ">="
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version: '
|
257
|
+
version: '0'
|
258
258
|
type: :runtime
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
|
-
- - "
|
262
|
+
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version: '
|
264
|
+
version: '0'
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: redis-namespace
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
@@ -485,6 +485,7 @@ files:
|
|
485
485
|
- app/controllers/shipit/api/outputs_controller.rb
|
486
486
|
- app/controllers/shipit/api/pull_requests_controller.rb
|
487
487
|
- app/controllers/shipit/api/release_statuses_controller.rb
|
488
|
+
- app/controllers/shipit/api/rollbacks_controller.rb
|
488
489
|
- app/controllers/shipit/api/stacks_controller.rb
|
489
490
|
- app/controllers/shipit/api/tasks_controller.rb
|
490
491
|
- app/controllers/shipit/api_clients_controller.rb
|
@@ -530,6 +531,7 @@ files:
|
|
530
531
|
- app/jobs/shipit/perform_commit_checks_job.rb
|
531
532
|
- app/jobs/shipit/perform_task_job.rb
|
532
533
|
- app/jobs/shipit/purge_old_deliveries_job.rb
|
534
|
+
- app/jobs/shipit/reap_dead_tasks_job.rb
|
533
535
|
- app/jobs/shipit/refresh_check_runs_job.rb
|
534
536
|
- app/jobs/shipit/refresh_github_user_job.rb
|
535
537
|
- app/jobs/shipit/refresh_pull_request_job.rb
|
@@ -568,6 +570,7 @@ files:
|
|
568
570
|
- app/models/shipit/membership.rb
|
569
571
|
- app/models/shipit/output_chunk.rb
|
570
572
|
- app/models/shipit/pull_request.rb
|
573
|
+
- app/models/shipit/record.rb
|
571
574
|
- app/models/shipit/release_status.rb
|
572
575
|
- app/models/shipit/repository.rb
|
573
576
|
- app/models/shipit/rollback.rb
|
@@ -641,6 +644,7 @@ files:
|
|
641
644
|
- app/views/shipit/stacks/_banners.html.erb
|
642
645
|
- app/views/shipit/stacks/_header.html.erb
|
643
646
|
- app/views/shipit/stacks/_links.html.erb
|
647
|
+
- app/views/shipit/stacks/all_tasks.html.erb
|
644
648
|
- app/views/shipit/stacks/index.html.erb
|
645
649
|
- app/views/shipit/stacks/new.html.erb
|
646
650
|
- app/views/shipit/stacks/settings.html.erb
|
@@ -718,6 +722,9 @@ files:
|
|
718
722
|
- db/migrate/20191219205202_add_archived_since_to_stacks.rb
|
719
723
|
- db/migrate/20200102175621_optional_task_commits.rb
|
720
724
|
- db/migrate/20200109132519_add_sha_to_commit_deployments.rb
|
725
|
+
- db/migrate/20200226211925_add_index_to_tasks_status.rb
|
726
|
+
- db/migrate/20200427135152_add_pull_request_head_sha_to_commit.rb
|
727
|
+
- db/migrate/20200615181558_add_rollback_once_aborted_to.rb
|
721
728
|
- lib/shipit-engine.rb
|
722
729
|
- lib/shipit.rb
|
723
730
|
- lib/shipit/cast_value.rb
|
@@ -737,6 +744,7 @@ files:
|
|
737
744
|
- lib/shipit/octokit_iterator.rb
|
738
745
|
- lib/shipit/paginator.rb
|
739
746
|
- lib/shipit/rollback_commands.rb
|
747
|
+
- lib/shipit/same_site_cookie_middleware.rb
|
740
748
|
- lib/shipit/simple_message_verifier.rb
|
741
749
|
- lib/shipit/stack_commands.rb
|
742
750
|
- lib/shipit/stat.rb
|
@@ -770,6 +778,7 @@ files:
|
|
770
778
|
- test/controllers/api/outputs_controller_test.rb
|
771
779
|
- test/controllers/api/pull_requests_controller_test.rb
|
772
780
|
- test/controllers/api/release_statuses_controller_test.rb
|
781
|
+
- test/controllers/api/rollback_controller_test.rb
|
773
782
|
- test/controllers/api/stacks_controller_test.rb
|
774
783
|
- test/controllers/api/tasks_controller_test.rb
|
775
784
|
- test/controllers/api_clients_controller_test.rb
|
@@ -866,10 +875,12 @@ files:
|
|
866
875
|
- test/jobs/merge_pull_requests_job_test.rb
|
867
876
|
- test/jobs/perform_task_job_test.rb
|
868
877
|
- test/jobs/purge_old_deliveries_job_test.rb
|
878
|
+
- test/jobs/reap_dead_tasks_job_test.rb
|
869
879
|
- test/jobs/refresh_github_user_job_test.rb
|
870
880
|
- test/jobs/refresh_status_job_test.rb
|
871
881
|
- test/jobs/unique_job_test.rb
|
872
882
|
- test/jobs/update_github_last_deployed_ref_job_test.rb
|
883
|
+
- test/middleware/same_site_cookie_middleware_test.rb
|
873
884
|
- test/models/api_client_test.rb
|
874
885
|
- test/models/commit_checks_test.rb
|
875
886
|
- test/models/commit_deployment_status_test.rb
|
@@ -901,16 +912,21 @@ files:
|
|
901
912
|
- test/models/users_test.rb
|
902
913
|
- test/test_command_integration.rb
|
903
914
|
- test/test_helper.rb
|
915
|
+
- test/unit/anonymous_user_serializer_test.rb
|
904
916
|
- test/unit/command_test.rb
|
905
917
|
- test/unit/commands_test.rb
|
918
|
+
- test/unit/commit_serializer_test.rb
|
906
919
|
- test/unit/csv_serializer_test.rb
|
907
920
|
- test/unit/deploy_commands_test.rb
|
921
|
+
- test/unit/deploy_serializer_test.rb
|
908
922
|
- test/unit/environment_variables_test.rb
|
909
923
|
- test/unit/github_app_test.rb
|
910
924
|
- test/unit/github_url_helper_test.rb
|
911
925
|
- test/unit/line_buffer_test.rb
|
912
926
|
- test/unit/rollback_commands_test.rb
|
927
|
+
- test/unit/shipit_helper_test.rb
|
913
928
|
- test/unit/shipit_test.rb
|
929
|
+
- test/unit/user_serializer_test.rb
|
914
930
|
- test/unit/variable_definition_test.rb
|
915
931
|
- vendor/assets/javascripts/clusterize.js
|
916
932
|
- vendor/assets/javascripts/jquery-notify.js
|
@@ -921,7 +937,8 @@ files:
|
|
921
937
|
homepage: https://github.com/shopify/shipit-engine
|
922
938
|
licenses:
|
923
939
|
- MIT
|
924
|
-
metadata:
|
940
|
+
metadata:
|
941
|
+
allowed_push_host: https://rubygems.org
|
925
942
|
post_install_message:
|
926
943
|
rdoc_options: []
|
927
944
|
require_paths:
|
@@ -942,154 +959,162 @@ signing_key:
|
|
942
959
|
specification_version: 4
|
943
960
|
summary: Application deployment software
|
944
961
|
test_files:
|
945
|
-
- test/
|
946
|
-
- test/
|
962
|
+
- test/dummy/public/favicon.ico
|
963
|
+
- test/dummy/public/500.html
|
964
|
+
- test/dummy/public/422.html
|
965
|
+
- test/dummy/public/404.html
|
966
|
+
- test/dummy/db/seeds.rb
|
967
|
+
- test/dummy/db/schema.rb
|
968
|
+
- test/dummy/bin/rake
|
969
|
+
- test/dummy/bin/bundle
|
970
|
+
- test/dummy/bin/rails
|
971
|
+
- test/dummy/bin/setup
|
972
|
+
- test/dummy/app/views/layouts/application.html.erb
|
973
|
+
- test/dummy/app/assets/stylesheets/application.css
|
974
|
+
- test/dummy/app/assets/javascripts/application.js
|
975
|
+
- test/dummy/app/controllers/application_controller.rb
|
976
|
+
- test/dummy/app/helpers/application_helper.rb
|
977
|
+
- test/dummy/config.ru
|
978
|
+
- test/dummy/Rakefile
|
979
|
+
- test/dummy/config/application.rb
|
980
|
+
- test/dummy/config/database.yml
|
981
|
+
- test/dummy/config/locales/en.yml
|
982
|
+
- test/dummy/config/secrets.yml
|
983
|
+
- test/dummy/config/boot.rb
|
984
|
+
- test/dummy/config/database.mysql.yml
|
985
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
986
|
+
- test/dummy/config/initializers/session_store.rb
|
987
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
988
|
+
- test/dummy/config/initializers/mime_types.rb
|
989
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
990
|
+
- test/dummy/config/initializers/0_load_development_secrets.rb
|
991
|
+
- test/dummy/config/initializers/assets.rb
|
992
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
993
|
+
- test/dummy/config/initializers/inflections.rb
|
994
|
+
- test/dummy/config/environment.rb
|
995
|
+
- test/dummy/config/routes.rb
|
996
|
+
- test/dummy/config/database.postgresql.yml
|
997
|
+
- test/dummy/config/environments/test.rb
|
998
|
+
- test/dummy/config/environments/development.rb
|
999
|
+
- test/dummy/config/environments/production.rb
|
1000
|
+
- test/controllers/webhooks_controller_test.rb
|
1001
|
+
- test/controllers/rollbacks_controller_test.rb
|
947
1002
|
- test/controllers/github_authentication_controller_test.rb
|
948
|
-
- test/controllers/pull_requests_controller_test.rb
|
949
|
-
- test/controllers/tasks_controller_test.rb
|
950
|
-
- test/controllers/commits_controller_test.rb
|
951
1003
|
- test/controllers/merge_status_controller_test.rb
|
952
|
-
- test/controllers/
|
953
|
-
- test/controllers/deploys_controller_test.rb
|
954
|
-
- test/controllers/api_clients_controller_test.rb
|
1004
|
+
- test/controllers/commit_checks_controller_test.rb
|
955
1005
|
- test/controllers/ccmenu_controller_test.rb
|
956
|
-
- test/controllers/
|
957
|
-
- test/controllers/
|
958
|
-
- test/controllers/api/base_controller_test.rb
|
959
|
-
- test/controllers/api/outputs_controller_test.rb
|
960
|
-
- test/controllers/api/pull_requests_controller_test.rb
|
961
|
-
- test/controllers/api/tasks_controller_test.rb
|
1006
|
+
- test/controllers/stacks_controller_test.rb
|
1007
|
+
- test/controllers/deploys_controller_test.rb
|
962
1008
|
- test/controllers/api/hooks_controller_test.rb
|
963
|
-
- test/controllers/api/commits_controller_test.rb
|
964
|
-
- test/controllers/api/deploys_controller_test.rb
|
965
1009
|
- test/controllers/api/ccmenu_controller_test.rb
|
966
1010
|
- test/controllers/api/stacks_controller_test.rb
|
967
|
-
- test/controllers/
|
968
|
-
- test/controllers/
|
969
|
-
- test/controllers/
|
970
|
-
- test/
|
971
|
-
- test/
|
1011
|
+
- test/controllers/api/base_controller_test.rb
|
1012
|
+
- test/controllers/api/locks_controller_test.rb
|
1013
|
+
- test/controllers/api/deploys_controller_test.rb
|
1014
|
+
- test/controllers/api/commits_controller_test.rb
|
1015
|
+
- test/controllers/api/release_statuses_controller_test.rb
|
1016
|
+
- test/controllers/api/rollback_controller_test.rb
|
1017
|
+
- test/controllers/api/pull_requests_controller_test.rb
|
1018
|
+
- test/controllers/api/tasks_controller_test.rb
|
1019
|
+
- test/controllers/api/outputs_controller_test.rb
|
1020
|
+
- test/controllers/status_controller_test.rb
|
1021
|
+
- test/controllers/commits_controller_test.rb
|
1022
|
+
- test/controllers/release_statuses_controller_test.rb
|
1023
|
+
- test/controllers/pull_requests_controller_test.rb
|
1024
|
+
- test/controllers/tasks_controller_test.rb
|
1025
|
+
- test/controllers/api_clients_controller_test.rb
|
1026
|
+
- test/unit/command_test.rb
|
1027
|
+
- test/unit/shipit_helper_test.rb
|
1028
|
+
- test/unit/user_serializer_test.rb
|
972
1029
|
- test/unit/commands_test.rb
|
1030
|
+
- test/unit/line_buffer_test.rb
|
1031
|
+
- test/unit/deploy_commands_test.rb
|
973
1032
|
- test/unit/shipit_test.rb
|
974
|
-
- test/unit/
|
975
|
-
- test/unit/
|
1033
|
+
- test/unit/rollback_commands_test.rb
|
1034
|
+
- test/unit/deploy_serializer_test.rb
|
1035
|
+
- test/unit/anonymous_user_serializer_test.rb
|
1036
|
+
- test/unit/csv_serializer_test.rb
|
1037
|
+
- test/unit/commit_serializer_test.rb
|
1038
|
+
- test/unit/variable_definition_test.rb
|
976
1039
|
- test/unit/github_url_helper_test.rb
|
1040
|
+
- test/unit/environment_variables_test.rb
|
977
1041
|
- test/unit/github_app_test.rb
|
978
|
-
- test/unit/deploy_commands_test.rb
|
979
|
-
- test/unit/rollback_commands_test.rb
|
980
|
-
- test/unit/line_buffer_test.rb
|
981
|
-
- test/test_helper.rb
|
982
|
-
- test/jobs/refresh_status_job_test.rb
|
983
|
-
- test/jobs/chunk_rollup_job_test.rb
|
984
|
-
- test/jobs/deliver_hook_job_test.rb
|
985
|
-
- test/jobs/emit_event_job_test.rb
|
986
|
-
- test/jobs/perform_task_job_test.rb
|
987
|
-
- test/jobs/mark_deploy_healthy_job_test.rb
|
988
|
-
- test/jobs/destroy_stack_job_test.rb
|
989
|
-
- test/jobs/purge_old_deliveries_job_test.rb
|
990
|
-
- test/jobs/update_github_last_deployed_ref_job_test.rb
|
991
|
-
- test/jobs/github_sync_job_test.rb
|
992
|
-
- test/jobs/unique_job_test.rb
|
993
|
-
- test/jobs/refresh_github_user_job_test.rb
|
994
|
-
- test/jobs/merge_pull_requests_job_test.rb
|
995
|
-
- test/jobs/fetch_deployed_revision_job_test.rb
|
996
|
-
- test/jobs/fetch_commit_stats_job_test.rb
|
997
|
-
- test/jobs/cache_deploy_spec_job_test.rb
|
998
|
-
- test/models/status/missing_test.rb
|
999
|
-
- test/models/status/group_test.rb
|
1000
|
-
- test/models/tasks_test.rb
|
1001
|
-
- test/models/github_hook_test.rb
|
1002
|
-
- test/models/duration_test.rb
|
1003
|
-
- test/models/output_chunk_test.rb
|
1004
|
-
- test/models/task_definitions_test.rb
|
1005
|
-
- test/models/team_test.rb
|
1006
1042
|
- test/models/release_statuses_test.rb
|
1007
|
-
- test/models/
|
1008
|
-
- test/models/commit_deployment_test.rb
|
1009
|
-
- test/models/deploy_spec_test.rb
|
1010
|
-
- test/models/commit_deployment_status_test.rb
|
1011
|
-
- test/models/api_client_test.rb
|
1012
|
-
- test/models/membership_test.rb
|
1043
|
+
- test/models/deploys_test.rb
|
1013
1044
|
- test/models/undeployed_commits_test.rb
|
1045
|
+
- test/models/team_test.rb
|
1046
|
+
- test/models/rollbacks_test.rb
|
1014
1047
|
- test/models/commit_checks_test.rb
|
1048
|
+
- test/models/github_hook_test.rb
|
1049
|
+
- test/models/task_definitions_test.rb
|
1050
|
+
- test/models/tasks_test.rb
|
1051
|
+
- test/models/output_chunk_test.rb
|
1052
|
+
- test/models/commit_deployment_status_test.rb
|
1015
1053
|
- test/models/delivery_test.rb
|
1016
|
-
- test/models/
|
1054
|
+
- test/models/users_test.rb
|
1055
|
+
- test/models/commit_deployment_test.rb
|
1056
|
+
- test/models/duration_test.rb
|
1057
|
+
- test/models/api_client_test.rb
|
1058
|
+
- test/models/shipit/wehbooks/handlers_test.rb
|
1059
|
+
- test/models/shipit/repository_test.rb
|
1060
|
+
- test/models/shipit/check_run_test.rb
|
1061
|
+
- test/models/commits_test.rb
|
1062
|
+
- test/models/status/group_test.rb
|
1063
|
+
- test/models/status/missing_test.rb
|
1064
|
+
- test/models/deploy_spec_test.rb
|
1017
1065
|
- test/models/stacks_test.rb
|
1018
1066
|
- test/models/deploy_stats_test.rb
|
1019
|
-
- test/models/deploys_test.rb
|
1020
1067
|
- test/models/hook_test.rb
|
1021
|
-
- test/models/
|
1022
|
-
- test/models/
|
1023
|
-
- test/models/shipit/check_run_test.rb
|
1068
|
+
- test/models/membership_test.rb
|
1069
|
+
- test/models/status_test.rb
|
1024
1070
|
- test/models/pull_request_test.rb
|
1025
|
-
- test/
|
1026
|
-
- test/
|
1027
|
-
- test/helpers/
|
1071
|
+
- test/middleware/same_site_cookie_middleware_test.rb
|
1072
|
+
- test/test_command_integration.rb
|
1073
|
+
- test/helpers/hooks_helper.rb
|
1028
1074
|
- test/helpers/queries_helper.rb
|
1029
|
-
- test/helpers/
|
1075
|
+
- test/helpers/json_helper.rb
|
1076
|
+
- test/helpers/fixture_aliases_helper.rb
|
1030
1077
|
- test/helpers/payloads_helper.rb
|
1031
1078
|
- test/helpers/links_helper.rb
|
1032
|
-
- test/helpers/
|
1033
|
-
- test/
|
1034
|
-
- test/
|
1035
|
-
- test/
|
1036
|
-
- test/
|
1037
|
-
- test/
|
1038
|
-
- test/
|
1039
|
-
- test/
|
1040
|
-
- test/
|
1041
|
-
- test/
|
1042
|
-
- test/
|
1043
|
-
- test/
|
1044
|
-
- test/
|
1045
|
-
- test/
|
1046
|
-
- test/
|
1047
|
-
- test/
|
1048
|
-
- test/
|
1049
|
-
- test/
|
1050
|
-
- test/dummy/config/initializers/mime_types.rb
|
1051
|
-
- test/dummy/config/initializers/inflections.rb
|
1052
|
-
- test/dummy/config/secrets.yml
|
1053
|
-
- test/dummy/config/database.mysql.yml
|
1054
|
-
- test/dummy/config/application.rb
|
1055
|
-
- test/dummy/config/database.postgresql.yml
|
1056
|
-
- test/dummy/config/database.yml
|
1057
|
-
- test/dummy/config/environment.rb
|
1058
|
-
- test/dummy/config/boot.rb
|
1059
|
-
- test/dummy/config/locales/en.yml
|
1060
|
-
- test/dummy/config/environments/development.rb
|
1061
|
-
- test/dummy/config/environments/test.rb
|
1062
|
-
- test/dummy/config/environments/production.rb
|
1063
|
-
- test/dummy/config/routes.rb
|
1064
|
-
- test/dummy/public/500.html
|
1065
|
-
- test/dummy/public/favicon.ico
|
1066
|
-
- test/dummy/public/422.html
|
1067
|
-
- test/dummy/public/404.html
|
1068
|
-
- test/dummy/db/schema.rb
|
1069
|
-
- test/dummy/db/seeds.rb
|
1070
|
-
- test/dummy/Rakefile
|
1071
|
-
- test/dummy/config.ru
|
1072
|
-
- test/test_command_integration.rb
|
1073
|
-
- test/fixtures/payloads/push_not_master.json
|
1074
|
-
- test/fixtures/payloads/check_suite_master.json
|
1075
|
-
- test/fixtures/payloads/push_master.json
|
1076
|
-
- test/fixtures/payloads/status_master.json
|
1079
|
+
- test/helpers/api_helper.rb
|
1080
|
+
- test/jobs/emit_event_job_test.rb
|
1081
|
+
- test/jobs/unique_job_test.rb
|
1082
|
+
- test/jobs/merge_pull_requests_job_test.rb
|
1083
|
+
- test/jobs/deliver_hook_job_test.rb
|
1084
|
+
- test/jobs/update_github_last_deployed_ref_job_test.rb
|
1085
|
+
- test/jobs/refresh_status_job_test.rb
|
1086
|
+
- test/jobs/fetch_deployed_revision_job_test.rb
|
1087
|
+
- test/jobs/purge_old_deliveries_job_test.rb
|
1088
|
+
- test/jobs/refresh_github_user_job_test.rb
|
1089
|
+
- test/jobs/chunk_rollup_job_test.rb
|
1090
|
+
- test/jobs/mark_deploy_healthy_job_test.rb
|
1091
|
+
- test/jobs/reap_dead_tasks_job_test.rb
|
1092
|
+
- test/jobs/fetch_commit_stats_job_test.rb
|
1093
|
+
- test/jobs/cache_deploy_spec_job_test.rb
|
1094
|
+
- test/jobs/perform_task_job_test.rb
|
1095
|
+
- test/jobs/github_sync_job_test.rb
|
1096
|
+
- test/jobs/destroy_stack_job_test.rb
|
1077
1097
|
- test/fixtures/timeout
|
1078
|
-
- test/fixtures/shipit/memberships.yml
|
1079
1098
|
- test/fixtures/shipit/check_runs.yml
|
1080
|
-
- test/fixtures/shipit/
|
1081
|
-
- test/fixtures/shipit/tasks.yml
|
1099
|
+
- test/fixtures/shipit/release_statuses.yml
|
1082
1100
|
- test/fixtures/shipit/users.yml
|
1083
|
-
- test/fixtures/shipit/
|
1101
|
+
- test/fixtures/shipit/output_chunks.yml
|
1084
1102
|
- test/fixtures/shipit/deliveries.yml
|
1085
|
-
- test/fixtures/shipit/stacks.yml
|
1086
|
-
- test/fixtures/shipit/pull_requests.yml
|
1087
|
-
- test/fixtures/shipit/teams.yml
|
1088
|
-
- test/fixtures/shipit/github_hooks.yml
|
1089
1103
|
- test/fixtures/shipit/hooks.yml
|
1090
|
-
- test/fixtures/shipit/
|
1091
|
-
- test/fixtures/shipit/
|
1104
|
+
- test/fixtures/shipit/github_hooks.yml
|
1105
|
+
- test/fixtures/shipit/statuses.yml
|
1106
|
+
- test/fixtures/shipit/memberships.yml
|
1107
|
+
- test/fixtures/shipit/teams.yml
|
1108
|
+
- test/fixtures/shipit/tasks.yml
|
1109
|
+
- test/fixtures/shipit/api_clients.yml
|
1110
|
+
- test/fixtures/shipit/stacks.yml
|
1092
1111
|
- test/fixtures/shipit/commits.yml
|
1112
|
+
- test/fixtures/shipit/repositories.yml
|
1113
|
+
- test/fixtures/shipit/pull_requests.yml
|
1093
1114
|
- test/fixtures/shipit/commit_deployments.yml
|
1094
|
-
- test/fixtures/shipit/
|
1095
|
-
- test/fixtures/
|
1115
|
+
- test/fixtures/shipit/commit_deployment_statuses.yml
|
1116
|
+
- test/fixtures/payloads/status_master.json
|
1117
|
+
- test/fixtures/payloads/push_master.json
|
1118
|
+
- test/fixtures/payloads/push_not_master.json
|
1119
|
+
- test/fixtures/payloads/check_suite_master.json
|
1120
|
+
- test/test_helper.rb
|