summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-06-01 14:33:04 +0300
committerValery Sizov <vsv2711@gmail.com>2015-06-03 16:36:54 +0300
commit550bcc8aaab26f94ef6b288c28159be21d11f269 (patch)
tree3958de94cc933bfedbefcf144c37fb9d811169f5 /app
parent227ffbc87c0d989c9213e4a4e4b87df0c8d01720 (diff)
downloadgitlab-ci-550bcc8aaab26f94ef6b288c28159be21d11f269.tar.gz
fix specs
Diffstat (limited to 'app')
-rw-r--r--app/models/commit.rb4
-rw-r--r--app/models/project_services/hip_chat_message.rb2
-rw-r--r--app/views/shared/_guide.html.haml2
3 files changed, 5 insertions, 3 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 14b558f..3bc38b6 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -95,7 +95,7 @@ class Commit < ActiveRecord::Base
filter_param = tag? ? :tags : :branches
config_processor.builds.each do |build_attrs|
if build_attrs[filter_param]
- builds.create!({project: project}.merge(build_attrs.extract!(:name, :commands, :tag_list)))
+ builds.create!({ project: project }.merge(build_attrs.extract!(:name, :commands, :tag_list)))
end
end
end
@@ -116,7 +116,7 @@ class Commit < ActiveRecord::Base
def create_deploy_builds
config_processor.deploy_builds_for_ref(ref).each do |build_attrs|
- builds.create!({project: project}.merge(build_attrs))
+ builds.create!({ project: project }.merge(build_attrs))
end
end
diff --git a/app/models/project_services/hip_chat_message.rb b/app/models/project_services/hip_chat_message.rb
index 3ceed94..db0d58e 100644
--- a/app/models/project_services/hip_chat_message.rb
+++ b/app/models/project_services/hip_chat_message.rb
@@ -8,12 +8,14 @@ class HipChatMessage
def to_s
lines = Array.new
lines.push("<a href=\"#{RoutesHelper.project_url(project)}\">#{project.name}</a> - ")
+
if commit.matrix?
lines.push("<a href=\"#{RoutesHelper.project_ref_commit_url(project, commit.ref, commit.sha)}\">Commit ##{commit.id}</a></br>")
else
first_build = commit.builds_without_retry.first
lines.push("<a href=\"#{RoutesHelper.project_build_url(project, first_build)}\">Build '#{first_build.name}' ##{first_build.id}</a></br>")
end
+
lines.push("#{commit.short_sha} #{commit.git_author_name} - #{commit.git_commit_message}</br>")
lines.push("#{humanized_status(commit_status)} in #{commit.duration} second(s).")
lines.join('')
diff --git a/app/views/shared/_guide.html.haml b/app/views/shared/_guide.html.haml
index 61261e5..7a5117f 100644
--- a/app/views/shared/_guide.html.haml
+++ b/app/views/shared/_guide.html.haml
@@ -7,7 +7,7 @@
Go to #{link_to 'Runners page', project_runners_path(@project), target: :blank} for instructions.
%li
Setup at least one Job with a build script.
- Go to #{link_to 'Jobs page', project_jobs_path(@project), target: :blank} for instructions.
+ Go to 'Jobs page' target: :blank for instructions.
%li
Visit #{link_to 'GitLab project settings', @project.gitlab_url + "/services/gitlab_ci/edit", target: :blank}
and press the "Test settings" button.