Commit 15c27192c0fa4e33188c3f6663362faca02df8af
Exists in
spb-stable
and in
2 other branches
Merge branch 'remove-wall'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: CHANGELOG
Showing
43 changed files
with
7 additions
and
530 deletions
Show diff stats
CHANGELOG
@@ -34,6 +34,7 @@ v 7.0.0 | @@ -34,6 +34,7 @@ v 7.0.0 | ||
34 | - Skip init script check on omnibus-gitlab | 34 | - Skip init script check on omnibus-gitlab |
35 | - Be more selective when killing stray Sidekiqs | 35 | - Be more selective when killing stray Sidekiqs |
36 | - Check LDAP user filter during sign-in | 36 | - Check LDAP user filter during sign-in |
37 | + - Remove wall feature (no data loss - you can take it from database) | ||
37 | 38 | ||
38 | v 6.9.2 | 39 | v 6.9.2 |
39 | - Revert the commit that broke the LDAP user filter | 40 | - Revert the commit that broke the LDAP user filter |
app/assets/javascripts/dispatcher.js.coffee
@@ -34,8 +34,6 @@ class Dispatcher | @@ -34,8 +34,6 @@ class Dispatcher | ||
34 | new Activities() | 34 | new Activities() |
35 | when 'projects:new', 'projects:edit' | 35 | when 'projects:new', 'projects:edit' |
36 | new Project() | 36 | new Project() |
37 | - when 'projects:walls:show' | ||
38 | - new Wall(project_id) | ||
39 | when 'projects:teams:members:index' | 37 | when 'projects:teams:members:index' |
40 | new TeamMembers() | 38 | new TeamMembers() |
41 | when 'groups:members' | 39 | when 'groups:members' |
app/assets/javascripts/wall.js.coffee
@@ -1,85 +0,0 @@ | @@ -1,85 +0,0 @@ | ||
1 | -class Wall | ||
2 | - constructor: (project_id) -> | ||
3 | - @project_id = project_id | ||
4 | - @note_ids = [] | ||
5 | - @getContent() | ||
6 | - @initRefresh() | ||
7 | - @initForm() | ||
8 | - | ||
9 | - # | ||
10 | - # Gets an initial set of notes. | ||
11 | - # | ||
12 | - getContent: -> | ||
13 | - Api.notes @project_id, (notes) => | ||
14 | - $.each notes, (i, note) => | ||
15 | - # render note if it not present in loaded list | ||
16 | - # or skip if rendered | ||
17 | - if $.inArray(note.id, @note_ids) == -1 | ||
18 | - @note_ids.push(note.id) | ||
19 | - @renderNote(note) | ||
20 | - @scrollDown() | ||
21 | - $("abbr.timeago").timeago() | ||
22 | - | ||
23 | - initRefresh: -> | ||
24 | - setInterval => | ||
25 | - @refresh() | ||
26 | - , 10000 | ||
27 | - | ||
28 | - refresh: -> | ||
29 | - @getContent() | ||
30 | - | ||
31 | - scrollDown: -> | ||
32 | - notes = $('ul.notes') | ||
33 | - $('body, html').scrollTop(notes.height()) | ||
34 | - | ||
35 | - initForm: -> | ||
36 | - form = $('.wall-note-form') | ||
37 | - form.find("#target_type").val('wall') | ||
38 | - | ||
39 | - form.on 'ajax:success', => | ||
40 | - @refresh() | ||
41 | - form.find(".js-note-text").val("").trigger("input") | ||
42 | - | ||
43 | - form.on 'ajax:complete', -> | ||
44 | - form.find(".js-comment-button").removeAttr('disabled') | ||
45 | - form.find(".js-comment-button").removeClass('disabled') | ||
46 | - | ||
47 | - form.on "click", ".js-choose-note-attachment-button", -> | ||
48 | - form.find(".js-note-attachment-input").click() | ||
49 | - | ||
50 | - form.on "change", ".js-note-attachment-input", -> | ||
51 | - filename = $(this).val().replace(/^.*[\\\/]/, '') | ||
52 | - form.find(".js-attachment-filename").text(filename) | ||
53 | - | ||
54 | - form.find('.note_text').keydown (e) -> | ||
55 | - if e.ctrlKey && e.keyCode == 13 | ||
56 | - form.find('.js-comment-button').submit() | ||
57 | - | ||
58 | - form.show() | ||
59 | - | ||
60 | - renderNote: (note) -> | ||
61 | - template = @noteTemplate() | ||
62 | - template = template.replace('{{author_name}}', note.author.name) | ||
63 | - template = template.replace(/{{created_at}}/g, note.created_at) | ||
64 | - template = template.replace('{{text}}', simpleFormat(note.body)) | ||
65 | - | ||
66 | - if note.attachment | ||
67 | - file = '<i class="icon-paper-clip"/><a href="' + gon.relative_url_root + '/files/note/' + note.id + '/' + note.attachment + '">' + note.attachment + '</a>' | ||
68 | - else | ||
69 | - file = '' | ||
70 | - template = template.replace('{{file}}', file) | ||
71 | - | ||
72 | - | ||
73 | - $('ul.notes').append(template) | ||
74 | - | ||
75 | - noteTemplate: -> | ||
76 | - return '<li> | ||
77 | - <strong class="wall-author">{{author_name}}</strong> | ||
78 | - <span class="wall-text"> | ||
79 | - {{text}} | ||
80 | - <span class="wall-file">{{file}}</span> | ||
81 | - </span> | ||
82 | - <abbr class="timeago" title="{{created_at}}">{{created_at}}</abbr> | ||
83 | - </li>' | ||
84 | - | ||
85 | -@Wall = Wall |
app/assets/stylesheets/sections/wall.scss
@@ -1,55 +0,0 @@ | @@ -1,55 +0,0 @@ | ||
1 | -.wall-page { | ||
2 | - .wall-note-form { | ||
3 | - @extend .col-md-12; | ||
4 | - | ||
5 | - margin: 0; | ||
6 | - height: 140px; | ||
7 | - background: #F9F9F9; | ||
8 | - position: fixed; | ||
9 | - bottom: 0px; | ||
10 | - padding: 3px; | ||
11 | - padding-bottom: 25px; | ||
12 | - border: 1px solid #DDD; | ||
13 | - } | ||
14 | - | ||
15 | - .notes { | ||
16 | - margin-bottom: 160px; | ||
17 | - background: #FFE; | ||
18 | - border: 1px solid #EED; | ||
19 | - | ||
20 | - > li { | ||
21 | - @extend .clearfix; | ||
22 | - border-bottom: 1px solid #EED; | ||
23 | - padding: 10px; | ||
24 | - } | ||
25 | - | ||
26 | - .wall-author { | ||
27 | - color: #666; | ||
28 | - float: left; | ||
29 | - font-size: 12px; | ||
30 | - width: 120px; | ||
31 | - text-overflow: ellipsis; | ||
32 | - white-space: nowrap; | ||
33 | - overflow: hidden; | ||
34 | - } | ||
35 | - | ||
36 | - .wall-text { | ||
37 | - border-left: 1px solid #CCC; | ||
38 | - margin-left: 10px; | ||
39 | - padding-left: 10px; | ||
40 | - float: left; | ||
41 | - width: 75%; | ||
42 | - } | ||
43 | - | ||
44 | - .wall-file { | ||
45 | - margin-left: 8px; | ||
46 | - background: #EEE; | ||
47 | - } | ||
48 | - | ||
49 | - abbr { | ||
50 | - float: right; | ||
51 | - color: #AAA; | ||
52 | - border: none; | ||
53 | - } | ||
54 | - } | ||
55 | -} |
app/controllers/projects/walls_controller.rb
@@ -1,20 +0,0 @@ | @@ -1,20 +0,0 @@ | ||
1 | -class Projects::WallsController < Projects::ApplicationController | ||
2 | - before_filter :module_enabled | ||
3 | - | ||
4 | - respond_to :js, :html | ||
5 | - | ||
6 | - def show | ||
7 | - @note = @project.notes.new | ||
8 | - | ||
9 | - respond_to do |format| | ||
10 | - format.html | ||
11 | - end | ||
12 | - end | ||
13 | - | ||
14 | - protected | ||
15 | - | ||
16 | - def module_enabled | ||
17 | - return render_404 unless @project.wall_enabled | ||
18 | - end | ||
19 | -end | ||
20 | - |
app/helpers/events_helper.rb
@@ -109,8 +109,6 @@ module EventsHelper | @@ -109,8 +109,6 @@ module EventsHelper | ||
109 | "#{event.note_target_type} ##{truncate event.note_target_iid}" | 109 | "#{event.note_target_type} ##{truncate event.note_target_iid}" |
110 | end | 110 | end |
111 | end | 111 | end |
112 | - elsif event.wall_note? | ||
113 | - link_to 'wall', project_wall_path(event.project) | ||
114 | else | 112 | else |
115 | content_tag :strong do | 113 | content_tag :strong do |
116 | "(deleted)" | 114 | "(deleted)" |
app/helpers/projects_helper.rb
@@ -139,7 +139,7 @@ module ProjectsHelper | @@ -139,7 +139,7 @@ module ProjectsHelper | ||
139 | nav_tabs << :settings | 139 | nav_tabs << :settings |
140 | end | 140 | end |
141 | 141 | ||
142 | - [:issues, :wiki, :wall, :snippets].each do |feature| | 142 | + [:issues, :wiki, :snippets].each do |feature| |
143 | nav_tabs << feature if project.send :"#{feature}_enabled" | 143 | nav_tabs << feature if project.send :"#{feature}_enabled" |
144 | end | 144 | end |
145 | 145 |
app/helpers/search_helper.rb
@@ -61,7 +61,6 @@ module SearchHelper | @@ -61,7 +61,6 @@ module SearchHelper | ||
61 | { label: "#{prefix} - Milestones", url: project_milestones_path(@project) }, | 61 | { label: "#{prefix} - Milestones", url: project_milestones_path(@project) }, |
62 | { label: "#{prefix} - Snippets", url: project_snippets_path(@project) }, | 62 | { label: "#{prefix} - Snippets", url: project_snippets_path(@project) }, |
63 | { label: "#{prefix} - Team", url: project_team_index_path(@project) }, | 63 | { label: "#{prefix} - Team", url: project_team_index_path(@project) }, |
64 | - { label: "#{prefix} - Wall", url: project_wall_path(@project) }, | ||
65 | { label: "#{prefix} - Wiki", url: project_wikis_path(@project) }, | 64 | { label: "#{prefix} - Wiki", url: project_wikis_path(@project) }, |
66 | ] | 65 | ] |
67 | else | 66 | else |
app/mailers/emails/notes.rb
@@ -32,14 +32,5 @@ module Emails | @@ -32,14 +32,5 @@ module Emails | ||
32 | cc: recipient(recipient_id), | 32 | cc: recipient(recipient_id), |
33 | subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) | 33 | subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) |
34 | end | 34 | end |
35 | - | ||
36 | - def note_wall_email(recipient_id, note_id) | ||
37 | - @note = Note.find(note_id) | ||
38 | - @project = @note.project | ||
39 | - @target_url = project_wall_url(@note.project, anchor: "note_#{@note.id}") | ||
40 | - mail(from: sender(@note.author_id), | ||
41 | - cc: recipient(recipient_id), | ||
42 | - subject: subject("Note on wall")) | ||
43 | - end | ||
44 | end | 35 | end |
45 | end | 36 | end |
app/models/event.rb
@@ -286,10 +286,6 @@ class Event < ActiveRecord::Base | @@ -286,10 +286,6 @@ class Event < ActiveRecord::Base | ||
286 | end.to_s | 286 | end.to_s |
287 | end | 287 | end |
288 | 288 | ||
289 | - def wall_note? | ||
290 | - target.noteable_type.blank? | ||
291 | - end | ||
292 | - | ||
293 | def note_target_type | 289 | def note_target_type |
294 | if target.noteable_type.present? | 290 | if target.noteable_type.present? |
295 | target.noteable_type.titleize | 291 | target.noteable_type.titleize |
app/models/note.rb
@@ -251,10 +251,6 @@ class Note < ActiveRecord::Base | @@ -251,10 +251,6 @@ class Note < ActiveRecord::Base | ||
251 | for_merge_request? && for_diff_line? | 251 | for_merge_request? && for_diff_line? |
252 | end | 252 | end |
253 | 253 | ||
254 | - def for_wall? | ||
255 | - noteable_type.blank? | ||
256 | - end | ||
257 | - | ||
258 | # override to return commits, which are not active record | 254 | # override to return commits, which are not active record |
259 | def noteable | 255 | def noteable |
260 | if for_commit? | 256 | if for_commit? |
@@ -295,8 +291,6 @@ class Note < ActiveRecord::Base | @@ -295,8 +291,6 @@ class Note < ActiveRecord::Base | ||
295 | def noteable_type_name | 291 | def noteable_type_name |
296 | if noteable_type.present? | 292 | if noteable_type.present? |
297 | noteable_type.downcase | 293 | noteable_type.downcase |
298 | - else | ||
299 | - "wall" | ||
300 | end | 294 | end |
301 | end | 295 | end |
302 | 296 |
app/models/project.rb
@@ -31,7 +31,6 @@ class Project < ActiveRecord::Base | @@ -31,7 +31,6 @@ class Project < ActiveRecord::Base | ||
31 | 31 | ||
32 | default_value_for :archived, false | 32 | default_value_for :archived, false |
33 | default_value_for :issues_enabled, true | 33 | default_value_for :issues_enabled, true |
34 | - default_value_for :wall_enabled, true | ||
35 | default_value_for :merge_requests_enabled, true | 34 | default_value_for :merge_requests_enabled, true |
36 | default_value_for :wiki_enabled, true | 35 | default_value_for :wiki_enabled, true |
37 | default_value_for :snippets_enabled, true | 36 | default_value_for :snippets_enabled, true |
@@ -39,7 +38,7 @@ class Project < ActiveRecord::Base | @@ -39,7 +38,7 @@ class Project < ActiveRecord::Base | ||
39 | ActsAsTaggableOn.strict_case_match = true | 38 | ActsAsTaggableOn.strict_case_match = true |
40 | 39 | ||
41 | attr_accessible :name, :path, :description, :issues_tracker, :label_list, | 40 | attr_accessible :name, :path, :description, :issues_tracker, :label_list, |
42 | - :issues_enabled, :wall_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, | 41 | + :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, |
43 | :wiki_enabled, :visibility_level, :import_url, :last_activity_at, as: [:default, :admin] | 42 | :wiki_enabled, :visibility_level, :import_url, :last_activity_at, as: [:default, :admin] |
44 | 43 | ||
45 | attr_accessible :namespace_id, :creator_id, as: :admin | 44 | attr_accessible :namespace_id, :creator_id, as: :admin |
@@ -98,7 +97,7 @@ class Project < ActiveRecord::Base | @@ -98,7 +97,7 @@ class Project < ActiveRecord::Base | ||
98 | exclusion: { in: Gitlab::Blacklist.path }, | 97 | exclusion: { in: Gitlab::Blacklist.path }, |
99 | format: { with: Gitlab::Regex.path_regex, | 98 | format: { with: Gitlab::Regex.path_regex, |
100 | message: "only letters, digits & '_' '-' '.' allowed. Letter or digit should be first" } | 99 | message: "only letters, digits & '_' '-' '.' allowed. Letter or digit should be first" } |
101 | - validates :issues_enabled, :wall_enabled, :merge_requests_enabled, | 100 | + validates :issues_enabled, :merge_requests_enabled, |
102 | :wiki_enabled, inclusion: { in: [true, false] } | 101 | :wiki_enabled, inclusion: { in: [true, false] } |
103 | validates :issues_tracker_id, length: { maximum: 255 }, allow_blank: true | 102 | validates :issues_tracker_id, length: { maximum: 255 }, allow_blank: true |
104 | validates :namespace, presence: true | 103 | validates :namespace, presence: true |
app/observers/note_observer.rb
@@ -3,12 +3,9 @@ class NoteObserver < BaseObserver | @@ -3,12 +3,9 @@ class NoteObserver < BaseObserver | ||
3 | notification.new_note(note) | 3 | notification.new_note(note) |
4 | 4 | ||
5 | # Skip system notes, like status changes and cross-references. | 5 | # Skip system notes, like status changes and cross-references. |
6 | - # Skip wall notes to prevent spamming of dashboard | ||
7 | - if note.noteable_type.present? && !note.system | 6 | + unless note.system |
8 | event_service.leave_note(note, note.author) | 7 | event_service.leave_note(note, note.author) |
9 | - end | ||
10 | 8 | ||
11 | - unless note.system? | ||
12 | # Create a cross-reference note if this Note contains GFM that names an | 9 | # Create a cross-reference note if this Note contains GFM that names an |
13 | # issue, merge request, or commit. | 10 | # issue, merge request, or commit. |
14 | note.references.each do |mentioned| | 11 | note.references.each do |mentioned| |
app/services/notification_service.rb
@@ -106,7 +106,6 @@ class NotificationService | @@ -106,7 +106,6 @@ class NotificationService | ||
106 | # TODO: split on methods and refactor | 106 | # TODO: split on methods and refactor |
107 | # | 107 | # |
108 | def new_note(note) | 108 | def new_note(note) |
109 | - # ignore wall messages | ||
110 | return true unless note.noteable_type.present? | 109 | return true unless note.noteable_type.present? |
111 | 110 | ||
112 | # ignore gitlab service messages | 111 | # ignore gitlab service messages |
app/services/projects/create_service.rb
@@ -19,7 +19,6 @@ module Projects | @@ -19,7 +19,6 @@ module Projects | ||
19 | default_opts = { | 19 | default_opts = { |
20 | issues_enabled: default_features.issues, | 20 | issues_enabled: default_features.issues, |
21 | wiki_enabled: default_features.wiki, | 21 | wiki_enabled: default_features.wiki, |
22 | - wall_enabled: default_features.wall, | ||
23 | snippets_enabled: default_features.snippets, | 22 | snippets_enabled: default_features.snippets, |
24 | merge_requests_enabled: default_features.merge_requests, | 23 | merge_requests_enabled: default_features.merge_requests, |
25 | visibility_level: default_features.visibility_level | 24 | visibility_level: default_features.visibility_level |
app/views/layouts/nav/_project.html.haml
@@ -36,10 +36,6 @@ | @@ -36,10 +36,6 @@ | ||
36 | = nav_link(controller: :wikis) do | 36 | = nav_link(controller: :wikis) do |
37 | = link_to 'Wiki', project_wiki_path(@project, :home) | 37 | = link_to 'Wiki', project_wiki_path(@project, :home) |
38 | 38 | ||
39 | - - if project_nav_tab? :wall | ||
40 | - = nav_link(controller: :walls) do | ||
41 | - = link_to 'Wall', project_wall_path(@project) | ||
42 | - | ||
43 | - if project_nav_tab? :snippets | 39 | - if project_nav_tab? :snippets |
44 | = nav_link(controller: :snippets) do | 40 | = nav_link(controller: :snippets) do |
45 | = link_to 'Snippets', project_snippets_path(@project) | 41 | = link_to 'Snippets', project_snippets_path(@project) |
app/views/notify/note_wall_email.html.haml
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -= render 'note_message' |
app/views/notify/note_wall_email.text.erb
app/views/projects/edit.html.haml
@@ -74,13 +74,6 @@ | @@ -74,13 +74,6 @@ | ||
74 | %span.descr Pages for project documentation | 74 | %span.descr Pages for project documentation |
75 | 75 | ||
76 | .form-group | 76 | .form-group |
77 | - = f.label :wall_enabled, "Wall", class: 'control-label' | ||
78 | - .col-sm-10 | ||
79 | - .checkbox | ||
80 | - = f.check_box :wall_enabled | ||
81 | - %span.descr Simple chat system for broadcasting inside project | ||
82 | - | ||
83 | - .form-group | ||
84 | = f.label :snippets_enabled, "Snippets", class: 'control-label' | 77 | = f.label :snippets_enabled, "Snippets", class: 'control-label' |
85 | .col-sm-10 | 78 | .col-sm-10 |
86 | .checkbox | 79 | .checkbox |
app/views/projects/walls/show.html.haml
@@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
1 | -%div.wall-page | ||
2 | - %ul.notes | ||
3 | - | ||
4 | - - if can? current_user, :write_note, @project | ||
5 | - .note-form-holder | ||
6 | - = form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note wall-note-form" }, authenticity_token: true do |f| | ||
7 | - = note_target_fields | ||
8 | - .note_text_and_preview | ||
9 | - = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on' | ||
10 | - .note-form-actions | ||
11 | - .buttons | ||
12 | - = f.submit 'Add Comment', class: "btn comment-btn btn-grouped js-comment-button" | ||
13 | - | ||
14 | - .note-form-option | ||
15 | - %a.choose-btn.btn.btn-small.js-choose-note-attachment-button | ||
16 | - %i.icon-paper-clip | ||
17 | - %span Choose File ... | ||
18 | - | ||
19 | - %span.file_name.js-attachment-filename File name... | ||
20 | - = f.file_field :attachment, class: "js-note-attachment-input hidden" | ||
21 | - | ||
22 | - .hint.pull-right CTRL + Enter to send message | ||
23 | - .clearfix |
config/gitlab.yml.example
@@ -73,7 +73,6 @@ production: &base | @@ -73,7 +73,6 @@ production: &base | ||
73 | issues: true | 73 | issues: true |
74 | merge_requests: true | 74 | merge_requests: true |
75 | wiki: true | 75 | wiki: true |
76 | - wall: false | ||
77 | snippets: false | 76 | snippets: false |
78 | visibility_level: "private" # can be "private" | "internal" | "public" | 77 | visibility_level: "private" # can be "private" | "internal" | "public" |
79 | 78 |
config/initializers/1_settings.rb
@@ -95,7 +95,6 @@ Settings.gitlab['default_projects_features'] ||= {} | @@ -95,7 +95,6 @@ Settings.gitlab['default_projects_features'] ||= {} | ||
95 | Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil? | 95 | Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil? |
96 | Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil? | 96 | Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil? |
97 | Settings.gitlab.default_projects_features['wiki'] = true if Settings.gitlab.default_projects_features['wiki'].nil? | 97 | Settings.gitlab.default_projects_features['wiki'] = true if Settings.gitlab.default_projects_features['wiki'].nil? |
98 | -Settings.gitlab.default_projects_features['wall'] = false if Settings.gitlab.default_projects_features['wall'].nil? | ||
99 | Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil? | 98 | Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil? |
100 | Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) | 99 | Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) |
101 | Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root) | 100 | Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root) |
config/routes.rb
@@ -209,12 +209,6 @@ Gitlab::Application.routes.draw do | @@ -209,12 +209,6 @@ Gitlab::Application.routes.draw do | ||
209 | end | 209 | end |
210 | end | 210 | end |
211 | 211 | ||
212 | - resource :wall, only: [:show], constraints: {id: /\d+/} do | ||
213 | - member do | ||
214 | - get 'notes' | ||
215 | - end | ||
216 | - end | ||
217 | - | ||
218 | resource :repository, only: [:show] do | 212 | resource :repository, only: [:show] do |
219 | member do | 213 | member do |
220 | get "stats" | 214 | get "stats" |
doc/api/notes.md
1 | # Notes | 1 | # Notes |
2 | 2 | ||
3 | -Notes can be wall notes or comments on snippets, issues or merge requests. | ||
4 | - | ||
5 | -## Wall | ||
6 | - | ||
7 | -### List project wall notes | ||
8 | - | ||
9 | -Get a list of project wall notes. | ||
10 | - | ||
11 | -``` | ||
12 | -GET /projects/:id/notes | ||
13 | -``` | ||
14 | - | ||
15 | -Parameters: | ||
16 | - | ||
17 | -+ `id` (required) - The ID of a project | ||
18 | - | ||
19 | -```json | ||
20 | -[ | ||
21 | - { | ||
22 | - "id": 522, | ||
23 | - "body": "The solution is rather tricky", | ||
24 | - "attachment": null, | ||
25 | - "author": { | ||
26 | - "id": 1, | ||
27 | - "username": "john_smith", | ||
28 | - "email": "john@example.com", | ||
29 | - "name": "John Smith", | ||
30 | - "state": "active", | ||
31 | - "created_at": "2012-05-23T08:00:58Z" | ||
32 | - }, | ||
33 | - "created_at": "2012-11-27T19:16:44Z" | ||
34 | - } | ||
35 | -] | ||
36 | -``` | ||
37 | - | ||
38 | -### Get single wall note | ||
39 | - | ||
40 | -Returns a single wall note. | ||
41 | - | ||
42 | -``` | ||
43 | -GET /projects/:id/notes/:note_id | ||
44 | -``` | ||
45 | - | ||
46 | -Parameters: | ||
47 | - | ||
48 | -+ `id` (required) - The ID of a project | ||
49 | -+ `note_id` (required) - The ID of a wall note | ||
50 | - | ||
51 | - | ||
52 | -### Create new wall note | ||
53 | - | ||
54 | -Creates a new wall note. | ||
55 | - | ||
56 | -``` | ||
57 | -POST /projects/:id/notes | ||
58 | -``` | ||
59 | - | ||
60 | -Parameters: | ||
61 | - | ||
62 | -+ `id` (required) - The ID of a project | ||
63 | -+ `body` (required) - The content of a note | ||
64 | - | 3 | +Notes are comments on snippets, issues or merge requests. |
65 | 4 | ||
66 | ## Issues | 5 | ## Issues |
67 | 6 |
doc/api/projects.md
@@ -30,7 +30,6 @@ GET /projects | @@ -30,7 +30,6 @@ GET /projects | ||
30 | "path_with_namespace": "diaspora/diaspora-client", | 30 | "path_with_namespace": "diaspora/diaspora-client", |
31 | "issues_enabled": true, | 31 | "issues_enabled": true, |
32 | "merge_requests_enabled": true, | 32 | "merge_requests_enabled": true, |
33 | - "wall_enabled": false, | ||
34 | "wiki_enabled": true, | 33 | "wiki_enabled": true, |
35 | "snippets_enabled": false, | 34 | "snippets_enabled": false, |
36 | "created_at": "2013-09-30T13: 46: 02Z", | 35 | "created_at": "2013-09-30T13: 46: 02Z", |
@@ -66,7 +65,6 @@ GET /projects | @@ -66,7 +65,6 @@ GET /projects | ||
66 | "path_with_namespace": "brightbox/puppet", | 65 | "path_with_namespace": "brightbox/puppet", |
67 | "issues_enabled": true, | 66 | "issues_enabled": true, |
68 | "merge_requests_enabled": true, | 67 | "merge_requests_enabled": true, |
69 | - "wall_enabled": false, | ||
70 | "wiki_enabled": true, | 68 | "wiki_enabled": true, |
71 | "snippets_enabled": false, | 69 | "snippets_enabled": false, |
72 | "created_at": "2013-09-30T13:46:02Z", | 70 | "created_at": "2013-09-30T13:46:02Z", |
@@ -136,7 +134,6 @@ Parameters: | @@ -136,7 +134,6 @@ Parameters: | ||
136 | "path_with_namespace": "diaspora/diaspora-project-site", | 134 | "path_with_namespace": "diaspora/diaspora-project-site", |
137 | "issues_enabled": true, | 135 | "issues_enabled": true, |
138 | "merge_requests_enabled": true, | 136 | "merge_requests_enabled": true, |
139 | - "wall_enabled": false, | ||
140 | "wiki_enabled": true, | 137 | "wiki_enabled": true, |
141 | "snippets_enabled": false, | 138 | "snippets_enabled": false, |
142 | "created_at": "2013-09-30T13: 46: 02Z", | 139 | "created_at": "2013-09-30T13: 46: 02Z", |
@@ -252,7 +249,6 @@ Parameters: | @@ -252,7 +249,6 @@ Parameters: | ||
252 | + `namespace_id` (optional) - namespace for the new project (defaults to user) | 249 | + `namespace_id` (optional) - namespace for the new project (defaults to user) |
253 | + `description` (optional) - short project description | 250 | + `description` (optional) - short project description |
254 | + `issues_enabled` (optional) | 251 | + `issues_enabled` (optional) |
255 | -+ `wall_enabled` (optional) | ||
256 | + `merge_requests_enabled` (optional) | 252 | + `merge_requests_enabled` (optional) |
257 | + `wiki_enabled` (optional) | 253 | + `wiki_enabled` (optional) |
258 | + `snippets_enabled` (optional) | 254 | + `snippets_enabled` (optional) |
@@ -276,7 +272,6 @@ Parameters: | @@ -276,7 +272,6 @@ Parameters: | ||
276 | + `description` (optional) - short project description | 272 | + `description` (optional) - short project description |
277 | + `default_branch` (optional) - 'master' by default | 273 | + `default_branch` (optional) - 'master' by default |
278 | + `issues_enabled` (optional) | 274 | + `issues_enabled` (optional) |
279 | -+ `wall_enabled` (optional) | ||
280 | + `merge_requests_enabled` (optional) | 275 | + `merge_requests_enabled` (optional) |
281 | + `wiki_enabled` (optional) | 276 | + `wiki_enabled` (optional) |
282 | + `snippets_enabled` (optional) | 277 | + `snippets_enabled` (optional) |
doc/markdown/markdown.md
doc/permissions/permissions.md
@@ -13,7 +13,6 @@ If a user is a GitLab administrator they receive all permissions. | @@ -13,7 +13,6 @@ If a user is a GitLab administrator they receive all permissions. | ||
13 | |---------------------------------------|---------|------------|-------------|----------|--------| | 13 | |---------------------------------------|---------|------------|-------------|----------|--------| |
14 | | Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ | | 14 | | Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ | |
15 | | Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ | | 15 | | Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ | |
16 | -| Write on project wall | ✓ | ✓ | ✓ | ✓ | ✓ | | ||
17 | | Pull project code | | ✓ | ✓ | ✓ | ✓ | | 16 | | Pull project code | | ✓ | ✓ | ✓ | ✓ | |
18 | | Download project | | ✓ | ✓ | ✓ | ✓ | | 17 | | Download project | | ✓ | ✓ | ✓ | ✓ | |
19 | | Create code snippets | | ✓ | ✓ | ✓ | ✓ | | 18 | | Create code snippets | | ✓ | ✓ | ✓ | ✓ | |
doc/workflow/project_features.md
@@ -26,12 +26,6 @@ This is a separate system for documentation, built right into GitLab. | @@ -26,12 +26,6 @@ This is a separate system for documentation, built right into GitLab. | ||
26 | 26 | ||
27 | It is source controlled and is very convenient if you don't want to keep you documentation in your source code, but you do want to keep it in your GitLab project. | 27 | It is source controlled and is very convenient if you don't want to keep you documentation in your source code, but you do want to keep it in your GitLab project. |
28 | 28 | ||
29 | -## Wall | ||
30 | - | ||
31 | -For simple, project specific conversations, the wall can be used. | ||
32 | - | ||
33 | -It's very lightweight and simple and works well if you're not interested in using issues, but still want to occasionally communicate within a project. | ||
34 | - | ||
35 | ## Snippets | 29 | ## Snippets |
36 | 30 | ||
37 | Snippets are little bits of code or text. | 31 | Snippets are little bits of code or text. |
features/project/active_tab.feature
@@ -35,11 +35,6 @@ Feature: Project active tab | @@ -35,11 +35,6 @@ Feature: Project active tab | ||
35 | Then the active main tab should be Merge Requests | 35 | Then the active main tab should be Merge Requests |
36 | And no other main tabs should be active | 36 | And no other main tabs should be active |
37 | 37 | ||
38 | - Scenario: On Project Wall | ||
39 | - Given I visit my project's wall page | ||
40 | - Then the active main tab should be Wall | ||
41 | - And no other main tabs should be active | ||
42 | - | ||
43 | Scenario: On Project Wiki | 38 | Scenario: On Project Wiki |
44 | Given I visit my project's wiki page | 39 | Given I visit my project's wiki page |
45 | Then the active main tab should be Wiki | 40 | Then the active main tab should be Wiki |
features/project/wall.feature
@@ -1,16 +0,0 @@ | @@ -1,16 +0,0 @@ | ||
1 | -Feature: Project Wall | ||
2 | - In order to use Project Wall | ||
3 | - A user should be able to read and write messages | ||
4 | - | ||
5 | - Background: | ||
6 | - Given I sign in as a user | ||
7 | - And I own project "Shop" | ||
8 | - And I visit project "Shop" wall page | ||
9 | - | ||
10 | - @javascript | ||
11 | - Scenario: Write comment | ||
12 | - Given I write new comment "my special test message" | ||
13 | - Then I should see project wall note "my special test message" | ||
14 | - | ||
15 | - Then I visit project "Shop" wall page | ||
16 | - And I should see project wall note "my special test message" |
features/steps/project/wall.rb
@@ -1,18 +0,0 @@ | @@ -1,18 +0,0 @@ | ||
1 | -class ProjectWall < Spinach::FeatureSteps | ||
2 | - include SharedAuthentication | ||
3 | - include SharedProject | ||
4 | - include SharedNote | ||
5 | - include SharedPaths | ||
6 | - | ||
7 | - | ||
8 | - Given 'I write new comment "my special test message"' do | ||
9 | - within(".wall-note-form") do | ||
10 | - fill_in "note[note]", with: "my special test message" | ||
11 | - click_button "Add Comment" | ||
12 | - end | ||
13 | - end | ||
14 | - | ||
15 | - Then 'I should see project wall note "my special test message"' do | ||
16 | - page.should have_content "my special test message" | ||
17 | - end | ||
18 | -end |
features/steps/shared/paths.rb
@@ -204,10 +204,6 @@ module SharedPaths | @@ -204,10 +204,6 @@ module SharedPaths | ||
204 | visit project_merge_requests_path(@project) | 204 | visit project_merge_requests_path(@project) |
205 | end | 205 | end |
206 | 206 | ||
207 | - step "I visit my project's wall page" do | ||
208 | - visit project_wall_path(@project) | ||
209 | - end | ||
210 | - | ||
211 | step "I visit my project's wiki page" do | 207 | step "I visit my project's wiki page" do |
212 | visit project_wiki_path(@project, :home) | 208 | visit project_wiki_path(@project, :home) |
213 | end | 209 | end |
@@ -319,10 +315,6 @@ module SharedPaths | @@ -319,10 +315,6 @@ module SharedPaths | ||
319 | visit project_team_index_path(project) | 315 | visit project_team_index_path(project) |
320 | end | 316 | end |
321 | 317 | ||
322 | - step 'I visit project "Shop" wall page' do | ||
323 | - visit project_wall_path(project) | ||
324 | - end | ||
325 | - | ||
326 | step 'I visit project wiki page' do | 318 | step 'I visit project wiki page' do |
327 | visit project_wiki_path(@project, :home) | 319 | visit project_wiki_path(@project, :home) |
328 | end | 320 | end |
lib/api/entities.rb
@@ -48,7 +48,7 @@ module API | @@ -48,7 +48,7 @@ module API | ||
48 | expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group } | 48 | expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group } |
49 | expose :name, :name_with_namespace | 49 | expose :name, :name_with_namespace |
50 | expose :path, :path_with_namespace | 50 | expose :path, :path_with_namespace |
51 | - expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :snippets_enabled, :created_at, :last_activity_at | 51 | + expose :issues_enabled, :merge_requests_enabled, :wiki_enabled, :snippets_enabled, :created_at, :last_activity_at |
52 | expose :namespace | 52 | expose :namespace |
53 | expose :forked_from_project, using: Entities::ForkedFromProject, :if => lambda{ | project, options | project.forked? } | 53 | expose :forked_from_project, using: Entities::ForkedFromProject, :if => lambda{ | project, options | project.forked? } |
54 | end | 54 | end |
lib/api/notes.rb
@@ -6,55 +6,6 @@ module API | @@ -6,55 +6,6 @@ module API | ||
6 | NOTEABLE_TYPES = [Issue, MergeRequest, Snippet] | 6 | NOTEABLE_TYPES = [Issue, MergeRequest, Snippet] |
7 | 7 | ||
8 | resource :projects do | 8 | resource :projects do |
9 | - # Get a list of project wall notes | ||
10 | - # | ||
11 | - # Parameters: | ||
12 | - # id (required) - The ID of a project | ||
13 | - # Example Request: | ||
14 | - # GET /projects/:id/notes | ||
15 | - get ":id/notes" do | ||
16 | - @notes = user_project.notes.common | ||
17 | - | ||
18 | - # Get recent notes if recent = true | ||
19 | - @notes = @notes.order('id DESC') if params[:recent] | ||
20 | - | ||
21 | - present paginate(@notes), with: Entities::Note | ||
22 | - end | ||
23 | - | ||
24 | - # Get a single project wall note | ||
25 | - # | ||
26 | - # Parameters: | ||
27 | - # id (required) - The ID of a project | ||
28 | - # note_id (required) - The ID of a note | ||
29 | - # Example Request: | ||
30 | - # GET /projects/:id/notes/:note_id | ||
31 | - get ":id/notes/:note_id" do | ||
32 | - @note = user_project.notes.common.find(params[:note_id]) | ||
33 | - present @note, with: Entities::Note | ||
34 | - end | ||
35 | - | ||
36 | - # Create a new project wall note | ||
37 | - # | ||
38 | - # Parameters: | ||
39 | - # id (required) - The ID of a project | ||
40 | - # body (required) - The content of a note | ||
41 | - # Example Request: | ||
42 | - # POST /projects/:id/notes | ||
43 | - post ":id/notes" do | ||
44 | - required_attributes! [:body] | ||
45 | - | ||
46 | - @note = user_project.notes.new(note: params[:body]) | ||
47 | - @note.author = current_user | ||
48 | - | ||
49 | - if @note.save | ||
50 | - present @note, with: Entities::Note | ||
51 | - else | ||
52 | - # :note is exposed as :body, but :note is set on error | ||
53 | - bad_request!(:note) if @note.errors[:note].any? | ||
54 | - not_found! | ||
55 | - end | ||
56 | - end | ||
57 | - | ||
58 | NOTEABLE_TYPES.each do |noteable_type| | 9 | NOTEABLE_TYPES.each do |noteable_type| |
59 | noteables_str = noteable_type.to_s.underscore.pluralize | 10 | noteables_str = noteable_type.to_s.underscore.pluralize |
60 | noteable_id_str = "#{noteable_type.to_s.underscore}_id" | 11 | noteable_id_str = "#{noteable_type.to_s.underscore}_id" |
lib/api/projects.rb
@@ -71,7 +71,6 @@ module API | @@ -71,7 +71,6 @@ module API | ||
71 | # name (required) - name for new project | 71 | # name (required) - name for new project |
72 | # description (optional) - short project description | 72 | # description (optional) - short project description |
73 | # issues_enabled (optional) | 73 | # issues_enabled (optional) |
74 | - # wall_enabled (optional) | ||
75 | # merge_requests_enabled (optional) | 74 | # merge_requests_enabled (optional) |
76 | # wiki_enabled (optional) | 75 | # wiki_enabled (optional) |
77 | # snippets_enabled (optional) | 76 | # snippets_enabled (optional) |
@@ -86,7 +85,6 @@ module API | @@ -86,7 +85,6 @@ module API | ||
86 | :path, | 85 | :path, |
87 | :description, | 86 | :description, |
88 | :issues_enabled, | 87 | :issues_enabled, |
89 | - :wall_enabled, | ||
90 | :merge_requests_enabled, | 88 | :merge_requests_enabled, |
91 | :wiki_enabled, | 89 | :wiki_enabled, |
92 | :snippets_enabled, | 90 | :snippets_enabled, |
@@ -114,7 +112,6 @@ module API | @@ -114,7 +112,6 @@ module API | ||
114 | # description (optional) - short project description | 112 | # description (optional) - short project description |
115 | # default_branch (optional) - 'master' by default | 113 | # default_branch (optional) - 'master' by default |
116 | # issues_enabled (optional) | 114 | # issues_enabled (optional) |
117 | - # wall_enabled (optional) | ||
118 | # merge_requests_enabled (optional) | 115 | # merge_requests_enabled (optional) |
119 | # wiki_enabled (optional) | 116 | # wiki_enabled (optional) |
120 | # snippets_enabled (optional) | 117 | # snippets_enabled (optional) |
@@ -129,7 +126,6 @@ module API | @@ -129,7 +126,6 @@ module API | ||
129 | :description, | 126 | :description, |
130 | :default_branch, | 127 | :default_branch, |
131 | :issues_enabled, | 128 | :issues_enabled, |
132 | - :wall_enabled, | ||
133 | :merge_requests_enabled, | 129 | :merge_requests_enabled, |
134 | :wiki_enabled, | 130 | :wiki_enabled, |
135 | :snippets_enabled, | 131 | :snippets_enabled, |
spec/features/security/project/internal_access_spec.rb
@@ -87,17 +87,6 @@ describe "Internal Project Access", feature: true do | @@ -87,17 +87,6 @@ describe "Internal Project Access", feature: true do | ||
87 | it { should be_denied_for :visitor } | 87 | it { should be_denied_for :visitor } |
88 | end | 88 | end |
89 | 89 | ||
90 | - describe "GET /:project_path/wall" do | ||
91 | - subject { project_wall_path(project) } | ||
92 | - | ||
93 | - it { should be_allowed_for master } | ||
94 | - it { should be_allowed_for reporter } | ||
95 | - it { should be_allowed_for :admin } | ||
96 | - it { should be_allowed_for guest } | ||
97 | - it { should be_allowed_for :user } | ||
98 | - it { should be_denied_for :visitor } | ||
99 | - end | ||
100 | - | ||
101 | describe "GET /:project_path/blob" do | 90 | describe "GET /:project_path/blob" do |
102 | before do | 91 | before do |
103 | commit = project.repository.commit | 92 | commit = project.repository.commit |
spec/features/security/project/private_access_spec.rb
@@ -87,17 +87,6 @@ describe "Private Project Access", feature: true do | @@ -87,17 +87,6 @@ describe "Private Project Access", feature: true do | ||
87 | it { should be_denied_for :visitor } | 87 | it { should be_denied_for :visitor } |
88 | end | 88 | end |
89 | 89 | ||
90 | - describe "GET /:project_path/wall" do | ||
91 | - subject { project_wall_path(project) } | ||
92 | - | ||
93 | - it { should be_allowed_for master } | ||
94 | - it { should be_allowed_for reporter } | ||
95 | - it { should be_allowed_for :admin } | ||
96 | - it { should be_denied_for guest } | ||
97 | - it { should be_denied_for :user } | ||
98 | - it { should be_denied_for :visitor } | ||
99 | - end | ||
100 | - | ||
101 | describe "GET /:project_path/blob" do | 90 | describe "GET /:project_path/blob" do |
102 | before do | 91 | before do |
103 | commit = project.repository.commit | 92 | commit = project.repository.commit |
spec/features/security/project/public_access_spec.rb
@@ -92,17 +92,6 @@ describe "Public Project Access", feature: true do | @@ -92,17 +92,6 @@ describe "Public Project Access", feature: true do | ||
92 | it { should be_denied_for :visitor } | 92 | it { should be_denied_for :visitor } |
93 | end | 93 | end |
94 | 94 | ||
95 | - describe "GET /:project_path/wall" do | ||
96 | - subject { project_wall_path(project) } | ||
97 | - | ||
98 | - it { should be_allowed_for master } | ||
99 | - it { should be_allowed_for reporter } | ||
100 | - it { should be_allowed_for :admin } | ||
101 | - it { should be_allowed_for guest } | ||
102 | - it { should be_allowed_for :user } | ||
103 | - it { should be_allowed_for :visitor } | ||
104 | - end | ||
105 | - | ||
106 | describe "GET /:project_path/blob" do | 95 | describe "GET /:project_path/blob" do |
107 | before do | 96 | before do |
108 | commit = project.repository.commit | 97 | commit = project.repository.commit |
spec/mailers/notify_spec.rb
@@ -410,22 +410,6 @@ describe Notify do | @@ -410,22 +410,6 @@ describe Notify do | ||
410 | end | 410 | end |
411 | end | 411 | end |
412 | 412 | ||
413 | - describe 'on a project wall' do | ||
414 | - let(:note_on_the_wall_path) { project_wall_path(project, anchor: "note_#{note.id}") } | ||
415 | - | ||
416 | - subject { Notify.note_wall_email(recipient.id, note.id) } | ||
417 | - | ||
418 | - it_behaves_like 'a note email' | ||
419 | - | ||
420 | - it 'has the correct subject' do | ||
421 | - should have_subject /#{project.name}/ | ||
422 | - end | ||
423 | - | ||
424 | - it 'contains a link to the wall note' do | ||
425 | - should have_body_text /#{note_on_the_wall_path}/ | ||
426 | - end | ||
427 | - end | ||
428 | - | ||
429 | describe 'on a commit' do | 413 | describe 'on a commit' do |
430 | let(:commit) { project.repository.commit } | 414 | let(:commit) { project.repository.commit } |
431 | 415 |
spec/requests/api/notes_spec.rb
@@ -13,58 +13,8 @@ describe API::API, api: true do | @@ -13,58 +13,8 @@ describe API::API, api: true do | ||
13 | let!(:issue_note) { create(:note, noteable: issue, project: project, author: user) } | 13 | let!(:issue_note) { create(:note, noteable: issue, project: project, author: user) } |
14 | let!(:merge_request_note) { create(:note, noteable: merge_request, project: project, author: user) } | 14 | let!(:merge_request_note) { create(:note, noteable: merge_request, project: project, author: user) } |
15 | let!(:snippet_note) { create(:note, noteable: snippet, project: project, author: user) } | 15 | let!(:snippet_note) { create(:note, noteable: snippet, project: project, author: user) } |
16 | - let!(:wall_note) { create(:note, project: project, author: user) } | ||
17 | before { project.team << [user, :reporter] } | 16 | before { project.team << [user, :reporter] } |
18 | 17 | ||
19 | - describe "GET /projects/:id/notes" do | ||
20 | - context "when unauthenticated" do | ||
21 | - it "should return authentication error" do | ||
22 | - get api("/projects/#{project.id}/notes") | ||
23 | - response.status.should == 401 | ||
24 | - end | ||
25 | - end | ||
26 | - | ||
27 | - context "when authenticated" do | ||
28 | - it "should return project wall notes" do | ||
29 | - get api("/projects/#{project.id}/notes", user) | ||
30 | - response.status.should == 200 | ||
31 | - json_response.should be_an Array | ||
32 | - json_response.first['body'].should == wall_note.note | ||
33 | - end | ||
34 | - end | ||
35 | - end | ||
36 | - | ||
37 | - describe "GET /projects/:id/notes/:note_id" do | ||
38 | - it "should return a wall note by id" do | ||
39 | - get api("/projects/#{project.id}/notes/#{wall_note.id}", user) | ||
40 | - response.status.should == 200 | ||
41 | - json_response['body'].should == wall_note.note | ||
42 | - end | ||
43 | - | ||
44 | - it "should return a 404 error if note not found" do | ||
45 | - get api("/projects/#{project.id}/notes/123", user) | ||
46 | - response.status.should == 404 | ||
47 | - end | ||
48 | - end | ||
49 | - | ||
50 | - describe "POST /projects/:id/notes" do | ||
51 | - it "should create a new wall note" do | ||
52 | - post api("/projects/#{project.id}/notes", user), body: 'hi!' | ||
53 | - response.status.should == 201 | ||
54 | - json_response['body'].should == 'hi!' | ||
55 | - end | ||
56 | - | ||
57 | - it "should return 401 unauthorized error" do | ||
58 | - post api("/projects/#{project.id}/notes") | ||
59 | - response.status.should == 401 | ||
60 | - end | ||
61 | - | ||
62 | - it "should return a 400 bad request if body is missing" do | ||
63 | - post api("/projects/#{project.id}/notes", user) | ||
64 | - response.status.should == 400 | ||
65 | - end | ||
66 | - end | ||
67 | - | ||
68 | describe "GET /projects/:id/noteable/:noteable_id/notes" do | 18 | describe "GET /projects/:id/noteable/:noteable_id/notes" do |
69 | context "when noteable is an Issue" do | 19 | context "when noteable is an Issue" do |
70 | it "should return an array of issue notes" do | 20 | it "should return an array of issue notes" do |
spec/requests/api/projects_spec.rb
@@ -126,7 +126,6 @@ describe API::API, api: true do | @@ -126,7 +126,6 @@ describe API::API, api: true do | ||
126 | project = attributes_for(:project, { | 126 | project = attributes_for(:project, { |
127 | description: Faker::Lorem.sentence, | 127 | description: Faker::Lorem.sentence, |
128 | issues_enabled: false, | 128 | issues_enabled: false, |
129 | - wall_enabled: false, | ||
130 | merge_requests_enabled: false, | 129 | merge_requests_enabled: false, |
131 | wiki_enabled: false | 130 | wiki_enabled: false |
132 | }) | 131 | }) |
@@ -208,7 +207,6 @@ describe API::API, api: true do | @@ -208,7 +207,6 @@ describe API::API, api: true do | ||
208 | project = attributes_for(:project, { | 207 | project = attributes_for(:project, { |
209 | description: Faker::Lorem.sentence, | 208 | description: Faker::Lorem.sentence, |
210 | issues_enabled: false, | 209 | issues_enabled: false, |
211 | - wall_enabled: false, | ||
212 | merge_requests_enabled: false, | 210 | merge_requests_enabled: false, |
213 | wiki_enabled: false | 211 | wiki_enabled: false |
214 | }) | 212 | }) |
spec/routing/project_routing_spec.rb
@@ -56,7 +56,6 @@ end | @@ -56,7 +56,6 @@ end | ||
56 | # projects POST /projects(.:format) projects#create | 56 | # projects POST /projects(.:format) projects#create |
57 | # new_project GET /projects/new(.:format) projects#new | 57 | # new_project GET /projects/new(.:format) projects#new |
58 | # fork_project POST /:id/fork(.:format) projects#fork | 58 | # fork_project POST /:id/fork(.:format) projects#fork |
59 | -# wall_project GET /:id/wall(.:format) projects#wall | ||
60 | # files_project GET /:id/files(.:format) projects#files | 59 | # files_project GET /:id/files(.:format) projects#files |
61 | # edit_project GET /:id/edit(.:format) projects#edit | 60 | # edit_project GET /:id/edit(.:format) projects#edit |
62 | # project GET /:id(.:format) projects#show | 61 | # project GET /:id(.:format) projects#show |
@@ -75,10 +74,6 @@ describe ProjectsController, "routing" do | @@ -75,10 +74,6 @@ describe ProjectsController, "routing" do | ||
75 | post("/gitlab/gitlabhq/fork").should route_to('projects#fork', id: 'gitlab/gitlabhq') | 74 | post("/gitlab/gitlabhq/fork").should route_to('projects#fork', id: 'gitlab/gitlabhq') |
76 | end | 75 | end |
77 | 76 | ||
78 | - it "to #wall" do | ||
79 | - get("/gitlab/gitlabhq/wall").should route_to('projects/walls#show', project_id: 'gitlab/gitlabhq') | ||
80 | - end | ||
81 | - | ||
82 | it "to #edit" do | 77 | it "to #edit" do |
83 | get("/gitlab/gitlabhq/edit").should route_to('projects#edit', id: 'gitlab/gitlabhq') | 78 | get("/gitlab/gitlabhq/edit").should route_to('projects#edit', id: 'gitlab/gitlabhq') |
84 | end | 79 | end |
spec/services/projects/create_service_spec.rb
@@ -65,7 +65,6 @@ describe Projects::CreateService do | @@ -65,7 +65,6 @@ describe Projects::CreateService do | ||
65 | @settings.stub(:issues) { true } | 65 | @settings.stub(:issues) { true } |
66 | @settings.stub(:merge_requests) { true } | 66 | @settings.stub(:merge_requests) { true } |
67 | @settings.stub(:wiki) { true } | 67 | @settings.stub(:wiki) { true } |
68 | - @settings.stub(:wall) { true } | ||
69 | @settings.stub(:snippets) { true } | 68 | @settings.stub(:snippets) { true } |
70 | stub_const("Settings", Class.new) | 69 | stub_const("Settings", Class.new) |
71 | @restrictions = double("restrictions") | 70 | @restrictions = double("restrictions") |
@@ -108,7 +107,6 @@ describe Projects::CreateService do | @@ -108,7 +107,6 @@ describe Projects::CreateService do | ||
108 | @settings.stub(:issues) { true } | 107 | @settings.stub(:issues) { true } |
109 | @settings.stub(:merge_requests) { true } | 108 | @settings.stub(:merge_requests) { true } |
110 | @settings.stub(:wiki) { true } | 109 | @settings.stub(:wiki) { true } |
111 | - @settings.stub(:wall) { true } | ||
112 | @settings.stub(:snippets) { true } | 110 | @settings.stub(:snippets) { true } |
113 | @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::PRIVATE } | 111 | @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::PRIVATE } |
114 | stub_const("Settings", Class.new) | 112 | stub_const("Settings", Class.new) |