From 344924d2cdf00ed2e51d345953babb993848191a Mon Sep 17 00:00:00 2001 From: Mauricio Giacomini Girardello <mgg12@inf.ufpr.br> Date: Mon, 11 Jan 2016 10:16:20 -0200 Subject: [PATCH] adding comments for feedbacks models and services --- app/models/bug.rb | 1 + app/models/feedback.rb | 1 + app/services/feedback_service.rb | 7 +++++-- app/services/gitlab_bugreporter_service.rb | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/models/bug.rb b/app/models/bug.rb index ed1f15b52..d87a20468 100644 --- a/app/models/bug.rb +++ b/app/models/bug.rb @@ -1,3 +1,4 @@ +##Represents a software issue class Bug include ActiveModel::Model attr_accessor :title, :description diff --git a/app/models/feedback.rb b/app/models/feedback.rb index 4307eb00a..a43add196 100644 --- a/app/models/feedback.rb +++ b/app/models/feedback.rb @@ -1,3 +1,4 @@ +##Feedback is an user review of the system class Feedback < ActiveRecord::Base belongs_to :user has_and_belongs_to_many :feedback_ratings diff --git a/app/services/feedback_service.rb b/app/services/feedback_service.rb index 86660f706..187bd6135 100644 --- a/app/services/feedback_service.rb +++ b/app/services/feedback_service.rb @@ -1,3 +1,5 @@ +## +# The Feedback service abstract two actions: report_bug, that delegates behavior for a BugReporter service; and send_feedback, that stores a user review of the system. class FeedbackService def initialize(bugreporter_service) @@ -5,16 +7,17 @@ class FeedbackService end ## - # delegates the reporting behavior for a bug reporter service + # delegates the behavior for a bug reporter service def report_bug(bug) @bugreporter_service.report bug end - ## + ##Feedback is an user review of the system # store the feedbacks in database and send notification def send_feedback(feedback) # save and send an email feedback.save! + # send notification end end \ No newline at end of file diff --git a/app/services/gitlab_bugreporter_service.rb b/app/services/gitlab_bugreporter_service.rb index 2645e0b0c..43200a0e4 100644 --- a/app/services/gitlab_bugreporter_service.rb +++ b/app/services/gitlab_bugreporter_service.rb @@ -1,3 +1,6 @@ +## +# This service represents the Gitlab Bug Reporter +# The client can report a bug, that will be created an issue for PortalMEC project. class GitlabBugreporterService PORTALMEC_PROJECT_ID = 633 -- GitLab