Commit 90f9c3fb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'master' of github.com:gitlabhq/gitlabhq

parents 931e6a72 5fd90cd5
...@@ -157,7 +157,8 @@ class Note < ActiveRecord::Base ...@@ -157,7 +157,8 @@ class Note < ActiveRecord::Base
# otherwise false is returned # otherwise false is returned
def downvote? def downvote?
votable? && (note.start_with?('-1') || votable? && (note.start_with?('-1') ||
note.start_with?(':-1:') note.start_with?(':-1:') ||
note.start_with?(':thumbsdown:')
) )
end end
...@@ -206,7 +207,8 @@ class Note < ActiveRecord::Base ...@@ -206,7 +207,8 @@ class Note < ActiveRecord::Base
# otherwise false is returned # otherwise false is returned
def upvote? def upvote?
votable? && (note.start_with?('+1') || votable? && (note.start_with?('+1') ||
note.start_with?(':+1:') note.start_with?(':+1:') ||
note.start_with?(':thumbsup:')
) )
end end
......
.row .row
.span3{:"data-spy" => 'affix'} .span3{:"data-spy" => 'affix'}
.ui-box %h3.page-title Help
.title %ul.nav.nav-pills.nav-stacked
Help - links = {:"Workflow" => help_workflow_path, :"SSH Keys" => help_ssh_path, :"GitLab Markdown" => help_markdown_path, :"Permissions" => help_permissions_path, :"API" => help_api_path, :"Web Hooks" => help_web_hooks_path, :"Rake Tasks" => help_raketasks_path, :"System Hooks" => help_system_hooks_path, :"Public Access" => help_public_access_path, :"Security" => help_security_path}
%ul.well-list - links.each do |title,path|
%li %li{class: current_page?(path) ? 'active' : nil}
%strong= link_to "Workflow", help_workflow_path = link_to title, path
%li
%strong= link_to "SSH keys", help_ssh_path
%li
%strong= link_to "GitLab Markdown", help_markdown_path
%li
%strong= link_to "Permissions", help_permissions_path
%li
%strong= link_to "API", help_api_path
%li
%strong= link_to "Web Hooks", help_web_hooks_path
%li
%strong= link_to "Rake Tasks", help_raketasks_path
%li
%strong= link_to "System Hooks", help_system_hooks_path
%li
%strong= link_to "Public Access", help_public_access_path
%li
%strong= link_to "Security", help_security_path
.span9.pull-right .span9.pull-right
= yield = yield
.git-clone-holder .git-clone-holder
%button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH %button{class: "btn #{ current_user ? 'active' : '' }", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase %button{class: "btn #{ current_user ? '' : 'active' }", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5", readonly: true = text_field_tag :project_clone, (current_user ? @project.url_to_repo : @project.http_url_to_repo), class: "one_click_select span5", readonly: true
...@@ -29,11 +29,11 @@ Feature: Project Network Graph ...@@ -29,11 +29,11 @@ Feature: Project Network Graph
@javascript @javascript
Scenario: I should filter selected tag Scenario: I should filter selected tag
When I switch ref to "v2.1.0" When I switch ref to "v2.1.0"
Then page should have content not cotaining "v2.1.0" Then page should have content not containing "v2.1.0"
When click "Show only selected branch" checkbox When click "Show only selected branch" checkbox
Then page should not have content not cotaining "v2.1.0" Then page should not have content not containing "v2.1.0"
When click "Show only selected branch" checkbox When click "Show only selected branch" checkbox
Then page should have content not cotaining "v2.1.0" Then page should have content not containing "v2.1.0"
Scenario: I should fail to look for a commit Scenario: I should fail to look for a commit
When I look for a commit by ";" When I look for a commit by ";"
......
...@@ -38,3 +38,14 @@ Feature: Public Projects Feature ...@@ -38,3 +38,14 @@ Feature: Public Projects Feature
Given I sign in as a user Given I sign in as a user
When I visit project "Internal" page When I visit project "Internal" page
Then I should see project "Internal" home page Then I should see project "Internal" home page
Scenario: I visit public project page
When I visit project "Community" page
Then I should see project "Community" home page
And I should see a http link to the repository
Scenario: I visit public area as user
Given I sign in as a user
When I visit project "Community" page
Then I should see project "Community" home page
And I should see a ssh link to the repository
...@@ -43,13 +43,13 @@ class ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -43,13 +43,13 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
sleep 2 sleep 2
end end
Then 'page should have content not cotaining "v2.1.0"' do Then 'page should have content not containing "v2.1.0"' do
within '.network-graph' do within '.network-graph' do
page.should have_content 'cleaning' page.should have_content 'cleaning'
end end
end end
Then 'page should not have content not cotaining "v2.1.0"' do Then 'page should not have content not containing "v2.1.0"' do
within '.network-graph' do within '.network-graph' do
page.should_not have_content 'cleaning' page.should_not have_content 'cleaning'
end end
......
...@@ -83,5 +83,15 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps ...@@ -83,5 +83,15 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
page.should have_content 'Internal' page.should have_content 'Internal'
end end
end end
Then 'I should see a http link to the repository' do
project = Project.find_by_name 'Community'
page.should have_field('project_clone', with: project.http_url_to_repo)
end
Then 'I should see a ssh link to the repository' do
project = Project.find_by_name 'Community'
page.should have_field('project_clone', with: project.url_to_repo)
end
end end
...@@ -61,6 +61,11 @@ describe Note do ...@@ -61,6 +61,11 @@ describe Note do
note.should be_upvote note.should be_upvote
end end
it "recognizes a thumbsup emoji as a vote" do
note = build(:votable_note, note: ":thumbsup: for this")
note.should be_upvote
end
it "recognizes a -1 note" do it "recognizes a -1 note" do
note = create(:votable_note, note: "-1 for this") note = create(:votable_note, note: "-1 for this")
note.should be_downvote note.should be_downvote
...@@ -70,6 +75,11 @@ describe Note do ...@@ -70,6 +75,11 @@ describe Note do
note = build(:votable_note, note: ":-1: for this") note = build(:votable_note, note: ":-1: for this")
note.should be_downvote note.should be_downvote
end end
it "recognizes a thumbsdown emoji as a vote" do
note = build(:votable_note, note: ":thumbsdown: for this")
note.should be_downvote
end
end end
let(:project) { create(:project) } let(:project) { create(:project) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment