Skip to content

Commit 44f76ab

Browse files
committed
Fix more warnings
``` spec/dummy/config/boot.rb:4: warning: File.exists? is a deprecated name, use File.exist? instead lib/omniauth/strategies/radius.rb:26: warning: `*' interpreted as argument prefix lib/kracken/controllers/json_api_compatible.rb:1: warning: loading in progress, circular require considered harmful - lib/kracken/controllers/json_api_compatible.rb from bin/rspec:16:in `<main>' from bin/rspec:16:in `load' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/exe/rspec:4:in `<top (required)>' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:41:in `invoke' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:73:in `run' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:88:in `run' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:102:in `setup' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1359:in `load_spec_files' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1359:in `each' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files' from /.gem/ruby/2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1361:in `load' from spec/kracken/authenticator_spec.rb:1:in `<top (required)>' from spec/kracken/authenticator_spec.rb:1:in `require' from spec/rails_helper.rb:3:in `<top (required)>' from spec/rails_helper.rb:3:in `require' from spec/dummy/config/environment.rb:2:in `<top (required)>' from spec/dummy/config/environment.rb:2:in `require' from spec/dummy/config/application.rb:10:in `<top (required)>' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler.rb:134:in `require' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require' from /.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require' from lib/kracken.rb:7:in `<top (required)>' from lib/kracken.rb:7:in `require' from lib/kracken/controllers/json_api_compatible.rb:1:in `<top (required)>' from lib/kracken/controllers/json_api_compatible.rb:1:in `require' spec/support/omniauth.rb:35: warning: assigned but unused variable - request ```
1 parent a2930ec commit 44f76ab

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

lib/kracken/controllers/json_api_compatible.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require 'kracken/controllers/json_api_compatible'
2-
31
module Kracken
42
module Controllers
53
module JsonApiCompatible

lib/omniauth/strategies/radius.rb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ def self.provider_url
2323
uid { raw_info['id'] }
2424

2525
info do
26-
raw_info["info"].slice *%w{
27-
first_name
28-
last_name
29-
email
30-
uid
31-
confirmed
32-
teams
33-
admin
34-
subscription_level
35-
}
26+
raw_info["info"].slice(
27+
*%w{
28+
first_name
29+
last_name
30+
email
31+
uid
32+
confirmed
33+
teams
34+
admin
35+
subscription_level
36+
}
37+
)
3638
end
3739

3840
extra do

spec/dummy/config/boot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Set up gems listed in the Gemfile.
22
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
33

4-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
4+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
55
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)

spec/support/omniauth.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def authenticate_request!(user = OAuthUser)
3232
get "/auth/radius"
3333
get response.header['Location']
3434

35-
request = nil
35+
_request = nil
3636
end
3737
end
3838
end

0 commit comments

Comments
 (0)