Updated gems.

This commit is contained in:
Martin Edenhofer 2016-07-27 00:02:28 +02:00
parent 345b988444
commit 42d0cd1f8f
13 changed files with 49 additions and 29 deletions

10
Gemfile
View file

@ -26,11 +26,17 @@ end
gem 'autoprefixer-rails', '>=5.2' gem 'autoprefixer-rails', '>=5.2'
gem 'oauth2'
gem 'doorkeeper'
gem 'omniauth' gem 'omniauth'
gem 'omniauth-twitter' gem 'omniauth-oauth2'
gem 'omniauth-facebook' gem 'omniauth-facebook'
gem 'omniauth-linkedin' gem 'omniauth-github'
gem 'omniauth-gitlab'
gem 'omniauth-google-oauth2' gem 'omniauth-google-oauth2'
gem 'omniauth-linkedin-oauth2'
gem 'omniauth-twitter'
gem 'twitter' gem 'twitter'
gem 'koala' gem 'koala'

View file

@ -56,7 +56,7 @@ GEM
childprocess (0.5.9) childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11) ffi (~> 1.0, >= 1.0.11)
clavius (1.0.2) clavius (1.0.2)
clearbit (0.2.3) clearbit (0.2.4)
nestful (~> 1.1.0) nestful (~> 1.1.0)
coderay (1.1.1) coderay (1.1.1)
coffee-rails (4.2.1) coffee-rails (4.2.1)
@ -82,6 +82,8 @@ GEM
docile (1.1.5) docile (1.1.5)
domain_name (0.5.20160615) domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
doorkeeper (4.0.0)
railties (>= 4.2)
eco (1.0.0) eco (1.0.0)
coffee-script coffee-script
eco-source eco-source
@ -100,7 +102,7 @@ GEM
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ffi (1.9.14) ffi (1.9.14)
formatador (0.2.5) formatador (0.2.5)
globalid (0.3.6) globalid (0.3.7)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
guard (2.14.0) guard (2.14.0)
formatador (>= 0.2.4) formatador (>= 0.2.4)
@ -181,13 +183,20 @@ GEM
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
omniauth-facebook (3.0.0) omniauth-facebook (3.0.0)
omniauth-oauth2 (~> 1.2) omniauth-oauth2 (~> 1.2)
omniauth-github (1.1.2)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-gitlab (1.0.2)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.0)
omniauth-google-oauth2 (0.4.1) omniauth-google-oauth2 (0.4.1)
jwt (~> 1.5.2) jwt (~> 1.5.2)
multi_json (~> 1.3) multi_json (~> 1.3)
omniauth (>= 1.1.1) omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.3.1) omniauth-oauth2 (>= 1.3.1)
omniauth-linkedin (0.2.0) omniauth-linkedin-oauth2 (0.1.5)
omniauth-oauth (~> 1.0) omniauth (~> 1.0)
omniauth-oauth2
omniauth-oauth (1.1.0) omniauth-oauth (1.1.0)
oauth oauth
omniauth (~> 1.0) omniauth (~> 1.0)
@ -200,7 +209,7 @@ GEM
parser (2.3.1.2) parser (2.3.1.2)
ast (~> 2.2) ast (~> 2.2)
pg (0.18.4) pg (0.18.4)
phony (2.15.26) phony (2.15.27)
pkg-config (1.1.7) pkg-config (1.1.7)
pluginator (1.3.0) pluginator (1.3.0)
power_assert (0.3.0) power_assert (0.3.0)
@ -211,7 +220,7 @@ GEM
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.8.1) method_source (~> 0.8.1)
slop (~> 3.4) slop (~> 3.4)
puma (3.4.0) puma (3.6.0)
rack (1.6.4) rack (1.6.4)
rack-livereload (0.3.16) rack-livereload (0.3.16)
rack rack
@ -249,7 +258,7 @@ GEM
rb-inotify (0.9.7) rb-inotify (0.9.7)
ffi (>= 0.5.0) ffi (>= 0.5.0)
ref (2.0.0) ref (2.0.0)
rubocop (0.41.2) rubocop (0.42.0)
parser (>= 2.3.1.1, < 3.0) parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
@ -259,7 +268,7 @@ GEM
ruby_dep (1.3.1) ruby_dep (1.3.1)
rubyzip (1.2.0) rubyzip (1.2.0)
sass (3.4.22) sass (3.4.22)
sass-rails (5.0.5) sass-rails (5.0.6)
railties (>= 4.0.0, < 6) railties (>= 4.0.0, < 6)
sass (~> 3.1) sass (~> 3.1)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
@ -283,7 +292,7 @@ GEM
slack-notifier (1.5.1) slack-notifier (1.5.1)
slop (3.6.0) slop (3.6.0)
spring (1.7.2) spring (1.7.2)
sprockets (3.6.3) sprockets (3.7.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.1.1) sprockets-rails (3.1.1)
@ -291,7 +300,7 @@ GEM
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.3.11) sqlite3 (1.3.11)
test-unit (3.2.0) test-unit (3.2.1)
power_assert power_assert
therubyracer (0.12.2) therubyracer (0.12.2)
libv8 (~> 3.16.14.0) libv8 (~> 3.16.14.0)
@ -343,6 +352,7 @@ DEPENDENCIES
daemons daemons
delayed_job_active_record delayed_job_active_record
diffy diffy
doorkeeper
eco eco
em-websocket em-websocket
email_verifier email_verifier
@ -359,10 +369,14 @@ DEPENDENCIES
mime-types mime-types
mysql2 (~> 0.3.20) mysql2 (~> 0.3.20)
net-ldap net-ldap
oauth2
omniauth omniauth
omniauth-facebook omniauth-facebook
omniauth-github
omniauth-gitlab
omniauth-google-oauth2 omniauth-google-oauth2
omniauth-linkedin omniauth-linkedin-oauth2
omniauth-oauth2
omniauth-twitter omniauth-twitter
pg pg
phony phony

View file

@ -242,7 +242,7 @@ class FirstStepsController < ApplicationController
if !test_customer if !test_customer
test_ticket_active = false test_ticket_active = false
end end
if Group.where(active: true, name: 'Users').count == 0 if Group.where(active: true, name: 'Users').count.zero?
test_ticket_active = false test_ticket_active = false
end end
return result if test_ticket_active return result if test_ticket_active

View file

@ -1346,7 +1346,7 @@ store attachments for this object
self.attachments_buffer = attachments self.attachments_buffer = attachments
# update if object already exists # update if object already exists
return if !(id && id != 0) return if !(id && id.nonzero?)
attachments_buffer_check attachments_buffer_check
end end

View file

@ -67,7 +67,7 @@ check and if channel not exists reset configured channels for email addresses
def update_email_address_id def update_email_address_id
not_configured = Group.where(email_address_id: nil).count not_configured = Group.where(email_address_id: nil).count
total = Group.count total = Group.count
return if not_configured == 0 return if not_configured.zero?
return if total != 1 return if total != 1
group = Group.find_by(email_address_id: nil) group = Group.find_by(email_address_id: nil)
group.email_address_id = id group.email_address_id = id

View file

@ -129,7 +129,7 @@ class Job < ApplicationModel
# loop week days # loop week days
(0..7).each do |day_counter| (0..7).each do |day_counter|
time_to_check = nil time_to_check = nil
day_to_check = if day_counter == 0 day_to_check = if day_counter.zero?
time time
else else
time + 1.day time + 1.day
@ -163,10 +163,10 @@ class Job < ApplicationModel
day_to_check = day_to_check - day_to_check.sec.seconds day_to_check = day_to_check - day_to_check.sec.seconds
# loop minutes till next full hour # loop minutes till next full hour
if day_to_check.min != 0 if day_to_check.min.nonzero?
(0..5).each do |minute_counter| (0..5).each do |minute_counter|
if minute_counter != 0 if minute_counter.nonzero?
break if day_to_check.min == 0 break if day_to_check.min.zero?
day_to_check = day_to_check + 10.minutes day_to_check = day_to_check + 10.minutes
end end
next if !timeplan['hours'][day_to_check.hour] && !timeplan['hours'][day_to_check.hour.to_s] next if !timeplan['hours'][day_to_check.hour] && !timeplan['hours'][day_to_check.hour.to_s]

View file

@ -631,7 +631,7 @@ to send no browser reload event, pass false
# sent maintenance message to clients # sent maintenance message to clients
if send_event if send_event
if execute_db_count != 0 if execute_db_count.nonzero?
if ENV['APP_RESTART_CMD'] if ENV['APP_RESTART_CMD']
AppVersion.set(true, 'restart_auto') AppVersion.set(true, 'restart_auto')
sleep 4 sleep 4
@ -639,7 +639,7 @@ to send no browser reload event, pass false
else else
AppVersion.set(true, 'restart_manual') AppVersion.set(true, 'restart_manual')
end end
elsif execute_config_count != 0 elsif execute_config_count.nonzero?
AppVersion.set(true, 'config_changed') AppVersion.set(true, 'config_changed')
end end
end end

View file

@ -122,10 +122,10 @@ class Scheduler < ApplicationModel
UserInfo.current_user_id = nil UserInfo.current_user_id = nil
loop do loop do
success, failure = Delayed::Worker.new.work_off success, failure = Delayed::Worker.new.work_off
if failure != 0 if failure.nonzero?
raise "ERROR: #{failure} failed background jobs: #{Delayed::Job.where('last_error IS NOT NULL').inspect}" raise "ERROR: #{failure} failed background jobs: #{Delayed::Job.where('last_error IS NOT NULL').inspect}"
end end
break if success == 0 break if success.zero?
end end
UserInfo.current_user_id = original_user_id UserInfo.current_user_id = original_user_id
return return

View file

@ -87,7 +87,7 @@ class Transaction::Trigger
end end
ticket_count, tickets = Ticket.selectors(condition, 1) ticket_count, tickets = Ticket.selectors(condition, 1)
next if ticket_count == 0 next if ticket_count.zero?
next if tickets.first.id != ticket.id next if tickets.first.id != ticket.id
# check if min one article attribute is used # check if min one article attribute is used

View file

@ -39,7 +39,7 @@ class Stats::TicketInProcess
state = 'supergood' state = 'supergood'
average_in_percent = '-' average_in_percent = '-'
if total != 0 if total.nonzero?
in_process_precent = ( count.to_f / (total.to_f / 100) ).round(1) in_process_precent = ( count.to_f / (total.to_f / 100) ).round(1)
end end

View file

@ -20,7 +20,7 @@ class Stats::TicketLoadMeasure
total = count total = count
end end
if total != 0 if total.nonzero?
load_measure_precent = ( count.to_f / (total.to_f / 100) ).round(3) load_measure_precent = ( count.to_f / (total.to_f / 100) ).round(3)
end end
{ {

View file

@ -24,7 +24,7 @@ class Stats::TicketReopen
end end
reopen_in_precent = 0 reopen_in_precent = 0
if total != 0 if total.nonzero?
reopen_in_precent = ( count.to_f / (total.to_f / 100) ).round(3) reopen_in_precent = ( count.to_f / (total.to_f / 100) ).round(3)
end end
{ {

View file

@ -35,7 +35,7 @@ class Stats::TicketResponseTime
end end
total += data[:time] total += data[:time]
} }
if total != 0 if total.nonzero?
own = (own / count_own).round own = (own / count_own).round
end end
{ {