Browse Source

Updated gems.

Martin Edenhofer 8 years ago
parent
commit
42d0cd1f8f

+ 8 - 2
Gemfile

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

+ 25 - 11
Gemfile.lock

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

+ 1 - 1
app/controllers/first_steps_controller.rb

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

+ 1 - 1
app/models/application_model.rb

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

+ 1 - 1
app/models/email_address.rb

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

+ 4 - 4
app/models/job.rb

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

+ 2 - 2
app/models/object_manager/attribute.rb

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

+ 2 - 2
app/models/scheduler.rb

@@ -122,10 +122,10 @@ class Scheduler < ApplicationModel
       UserInfo.current_user_id = nil
       loop do
         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}"
         end
-        break if success == 0
+        break if success.zero?
       end
       UserInfo.current_user_id = original_user_id
       return

+ 1 - 1
app/models/transaction/trigger.rb

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

+ 1 - 1
lib/stats/ticket_in_process.rb

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

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