Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-02 11:34:26 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-02 11:34:26 +0400
commit90f9c3fbc7e14801fcb787940ec77371e17fc753 (patch)
treeaf9914806f02114736b3a963276f5351152a2525
parent931e6a721f44d5042a019eca189fac677f719006 (diff)
parent5fd90cd5e4a038e4b0ad9e8893eec7155e0b6cb5 (diff)
Merge branch 'master' of github.com:gitlabhq/gitlabhq
-rw-r--r--app/models/note.rb6
-rw-r--r--app/views/help/_layout.html.haml38
-rw-r--r--app/views/shared/_clone_panel.html.haml6
-rw-r--r--features/project/network.feature6
-rw-r--r--features/public/public_projects.feature11
-rw-r--r--features/steps/project/project_network_graph.rb4
-rw-r--r--features/steps/public/projects_feature.rb10
-rw-r--r--spec/models/note_spec.rb10
8 files changed, 49 insertions, 42 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 7e7387abed6..8284da8616f 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -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
diff --git a/app/views/help/_layout.html.haml b/app/views/help/_layout.html.haml
index da917888eee..7928937c60a 100644
--- a/app/views/help/_layout.html.haml
+++ b/app/views/help/_layout.html.haml
@@ -1,37 +1,11 @@
.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
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml
index ac7b9ee7f2d..097c81100ba 100644
--- a/app/views/shared/_clone_panel.html.haml
+++ b/app/views/shared/_clone_panel.html.haml
@@ -1,4 +1,4 @@
.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
diff --git a/features/project/network.feature b/features/project/network.feature
index ceae08c1074..22beb1c50bc 100644
--- a/features/project/network.feature
+++ b/features/project/network.feature
@@ -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 ";"
diff --git a/features/public/public_projects.feature b/features/public/public_projects.feature
index 86bb888fdb6..03825dffd3f 100644
--- a/features/public/public_projects.feature
+++ b/features/public/public_projects.feature
@@ -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
diff --git a/features/steps/project/project_network_graph.rb b/features/steps/project/project_network_graph.rb
index 127adecf7ed..4954db2d7b1 100644
--- a/features/steps/project/project_network_graph.rb
+++ b/features/steps/project/project_network_graph.rb
@@ -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
diff --git a/features/steps/public/projects_feature.rb b/features/steps/public/projects_feature.rb
index 8b61eba3ffb..a4209bb9c78 100644
--- a/features/steps/public/projects_feature.rb
+++ b/features/steps/public/projects_feature.rb
@@ -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
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 42c405d8e50..55b264ce8cf 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -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) }