houston-core 0.7.0.beta3 → 0.7.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +56 -56
- data/app/assets/javascripts/houston/app/infinite_scroll.coffee +6 -2
- data/app/assets/javascripts/houston/app/models/ticket.coffee +0 -42
- data/app/assets/javascripts/houston/app/ticket_tracker_refresh.coffee +0 -2
- data/app/assets/javascripts/houston/app/views/keyboard_shortcuts_modal.coffee +0 -6
- data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +0 -5
- data/app/assets/stylesheets/houston/application/actions.scss +15 -0
- data/app/assets/stylesheets/houston/application/layout.scss +3 -0
- data/app/assets/stylesheets/houston/application/markdown.scss +1 -1
- data/app/assets/stylesheets/houston/application/navigation.scss +3 -1
- data/app/assets/stylesheets/houston/application/project_banner_buttons.scss +2 -0
- data/app/assets/stylesheets/houston/application/tables.scss +0 -1
- data/app/assets/stylesheets/houston/application/timeline.scss +1 -1
- data/app/assets/stylesheets/houston/core/overrides.scss +2 -1
- data/app/concerns/houston/props.rb +11 -4
- data/app/concerns/project_adapter.rb +1 -1
- data/app/concerns/unique_add.rb +1 -1
- data/app/controllers/actions_controller.rb +39 -0
- data/app/controllers/commits_controller.rb +1 -1
- data/app/controllers/errors_controller.rb +10 -0
- data/app/controllers/hooks_controller.rb +1 -1
- data/app/controllers/omnibar_controller.rb +1 -11
- data/app/controllers/project_hooks_controller.rb +2 -2
- data/app/controllers/projects_controller.rb +2 -0
- data/app/controllers/test_runs_controller.rb +14 -3
- data/app/controllers/triggers_controller.rb +8 -0
- data/app/helpers/actions_helper.rb +7 -0
- data/app/helpers/application_helper.rb +1 -1
- data/app/interactors/cache_key_dependencies.rb +1 -1
- data/app/interactors/test_run_comparer.rb +1 -1
- data/app/mailers/project_notification.rb +0 -31
- data/app/models/ability.rb +0 -11
- data/app/models/{job.rb → action.rb} +19 -7
- data/app/models/commit.rb +2 -2
- data/app/models/deploy.rb +3 -3
- data/app/models/github/comment_event.rb +9 -3
- data/app/models/github/post_receive_event.rb +1 -1
- data/app/models/github/pull_request.rb +5 -5
- data/app/models/persistent_trigger.rb +46 -0
- data/app/models/project.rb +0 -1
- data/app/models/release.rb +1 -1
- data/app/models/run_tests_on_post_receive.rb +17 -17
- data/app/models/task.rb +4 -4
- data/app/models/test_run.rb +18 -5
- data/app/models/ticket.rb +2 -21
- data/app/models/ticket_antecedent.rb +3 -3
- data/app/models/user.rb +0 -1
- data/app/views/actions/index.html.erb +69 -0
- data/app/views/actions/show.html.erb +45 -0
- data/app/views/commits/show.html.erb +7 -8
- data/app/views/errors/_actions.html.erb +11 -0
- data/app/views/errors/index.html.erb +39 -0
- data/app/views/layouts/_mobile_navigation.html.erb +1 -9
- data/app/views/layouts/_navigation.html.erb +14 -8
- data/app/views/layouts/application.html.erb +1 -3
- data/app/views/project_notification/test_run.html.erb +13 -3
- data/app/views/projects/_form.html.erb +13 -7
- data/app/views/triggers/index.html.erb +39 -0
- data/config/initializers/add_navigation_renderers.rb +0 -6
- data/config/initializers/houston_async.rb +4 -2
- data/config/initializers/houston_scheduler_daemon.rb +6 -0
- data/config/initializers/load_persistent_triggers.rb +7 -0
- data/config/initializers/requirements.rb +2 -1
- data/config/initializers/sync_commits_on_post_receive.rb +2 -2
- data/config/routes.rb +17 -15
- data/db/migrate/20160711170921_rename_jobs_to_actions.rb +5 -0
- data/db/migrate/20160713204605_add_trigger_and_params_to_actions.rb +6 -0
- data/db/migrate/20160715173039_create_persistent_triggers.rb +10 -0
- data/db/structure.sql +197 -221
- data/houston-core.gemspec +1 -1
- data/lib/houston/boot/actions.rb +105 -0
- data/lib/houston/boot/active_record_serializer.rb +24 -0
- data/lib/houston/boot/configuration.rb +118 -49
- data/lib/houston/boot/events.rb +46 -0
- data/lib/houston/boot/extensions.rb +118 -14
- data/lib/houston/boot/observer.rb +122 -24
- data/lib/houston/boot/readonly_hash_serializer.rb +15 -0
- data/lib/houston/boot/serializer.rb +83 -0
- data/lib/houston/boot/ticket_antecedent_serializer.rb +21 -0
- data/lib/houston/boot/timer.rb +45 -0
- data/lib/houston/boot/triggers.rb +75 -0
- data/lib/houston/boot.rb +5 -0
- data/lib/houston/version.rb +1 -1
- data/lib/params_serializer.rb +18 -0
- data/lib/tasks/actions.rake +12 -0
- data/lib/tasks/events.rake +11 -0
- data/templates/new-instance/config/abilities.rb +0 -8
- data/templates/new-instance/config/{triggers → events}/alerts/slack_when_assigned.rb +1 -1
- data/templates/new-instance/config/{triggers → events}/alerts/slack_when_opened.rb +1 -1
- data/templates/new-instance/config/{triggers → events}/daemons/health.rb +6 -6
- data/templates/new-instance/config/{triggers → events}/deploy/autoresolve_errs.rb +1 -1
- data/templates/new-instance/config/{triggers → events}/deploy/checkout_mentioned_alerts.rb +1 -1
- data/templates/new-instance/config/{triggers → events}/deploy/notify_deployer_when_finished.rb +2 -2
- data/templates/new-instance/config/{triggers → events}/github/publish_comments_on_slack.rb +9 -9
- data/templates/new-instance/config/{triggers → events}/tests/slack_when_analyzed.rb +1 -1
- data/templates/new-instance/config/{triggers → events}/tests/slack_when_completed.rb +1 -1
- data/templates/new-instance/config/{triggers → events}/tickets/mark_tasks_completed_on_commit.rb +1 -1
- data/templates/new-instance/config/main.rb +8 -35
- data/templates/new-instance/config/{jobs → timers}/cache_key_dependencies.rb +0 -0
- data/templates/new-instance/config/{jobs → timers}/email_about_open_alerts.rb +0 -0
- data/templates/new-instance/config/{jobs → timers}/purge_jobs.rb +0 -0
- data/templates/new-instance/config/{jobs → timers}/slack_reminders_about_alerts.rb +0 -0
- data/templates/new-instance/config/{jobs → timers}/sync_commits.rb +0 -0
- data/templates/new-instance/config/{jobs → timers}/sync_pull_requests.rb +0 -0
- data/templates/new-instance/config/{jobs → timers}/sync_tickets.rb +0 -0
- data/templates/new-module/lib/houston/%name%.rb +13 -0
- data/test/integration/ci_integration_test.rb +5 -5
- data/test/integration/web_hook_test.rb +1 -1
- data/test/test_helper.rb +14 -0
- data/test/unit/controllers/hooks_controller_test.rb +2 -2
- data/test/unit/initializers/sync_commits_on_post_receive_test.rb +1 -1
- data/test/unit/models/actions_test.rb +107 -0
- data/test/unit/models/configuration_test.rb +108 -0
- data/test/unit/models/observer_test.rb +87 -3
- data/test/unit/models/persistent_trigger_test.rb +94 -0
- data/test/unit/models/serializer_test.rb +80 -0
- data/test/unit/models/triggers_test.rb +53 -0
- metadata +60 -60
- data/app/assets/javascripts/houston/app/models/testing_note.coffee +0 -18
- data/app/assets/javascripts/houston/app/views/commit_view.coffee +0 -13
- data/app/assets/javascripts/houston/app/views/testing_note_view.coffee +0 -85
- data/app/assets/javascripts/houston/app/views/testing_report_view.coffee +0 -29
- data/app/assets/javascripts/houston/app/views/testing_ticket_view.coffee +0 -203
- data/app/assets/stylesheets/houston/application/jobs.scss +0 -5
- data/app/assets/stylesheets/houston/application/testing_report.scss +0 -279
- data/app/assets/templates/commit.hbs +0 -9
- data/app/assets/templates/testing_notes/edit.hbs +0 -20
- data/app/assets/templates/testing_notes/new.hbs +0 -27
- data/app/assets/templates/testing_notes/show.hbs +0 -11
- data/app/assets/templates/testing_report/description.hbs +0 -12
- data/app/assets/templates/testing_report/ticket.hbs +0 -21
- data/app/assets/templates/testing_report/verdict.hbs +0 -4
- data/app/controllers/jobs_controller.rb +0 -42
- data/app/controllers/testing_notes_controller.rb +0 -50
- data/app/controllers/testing_report_controller.rb +0 -38
- data/app/models/testing_note.rb +0 -64
- data/app/presenters/testing_note_presenter.rb +0 -27
- data/app/presenters/testing_report_ticket_presenter.rb +0 -71
- data/app/views/jobs/index.html.erb +0 -72
- data/app/views/jobs/show.html.erb +0 -41
- data/app/views/project_notification/testing_note.html.erb +0 -9
- data/app/views/testing_report/_scripts.html.erb +0 -12
- data/app/views/testing_report/index.html.erb +0 -31
- data/app/views/testing_report/show.html.erb +0 -29
- data/config/initializers/houston_scheduler.rb +0 -23
- data/db/migrate/20120424212706_create_testing_notes.rb +0 -14
- data/db/migrate/20120501231817_add_expires_at_to_testing_notes.rb +0 -5
- data/db/migrate/20120501231948_add_unfuddle_id_to_testing_notes.rb +0 -5
- data/db/migrate/20120715230526_change_testing_notes_comment_to_text.rb +0 -9
- data/db/migrate/20130211015046_add_min_passing_verdicts_to_projects.rb +0 -5
- data/db/migrate/20130407220039_add_project_id_to_testing_notes.rb +0 -26
- data/db/migrate/20140511024021_rename_testing_notes_unfuddle_id_to_remote_id.rb +0 -5
- data/templates/new-instance/config/triggers/tickets/email_testing_notes.rb +0 -7
- data/templates/new-instance/log/development.log +0 -41253
- data/templates/new-instance/log/test.log +0 -545
- data/templates/new-module/config/initializers/add_navigation_renderer.rb +0 -3
@@ -1,50 +0,0 @@
|
|
1
|
-
class TestingNotesController < ApplicationController
|
2
|
-
before_filter :find_ticket
|
3
|
-
before_filter :find_testing_note, :only => [:destroy, :update]
|
4
|
-
before_filter :authenticate_user!, :only => [:create, :update, :destroy]
|
5
|
-
|
6
|
-
|
7
|
-
def create
|
8
|
-
@testing_note = current_user.testing_notes.build(params[:testing_note].merge(project: @ticket.project))
|
9
|
-
|
10
|
-
authorize! :create, @testing_note
|
11
|
-
@testing_note.save
|
12
|
-
render_testing_note
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
def update
|
17
|
-
authorize! :update, @testing_note
|
18
|
-
|
19
|
-
@testing_note.update_attributes(params[:testing_note])
|
20
|
-
render_testing_note
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
def destroy
|
25
|
-
authorize! :destroy, @testing_note
|
26
|
-
|
27
|
-
@testing_note.destroy
|
28
|
-
head 204
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def find_ticket
|
35
|
-
@ticket = Ticket.find(params[:ticket_id])
|
36
|
-
end
|
37
|
-
|
38
|
-
def find_testing_note
|
39
|
-
@testing_note = @ticket.testing_notes.find(params[:id])
|
40
|
-
end
|
41
|
-
|
42
|
-
def render_testing_note
|
43
|
-
if @testing_note.errors.any?
|
44
|
-
render json: @testing_note.errors, :status => :unprocessable_entity
|
45
|
-
else
|
46
|
-
render json: TestingNotePresenter.new(@testing_note)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
class TestingReportController < ApplicationController
|
2
|
-
before_filter :authenticate_user!
|
3
|
-
before_filter :find_project, only: [:show]
|
4
|
-
|
5
|
-
|
6
|
-
def index
|
7
|
-
@title = "Testing Report"
|
8
|
-
|
9
|
-
@projects = followed_projects.select { |project| can?(:read, project.testing_notes.build) }
|
10
|
-
@tickets = Ticket.for_projects @projects
|
11
|
-
end
|
12
|
-
|
13
|
-
|
14
|
-
def show
|
15
|
-
@title = "Testing Report • #{@project.name}"
|
16
|
-
authorize! :show, @project.testing_notes.build
|
17
|
-
|
18
|
-
@projects = [@project]
|
19
|
-
@tickets = @project.tickets
|
20
|
-
end
|
21
|
-
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
|
26
|
-
def find_project
|
27
|
-
@project = Project.find_by_slug!(params[:slug])
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
def default_render
|
32
|
-
@tickets = TestingReportTicketPresenter.new(@tickets).as_json
|
33
|
-
render json: @tickts if request.xhr?
|
34
|
-
super
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
|
-
end
|
data/app/models/testing_note.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
class TestingNote < ActiveRecord::Base
|
2
|
-
|
3
|
-
before_create :create_ticket_comment!
|
4
|
-
before_update :update_ticket_comment!
|
5
|
-
before_destroy :destroy_ticket_comment!
|
6
|
-
after_create { Houston.observer.fire "testing_note:create", self }
|
7
|
-
after_update { Houston.observer.fire "testing_note:update", self }
|
8
|
-
after_save { Houston.observer.fire "testing_note:save", self }
|
9
|
-
|
10
|
-
belongs_to :user
|
11
|
-
belongs_to :ticket
|
12
|
-
belongs_to :project
|
13
|
-
|
14
|
-
VERDICTS = %w{works fails badticket none}
|
15
|
-
|
16
|
-
validates :user, :presence => true
|
17
|
-
validates :ticket, :presence => true
|
18
|
-
validates :project, :presence => true
|
19
|
-
validates :comment, :presence => true, :length => 1..1000
|
20
|
-
validates :verdict, :presence => true, :inclusion => VERDICTS
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
def to_comment
|
25
|
-
TicketComment.new(
|
26
|
-
user: user,
|
27
|
-
body: "**#{verdict}** #{comment}",
|
28
|
-
remote_id: remote_id )
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
def pass?
|
34
|
-
verdict == "works"
|
35
|
-
end
|
36
|
-
|
37
|
-
def fail?
|
38
|
-
verdict == "fails"
|
39
|
-
end
|
40
|
-
|
41
|
-
def first_fail?
|
42
|
-
return false unless fail?
|
43
|
-
first_fail = ticket.testing_notes_since_last_release.where(verdict: "fails").order("created_at ASC").first
|
44
|
-
first_fail == nil || first_fail.id == self.id
|
45
|
-
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
private
|
50
|
-
|
51
|
-
def create_ticket_comment!
|
52
|
-
remote_id = ticket.create_comment!(to_comment)
|
53
|
-
self.remote_id = remote_id
|
54
|
-
end
|
55
|
-
|
56
|
-
def update_ticket_comment!
|
57
|
-
ticket.update_comment!(to_comment)
|
58
|
-
end
|
59
|
-
|
60
|
-
def destroy_ticket_comment!
|
61
|
-
ticket.destroy_comment!(to_comment)
|
62
|
-
end
|
63
|
-
|
64
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class TestingNotePresenter
|
2
|
-
include AvatarHelper
|
3
|
-
|
4
|
-
def initialize(testing_notes)
|
5
|
-
@testing_notes = testing_notes
|
6
|
-
end
|
7
|
-
|
8
|
-
def as_json(*args)
|
9
|
-
if @testing_notes.is_a?(TestingNote)
|
10
|
-
to_hash @testing_notes
|
11
|
-
else
|
12
|
-
@testing_notes.map(&method(:to_hash))
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_hash(testing_note)
|
17
|
-
{ id: testing_note.id,
|
18
|
-
createdAt: testing_note.created_at,
|
19
|
-
avatarImage: avatar_for(testing_note.user),
|
20
|
-
userId: testing_note.user_id,
|
21
|
-
byTester: testing_note.user.try(:tester?),
|
22
|
-
ticketId: testing_note.ticket_id,
|
23
|
-
verdict: testing_note.verdict,
|
24
|
-
comment: testing_note.comment }
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
class TestingReportTicketPresenter < TicketPresenter
|
2
|
-
include MarkdownHelper
|
3
|
-
|
4
|
-
def initialize(tickets)
|
5
|
-
super tickets
|
6
|
-
.unclosed
|
7
|
-
.fixed
|
8
|
-
.includes(:project)
|
9
|
-
.includes(:testing_notes => :user)
|
10
|
-
.includes(:releases)
|
11
|
-
@committers_by_ticket = Commit
|
12
|
-
.joins("INNER JOIN commits_tickets ON commits_tickets.commit_id=commits.id")
|
13
|
-
.where(["commits_tickets.ticket_id IN (?)", @tickets.pluck(:id)])
|
14
|
-
.where(unreachable: false)
|
15
|
-
.pluck("commits_tickets.ticket_id", :committer, :committer_email)
|
16
|
-
.each_with_object({}) { |(ticket_id, committer_name, committer_email), map|
|
17
|
-
(map[ticket_id] ||= Set.new) << TicketCommitter.new(committer_name, committer_email) }
|
18
|
-
@released_commits_by_ticket = Commit
|
19
|
-
.joins("INNER JOIN commits_tickets ON commits_tickets.commit_id=commits.id")
|
20
|
-
.where(["commits_tickets.ticket_id IN (?)", @tickets.pluck(:id)])
|
21
|
-
.reachable
|
22
|
-
.released
|
23
|
-
.select("commits.*, commits_tickets.ticket_id")
|
24
|
-
.group_by(&:ticket_id)
|
25
|
-
end
|
26
|
-
|
27
|
-
def as_json(*args)
|
28
|
-
super(*args).sort_by { |ticket| ticket[:projectTitle] }
|
29
|
-
end
|
30
|
-
|
31
|
-
def ticket_to_json(ticket)
|
32
|
-
super.merge(
|
33
|
-
committers: @committers_by_ticket.fetch(ticket.id, Set.new).map(&:to_h),
|
34
|
-
deployment: ticket.deployment,
|
35
|
-
description: mdown(ticket.description),
|
36
|
-
priority: ticket.priority,
|
37
|
-
verdictsByTester: verdicts_by_tester_index(ticket),
|
38
|
-
dueDate: ticket.due_date,
|
39
|
-
minPassingVerdicts: ticket.min_passing_verdicts,
|
40
|
-
testingNotes: TestingNotePresenter.new(ticket.testing_notes).as_json,
|
41
|
-
commits: CommitPresenter.new(@released_commits_by_ticket.fetch(ticket.id, [])).as_json,
|
42
|
-
releases: ReleasePresenter.new(ticket.releases).as_json,
|
43
|
-
lastReleaseAt: ticket.last_release_at)
|
44
|
-
end
|
45
|
-
|
46
|
-
private
|
47
|
-
|
48
|
-
def verdicts_by_tester_index(ticket)
|
49
|
-
verdicts = verdicts_by_tester(ticket)
|
50
|
-
ticket.testers.each_with_index.each_with_object({}) { |(tester, i), response| response[i + 1] = verdicts[tester.id] if verdicts.key?(tester.id) }
|
51
|
-
end
|
52
|
-
|
53
|
-
def verdicts_by_tester(ticket)
|
54
|
-
notes = ticket.testing_notes_since_last_release
|
55
|
-
return {} if notes.empty?
|
56
|
-
|
57
|
-
verdicts_by_tester = Hash[ticket.testers.map(&:id).zip([nil])]
|
58
|
-
notes.each do |note|
|
59
|
-
tester_id = note.user_id
|
60
|
-
next unless verdicts_by_tester.key?(tester_id) # not was not by a tester
|
61
|
-
|
62
|
-
if note.fail?
|
63
|
-
verdicts_by_tester[tester_id] = "failing"
|
64
|
-
elsif note.pass?
|
65
|
-
verdicts_by_tester[tester_id] ||= "passing"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
verdicts_by_tester
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
<% content_for :title do %>
|
2
|
-
<h1 class="project-banner space-below">
|
3
|
-
Jobs
|
4
|
-
</h1>
|
5
|
-
<% end %>
|
6
|
-
|
7
|
-
<% if $scheduler %>
|
8
|
-
<p><b>Status:</b> <%= $scheduler.up? ? "Up (Started #{format_time $scheduler.started_at})".html_safe : "Down" %></p>
|
9
|
-
|
10
|
-
<div class="nomargin">
|
11
|
-
<table id="jobs" class="table table-sortable table-striped">
|
12
|
-
<thead>
|
13
|
-
<tr>
|
14
|
-
<td class="table-margin"></td>
|
15
|
-
<th class="scheduler-job-name">Name</th>
|
16
|
-
<td class="scheduler-job-schedule">Schedule</td>
|
17
|
-
<th class="scheduler-job-last">Last Run</th>
|
18
|
-
<th class="scheduler-job-reliability">Reliability</th>
|
19
|
-
<th class="scheduler-job-duration">Duration</th>
|
20
|
-
<td class="scheduler-job-run-now"></td>
|
21
|
-
<td class="table-margin"></td>
|
22
|
-
</tr>
|
23
|
-
</thead>
|
24
|
-
<tbody>
|
25
|
-
<% @jobs.each do |job| %>
|
26
|
-
<tr class="scheduler-job">
|
27
|
-
<td class="table-margin"></td>
|
28
|
-
<td class="scheduler-job-name"><%= link_to job[:name], job_path(slug: job[:name]) %></td>
|
29
|
-
<td class="scheduler-job-schedule"><%= job[:schedule] %></td>
|
30
|
-
<% if job[:last] %>
|
31
|
-
<td class="scheduler-job-last" data-timestamp="<%= job[:last].started_at.iso8601 %>">
|
32
|
-
<%= format_time job[:last].started_at, today: false %>
|
33
|
-
<%= format_job_state job[:last] %>
|
34
|
-
</td>
|
35
|
-
<td class="scheduler-job-reliability">
|
36
|
-
<%= number_to_percentage 100.0 * job[:successful_runs].to_f / job[:runs], precision: 1 %>
|
37
|
-
<span class="scheduler-job-success-rate">/<%= job[:runs] %></span>
|
38
|
-
</td>
|
39
|
-
<td class="scheduler-job-duration" data-position="<%= job[:avg_duration] %>"><%= format_duration job[:avg_duration] %></td>
|
40
|
-
<% else %>
|
41
|
-
<td class="scheduler-job-last">—</td>
|
42
|
-
<td class="scheduler-job-reliability">—</td>
|
43
|
-
<td class="scheduler-job-duration">—</td>
|
44
|
-
<% end %>
|
45
|
-
<td class="scheduler-job-run-now">
|
46
|
-
<%= button_to "Run now", run_job_path(slug: job[:name]), :class => "btn btn-default" %>
|
47
|
-
</td>
|
48
|
-
<td class="table-margin"></td>
|
49
|
-
</tr>
|
50
|
-
<% end %>
|
51
|
-
</tbody>
|
52
|
-
</table>
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<% else %>
|
56
|
-
<p><b>Status:</b> Unavailable</p>
|
57
|
-
<% end %>
|
58
|
-
|
59
|
-
|
60
|
-
<% content_for :javascripts do %>
|
61
|
-
<script type="text/javascript">
|
62
|
-
$(function() {
|
63
|
-
$('#jobs').tablesorter({
|
64
|
-
headers: {
|
65
|
-
3: { sorter: 'timestamp' },
|
66
|
-
4: { sorter: 'percent' },
|
67
|
-
5: { sorter: 'property' }
|
68
|
-
}
|
69
|
-
});
|
70
|
-
});
|
71
|
-
</script>
|
72
|
-
<% end %>
|
@@ -1,41 +0,0 @@
|
|
1
|
-
<% content_for :title do %>
|
2
|
-
<h1 class="project-banner space-below">
|
3
|
-
<%= link_to "Jobs", jobs_path %>
|
4
|
-
<small><%= @job_name %></small>
|
5
|
-
</h1>
|
6
|
-
<% end %>
|
7
|
-
|
8
|
-
<div class="nomargin">
|
9
|
-
<table id="jobs" class="table table-sortable table-striped">
|
10
|
-
<thead>
|
11
|
-
<tr>
|
12
|
-
<td class="table-margin"></td>
|
13
|
-
<th class="scheduler-job-time">Time</th>
|
14
|
-
<th class="scheduler-job-succeded">Succeeded</th>
|
15
|
-
<th class="scheduler-job-duration">Duration</th>
|
16
|
-
<th class="scheduler-job-exception">Exception</th>
|
17
|
-
<td class="table-margin"></td>
|
18
|
-
</tr>
|
19
|
-
</thead>
|
20
|
-
<tbody>
|
21
|
-
<% @jobs.each do |job| %>
|
22
|
-
<tr class="scheduler-job">
|
23
|
-
<td class="table-margin"></td>
|
24
|
-
<td class="scheduler-job-time"><%= format_time job.started_at %></td>
|
25
|
-
<td class="scheduler-job-succeded"><%= format_job_state job %></td>
|
26
|
-
<td class="scheduler-job-duration"><%= format_duration job.duration %></td>
|
27
|
-
<td class="scheduler-job-exception"><%= job.error.message if job.error %><td>
|
28
|
-
<td class="table-margin"></td>
|
29
|
-
</tr>
|
30
|
-
<% end %>
|
31
|
-
</tbody>
|
32
|
-
</table>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<% content_for :javascripts do %>
|
36
|
-
<script type="text/javascript">
|
37
|
-
$(function() {
|
38
|
-
$('#jobs').tablesorter();
|
39
|
-
});
|
40
|
-
</script>
|
41
|
-
<% end %>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<h1 class="project-banner <%= @project.color %>">
|
2
|
-
<small><%= @noun %> on</small> <%= @project.name %>
|
3
|
-
</h1>
|
4
|
-
|
5
|
-
<h3><%= @tester.name %> put a <%= @noun.downcase %> on ticket #<%= @ticket.number %>:</h3>
|
6
|
-
|
7
|
-
<p><%= mdown @note.comment %></p>
|
8
|
-
|
9
|
-
<p><%= link_to_ticket(@ticket) %></p>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<% content_for :javascripts do %>
|
2
|
-
<script type="text/javascript">
|
3
|
-
$(function() {
|
4
|
-
var tickets = new Tickets(<%= raw tickets.to_json %>);
|
5
|
-
new TestingReportView({
|
6
|
-
el: '#testing_report',
|
7
|
-
projectsCanCloseTicketsFor: <%= raw @projects.select { |project| can?(:close, project.tickets.build) }.map(&:id).to_json %>,
|
8
|
-
tickets: tickets
|
9
|
-
});
|
10
|
-
});
|
11
|
-
</script>
|
12
|
-
<% end %>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<% content_for :title do %>
|
2
|
-
<h1 class="project-banner">
|
3
|
-
Testing Report
|
4
|
-
|
5
|
-
<%= render partial: "projects/keyboard_shortcuts" %>
|
6
|
-
</h1>
|
7
|
-
<% end %>
|
8
|
-
|
9
|
-
<div class="nomargin">
|
10
|
-
<table class="table table-expandable table-sortable table-striped testing-report-table testing-reports-projects">
|
11
|
-
<thead>
|
12
|
-
<tr>
|
13
|
-
<td class="table-margin"></td>
|
14
|
-
<td class="ticket-testingPriority"><i class="fa fa-arrow-up"></i><i class="fa fa-arrow-down"></i></td>
|
15
|
-
<th class="ticket-project sort-desc"><b class="bubble"></b> Project</th>
|
16
|
-
<th class="ticket-summary">Ticket</th>
|
17
|
-
<th class="ticket-deployment">Environment</th>
|
18
|
-
<th class="ticket-due-date">Due Date</th>
|
19
|
-
<th class="ticket-participants vertical"><span class="participant-name">Committers</span></th>
|
20
|
-
<% User.testers.unretired.each do |tester| %>
|
21
|
-
<th class="ticket-participants vertical tester" data-tester-id="<%= tester.id %>"><span class="participant-name"><%= tester.first_name %></span></th>
|
22
|
-
<% end %>
|
23
|
-
<td class="table-margin"></td>
|
24
|
-
</tr>
|
25
|
-
</thead>
|
26
|
-
|
27
|
-
<tbody id="testing_report"><tbody>
|
28
|
-
</table>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<%= render partial: "testing_report/scripts", locals: {tickets: @tickets} %>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<%= render partial: "projects/header", locals: {project: @project, subtitle: "Testing Report"} %>
|
2
|
-
|
3
|
-
<% if @tickets.any? %>
|
4
|
-
<div class="nomargin">
|
5
|
-
<table class="table table-expandable table-sortable table-striped testing-report-table testing-reports-projects">
|
6
|
-
<thead>
|
7
|
-
<tr>
|
8
|
-
<td class="table-margin"></td>
|
9
|
-
<td class="ticket-testingPriority"><i class="fa fa-arrow-up"></i><i class="fa fa-arrow-down"></i></td>
|
10
|
-
<th class="ticket-project sort-asc"><b class="bubble"></b> Project</th>
|
11
|
-
<th class="ticket-summary">Ticket</th>
|
12
|
-
<th class="ticket-deployment">Environment</th>
|
13
|
-
<th class="ticket-due-date">Due Date</th>
|
14
|
-
<th class="ticket-participants vertical"><span class="participant-name">Committers</span></th>
|
15
|
-
<% User.testers.unretired.each do |tester| %>
|
16
|
-
<th class="ticket-participants vertical tester" data-tester-id="<%= tester.id %>"><span class="participant-name"><%= tester.first_name %></span></th>
|
17
|
-
<% end %>
|
18
|
-
<td class="table-margin"></td>
|
19
|
-
</tr>
|
20
|
-
</thead>
|
21
|
-
|
22
|
-
<tbody id="testing_report"><tbody>
|
23
|
-
</table>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<%= render partial: "testing_report/scripts", locals: {tickets: @tickets} %>
|
27
|
-
<% else %>
|
28
|
-
<div class="alert alert-info">There are no tickets in testing for <b><%= @project.name %></b> right now.</div>
|
29
|
-
<% end %>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require "rufus/scheduler"
|
2
|
-
|
3
|
-
Houston.daemonize "scheduler" do
|
4
|
-
$scheduler = Rufus::Scheduler.new
|
5
|
-
|
6
|
-
Houston.config.timers.each do |(type, param, name, options, block)|
|
7
|
-
wrapped_block = Houston.jobs.method(:run)
|
8
|
-
|
9
|
-
case type
|
10
|
-
when :cron
|
11
|
-
cronline = Whenever::Output::Cron.new(options.fetch(:every, :day), nil, param)
|
12
|
-
$scheduler.cron cronline.time_in_cron_syntax, options.merge(tag: name), &wrapped_block
|
13
|
-
|
14
|
-
when :every
|
15
|
-
$scheduler.every param, options.merge(tag: name), &wrapped_block
|
16
|
-
|
17
|
-
else
|
18
|
-
raise NotImplementedError, "A #{type.inspect} timer is not implemented"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
$scheduler.join
|
23
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class CreateTestingNotes < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :testing_notes do |t|
|
4
|
-
t.belongs_to :user
|
5
|
-
t.belongs_to :ticket
|
6
|
-
t.string :verdict, :null => false
|
7
|
-
t.string :comment, :null => false, :default => ""
|
8
|
-
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
add_index :testing_notes, :user_id
|
12
|
-
add_index :testing_notes, :ticket_id
|
13
|
-
end
|
14
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
class AddProjectIdToTestingNotes < ActiveRecord::Migration
|
2
|
-
def up
|
3
|
-
add_column :testing_notes, :project_id, :integer
|
4
|
-
|
5
|
-
TestingNote.reset_column_information
|
6
|
-
TestingNote.find_each do |testing_note|
|
7
|
-
ticket = testing_note.ticket
|
8
|
-
|
9
|
-
if ticket.nil?
|
10
|
-
testing_note.delete
|
11
|
-
Rails.logger.warn "Deleting testing_note ##{testing_note.id} (#{testing_note.attributes.inspect})"
|
12
|
-
next
|
13
|
-
end
|
14
|
-
|
15
|
-
testing_note.update_column(:project_id, ticket.project_id)
|
16
|
-
end
|
17
|
-
|
18
|
-
change_column_null :testing_notes, :project_id, false
|
19
|
-
|
20
|
-
add_index :testing_notes, [:project_id]
|
21
|
-
end
|
22
|
-
|
23
|
-
def down
|
24
|
-
remove_column :testing_notes, :project_id
|
25
|
-
end
|
26
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
Houston.config do
|
2
|
-
on "testing_note:create" do |note|
|
3
|
-
ticket, verdict = note.ticket, note.verdict
|
4
|
-
ProjectNotification.testing_note(note, ticket.participants).deliver! if verdict == "none"
|
5
|
-
ProjectNotification.testing_note(note, ticket.participants.reject(&:tester?)).deliver! if verdict == "fails"
|
6
|
-
end
|
7
|
-
end
|