Commit ea324f71 by Your Name

flagging done except returning abuse flaggers

parent fc127ddf
20566: Locked by 20566 at Sun Dec 02 07:30:57 -0500 2012
...@@ -15,4 +15,12 @@ cursor_positions: ...@@ -15,4 +15,12 @@ cursor_positions:
- :path: models/comment_thread.rb - :path: models/comment_thread.rb
:cursor_offset: 6463 :cursor_offset: 6463
:timestamp: 2012-12-02 08:32:40 -05:00 :timestamp: 2012-12-02 08:32:40 -05:00
- :path: api/flags.rb
:cursor_offset: 191
:timestamp: 2012-12-02 13:58:32 -05:00
- :path: lib/helpers.rb
:cursor_offset: 367
:timestamp: 2012-12-02 13:22:28 -05:00
:selection_offset: 358
:block_selection_mode: false
files_to_retain: 0 files_to_retain: 0
--- ---
open_files: open_files:
- .gitignore - api/flags.rb
- lib/helpers.rb
...@@ -4,4 +4,4 @@ bounds: ...@@ -4,4 +4,4 @@ bounds:
y: 24 y: 24
width: 1857 width: 1857
height: 1085 height: 1085
tree_width: 330 tree_width: 399
1354462766 1354476788
Comment /Users/kevinchugh/mitx_all/cs_comments_service/models/comment.rb class Comment CommentThread /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb class CommentThread
CommentThread /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb class CommentThread Content /home/kevin/mitx_all/cs_comments_service/models/content.rb class Content
Content /Users/kevinchugh/mitx_all/cs_comments_service/models/content.rb class Content RE_CHAR /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb RE_CHAR =
DELETE /api/v1/threads/:thread_id /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "DELETE /api/v1/threads/:thread_id" do RE_ENDCHAR /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb RE_ENDCHAR =
GET /api/v1/threads/:thread_id /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "GET /api/v1/threads/:thread_id" do RE_ENDONLYCHAR /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb RE_ENDONLYCHAR =
GET /api/v1/threads/tags /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "GET /api/v1/threads/tags" do RE_HEADCHAR /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb RE_HEADCHAR =
GET /api/v1/threads/tags/autocomplete /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "GET /api/v1/threads/tags/autocomplete" do RE_TAG /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb RE_TAG =
POST /api/v1/threads/:thread_id/comments /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "POST /api/v1/threads/:thread_id/comments" do RE_WORD /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb RE_WORD =
PUT /api/v1/threads/:thread_id /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "PUT /api/v1/threads/:thread_id" do activity_overall /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def activity_overall;
RE_CHAR /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb RE_CHAR = activity_since /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def activity_since(from_time=nil)
RE_ENDCHAR /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb RE_ENDCHAR = activity_this_month /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def activity_this_month;
RE_ENDONLYCHAR /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb RE_ENDONLYCHAR = activity_this_week /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def activity_this_week;
RE_HEADCHAR /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb RE_HEADCHAR = activity_today /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def activity_today;
RE_TAG /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb RE_TAG = author_contents_only /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def author_contents_only(contents, author_id)
RE_WORD /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb RE_WORD = author_with_anonymity /home/kevin/mitx_all/cs_comments_service/models/content.rb def author_with_anonymity(attr=nil, attr_when_anonymous=nil)
abuse /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb describe "abuse" do bool_anonymous /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def bool_anonymous
activity_overall /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def activity_overall; bool_anonymous_to_peers /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def bool_anonymous_to_peers
activity_since /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def activity_since(from_time=nil) bool_auto_subscribe /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def bool_auto_subscribe
activity_this_month /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def activity_this_month; bool_complete /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def bool_complete
activity_this_week /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def activity_this_week; bool_mark_as_read /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def bool_mark_as_read
activity_today /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def activity_today; bool_recursive /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def bool_recursive
allows anonymous comment /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "allows anonymous comment" do comment /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def comment
app /Users/kevinchugh/mitx_all/cs_comments_service/spec/spec_helper.rb def app commentable /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def commentable
app /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "app" do commentable /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def commentable
app /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb describe "app" do destroy_subscriptions /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def destroy_subscriptions
author_contents_only /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def author_contents_only(contents, author_id) endorsed? /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def endorsed?
author_with_anonymity /Users/kevinchugh/mitx_all/cs_comments_service/models/content.rb def author_with_anonymity(attr=nil, attr_when_anonymous=nil) flag_as_abuse /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def flag_as_abuse(obj)
bool_anonymous /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def bool_anonymous handle_paged_threads_query /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def handle_paged_threads_query(paged_comment_threads)
bool_anonymous_to_peers /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def bool_anonymous_to_peers handle_threads_query /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def handle_threads_query(comment_threads)
bool_auto_subscribe /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def bool_auto_subscribe new_dumb_thread /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def self.new_dumb_thread(options={})
bool_complete /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def bool_complete perform_search /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def self.perform_search(params, options={})
bool_mark_as_read /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def bool_mark_as_read root_comments /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def root_comments
bool_recursive /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def bool_recursive search_result_to_hash /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def self.search_result_to_hash(result, params={})
comment /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def comment set_last_activity_at /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def set_last_activity_at
comment threads /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb describe "comment threads" do source /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def source
commentable /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def commentable subscribers /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def subscribers
commentable /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def commentable subscriptions /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def subscriptions
create a comment to the comment thread /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "create a comment to the comment thread" do tag_name_valid? /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def self.tag_name_valid?(tag)
create or update the abuse_flags on the comment /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "create or update the abuse_flags on the comment" do tag_names_unique /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def tag_names_unique
create or update the abuse_flags on the thread /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "create or update the abuse_flags on the thread" do tag_names_valid /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def tag_names_valid
create_comment_flag /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb def create_comment_flag(comment_id, user_id) thread /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def thread
create_comment_thread /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb def create_comment_thread(tags) to_hash /home/kevin/mitx_all/cs_comments_service/models/comment_thread.rb def to_hash(params={})
create_flag /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb def create_flag(put_command, user_id) un_flag_as_abuse /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def un_flag_as_abuse(obj)
create_test_user /Users/kevinchugh/mitx_all/cs_comments_service/spec/spec_helper.rb def create_test_user(id) undo_vote_for /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def undo_vote_for(obj)
create_thread_flag /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb def create_thread_flag(thread_id, user_id) user /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def user
delete the comment thread and its comments /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "delete the comment thread and its comments" do value_to_boolean /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def value_to_boolean(value)
destroy_subscriptions /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def destroy_subscriptions vote_for /home/kevin/mitx_all/cs_comments_service/lib/helpers.rb def vote_for(obj)
endorsed? /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def endorsed?
flag a comment as abusive /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb describe "flag a comment as abusive" do
flag a thread as abusive /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb describe "flag a thread as abusive" do
flag_as_abuse /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def flag_as_abuse(obj)
get all tags used in threads /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "get all tags used in threads" do
get information of a single comment thread /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "get information of a single comment thread" do
get information of a single comment thread with its comments /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "get information of a single comment thread with its comments" do
get information of a single comment thread with its tags /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "get information of a single comment thread with its tags" do
handle_paged_threads_query /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def handle_paged_threads_query(paged_comment_threads)
handle_threads_query /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def handle_threads_query(comment_threads)
has a correct hash /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "has a correct hash" do
has a correct hash /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "has a correct hash" do
hash_tree /Users/kevinchugh/mitx_all/cs_comments_service/models/comment.rb def self.hash_tree(nodes)
init_with_subscriptions /Users/kevinchugh/mitx_all/cs_comments_service/spec/spec_helper.rb def init_with_subscriptions
init_without_subscriptions /Users/kevinchugh/mitx_all/cs_comments_service/spec/spec_helper.rb def init_without_subscriptions
new_dumb_thread /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def self.new_dumb_thread(options={})
parse /Users/kevinchugh/mitx_all/cs_comments_service/spec/spec_helper.rb def parse(text)
perform_search /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def self.perform_search(params, options={})
returns 400 when the comment does not exist /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "returns 400 when the comment does not exist" do
returns 400 when the thread does not exist /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "returns 400 when the thread does not exist" do
returns 400 when the thread does not exist /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "returns 400 when the thread does not exist" do
returns 400 when the thread does not exist /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "returns 400 when the thread does not exist" do
returns 400 when the thread does not exist /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "returns 400 when the thread does not exist" do
returns 400 when the thread does not exist /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "returns 400 when the thread does not exist" do
returns 400 when user_id is not provided /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "returns 400 when user_id is not provided" do
returns 400 when user_id is not provided /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/abuse_spec.rb it "returns 400 when user_id is not provided" do
returns autocomplete results /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "returns autocomplete results" do
returns error when body or course_id does not exist, or when body is blank /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "returns error when body or course_id does not exist, or when body is blank" do
root_comments /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def root_comments
search_result_to_hash /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def self.search_result_to_hash(result, params={})
set_last_activity_at /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def set_last_activity_at
set_thread_last_activity_at /Users/kevinchugh/mitx_all/cs_comments_service/models/comment.rb def set_thread_last_activity_at
source /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def source
subscribers /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def subscribers
subscriptions /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def subscriptions
tag_name_valid? /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def self.tag_name_valid?(tag)
tag_names_unique /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def tag_names_unique
tag_names_valid /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def tag_names_valid
thread /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def thread
to_hash /Users/kevinchugh/mitx_all/cs_comments_service/models/comment.rb def to_hash(params={})
to_hash /Users/kevinchugh/mitx_all/cs_comments_service/models/comment_thread.rb def to_hash(params={})
un_flag_as_abuse /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def un_flag_as_abuse(obj)
undo_vote_for /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def undo_vote_for(obj)
update information of comment thread /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "update information of comment thread" do
updates tag of comment thread /Users/kevinchugh/mitx_all/cs_comments_service/spec/api/comment_thread_spec.rb it "updates tag of comment thread" do
user /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def user
value_to_boolean /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def value_to_boolean(value)
vote_for /Users/kevinchugh/mitx_all/cs_comments_service/lib/helpers.rb def vote_for(obj)
put "#{APIPREFIX}/comments/:comment_id/abuse_flags" do |comment_id| put "#{APIPREFIX}/threads/:thread_id/abuse_flags" do |thread_id|
flag_as_abuse comment flag_as_abuse thread
end end
put "#{APIPREFIX}/threads/:thread_id/abuse_unflags" do |thread_id| put "#{APIPREFIX}/threads/:thread_id/abuse_unflags" do |thread_id|
un_flag_as_abuse thread un_flag_as_abuse thread
end end
delete "#{APIPREFIX}/comments/:comment_id/abuse_flags" do |comment_id|
undo_flag_as_abuse comment
end
delete "#{APIPREFIX}/comments/:thread_id/abuse_flags" do |thread_id|
undo_flag_as_abuse thread
end
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