Code beautifying.
This commit is contained in:
parent
a672b0a692
commit
79bebc2d3f
7 changed files with 66 additions and 56 deletions
|
@ -1,2 +1,4 @@
|
||||||
|
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module PostsHelper
|
module PostsHelper
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,7 +27,7 @@ module RBeautify
|
||||||
# user-customizable values
|
# user-customizable values
|
||||||
|
|
||||||
RBeautify::TabStr = " "
|
RBeautify::TabStr = " "
|
||||||
RBeautify::TabSize = 3
|
RBeautify::TabSize = 2
|
||||||
|
|
||||||
# indent regexp tests
|
# indent regexp tests
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ module RBeautify
|
||||||
/^module\b/,
|
/^module\b/,
|
||||||
/^class\b/,
|
/^class\b/,
|
||||||
/^if\b/,
|
/^if\b/,
|
||||||
|
/[A-z]\($/,
|
||||||
/(=\s*|^)until\b/,
|
/(=\s*|^)until\b/,
|
||||||
/(=\s*|^)for\b/,
|
/(=\s*|^)for\b/,
|
||||||
/^unless\b/,
|
/^unless\b/,
|
||||||
|
@ -59,6 +60,9 @@ module RBeautify
|
||||||
/^rescue\b/,
|
/^rescue\b/,
|
||||||
/^ensure\b/,
|
/^ensure\b/,
|
||||||
/^elsif\b/,
|
/^elsif\b/,
|
||||||
|
/^\)$/,
|
||||||
|
/^\);$/,
|
||||||
|
/^\)\./,
|
||||||
/^end\b/,
|
/^end\b/,
|
||||||
/^else\b/,
|
/^else\b/,
|
||||||
/\bwhen\b/,
|
/\bwhen\b/,
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
|
|
||||||
$LOAD_PATH << './lib'
|
$LOAD_PATH << './lib'
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
|
|
|
@ -44,9 +44,7 @@ def checkForHeader(fileName)
|
||||||
end
|
end
|
||||||
|
|
||||||
#folder array
|
#folder array
|
||||||
#folder = ['app/controllers/','app/models/', 'app/helpers/', 'app/mailers/']
|
folder = ['app/controllers/', 'app/models/', 'app/helpers/', 'app/mailers/' ]
|
||||||
#folder = ['app/controllers/', 'script']
|
|
||||||
folder = ['script/']
|
|
||||||
|
|
||||||
folder.each do |folder|
|
folder.each do |folder|
|
||||||
puts 'Working on folder' + folder.to_s
|
puts 'Working on folder' + folder.to_s
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
|
|
||||||
$LOAD_PATH << './lib'
|
$LOAD_PATH << './lib'
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
|
@ -256,7 +258,7 @@ EventMachine.run {
|
||||||
begin
|
begin
|
||||||
queue = Session.queue( client_id )
|
queue = Session.queue( client_id )
|
||||||
if queue && queue[0]
|
if queue && queue[0]
|
||||||
# log "send " + queue.inspect, client_id
|
# log "send " + queue.inspect, client_id
|
||||||
log 'notice', "send data to client", client_id
|
log 'notice', "send data to client", client_id
|
||||||
client[:websocket].send( queue.to_json )
|
client[:websocket].send( queue.to_json )
|
||||||
end
|
end
|
||||||
|
@ -313,7 +315,7 @@ EventMachine.run {
|
||||||
return if level == 'debug'
|
return if level == 'debug'
|
||||||
end
|
end
|
||||||
puts "#{Time.now}:client(#{ client_id }) #{ data }"
|
puts "#{Time.now}:client(#{ client_id }) #{ data }"
|
||||||
# puts "#{Time.now}:#{ level }:client(#{ client_id }) #{ data }"
|
# puts "#{Time.now}:#{ level }:client(#{ client_id }) #{ data }"
|
||||||
end
|
end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue