Commit 90f9c3fbc7e14801fcb787940ec77371e17fc753

Authored by Dmitriy Zaporozhets
2 parents 931e6a72 5fd90cd5

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

app/models/note.rb
... ... @@ -157,7 +157,8 @@ class Note < ActiveRecord::Base
157 157 # otherwise false is returned
158 158 def downvote?
159 159 votable? && (note.start_with?('-1') ||
160   - note.start_with?(':-1:')
  160 + note.start_with?(':-1:') ||
  161 + note.start_with?(':thumbsdown:')
161 162 )
162 163 end
163 164  
... ... @@ -206,7 +207,8 @@ class Note < ActiveRecord::Base
206 207 # otherwise false is returned
207 208 def upvote?
208 209 votable? && (note.start_with?('+1') ||
209   - note.start_with?(':+1:')
  210 + note.start_with?(':+1:') ||
  211 + note.start_with?(':thumbsup:')
210 212 )
211 213 end
212 214  
... ...
app/views/help/_layout.html.haml
1 1 .row
2 2 .span3{:"data-spy" => 'affix'}
3   - .ui-box
4   - .title
5   - Help
6   - %ul.well-list
7   - %li
8   - %strong= link_to "Workflow", help_workflow_path
9   - %li
10   - %strong= link_to "SSH keys", help_ssh_path
11   -
12   - %li
13   - %strong= link_to "GitLab Markdown", help_markdown_path
14   -
15   - %li
16   - %strong= link_to "Permissions", help_permissions_path
17   -
18   - %li
19   - %strong= link_to "API", help_api_path
20   -
21   - %li
22   - %strong= link_to "Web Hooks", help_web_hooks_path
23   -
24   - %li
25   - %strong= link_to "Rake Tasks", help_raketasks_path
26   -
27   - %li
28   - %strong= link_to "System Hooks", help_system_hooks_path
29   -
30   - %li
31   - %strong= link_to "Public Access", help_public_access_path
32   -
33   - %li
34   - %strong= link_to "Security", help_security_path
  3 + %h3.page-title Help
  4 + %ul.nav.nav-pills.nav-stacked
  5 + - 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}
  6 + - links.each do |title,path|
  7 + %li{class: current_page?(path) ? 'active' : nil}
  8 + = link_to title, path
35 9  
36 10 .span9.pull-right
37 11 = yield
... ...
app/views/shared/_clone_panel.html.haml
1 1 .git-clone-holder
2   - %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
3   - %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase
4   - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5", readonly: true
  2 + %button{class: "btn #{ current_user ? 'active' : '' }", :"data-clone" => @project.ssh_url_to_repo} SSH
  3 + %button{class: "btn #{ current_user ? '' : 'active' }", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase
  4 + = text_field_tag :project_clone, (current_user ? @project.url_to_repo : @project.http_url_to_repo), class: "one_click_select span5", readonly: true
... ...
features/project/network.feature
... ... @@ -29,11 +29,11 @@ Feature: Project Network Graph
29 29 @javascript
30 30 Scenario: I should filter selected tag
31 31 When I switch ref to "v2.1.0"
32   - Then page should have content not cotaining "v2.1.0"
  32 + Then page should have content not containing "v2.1.0"
33 33 When click "Show only selected branch" checkbox
34   - Then page should not have content not cotaining "v2.1.0"
  34 + Then page should not have content not containing "v2.1.0"
35 35 When click "Show only selected branch" checkbox
36   - Then page should have content not cotaining "v2.1.0"
  36 + Then page should have content not containing "v2.1.0"
37 37  
38 38 Scenario: I should fail to look for a commit
39 39 When I look for a commit by ";"
... ...
features/public/public_projects.feature
... ... @@ -38,3 +38,14 @@ Feature: Public Projects Feature
38 38 Given I sign in as a user
39 39 When I visit project "Internal" page
40 40 Then I should see project "Internal" home page
  41 +
  42 + Scenario: I visit public project page
  43 + When I visit project "Community" page
  44 + Then I should see project "Community" home page
  45 + And I should see a http link to the repository
  46 +
  47 + Scenario: I visit public area as user
  48 + Given I sign in as a user
  49 + When I visit project "Community" page
  50 + Then I should see project "Community" home page
  51 + And I should see a ssh link to the repository
... ...
features/steps/project/project_network_graph.rb
... ... @@ -43,13 +43,13 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
43 43 sleep 2
44 44 end
45 45  
46   - Then 'page should have content not cotaining "v2.1.0"' do
  46 + Then 'page should have content not containing "v2.1.0"' do
47 47 within '.network-graph' do
48 48 page.should have_content 'cleaning'
49 49 end
50 50 end
51 51  
52   - Then 'page should not have content not cotaining "v2.1.0"' do
  52 + Then 'page should not have content not containing "v2.1.0"' do
53 53 within '.network-graph' do
54 54 page.should_not have_content 'cleaning'
55 55 end
... ...
features/steps/public/projects_feature.rb
... ... @@ -83,5 +83,15 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
83 83 page.should have_content 'Internal'
84 84 end
85 85 end
  86 +
  87 + Then 'I should see a http link to the repository' do
  88 + project = Project.find_by_name 'Community'
  89 + page.should have_field('project_clone', with: project.http_url_to_repo)
  90 + end
  91 +
  92 + Then 'I should see a ssh link to the repository' do
  93 + project = Project.find_by_name 'Community'
  94 + page.should have_field('project_clone', with: project.url_to_repo)
  95 + end
86 96 end
87 97  
... ...
spec/models/note_spec.rb
... ... @@ -61,6 +61,11 @@ describe Note do
61 61 note.should be_upvote
62 62 end
63 63  
  64 + it "recognizes a thumbsup emoji as a vote" do
  65 + note = build(:votable_note, note: ":thumbsup: for this")
  66 + note.should be_upvote
  67 + end
  68 +
64 69 it "recognizes a -1 note" do
65 70 note = create(:votable_note, note: "-1 for this")
66 71 note.should be_downvote
... ... @@ -70,6 +75,11 @@ describe Note do
70 75 note = build(:votable_note, note: ":-1: for this")
71 76 note.should be_downvote
72 77 end
  78 +
  79 + it "recognizes a thumbsdown emoji as a vote" do
  80 + note = build(:votable_note, note: ":thumbsdown: for this")
  81 + note.should be_downvote
  82 + end
73 83 end
74 84  
75 85 let(:project) { create(:project) }
... ...