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
@@ -1,54 +1,53 @@
|
|
1
1
|
class TestRunStatistics
|
2
|
-
|
2
|
+
|
3
3
|
def initialize(project)
|
4
4
|
@project = project
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
attr_reader :project
|
8
|
-
|
8
|
+
|
9
9
|
def last_completed_test_runs(n)
|
10
10
|
project.test_runs.where("total_count > 0").limit(n)
|
11
11
|
end
|
12
|
-
|
13
|
-
|
12
|
+
|
13
|
+
|
14
14
|
def duration(n=20)
|
15
15
|
durations = last_completed_test_runs(n).pluck(:duration).map { |n| n / 1000.0 }
|
16
16
|
ljust(durations, 0, n).reverse
|
17
17
|
end
|
18
|
-
|
19
|
-
|
18
|
+
|
19
|
+
|
20
20
|
def coverage(n=20)
|
21
21
|
percentages = last_completed_test_runs(n).pluck(:covered_percent).map { |n| n * 100.0 }
|
22
22
|
ljust(percentages, 0.0, n).reverse
|
23
23
|
end
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
|
25
|
+
|
26
|
+
|
27
27
|
def tests(n=20)
|
28
28
|
[ skips(n), regressions(n), fails(n), passes(n) ]
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def skips(n=20)
|
32
32
|
ljust(last_completed_test_runs(n).pluck(:skip_count), 0, n).reverse
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
def regressions(n=20)
|
36
36
|
ljust(last_completed_test_runs(n).pluck(:regression_count), 0, n).reverse
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
def fails(n=20)
|
40
40
|
ljust(last_completed_test_runs(n).pluck(:fail_count), 0, n).reverse
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
def passes(n=20)
|
44
44
|
ljust(last_completed_test_runs(n).pluck(:pass_count), 0, n).reverse
|
45
45
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
|
47
|
+
|
48
|
+
|
49
49
|
def ljust(array, value, n)
|
50
50
|
array.dup.fill(value, array.length...n)
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
end
|
54
|
-
|
data/app/models/testing_note.rb
CHANGED
@@ -1,64 +1,64 @@
|
|
1
1
|
class TestingNote < ActiveRecord::Base
|
2
|
-
|
2
|
+
|
3
3
|
before_create :create_ticket_comment!
|
4
4
|
before_update :update_ticket_comment!
|
5
5
|
before_destroy :destroy_ticket_comment!
|
6
6
|
after_create { Houston.observer.fire "testing_note:create", self }
|
7
7
|
after_update { Houston.observer.fire "testing_note:update", self }
|
8
8
|
after_save { Houston.observer.fire "testing_note:save", self }
|
9
|
-
|
9
|
+
|
10
10
|
belongs_to :user
|
11
11
|
belongs_to :ticket
|
12
12
|
belongs_to :project
|
13
|
-
|
13
|
+
|
14
14
|
VERDICTS = %w{works fails badticket none}
|
15
|
-
|
15
|
+
|
16
16
|
validates :user, :presence => true
|
17
17
|
validates :ticket, :presence => true
|
18
18
|
validates :project, :presence => true
|
19
19
|
validates :comment, :presence => true, :length => 1..1000
|
20
20
|
validates :verdict, :presence => true, :inclusion => VERDICTS
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
|
22
|
+
|
23
|
+
|
24
24
|
def to_comment
|
25
25
|
TicketComment.new(
|
26
26
|
user: user,
|
27
27
|
body: "**#{verdict}** #{comment}",
|
28
28
|
remote_id: remote_id )
|
29
29
|
end
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
|
31
|
+
|
32
|
+
|
33
33
|
def pass?
|
34
34
|
verdict == "works"
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
def fail?
|
38
38
|
verdict == "fails"
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
def first_fail?
|
42
42
|
return false unless fail?
|
43
43
|
first_fail = ticket.testing_notes_since_last_release.where(verdict: "fails").order("created_at ASC").first
|
44
44
|
first_fail == nil || first_fail.id == self.id
|
45
45
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
|
47
|
+
|
48
|
+
|
49
49
|
private
|
50
|
-
|
50
|
+
|
51
51
|
def create_ticket_comment!
|
52
52
|
remote_id = ticket.create_comment!(to_comment)
|
53
53
|
self.remote_id = remote_id
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
def update_ticket_comment!
|
57
57
|
ticket.update_comment!(to_comment)
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def destroy_ticket_comment!
|
61
61
|
ticket.destroy_comment!(to_comment)
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
end
|
data/app/models/ticket.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
class Ticket < ActiveRecord::Base
|
2
2
|
extend Nosync
|
3
|
-
|
3
|
+
|
4
4
|
self.inheritance_column = nil
|
5
|
-
|
5
|
+
|
6
6
|
versioned only: [:summary, :description, :type,
|
7
7
|
:tags, :antecedents, :prerequisites,
|
8
8
|
:closed_at, :resolution, :milestone_id]
|
9
|
-
|
9
|
+
|
10
10
|
belongs_to :project
|
11
11
|
belongs_to :reporter, class_name: "User"
|
12
12
|
belongs_to :milestone, counter_cache: true
|
@@ -15,9 +15,9 @@ class Ticket < ActiveRecord::Base
|
|
15
15
|
has_and_belongs_to_many :releases
|
16
16
|
has_and_belongs_to_many :commits, -> { where(unreachable: false) }
|
17
17
|
has_and_belongs_to_many :released_commits, -> { reachable.released }, class_name: "Commit", association_foreign_key: "commit_id"
|
18
|
-
|
18
|
+
|
19
19
|
default_scope { order(:number).where(destroyed_at: nil) }
|
20
|
-
|
20
|
+
|
21
21
|
validates :project_id, presence: true
|
22
22
|
validates :summary, presence: true
|
23
23
|
validates :number, presence: true
|
@@ -25,7 +25,7 @@ class Ticket < ActiveRecord::Base
|
|
25
25
|
validates :type, presence: true, inclusion: { in: Houston.config.ticket_types, message: "\"%{value}\" is unknown. It must be #{Houston.config.ticket_types.to_sentence(last_word_connector: ", or ")}" }
|
26
26
|
validate :must_have_at_least_one_task
|
27
27
|
validates_uniqueness_of :number, scope: :project_id, on: :create
|
28
|
-
|
28
|
+
|
29
29
|
before_validation :ensure_that_ticket_has_a_task, on: :create
|
30
30
|
before_save :parse_ticket_description, if: :description_changed?
|
31
31
|
before_save :find_reporter, if: :find_reporter?
|
@@ -33,22 +33,22 @@ class Ticket < ActiveRecord::Base
|
|
33
33
|
after_save :resolve_antecedents!, if: :just_resolved?
|
34
34
|
after_save :close_antecedents!, if: :just_closed?
|
35
35
|
after_save :updated_milestone_attributes
|
36
|
-
|
36
|
+
|
37
37
|
attr_readonly :number, :project_id
|
38
|
-
|
38
|
+
|
39
39
|
delegate :testers, :maintainers, :min_passing_verdicts, :ticket_tracker, to: :project
|
40
40
|
delegate :nosync?, to: "self.class"
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
|
42
|
+
|
43
|
+
|
44
44
|
class << self
|
45
|
-
|
45
|
+
|
46
46
|
def for_projects(*projects)
|
47
47
|
ids = projects.flatten.map { |project| project.is_a?(Project) ? project.id : project }
|
48
48
|
where(project_id: ids)
|
49
49
|
end
|
50
50
|
alias :for_project :for_projects
|
51
|
-
|
51
|
+
|
52
52
|
def mentioned_by_commits(*commits)
|
53
53
|
ids = commits.flatten.map { |commit| commit.is_a?(Commit) ? commit.id : commit }
|
54
54
|
commits_tickets = Arel::Table.new("commits_tickets")
|
@@ -56,82 +56,82 @@ class Ticket < ActiveRecord::Base
|
|
56
56
|
.where(commits_tickets[:commit_id].in(ids))
|
57
57
|
.project(commits_tickets[:ticket_id]))
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def numbered(*numbers)
|
61
61
|
where(number: numbers.flatten.map(&:to_i))
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
def without(tickets)
|
65
65
|
not_numbered(tickets.map(&:number))
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
def not_numbered(*numbers)
|
69
69
|
where(arel_table[:number].not_in(numbers.flatten.map(&:to_i)))
|
70
70
|
end
|
71
|
-
|
71
|
+
|
72
72
|
def ideas
|
73
73
|
where(type: %w{Feature Enhancement})
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
def bugs
|
77
77
|
where(type: %w{Bug Chore})
|
78
78
|
end
|
79
|
-
|
79
|
+
|
80
80
|
def unresolved
|
81
81
|
unclosed.where(resolution: "")
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
84
|
def resolved
|
85
85
|
where(arel_table[:resolution].not_eq(""))
|
86
86
|
end
|
87
|
-
|
87
|
+
|
88
88
|
def fixed
|
89
89
|
where(resolution: "fixed")
|
90
90
|
end
|
91
|
-
|
91
|
+
|
92
92
|
def unclosed
|
93
93
|
where(closed_at: nil)
|
94
94
|
end
|
95
95
|
alias :open :unclosed
|
96
|
-
|
96
|
+
|
97
97
|
def closed
|
98
98
|
where(arel_table[:closed_at].not_eq(nil))
|
99
99
|
end
|
100
|
-
|
100
|
+
|
101
101
|
def created_before(time)
|
102
102
|
where(arel_table[:created_at].lt(time)).reorder(arel_table[:created_at].desc)
|
103
103
|
end
|
104
|
-
|
104
|
+
|
105
105
|
def closed_before(time)
|
106
106
|
where(arel_table[:closed_at].lt(time)).reorder(arel_table[:closed_at].desc)
|
107
107
|
end
|
108
|
-
|
108
|
+
|
109
109
|
def closed_on(date)
|
110
110
|
where(closed_at: date.to_time.beginning_of_day..date.to_time.end_of_day)
|
111
111
|
end
|
112
|
-
|
112
|
+
|
113
113
|
def deployed
|
114
114
|
where(arel_table[:deployment].not_eq(nil))
|
115
115
|
end
|
116
|
-
|
116
|
+
|
117
117
|
def deployed_to(environment)
|
118
118
|
where(deployment: environment)
|
119
119
|
end
|
120
|
-
|
120
|
+
|
121
121
|
def unreleased
|
122
122
|
where(arel_table[:deployment].not_eq("Production"))
|
123
123
|
end
|
124
|
-
|
124
|
+
|
125
125
|
def estimated
|
126
126
|
# !todo: will change: must be defined in terms of tasks
|
127
127
|
where("NULLIF(tickets.extended_attributes->'estimated_effort', '')::numeric > 0")
|
128
128
|
end
|
129
|
-
|
129
|
+
|
130
130
|
def unestimated
|
131
131
|
# !todo: will change: must be defined in terms of tasks
|
132
132
|
where("NOT defined(tickets.extended_attributes, 'estimated_effort') OR NULLIF(tickets.extended_attributes->'estimated_effort', '')::numeric <= 0")
|
133
133
|
end
|
134
|
-
|
134
|
+
|
135
135
|
def resolve_all!
|
136
136
|
return unless Rails.env.production?
|
137
137
|
all.parallel.each do |ticket|
|
@@ -140,137 +140,137 @@ class Ticket < ActiveRecord::Base
|
|
140
140
|
end
|
141
141
|
end
|
142
142
|
end
|
143
|
-
|
143
|
+
|
144
144
|
end
|
145
|
-
|
146
|
-
|
147
|
-
|
145
|
+
|
146
|
+
|
147
|
+
|
148
148
|
def due_date
|
149
149
|
extended_attributes["due_date"]
|
150
150
|
end
|
151
|
-
|
151
|
+
|
152
152
|
def due_date=(value)
|
153
153
|
extended_attributes["due_date"] = value
|
154
154
|
extended_attributes_will_change!
|
155
155
|
end
|
156
|
-
|
157
|
-
|
158
|
-
|
156
|
+
|
157
|
+
|
158
|
+
|
159
159
|
def reporter_email=(value)
|
160
160
|
value = value.downcase if value
|
161
161
|
super(value)
|
162
162
|
end
|
163
|
-
|
164
|
-
|
165
|
-
|
163
|
+
|
164
|
+
|
165
|
+
|
166
166
|
def committers
|
167
167
|
commits.map { |commit| TicketCommitter.new(commit.committer, commit.committer_email) }.uniq
|
168
168
|
end
|
169
|
-
|
170
|
-
|
171
|
-
|
169
|
+
|
170
|
+
|
171
|
+
|
172
172
|
def ticket_tracker_ticket_url
|
173
173
|
project.ticket_tracker_ticket_url(number)
|
174
174
|
end
|
175
|
-
|
176
|
-
|
177
|
-
|
175
|
+
|
176
|
+
|
177
|
+
|
178
178
|
def unresolved?
|
179
179
|
resolution.blank?
|
180
180
|
end
|
181
|
-
|
181
|
+
|
182
182
|
def resolved?
|
183
183
|
!resolution.blank?
|
184
184
|
end
|
185
|
-
|
185
|
+
|
186
186
|
def open?
|
187
187
|
closed_at.nil?
|
188
188
|
end
|
189
|
-
|
189
|
+
|
190
190
|
def closed?
|
191
191
|
closed_at.present?
|
192
192
|
end
|
193
|
-
|
193
|
+
|
194
194
|
def in_development?
|
195
195
|
deployment.blank?
|
196
196
|
end
|
197
|
-
|
197
|
+
|
198
198
|
def unreleased?
|
199
199
|
releases.before(reopened_at).empty?
|
200
200
|
end
|
201
|
-
|
202
|
-
|
203
|
-
|
201
|
+
|
202
|
+
|
203
|
+
|
204
204
|
def antecedents
|
205
205
|
(super || []).map { |s| TicketAntecedent.from_s(self, s) }
|
206
206
|
end
|
207
|
-
|
207
|
+
|
208
208
|
def antecedents=(antecedents)
|
209
209
|
super Array(antecedents).map(&:to_s)
|
210
210
|
end
|
211
|
-
|
212
|
-
|
213
|
-
|
211
|
+
|
212
|
+
|
213
|
+
|
214
214
|
def tags
|
215
215
|
(super || []).map(&TicketTag.method(:from_s))
|
216
216
|
end
|
217
|
-
|
217
|
+
|
218
218
|
def tags=(tags)
|
219
219
|
super (tags || []).map(&:to_s)
|
220
220
|
end
|
221
|
-
|
222
|
-
|
223
|
-
|
221
|
+
|
222
|
+
|
223
|
+
|
224
224
|
def extended_attributes
|
225
225
|
super || (self.extended_attributes = {})
|
226
226
|
end
|
227
|
-
|
228
|
-
|
229
|
-
|
227
|
+
|
228
|
+
|
229
|
+
|
230
230
|
def commit_time
|
231
231
|
@commit_time ||= commits.map(&:committer_hours).compact.sum
|
232
232
|
end
|
233
|
-
|
233
|
+
|
234
234
|
def effort
|
235
235
|
@effort ||= tasks.map(&:effort).sum
|
236
236
|
end
|
237
|
-
|
238
|
-
|
239
|
-
|
237
|
+
|
238
|
+
|
239
|
+
|
240
240
|
def create_comment!(comment)
|
241
241
|
remote.create_comment!(comment) if remote.respond_to?(:create_comment!)
|
242
242
|
end
|
243
|
-
|
243
|
+
|
244
244
|
def update_comment!(comment)
|
245
245
|
remote.update_comment!(comment) if remote.respond_to?(:update_comment!)
|
246
246
|
end
|
247
|
-
|
247
|
+
|
248
248
|
def destroy_comment!(comment)
|
249
249
|
remote.destroy_comment!(comment) if remote.respond_to?(:destroy_comment!)
|
250
250
|
end
|
251
|
-
|
252
|
-
|
253
|
-
|
251
|
+
|
252
|
+
|
253
|
+
|
254
254
|
def released!(release)
|
255
255
|
cache_release_attributes(release)
|
256
256
|
Houston.observer.fire "ticket:release", self, release
|
257
257
|
end
|
258
|
-
|
258
|
+
|
259
259
|
def resolve!
|
260
260
|
remote_ticket.resolve! if remote_ticket.respond_to?(:resolve!)
|
261
261
|
update_attribute :resolution, "fixed"
|
262
262
|
end
|
263
|
-
|
263
|
+
|
264
264
|
def close!
|
265
265
|
remote_ticket.close! if remote_ticket
|
266
266
|
update_attribute :closed_at, Time.now
|
267
267
|
end
|
268
|
-
|
268
|
+
|
269
269
|
def unclose!
|
270
270
|
remote_ticket.reopen! if remote_ticket
|
271
271
|
update_attribute :closed_at, nil
|
272
272
|
end
|
273
|
-
|
273
|
+
|
274
274
|
def reopen!
|
275
275
|
return unless resolved?
|
276
276
|
remote_ticket.reopen! if remote_ticket
|
@@ -284,15 +284,15 @@ class Ticket < ActiveRecord::Base
|
|
284
284
|
first_release_at: nil,
|
285
285
|
last_release_at: nil)
|
286
286
|
end
|
287
|
-
|
288
|
-
|
289
|
-
|
287
|
+
|
288
|
+
|
289
|
+
|
290
290
|
def testing_notes_since_last_release
|
291
291
|
last_release_at ? testing_notes.where(["created_at > ?", last_release_at]) : testing_notes
|
292
292
|
end
|
293
|
-
|
294
|
-
|
295
|
-
|
293
|
+
|
294
|
+
|
295
|
+
|
296
296
|
def participants
|
297
297
|
@participants ||= begin # Participants in a Ticket include:
|
298
298
|
User.unretired.where(id: #
|
@@ -302,67 +302,67 @@ class Ticket < ActiveRecord::Base
|
|
302
302
|
committers # - anyone who has comitted to it
|
303
303
|
end #
|
304
304
|
end
|
305
|
-
|
306
|
-
|
307
|
-
|
305
|
+
|
306
|
+
|
307
|
+
|
308
308
|
private
|
309
|
-
|
309
|
+
|
310
310
|
def find_reporter?
|
311
311
|
reporter_email_changed? or (reporter_email.present? and reporter_id.nil?)
|
312
312
|
end
|
313
|
-
|
313
|
+
|
314
314
|
def find_reporter
|
315
315
|
self.reporter = User.with_email_address(reporter_email).first
|
316
316
|
end
|
317
|
-
|
317
|
+
|
318
318
|
def propagate_milestone_change
|
319
319
|
return if nosync?
|
320
320
|
remote_ticket.set_milestone!(milestone && milestone.remote_id) if remote_ticket.respond_to?(:set_milestone!)
|
321
321
|
end
|
322
|
-
|
322
|
+
|
323
323
|
def just_resolved?
|
324
324
|
resolution_changed? && resolution_was.blank?
|
325
325
|
end
|
326
|
-
|
326
|
+
|
327
327
|
def just_closed?
|
328
328
|
closed_at_changed? && closed_at_was.nil?
|
329
329
|
end
|
330
|
-
|
330
|
+
|
331
331
|
def resolve_antecedents!
|
332
332
|
antecedents.each(&:resolve!)
|
333
333
|
end
|
334
|
-
|
334
|
+
|
335
335
|
def close_antecedents!
|
336
336
|
antecedents.each(&:close!)
|
337
337
|
end
|
338
|
-
|
338
|
+
|
339
339
|
def remote_ticket
|
340
340
|
@remote_ticket ||= ticket_tracker.find_ticket_by_number(number)
|
341
341
|
end
|
342
342
|
alias :remote :remote_ticket
|
343
|
-
|
343
|
+
|
344
344
|
def cache_release_attributes(release)
|
345
345
|
attributes = { last_release_at: release.created_at, deployment: release.environment_name }
|
346
346
|
attributes.merge!(first_release_at: release.created_at) if unreleased?
|
347
347
|
update_attributes attributes
|
348
348
|
end
|
349
|
-
|
349
|
+
|
350
350
|
def parse_ticket_description
|
351
351
|
Houston.config.parse_ticket_description(self)
|
352
352
|
end
|
353
|
-
|
353
|
+
|
354
354
|
def ensure_that_ticket_has_a_task
|
355
355
|
tasks.build if tasks.none?
|
356
356
|
end
|
357
|
-
|
357
|
+
|
358
358
|
def must_have_at_least_one_task
|
359
359
|
errors.add :base, "must have at least one task" if tasks.length.zero?
|
360
360
|
end
|
361
|
-
|
361
|
+
|
362
362
|
def updated_milestone_attributes
|
363
363
|
return unless milestone_id
|
364
364
|
return unless new_record? or closed_at_changed?
|
365
365
|
milestone.update_closed_tickets_count!
|
366
366
|
end
|
367
|
-
|
367
|
+
|
368
368
|
end
|
@@ -1,39 +1,39 @@
|
|
1
1
|
class TicketAntecedent
|
2
2
|
include Comparable
|
3
|
-
|
3
|
+
|
4
4
|
def initialize(ticket_or_commit, kind, id)
|
5
5
|
@ticket_or_commit = ticket_or_commit
|
6
6
|
@kind = kind
|
7
7
|
@id = id
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
attr_reader :ticket_or_commit, :kind, :id
|
11
11
|
delegate :project, to: :ticket_or_commit
|
12
|
-
|
12
|
+
|
13
13
|
def self.from_s(ticket, string)
|
14
14
|
new ticket, *string.split(":")
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def to_s
|
18
18
|
"#{kind}:#{id}"
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
def <=>(other)
|
22
22
|
[kind, id] <=> [other.kind, other.id]
|
23
23
|
end
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
|
25
|
+
|
26
|
+
|
27
27
|
def released!(release=nil)
|
28
28
|
Houston.observer.fire "antecedent:#{kind.downcase.underscore}:released", self
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def resolve!
|
32
32
|
Houston.observer.fire "antecedent:#{kind.downcase.underscore}:resolved", self
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
def close!
|
36
36
|
Houston.observer.fire "antecedent:#{kind.downcase.underscore}:closed", self
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
end
|
@@ -1,21 +1,21 @@
|
|
1
1
|
class TicketComment
|
2
|
-
|
2
|
+
|
3
3
|
def initialize(attributes={})
|
4
4
|
@attributes = attributes
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
attr_reader :attributes
|
8
|
-
|
8
|
+
|
9
9
|
def user
|
10
10
|
attributes[:user]
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def remote_id
|
14
14
|
attributes[:remote_id]
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def body
|
18
18
|
attributes[:body]
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
end
|