Fix logger, take #2
authorSteven Bazyl <sqrrrl@gmail.com>
Fri, 19 Dec 2014 23:45:20 +0000 (15:45 -0800)
committerSteven Bazyl <sqrrrl@gmail.com>
Fri, 19 Dec 2014 23:45:20 +0000 (15:45 -0800)
lib/google/api_client/railtie.rb
lib/google/api_client/version.rb

index 51edb33b5153edd7420443e044c36b8276bdbcf6..86d9a6b204b265b0ffae848ca633fe3c6af079c5 100644 (file)
@@ -10,13 +10,8 @@ module Google
     #
     class Railtie < Rails::Railtie
       initializer 'google-api-client' do |app|
-        _logger = case
-                    when app.respond_to?(:logger)        then app.logger
-                    when app.config.respond_to?(:logger) then app.config.logger
-                    else                                      Rails.logger
-                  end
-                  
-        Google::APIClient.logger = _logger
+        logger = app.config.logger || Rails.logger
+        Google::APIClient.logger = logger unless logger.nil?
       end
     end
   end
index 8138956bffd0345765a435671449ec8af10729b2..654aeffbf3cdd51837cb736187b655e7f290adc5 100644 (file)
@@ -19,7 +19,7 @@ module Google
       MAJOR = 0
       MINOR = 8
       TINY  = 1
-      PATCH = nil
+      PATCH = 1
       STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
     end
   end