houston-core 0.5.0.beta1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +0 -2
- data/.gitignore +3 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +63 -62
- data/README.md +13 -121
- data/app/adapters/houston/adapters/ci_server/errors.rb +4 -4
- data/app/adapters/houston/adapters/ci_server/jenkins_adapter/job.rb +50 -50
- data/app/adapters/houston/adapters/ci_server/jenkins_adapter.rb +4 -4
- data/app/adapters/houston/adapters/ci_server/none_adapter/job.rb +5 -5
- data/app/adapters/houston/adapters/ci_server/none_adapter.rb +4 -4
- data/app/adapters/houston/adapters/deployment/engineyard.rb +20 -20
- data/app/adapters/houston/adapters/error_tracker/errbit_adapter/app.rb +14 -14
- data/app/adapters/houston/adapters/error_tracker/errbit_adapter/connection.rb +41 -41
- data/app/adapters/houston/adapters/error_tracker/errbit_adapter/notice.rb +6 -6
- data/app/adapters/houston/adapters/error_tracker/errbit_adapter/problem.rb +25 -25
- data/app/adapters/houston/adapters/error_tracker/errbit_adapter.rb +20 -20
- data/app/adapters/houston/adapters/error_tracker/none_adapter.rb +8 -8
- data/app/adapters/houston/adapters/error_tracker/null_app.rb +13 -13
- data/app/adapters/houston/adapters/ticket_tracker/errors.rb +5 -5
- data/app/adapters/houston/adapters/ticket_tracker/github_adapter/connection.rb +41 -41
- data/app/adapters/houston/adapters/ticket_tracker/github_adapter/issue.rb +22 -22
- data/app/adapters/houston/adapters/ticket_tracker/github_adapter.rb +7 -7
- data/app/adapters/houston/adapters/ticket_tracker/houston_adapter/connection.rb +13 -13
- data/app/adapters/houston/adapters/ticket_tracker/houston_adapter/ticket.rb +15 -15
- data/app/adapters/houston/adapters/ticket_tracker/houston_adapter.rb +4 -4
- data/app/adapters/houston/adapters/ticket_tracker/none_adapter.rb +4 -4
- data/app/adapters/houston/adapters/ticket_tracker/null_connection.rb +13 -13
- data/app/adapters/houston/adapters/ticket_tracker/null_ticket.rb +19 -19
- data/app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/connection.rb +54 -54
- data/app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb +10 -10
- data/app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/ticket.rb +59 -59
- data/app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter.rb +9 -9
- data/app/adapters/houston/adapters/version_control/commit.rb +4 -4
- data/app/adapters/houston/adapters/version_control/errors.rb +9 -9
- data/app/adapters/houston/adapters/version_control/git_adapter/github_repo.rb +15 -15
- data/app/adapters/houston/adapters/version_control/git_adapter/remote_repo.rb +53 -30
- data/app/adapters/houston/adapters/version_control/git_adapter/repo.rb +60 -55
- data/app/adapters/houston/adapters/version_control/git_adapter.rb +22 -22
- data/app/adapters/houston/adapters/version_control/none_adapter.rb +4 -4
- data/app/adapters/houston/adapters/version_control/null_commit.rb +4 -4
- data/app/adapters/houston/adapters/version_control/null_repo.rb +18 -18
- data/app/adapters/houston/adapters.rb +10 -10
- data/app/assets/javascripts/app/boot.coffee +5 -5
- data/app/assets/javascripts/app/infinite_scroll.coffee +6 -6
- data/app/assets/javascripts/app/models/commit.coffee +1 -1
- data/app/assets/javascripts/app/models/release.coffee +1 -1
- data/app/assets/javascripts/app/models/task.coffee +1 -1
- data/app/assets/javascripts/app/models/tester.coffee +1 -1
- data/app/assets/javascripts/app/models/testing_note.coffee +2 -2
- data/app/assets/javascripts/app/models/ticket.coffee +24 -24
- data/app/assets/javascripts/app/models/user.coffee +1 -1
- data/app/assets/javascripts/app/releases.coffee +6 -6
- data/app/assets/javascripts/app/stacked_area_graph.coffee +22 -22
- data/app/assets/javascripts/app/stacked_bar_graph.coffee +20 -20
- data/app/assets/javascripts/app/table_row_expander.coffee +10 -10
- data/app/assets/javascripts/app/ticket_tracker_refresh.coffee +19 -19
- data/app/assets/javascripts/app/views/_show_sprint_view.coffee +14 -14
- data/app/assets/javascripts/app/views/_tickets_view.coffee +8 -8
- data/app/assets/javascripts/app/views/all_tickets_view.coffee +1 -2
- data/app/assets/javascripts/app/views/commit_view.coffee +2 -2
- data/app/assets/javascripts/app/views/edit_sprint_view.coffee +36 -36
- data/app/assets/javascripts/app/views/find_or_create_ticket_view.coffee +3 -3
- data/app/assets/javascripts/app/views/keyboard_shortcuts_modal.coffee +14 -14
- data/app/assets/javascripts/app/views/new_ticket_modal.coffee +4 -4
- data/app/assets/javascripts/app/views/new_ticket_view.coffee +34 -34
- data/app/assets/javascripts/app/views/problems_view.coffee +8 -8
- data/app/assets/javascripts/app/views/reports_view.coffee +5 -5
- data/app/assets/javascripts/app/views/testing_note_view.coffee +10 -10
- data/app/assets/javascripts/app/views/testing_report_view.coffee +7 -7
- data/app/assets/javascripts/app/views/testing_ticket_view.coffee +36 -36
- data/app/assets/javascripts/app/views/ticket_modal_view.coffee +5 -5
- data/app/assets/javascripts/core/app.coffee +22 -22
- data/app/assets/javascripts/core/burndown_chart.coffee +21 -21
- data/app/assets/javascripts/core/errors.coffee +2 -2
- data/app/assets/javascripts/core/handlebars_helpers.coffee +6 -6
- data/app/assets/javascripts/core/jquery_extensions.coffee +28 -28
- data/app/assets/javascripts/dashboard/refresher.coffee +4 -4
- data/app/assets/stylesheets/application/ansi.scss +2 -2
- data/app/assets/stylesheets/application/commit.scss +1 -1
- data/app/assets/stylesheets/application/exceptions.scss +3 -3
- data/app/assets/stylesheets/application/find_or_create_ticket.scss +2 -2
- data/app/assets/stylesheets/application/follow_up.scss +2 -2
- data/app/assets/stylesheets/application/forms.scss +2 -2
- data/app/assets/stylesheets/application/freight_train.css.scss +5 -5
- data/app/assets/stylesheets/application/full_screen.scss +2 -2
- data/app/assets/stylesheets/application/infinite_scroll.scss +1 -1
- data/app/assets/stylesheets/application/keyboard_shortcuts.scss +3 -3
- data/app/assets/stylesheets/application/markdown.scss +2 -2
- data/app/assets/stylesheets/application/navigation.scss +15 -15
- data/app/assets/stylesheets/application/new_ticket_view.scss +16 -16
- data/app/assets/stylesheets/application/omnibar.scss +6 -6
- data/app/assets/stylesheets/application/project_banner_buttons.scss +6 -6
- data/app/assets/stylesheets/application/project_tiles.scss +2 -2
- data/app/assets/stylesheets/application/projects.css.scss +3 -3
- data/app/assets/stylesheets/application/pull_requests.scss +6 -6
- data/app/assets/stylesheets/application/queue.scss +2 -2
- data/app/assets/stylesheets/application/release_form.scss +10 -10
- data/app/assets/stylesheets/application/releases.scss +32 -39
- data/app/assets/stylesheets/application/sortable_table.scss +6 -6
- data/app/assets/stylesheets/application/sprint.scss +6 -6
- data/app/assets/stylesheets/application/tables.scss +6 -6
- data/app/assets/stylesheets/application/test_run.scss +16 -16
- data/app/assets/stylesheets/application/ticket.scss +13 -13
- data/app/assets/stylesheets/application/ticket_modal.scss +19 -19
- data/app/assets/stylesheets/application/tickets.scss +2 -2
- data/app/assets/stylesheets/application/timeline.scss +30 -30
- data/app/assets/stylesheets/application/tips.scss +1 -1
- data/app/assets/stylesheets/application/typeahead.scss +4 -4
- data/app/assets/stylesheets/application/uploading.scss +13 -13
- data/app/assets/stylesheets/application/welcome.scss +3 -3
- data/app/assets/stylesheets/core/burndown_chart.scss +11 -11
- data/app/assets/stylesheets/core/misc.scss +8 -8
- data/app/assets/stylesheets/core/overrides.scss +2 -2
- data/app/assets/stylesheets/core/scores.scss +26 -26
- data/app/assets/stylesheets/dashboard/dashboard.scss +16 -16
- data/app/assets/stylesheets/print.css.scss +3 -3
- data/app/concerns/commit_synchronizer.rb +24 -24
- data/app/concerns/feature_state.rb +7 -7
- data/app/concerns/feature_support.rb +4 -4
- data/app/concerns/historical_weekly_stats.rb +4 -4
- data/app/concerns/milestone_synchronizer.rb +14 -14
- data/app/concerns/nosync.rb +4 -4
- data/app/concerns/project_adapter.rb +22 -22
- data/app/concerns/retirement.rb +7 -7
- data/app/concerns/ticket_synchronizer.rb +31 -31
- data/app/concerns/unique_add.rb +2 -2
- data/app/controllers/api/v1/sprint_tasks_controller.rb +19 -19
- data/app/controllers/api/v1/ticket_tasks_controller.rb +14 -14
- data/app/controllers/application_controller.rb +46 -40
- data/app/controllers/commits_controller.rb +10 -10
- data/app/controllers/deploys_controller.rb +11 -11
- data/app/controllers/home_controller.rb +4 -4
- data/app/controllers/jobs_controller.rb +3 -3
- data/app/controllers/oauth_consumers_controller.rb +1 -1
- data/app/controllers/omnibar_controller.rb +6 -6
- data/app/controllers/project_exceptions_controller.rb +11 -11
- data/app/controllers/project_hooks_controller.rb +7 -7
- data/app/controllers/project_options_controller.rb +8 -8
- data/app/controllers/project_pretickets_controller.rb +6 -6
- data/app/controllers/project_roles_controller.rb +7 -7
- data/app/controllers/project_tickets_controller.rb +28 -28
- data/app/controllers/project_tickets_sync_controller.rb +8 -8
- data/app/controllers/projects_controller.rb +29 -29
- data/app/controllers/releases_controller.rb +25 -25
- data/app/controllers/reports_controller.rb +36 -36
- data/app/controllers/sessions_controller.rb +2 -2
- data/app/controllers/settings_controller.rb +3 -3
- data/app/controllers/sprint_task_locks_controller.rb +11 -11
- data/app/controllers/sprints_controller.rb +25 -25
- data/app/controllers/tasks_controller.rb +10 -10
- data/app/controllers/test_runs_controller.rb +8 -8
- data/app/controllers/tester_bar_controller.rb +2 -2
- data/app/controllers/testing_notes_controller.rb +15 -15
- data/app/controllers/testing_report_controller.rb +14 -14
- data/app/controllers/tickets_controller.rb +9 -9
- data/app/controllers/uploads_controller.rb +9 -9
- data/app/controllers/user_credentials_controller.rb +4 -4
- data/app/controllers/user_options_controller.rb +6 -6
- data/app/controllers/users_controller.rb +34 -34
- data/app/controllers/welcome_controller.rb +6 -6
- data/app/helpers/ansi_helper.rb +4 -4
- data/app/helpers/application_helper.rb +26 -26
- data/app/helpers/avatar_helper.rb +12 -12
- data/app/helpers/backtrace_helper.rb +2 -2
- data/app/helpers/breadcrumbs_helper.rb +9 -9
- data/app/helpers/commit_helper.rb +16 -12
- data/app/helpers/demo_helper.rb +4 -4
- data/app/helpers/email_helper.rb +3 -3
- data/app/helpers/emoji_helper.rb +1 -1
- data/app/helpers/excel_helpers.rb +2 -2
- data/app/helpers/exposure_helper.rb +3 -3
- data/app/helpers/flash_message_helper.rb +6 -6
- data/app/helpers/maintenance_light_helper.rb +3 -3
- data/app/helpers/markdown_helper.rb +3 -3
- data/app/helpers/navigation_helper.rb +12 -12
- data/app/helpers/project_helper.rb +5 -5
- data/app/helpers/release_helper.rb +9 -9
- data/app/helpers/score_card_helper.rb +16 -16
- data/app/helpers/sprint_helper.rb +2 -2
- data/app/helpers/static_chart_helper.rb +2 -2
- data/app/helpers/test_run_helper.rb +6 -6
- data/app/helpers/ticket_helper.rb +14 -14
- data/app/helpers/timeline_helper.rb +5 -5
- data/app/helpers/url_helper.rb +26 -26
- data/app/helpers/user_helper.rb +6 -6
- data/app/helpers/version_helper.rb +4 -4
- data/app/interactors/test_run_comparer.rb +9 -9
- data/app/interactors/ticket_report.rb +7 -7
- data/app/jobs/sync_all_tickets_job.rb +13 -13
- data/app/jobs/sync_commits_job.rb +3 -3
- data/app/jobs/sync_project_tickets_job.rb +9 -9
- data/app/mailers/deploy_notification.rb +9 -9
- data/app/mailers/project_notification.rb +29 -29
- data/app/mailers/view_mailer.rb +20 -38
- data/app/models/ability.rb +21 -21
- data/app/models/activity_feed.rb +25 -25
- data/app/models/antecedent.rb +3 -3
- data/app/models/code_climate/coverage_report.rb +25 -25
- data/app/models/commit.rb +77 -82
- data/app/models/consumer_token.rb +2 -2
- data/app/models/deploy.rb +31 -27
- data/app/models/environment.rb +12 -12
- data/app/models/github/commit_status_report.rb +16 -16
- data/app/models/github/pull_request.rb +35 -12
- data/app/models/github/pull_request_event.rb +6 -5
- data/app/models/github_token.rb +2 -2
- data/app/models/historical_head.rb +2 -2
- data/app/models/key_dependency.rb +17 -17
- data/app/models/maintenance_light.rb +3 -3
- data/app/models/measurement.rb +22 -22
- data/app/models/menu_item.rb +5 -5
- data/app/models/menu_item_divider.rb +1 -1
- data/app/models/milestone.rb +27 -27
- data/app/models/output_stream.rb +4 -4
- data/app/models/post_receive_payload.rb +7 -7
- data/app/models/project.rb +93 -89
- data/app/models/project_dependencies.rb +9 -9
- data/app/models/project_dependency.rb +33 -33
- data/app/models/project_menu_item.rb +3 -3
- data/app/models/release.rb +60 -60
- data/app/models/release_change.rb +18 -18
- data/app/models/role.rb +15 -15
- data/app/models/rubygems/gem.rb +21 -21
- data/app/models/run_tests_on_post_receive.rb +36 -36
- data/app/models/setting.rb +3 -3
- data/app/models/settings.rb +8 -8
- data/app/models/source_file_coverage.rb +2 -2
- data/app/models/sprint.rb +19 -19
- data/app/models/sprint_report.rb +7 -7
- data/app/models/sprint_task.rb +8 -8
- data/app/models/static_chart/area.rb +19 -19
- data/app/models/static_chart.rb +35 -35
- data/app/models/task.rb +64 -64
- data/app/models/test_error.rb +2 -2
- data/app/models/test_result.rb +7 -0
- data/app/models/test_run.rb +75 -79
- data/app/models/test_run_statistics.rb +18 -19
- data/app/models/testing_note.rb +19 -19
- data/app/models/ticket.rb +104 -104
- data/app/models/ticket_antecedent.rb +11 -11
- data/app/models/ticket_comment.rb +6 -6
- data/app/models/ticket_committer.rb +3 -3
- data/app/models/ticket_tag.rb +6 -6
- data/app/models/user.rb +44 -44
- data/app/models/user_credentials.rb +11 -11
- data/app/models/value_statement.rb +3 -3
- data/app/presenters/commit_presenter.rb +6 -6
- data/app/presenters/one_or_many.rb +4 -4
- data/app/presenters/problem_presenter.rb +8 -8
- data/app/presenters/release_presenter.rb +4 -4
- data/app/presenters/sprint_task_presenter.rb +9 -9
- data/app/presenters/task_presenter.rb +8 -8
- data/app/presenters/tasks_excel_presenter.rb +6 -6
- data/app/presenters/tester_presenter.rb +3 -3
- data/app/presenters/testing_note_presenter.rb +4 -4
- data/app/presenters/testing_report_ticket_presenter.rb +9 -9
- data/app/presenters/ticket_presenter.rb +4 -4
- data/app/views/deploys/show.html.erb +8 -0
- data/app/views/jobs/show.html.erb +0 -34
- data/app/views/layouts/application.html.erb +1 -0
- data/app/views/layouts/minimal.html.erb +1 -0
- data/app/views/projects/_form.html.erb +0 -7
- data/app/views/releases/_form.html.erb +9 -3
- data/app/views/releases/index.html.erb +1 -1
- data/config/application.rb +1 -2
- data/config/database.yml +3 -3
- data/config/environments/production.rb +1 -1
- data/config/environments/test.rb +1 -1
- data/config/initializers/action_view_field_error_proc.rb +3 -3
- data/config/initializers/constants.rb +3 -3
- data/config/initializers/devise.rb +8 -8
- data/config/initializers/hard_coded_knowledge.rb +3 -3
- data/config/initializers/houston_async.rb +2 -2
- data/config/initializers/houston_report_exception.rb +3 -3
- data/config/initializers/houston_try.rb +3 -3
- data/config/initializers/sync_commits_on_post_receive.rb +0 -5
- data/config/routes.rb +108 -108
- data/db/migrate/20120417175450_devise_create_users.rb +2 -2
- data/db/migrate/20120501230243_add_unfuddle_id_to_tickets.rb +1 -1
- data/db/migrate/20120504143615_link_tickets_and_releases.rb +3 -3
- data/db/migrate/20120626150333_add_last_release_at_to_tickets.rb +2 -2
- data/db/migrate/20120626151320_link_tickets_and_commits.rb +2 -2
- data/db/migrate/20120626152020_add_committer_email_to_commits.rb +2 -2
- data/db/migrate/20120715230922_create_user_notifications.rb +3 -3
- data/db/migrate/20120716010743_add_user_to_releases.rb +3 -3
- data/db/migrate/20120726231754_link_projects_and_maintainers.rb +2 -2
- data/db/migrate/20120826022643_add_authentication_token_to_users.rb +2 -2
- data/db/migrate/20120920023251_add_administrator_to_users.rb +3 -3
- data/db/migrate/20121026014457_split_users_name_into_first_and_last.rb +2 -2
- data/db/migrate/20121027160548_create_deploys.rb +1 -1
- data/db/migrate/20121222170917_add_version_control_adapter_to_projects.rb +2 -2
- data/db/migrate/20121222223635_add_ticket_tracking_adapter_to_projects.rb +2 -2
- data/db/migrate/20121224212623_rename_environments.rb +3 -3
- data/db/migrate/20121225175106_replace_environment_id_with_environment_name.rb +8 -8
- data/db/migrate/20121230174234_create_test_runs.rb +3 -3
- data/db/migrate/20130119203853_remove_cached_queries_from_projects.rb +1 -1
- data/db/migrate/20130119204608_add_extended_attributes_to_tickets.rb +10 -10
- data/db/migrate/20130120182026_create_ticket_prerequisites.rb +2 -2
- data/db/migrate/20130312224911_create_errors.rb +1 -1
- data/db/migrate/20130407195450_create_roles.rb +2 -2
- data/db/migrate/20130407200624_populate_roles.rb +9 -9
- data/db/migrate/20130407220039_add_project_id_to_testing_notes.rb +6 -6
- data/db/migrate/20130407220937_add_project_id_to_commits.rb +6 -6
- data/db/migrate/20130416020627_add_environments_subscribed_to_to_users.rb +3 -3
- data/db/migrate/20130420174126_add_error_tracker_name_to_projects.rb +2 -2
- data/db/migrate/20130427223925_create_project_quotas.rb +2 -2
- data/db/migrate/20130504014802_add_extended_attributes_to_projects.rb +3 -3
- data/db/migrate/20130504135741_add_antecedents_to_tickets.rb +6 -6
- data/db/migrate/20130505144446_add_tags_to_tickets.rb +1 -1
- data/db/migrate/20130505162039_add_type_to_tickets.rb +1 -1
- data/db/migrate/20130505212838_add_closed_at_to_tickets.rb +1 -1
- data/db/migrate/20130519163615_create_user_credentials.rb +2 -2
- data/db/migrate/20130526024851_give_default_values_for_counts_from_test_runs.rb +2 -2
- data/db/migrate/20130710233849_add_authored_at_to_commits.rb +10 -10
- data/db/migrate/20130711013156_link_commits_and_users.rb +6 -6
- data/db/migrate/20130806143651_link_commits_and_releases.rb +2 -2
- data/db/migrate/20130921141449_create_milestones.rb +3 -3
- data/db/migrate/20131004185618_add_first_release_at_to_tickets.rb +2 -2
- data/db/migrate/20131012152403_create_sprints.rb +3 -3
- data/db/migrate/20131112010815_delete_duplicate_commits.rb +7 -7
- data/db/migrate/20140217160450_add_email_addresses_to_users.rb +3 -3
- data/db/migrate/20140327020121_drop_ticket_prerequisites.rb +1 -1
- data/db/migrate/20140406183224_remove_new_relic_id_from_projects.rb +1 -1
- data/db/migrate/20140406230121_delete_automatically_generated_messages_for_releases.rb +1 -1
- data/db/migrate/20140407010111_drop_sprints_project_id.rb +1 -1
- data/db/migrate/20140418133005_change_ticket_antecedents_to_text_array.rb +1 -1
- data/db/migrate/20140425141946_embed_changes_in_releases.rb +3 -3
- data/db/migrate/20140515174322_create_tasks.rb +3 -3
- data/db/migrate/20140516012049_create_tasks_for_existing_tickets.rb +1 -1
- data/db/migrate/20140517012626_prevent_hstore_fields_from_being_null.rb +2 -2
- data/db/migrate/20140521014652_allow_task_descriptions_to_be_null.rb +1 -1
- data/db/migrate/20140526155845_add_commit_id_to_deploys.rb +5 -5
- data/db/migrate/20140526162645_add_commit_before_id_and_commit_after_id_to_releases.rb +4 -4
- data/db/migrate/20140526180608_associate_remaining_deploys_and_releases.rb +12 -12
- data/db/migrate/20140724231918_create_sprints_tasks.rb +3 -3
- data/db/migrate/20140824194031_add_project_id_to_tasks.rb +1 -1
- data/db/migrate/20140824194526_add_completed_at_to_tasks.rb +3 -3
- data/db/migrate/20140824211249_require_sprints_to_be_unique.rb +1 -1
- data/db/migrate/20140907012329_drop_table_changes.rb +1 -1
- data/db/migrate/20140907013836_drop_table_errors.rb +1 -1
- data/db/migrate/20140921190022_add_checked_out_to_sprints_tasks.rb +2 -2
- data/db/migrate/20140921201441_drop_users_name.rb +1 -1
- data/db/migrate/20140925021043_rename_deploys_commit_to_sha.rb +1 -1
- data/db/migrate/20140929004347_create_historical_heads.rb +4 -4
- data/db/migrate/20141027194819_make_users_environments_subscribed_to_an_array.rb +2 -2
- data/db/migrate/20141226171730_create_measurements.rb +1 -1
- data/db/migrate/20150119154013_drop_unused_fields_from_milestones.rb +1 -1
- data/db/migrate/20150222205616_add_features_to_projects.rb +2 -2
- data/db/migrate/20150323004452_add_deploys_completed_at.rb +1 -1
- data/db/migrate/20150805180939_add_commit_id_to_test_runs.rb +1 -1
- data/db/migrate/20150808161805_create_test_results.rb +1 -1
- data/db/migrate/20150809132417_rename_test_results_regression_to_difference.rb +1 -1
- data/db/migrate/20150927014445_required_pull_requests_to_be_unique_by_project_and_number.rb +13 -0
- data/db/structure.sql +9 -0
- data/houston.gemspec +23 -26
- data/lib/configuration.rb +0 -5
- data/lib/core_ext/duration.rb +4 -4
- data/lib/core_ext/hash.rb +17 -17
- data/lib/houston/version.rb +1 -1
- data/lib/houston_server.rb +6 -6
- data/lib/parallel_enumerable.rb +16 -16
- data/lib/tasks/specific_tests.rake +37 -0
- metadata +91 -107
- data/app/interactors/push_gemfile_to_gemnasium.rb +0 -88
- data/app/models/gemnasium/alert.rb +0 -25
- data/app/views/welcome/_tdl.html.erb +0 -31
- data/config/initializers/houston_tdl.rb +0 -104
@@ -3,47 +3,47 @@ module Houston
|
|
3
3
|
module CIServer
|
4
4
|
class JenkinsAdapter
|
5
5
|
class Job
|
6
|
-
|
6
|
+
|
7
7
|
def initialize(project)
|
8
8
|
@project = project
|
9
|
-
|
9
|
+
|
10
10
|
config = Houston.config.ci_server_configuration(:jenkins)
|
11
|
-
|
11
|
+
|
12
12
|
protocol = "http"
|
13
13
|
protocol = "https" if config[:port] == 443
|
14
14
|
jenkins_url = "#{protocol}://#{config[:host]}"
|
15
15
|
jenkins_url << ":#{config[:port]}" unless [80, 443].member?(config[:port])
|
16
|
-
|
16
|
+
|
17
17
|
@connection = Faraday.new(url: jenkins_url)
|
18
18
|
@connection.basic_auth config[:username], config[:password] if config[:username] && config[:password]
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
attr_reader :project, :connection
|
22
|
-
|
22
|
+
|
23
23
|
def job_url
|
24
24
|
"#{@connection.url_prefix}#{job_path}"
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
def job_path
|
28
28
|
"/job/#{project.slug}"
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def build_path(commit)
|
32
32
|
"#{job_path}/buildWithParameters?COMMIT_SHA=#{commit}"
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
def last_build_url
|
36
36
|
url = "#{job_path}/api/json?tree=lastBuild[url]"
|
37
37
|
response = connection.get(url)
|
38
38
|
last_build_url_error!(url) unless 200 == response.status
|
39
39
|
MultiJson.load(response.body).fetch("lastBuild").fetch("url")
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
def last_build_progress_url
|
43
43
|
url = last_build_url
|
44
44
|
url + "/console" if url
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
def build!(commit)
|
48
48
|
url = build_path(commit)
|
49
49
|
Houston.try({max_tries: 5}, Faraday::Error::ConnectionFailed) do
|
@@ -53,7 +53,7 @@ module Houston
|
|
53
53
|
response
|
54
54
|
end
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
def fetch_results!(build_url)
|
58
58
|
build_url = build_url.chomp("/")
|
59
59
|
results = {}
|
@@ -61,27 +61,27 @@ module Houston
|
|
61
61
|
results.merge! fetch_test_report!(build_url)
|
62
62
|
results.merge! fetch_coverage_report!(build_url)
|
63
63
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
|
65
|
+
|
66
|
+
|
67
67
|
private
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
|
69
|
+
|
70
|
+
|
71
71
|
def fetch_overall_report!(build_url)
|
72
72
|
response = fetch_json(
|
73
73
|
"#{build_url}/api/json?tree=result",
|
74
74
|
resource_name: "the result of the build")
|
75
|
-
|
75
|
+
|
76
76
|
{ result: translate_result(response["result"]) }
|
77
77
|
end
|
78
|
-
|
78
|
+
|
79
79
|
def fetch_test_report!(build_url)
|
80
80
|
response = fetch_json(
|
81
81
|
"#{build_url}/testReport/api/json",
|
82
82
|
resource_name: "detailed test results",
|
83
83
|
additional_error_info: "Most likely the build failed before the tests could be run.")
|
84
|
-
|
84
|
+
|
85
85
|
tests = translate_suites(response["suites"])
|
86
86
|
regression_count = tests.count { |hash| hash[:status] == :regression }
|
87
87
|
{ duration: translate_duration(response["duration"]),
|
@@ -92,13 +92,13 @@ module Houston
|
|
92
92
|
skip_count: response["skipCount"],
|
93
93
|
tests: tests }
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
def fetch_coverage_report!(build_url)
|
97
97
|
response = fetch_json(
|
98
98
|
"#{build_url}/artifact/coverage/coverage.json",
|
99
99
|
resource_name: "coverage report",
|
100
100
|
fallback_value: {})
|
101
|
-
|
101
|
+
|
102
102
|
metrics = response["metrics"] || {}
|
103
103
|
covered_percent = metrics["covered_percent"] / 100.0 if metrics.key?("covered_percent")
|
104
104
|
covered_strength = metrics["covered_strength"] / 100.0 if metrics.key?("covered_strength")
|
@@ -106,19 +106,19 @@ module Houston
|
|
106
106
|
covered_percent: covered_percent || 0,
|
107
107
|
covered_strength: covered_strength || 0 }
|
108
108
|
end
|
109
|
-
|
110
|
-
|
111
|
-
|
109
|
+
|
110
|
+
|
111
|
+
|
112
112
|
def translate_result(result)
|
113
113
|
RESULT_MAP.fetch(result) do
|
114
114
|
raise NotImplementedError.new("#{result} is not a mapped result from Jenkins")
|
115
115
|
end
|
116
116
|
end
|
117
|
-
|
117
|
+
|
118
118
|
def translate_duration(seconds)
|
119
119
|
seconds * 1000 # milliseconds!
|
120
120
|
end
|
121
|
-
|
121
|
+
|
122
122
|
def translate_suites(suites)
|
123
123
|
suites.each_with_object([]) do |suite, tests|
|
124
124
|
suite_name = suite["name"]
|
@@ -127,17 +127,17 @@ module Houston
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
end
|
130
|
-
|
130
|
+
|
131
131
|
def translate_test_case(test_case)
|
132
132
|
test = { name: translate_test_name(test_case["name"]) }
|
133
|
-
|
133
|
+
|
134
134
|
if test_case["skipped"]
|
135
135
|
test[:status] = :skip
|
136
136
|
else
|
137
137
|
test[:status] = translate_status(test_case["status"])
|
138
138
|
test[:duration] = translate_duration(test_case["duration"])
|
139
139
|
test[:age] = test_case["age"]
|
140
|
-
|
140
|
+
|
141
141
|
error_message, error_backtrace = translate_stack_trace(test_case["errorStackTrace"])
|
142
142
|
if error_message
|
143
143
|
# test[:status] = :error # <-- until we can differentiate errors and fails, call them fails
|
@@ -145,34 +145,34 @@ module Houston
|
|
145
145
|
test[:error_backtrace] = error_backtrace
|
146
146
|
end
|
147
147
|
end
|
148
|
-
|
148
|
+
|
149
149
|
test
|
150
150
|
end
|
151
|
-
|
151
|
+
|
152
152
|
def translate_test_name(name)
|
153
153
|
name.gsub(/^test_/, "").gsub("_", " ")
|
154
154
|
end
|
155
|
-
|
155
|
+
|
156
156
|
def translate_status(status)
|
157
157
|
STATUS_MAP.fetch(status) do
|
158
158
|
raise NotImplementedError.new("#{status} is not a mapped status from Jenkins")
|
159
159
|
end
|
160
160
|
end
|
161
|
-
|
161
|
+
|
162
162
|
def translate_stack_trace(stack_trace)
|
163
163
|
lines = stack_trace.to_s.split("\n").map(&:strip).reject(&:blank?)
|
164
164
|
message = lines[0]
|
165
165
|
backtrace = lines[1..-1]
|
166
166
|
[message, backtrace]
|
167
167
|
end
|
168
|
-
|
168
|
+
|
169
169
|
def translate_file_coverage(files)
|
170
170
|
Array.wrap(files).map do |file|
|
171
171
|
{ filename: get_relative_filename(file["filename"]),
|
172
172
|
coverage: file["coverage"] }
|
173
173
|
end
|
174
174
|
end
|
175
|
-
|
175
|
+
|
176
176
|
# Gets the path of the file in question relative to the
|
177
177
|
# project's root directory.
|
178
178
|
#
|
@@ -184,30 +184,30 @@ module Houston
|
|
184
184
|
def get_relative_filename(filename)
|
185
185
|
filename[WORKSPACE_MATCHER] || filename
|
186
186
|
end
|
187
|
-
|
188
|
-
|
189
|
-
|
187
|
+
|
188
|
+
|
189
|
+
|
190
190
|
def fetch_json(url, options)
|
191
191
|
Rails.logger.debug "[jenkins] GET #{url}"
|
192
|
-
|
192
|
+
|
193
193
|
response = connection.get(url)
|
194
194
|
unless response.status == 200
|
195
195
|
return options[:fallback_value] if options.key?(:fallback_value)
|
196
196
|
network_error!(url, options)
|
197
197
|
end
|
198
|
-
|
198
|
+
|
199
199
|
JSON.parse(response.body)
|
200
200
|
rescue JSON::ParserError
|
201
201
|
parser_error!(url, options)
|
202
202
|
end
|
203
|
-
|
203
|
+
|
204
204
|
def network_error!(url, options)
|
205
205
|
resource = options.fetch(:resource_name, "the resource")
|
206
206
|
error_message = "Houston could not get #{resource} from the URL #{url.inspect}."
|
207
207
|
error_message << " " << options[:additional_error_info] if options.key?(:additional_error_info)
|
208
208
|
raise Houston::Adapters::CIServer::Error, error_message
|
209
209
|
end
|
210
|
-
|
210
|
+
|
211
211
|
def parser_error!(url, options)
|
212
212
|
resource = options.fetch(:resource_name, "the resource")
|
213
213
|
error_message = "Houston could not parse #{resource} from the URL #{url.inspect}."
|
@@ -215,17 +215,17 @@ module Houston
|
|
215
215
|
error_message << " " << options[:additional_error_info] if options.key?(:additional_error_info)
|
216
216
|
raise Houston::Adapters::CIServer::Error, error_message
|
217
217
|
end
|
218
|
-
|
218
|
+
|
219
219
|
def build_error!(url)
|
220
220
|
raise Houston::Adapters::CIServer::Error.new("Houston was unable to trigger a build for #{project.name} with the URL #{url}.")
|
221
221
|
end
|
222
|
-
|
222
|
+
|
223
223
|
def last_build_url_error!(url)
|
224
224
|
raise Houston::Adapters::CIServer::Error.new("Houston was unable to fetch the job's lastBuild URL using #{url}.")
|
225
225
|
end
|
226
|
-
|
227
|
-
|
228
|
-
|
226
|
+
|
227
|
+
|
228
|
+
|
229
229
|
RESULT_MAP = {
|
230
230
|
"FAILURE" => "fail",
|
231
231
|
"UNSTABLE" => "fail",
|
@@ -237,7 +237,7 @@ module Houston
|
|
237
237
|
"SKIPPED" => :skip,
|
238
238
|
"PASSED" => :pass,
|
239
239
|
"FIXED" => :pass }.freeze
|
240
|
-
|
240
|
+
|
241
241
|
end
|
242
242
|
end
|
243
243
|
end
|
@@ -2,19 +2,19 @@ module Houston
|
|
2
2
|
module Adapters
|
3
3
|
module CIServer
|
4
4
|
class JenkinsAdapter
|
5
|
-
|
5
|
+
|
6
6
|
def self.errors_with_parameters(project)
|
7
7
|
{}
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
def self.build(project)
|
11
11
|
Job.new(project)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def self.parameters
|
15
15
|
[]
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -3,21 +3,21 @@ module Houston
|
|
3
3
|
module CIServer
|
4
4
|
class NoneAdapter
|
5
5
|
class Job
|
6
|
-
|
6
|
+
|
7
7
|
def initialize(project)
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
def job_url
|
11
11
|
nil
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def build!(commit)
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def fetch_results!(results_url)
|
18
18
|
{}
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -2,19 +2,19 @@ module Houston
|
|
2
2
|
module Adapters
|
3
3
|
module CIServer
|
4
4
|
class NoneAdapter
|
5
|
-
|
5
|
+
|
6
6
|
def self.errors_with_parameters(project)
|
7
7
|
{}
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
def self.build(project)
|
11
11
|
Job.new(project)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def self.parameters
|
15
15
|
[]
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -7,23 +7,23 @@ module Houston
|
|
7
7
|
module Deployment
|
8
8
|
class Engineyard
|
9
9
|
attr_reader :project, :environment_name
|
10
|
-
|
10
|
+
|
11
11
|
def initialize(project, environment_name)
|
12
12
|
@project = project
|
13
13
|
@environment_name = environment_name
|
14
|
-
|
14
|
+
|
15
15
|
@config = Houston::Adapters::Deployment::Engineyard::Config.new(project.read_file("config/ey.yml"))
|
16
16
|
@ui = EY::CLI::UI.new
|
17
17
|
@api = EY::CLI::API.new(config.endpoint, ui, Houston.config.engineyard[:api_token])
|
18
18
|
@repo = nil
|
19
19
|
end
|
20
|
-
|
21
|
-
|
20
|
+
|
21
|
+
|
22
22
|
def last_deploy_commit
|
23
23
|
app_env.last_deployment.commit
|
24
24
|
end
|
25
|
-
|
26
|
-
|
25
|
+
|
26
|
+
|
27
27
|
# https://github.com/engineyard/engineyard/blob/v3.0.1/lib/engineyard/cli.rb#L123
|
28
28
|
def deploy(deploy, options={})
|
29
29
|
options = {
|
@@ -31,36 +31,36 @@ module Houston
|
|
31
31
|
environment: environment_name,
|
32
32
|
config: { maintenance_on_migrate: options[:maintenance_page] }
|
33
33
|
}.with_indifferent_access
|
34
|
-
|
34
|
+
|
35
35
|
env_config = config.environment_config(app_env.environment_name)
|
36
36
|
deploy_config = EY::DeployConfig.new(options, env_config, repo, ui)
|
37
|
-
|
37
|
+
|
38
38
|
deployment = app_env.new_deployment(
|
39
39
|
ref: deploy_config.ref,
|
40
40
|
migrate: deploy_config.migrate,
|
41
41
|
migrate_command: deploy_config.migrate_command,
|
42
42
|
extra_config: deploy_config.extra_config,
|
43
43
|
serverside_version: EY::ENGINEYARD_SERVERSIDE_VERSION)
|
44
|
-
|
44
|
+
|
45
45
|
runner = EY::ServersideRunner.new(
|
46
46
|
bridge: app_env.environment.bridge!(options[:ignore_bad_master]).hostname,
|
47
47
|
app: app_env.app,
|
48
48
|
environment: app_env.environment,
|
49
49
|
verbose: deploy_config.verbose,
|
50
50
|
serverside_version: EY::ENGINEYARD_SERVERSIDE_VERSION)
|
51
|
-
|
51
|
+
|
52
52
|
# Triplicate:
|
53
53
|
# 1. standard output gets a copy
|
54
54
|
# 2. the Deploy model gets a copy
|
55
55
|
# 3. EngineYard gets a copy
|
56
56
|
out = EY::CLI::UI::Tee.new(ui.out, deploy.output_stream, deployment.output)
|
57
57
|
err = EY::CLI::UI::Tee.new(ui.err, deploy.output_stream, deployment.output)
|
58
|
-
|
58
|
+
|
59
59
|
deployment.start
|
60
|
-
|
60
|
+
|
61
61
|
begin
|
62
62
|
ui.show_deployment(deployment)
|
63
|
-
|
63
|
+
|
64
64
|
runner.deploy do |args|
|
65
65
|
args.config = deployment.config if deployment.config
|
66
66
|
if deployment.migrate
|
@@ -70,27 +70,27 @@ module Houston
|
|
70
70
|
end
|
71
71
|
args.ref = deployment.resolved_ref
|
72
72
|
end
|
73
|
-
|
73
|
+
|
74
74
|
deployment.successful = runner.call(out, err)
|
75
|
-
|
75
|
+
|
76
76
|
rescue StandardError => e
|
77
77
|
Houston.report_exception(e)
|
78
78
|
deployment.err << "Error encountered during deploy.\n#{e.class} #{e}\n"
|
79
79
|
ui.print_exception(e)
|
80
|
-
|
80
|
+
|
81
81
|
ensure
|
82
82
|
deployment.finished
|
83
83
|
Houston.try({max_tries: 5, ignore: true}, exceptions_wrapping(PG::ConnectionBad)) do
|
84
84
|
deploy.update_attributes!(completed_at: Time.now)
|
85
85
|
end
|
86
86
|
end
|
87
|
-
|
87
|
+
|
88
88
|
deployment.successful?
|
89
89
|
end
|
90
|
-
|
90
|
+
|
91
91
|
private
|
92
92
|
attr_reader :config, :ui, :api, :repo
|
93
|
-
|
93
|
+
|
94
94
|
def app_env
|
95
95
|
@app_env ||= begin
|
96
96
|
resolver = api.resolve_app_environments(
|
@@ -100,7 +100,7 @@ module Houston
|
|
100
100
|
resolver.matches.first
|
101
101
|
end
|
102
102
|
end
|
103
|
-
|
103
|
+
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -3,44 +3,44 @@ module Houston
|
|
3
3
|
module ErrorTracker
|
4
4
|
class ErrbitAdapter
|
5
5
|
class App
|
6
|
-
|
6
|
+
|
7
7
|
def initialize(connection, app_id)
|
8
8
|
@connection = connection
|
9
9
|
@app_id = app_id
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
attr_reader :connection, :app_id
|
13
|
-
|
14
|
-
|
13
|
+
|
14
|
+
|
15
15
|
def project_url
|
16
16
|
connection.project_url(app_id)
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def error_url(err)
|
20
20
|
connection.error_url(app_id, err)
|
21
21
|
end
|
22
|
-
|
23
|
-
|
22
|
+
|
23
|
+
|
24
24
|
def problems_during(range)
|
25
25
|
connection.problems_during(range, app_id: app_id)
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
def open_problems(params={})
|
29
29
|
connection.open_problems params.merge(app_id: app_id)
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
def resolve!(problem_id, params={})
|
33
33
|
connection.resolve!(problem_id, params)
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
def unresolve!(problem_id)
|
37
37
|
connection.unresolve!(problem_id)
|
38
38
|
end
|
39
|
-
|
40
|
-
|
39
|
+
|
40
|
+
|
41
41
|
delegate :merge_problems, :unmerge_problems, :delete_problems, to: :connection
|
42
|
-
|
43
|
-
|
42
|
+
|
43
|
+
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|