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
# otherwise false is returned
def downvote?
votable? && (note.start_with?('-1') ||
note.start_with?(':-1:')
note.start_with?(':-1:') ||
note.start_with?(':thumbsdown:')
)
end
......@@ -206,7 +207,8 @@ class Note < ActiveRecord::Base
# otherwise false is returned
def upvote?
votable? && (note.start_with?('+1') ||
note.start_with?(':+1:')
note.start_with?(':+1:') ||
note.start_with?(':thumbsup:')
)
end
......
.row
.span3{:"data-spy" => 'affix'}
.ui-box
.title
Help
%ul.well-list
%li
%strong= link_to "Workflow", help_workflow_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
%h3.page-title Help
%ul.nav.nav-pills.nav-stacked
- 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}
- links.each do |title,path|
%li{class: current_page?(path) ? 'active' : nil}
= link_to title, path
.span9.pull-right
= yield
.git-clone-holder
%button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn", :"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
%button{class: "btn #{ current_user ? 'active' : '' }", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn #{ current_user ? '' : 'active' }", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase
= 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
@javascript
Scenario: I should filter selected tag
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
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
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
When I look for a commit by ";"
......
......@@ -38,3 +38,14 @@ Feature: Public Projects Feature
Given I sign in as a user
When I visit project "Internal" 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
sleep 2
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
page.should have_content 'cleaning'
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
page.should_not have_content 'cleaning'
end
......
......@@ -83,5 +83,15 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
page.should have_content 'Internal'
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
......@@ -61,6 +61,11 @@ describe Note do
note.should be_upvote
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
note = create(:votable_note, note: "-1 for this")
note.should be_downvote
......@@ -70,6 +75,11 @@ describe Note do
note = build(:votable_note, note: ":-1: for this")
note.should be_downvote
end
it "recognizes a thumbsdown emoji as a vote" do
note = build(:votable_note, note: ":thumbsdown: for this")
note.should be_downvote
end
end
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