Browse Source

Applied rubocop Style/SpaceAfterComma.

Martin Edenhofer 10 years ago
parent
commit
16ddef38e9

+ 1 - 1
app/controllers/online_notifications_controller.rb

@@ -105,7 +105,7 @@ curl http://localhost/api/v1/online_notifications/mark_all_as_read -v -u #{login
 =end
 
   def mark_all_as_read
-      notifications = OnlineNotification.list(current_user,100)
+      notifications = OnlineNotification.list(current_user, 100)
       notifications.each do |notification|
         if !notification['seen']
           OnlineNotification.seen( id: notification['id'] )

+ 1 - 1
app/controllers/taskbar_controller.rb

@@ -18,7 +18,7 @@ class TaskbarController < ApplicationController
   end
 
   def create
-    model_create_render(Taskbar,params)
+    model_create_render(Taskbar, params)
   end
 
   def update

+ 1 - 1
app/models/activity_stream.rb

@@ -89,7 +89,7 @@ return all activity entries of an user
 
 =end
 
-  def self.list(user,limit)
+  def self.list(user, limit)
     role_ids  = user.role_ids
     group_ids = user.group_ids
 

+ 4 - 4
app/models/application_model.rb

@@ -108,7 +108,7 @@ returns
 
     # set relations
     self.class.reflect_on_all_associations.map { |assoc|
-      real_key = assoc.name.to_s[0,assoc.name.to_s.length - 1] + '_ids'
+      real_key = assoc.name.to_s[0, assoc.name.to_s.length - 1] + '_ids'
       if params.has_key?( real_key.to_sym )
         list_of_items = params[ real_key.to_sym ]
         if params[ real_key.to_sym ].class != Array
@@ -141,7 +141,7 @@ returns
     # set relations
     attributes = self.attributes
     self.class.reflect_on_all_associations.map { |assoc|
-      real_key = assoc.name.to_s[0,assoc.name.to_s.length - 1] + '_ids'
+      real_key = assoc.name.to_s[0, assoc.name.to_s.length - 1] + '_ids'
       if self.respond_to?( real_key )
         attributes[ real_key ] = self.send( real_key )
       end
@@ -872,13 +872,13 @@ log object update history with all updated attributes, if configured - will be e
 
       # get attribute name
       attribute_name = key.to_s
-      if attribute_name[-3,3] == '_id'
+      if attribute_name[-3, 3] == '_id'
         attribute_name = attribute_name[ 0, attribute_name.length - 3 ]
       end
 
       value_id = []
       value_str = [ value[0], value[1] ]
-      if key.to_s[-3,3] == '_id'
+      if key.to_s[-3, 3] == '_id'
         value_id[0] = value[0]
         value_id[1] = value[1]
 

+ 1 - 1
app/models/application_model/search_index_base.rb

@@ -112,7 +112,7 @@ returns
       # get attribute name
       attribute_name_with_id = key.to_s
       attribute_name         = key.to_s
-      next if attribute_name[-3,3] != '_id'
+      next if attribute_name[-3, 3] != '_id'
       attribute_name = attribute_name[ 0, attribute_name.length - 3 ]
 
       # check if attribute method exists

+ 1 - 1
app/models/channel/email_parser.rb

@@ -526,7 +526,7 @@ class Channel::EmailParser
   def set_attributes_by_x_headers( item_object, header_name, mail )
 
     # loop all x-zammad-hedaer-* headers
-    item_object.attributes.each{|key,value|
+    item_object.attributes.each{|key, value|
 
       # ignore read only attributes
       next if key == 'updated_at'

+ 2 - 2
app/models/channel/imap.rb

@@ -65,7 +65,7 @@ class Channel::IMAP < Channel::EmailParser
 
       # check for verify message
       if check_type == 'verify'
-        subject = @imap.fetch(message_id,'ENVELOPE')[0].attr['ENVELOPE'].subject
+        subject = @imap.fetch(message_id, 'ENVELOPE')[0].attr['ENVELOPE'].subject
         if subject && subject =~ /#{verify_string}/
           puts " - verify email #{verify_string} found"
           @imap.store(message_id, '+FLAGS', [:Deleted])
@@ -76,7 +76,7 @@ class Channel::IMAP < Channel::EmailParser
       else
 
         # delete email from server after article was created
-        msg = @imap.fetch(message_id,'RFC822')[0].attr['RFC822']
+        msg = @imap.fetch(message_id, 'RFC822')[0].attr['RFC822']
         if process(channel, msg)
           @imap.store(message_id, '+FLAGS', [:Deleted])
         end

+ 1 - 1
app/models/channel/twitter2.rb

@@ -227,7 +227,7 @@ class Channel::TWITTER2
       ticket = Ticket.create(
         group_id: group_id,
         customer_id: user.id,
-        title: tweet.text[0,40],
+        title: tweet.text[0, 40],
         state_id: state_id,
         priority_id: priority_id,
       )

+ 4 - 4
app/models/observer/ticket/notification/background_job.rb

@@ -165,7 +165,7 @@ class Observer::Ticket::Notification::BackgroundJob
       # get attribute name
       attribute_name           = key.to_s
       object_manager_attribute = attribute_list[attribute_name]
-      if attribute_name[-3,3] == '_id'
+      if attribute_name[-3, 3] == '_id'
         attribute_name = attribute_name[ 0, attribute_name.length - 3 ].to_s
       end
 
@@ -177,7 +177,7 @@ class Observer::Ticket::Notification::BackgroundJob
       # if changed item is an _id field/reference, do an lookup for the realy values
       value_id  = []
       value_str = [ value[0], value[1] ]
-      if key.to_s[-3,3] == '_id'
+      if key.to_s[-3, 3] == '_id'
         value_id[0] = value[0]
         value_id[1] = value[1]
 
@@ -289,7 +289,7 @@ State: i18n(#{ticket.state.name.text2html})<br>
 
   def template_update(user, ticket, article, ticket_changes)
     changes = ''
-    ticket_changes.each {|key,value|
+    ticket_changes.each {|key, value|
       changes += "i18n(#{key.to_s.text2html}): #{value[0].to_s.text2html} -> #{value[1].to_s.text2html}<br>\n"
     }
     article_content = ''
@@ -339,7 +339,7 @@ Changes:<br>
     end
 
     body = template_header(user) + body
-    body += template_footer(user,ticket, article)
+    body += template_footer(user, ticket, article)
 
     template = {
       subject: subject,

+ 2 - 2
app/models/online_notification.rb

@@ -85,7 +85,7 @@ return all online notifications of an user
 
 =end
 
-  def self.list(user,limit)
+  def self.list(user, limit)
 
     notifications = OnlineNotification.where(user_id: user.id).
       order( 'created_at DESC, id DESC' ).
@@ -167,7 +167,7 @@ returns:
 
 =end
 
-  def self.list_full(user,limit)
+  def self.list_full(user, limit)
 
     notifications = OnlineNotification.list(user, limit)
     assets = ApplicationModel.assets_of_object_list(notifications)

Some files were not shown because too many files changed in this diff