Skip to content

Commit

Permalink
Accommodate Ruby 2.3 and frozen strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Panzer committed Aug 13, 2016
1 parent 906edf8 commit f16a7fe
Show file tree
Hide file tree
Showing 40 changed files with 55 additions and 16 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
source 'https://rubygems.org'

gemspec
Expand Down
30 changes: 15 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
PATH
remote: .
specs:
warden (1.2.3)
warden (1.2.6)
rack (>= 1.0)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
rack (1.3.0)
rack-test (0.6.0)
rack-test (0.6.3)
rack (>= 1.0)
rake (0.8.7)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
rake (11.2.2)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.2)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.2)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)

PLATFORMS
ruby
Expand All @@ -37,4 +37,4 @@ DEPENDENCIES
warden!

BUNDLED WITH
1.10.6
1.12.1
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
require 'rubygems'
require 'rake'
$:.unshift File.join(File.dirname(__FILE__), "lib")
Expand Down
1 change: 1 addition & 0 deletions lib/warden.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
require 'forwardable'

Expand Down
1 change: 1 addition & 0 deletions lib/warden/config.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8

module Warden
Expand Down
1 change: 1 addition & 0 deletions lib/warden/errors.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
module Warden
class Proxy
Expand Down
1 change: 1 addition & 0 deletions lib/warden/hooks.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
module Warden
module Hooks
Expand Down
1 change: 1 addition & 0 deletions lib/warden/manager.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
require 'warden/hooks'
require 'warden/config'
Expand Down
1 change: 1 addition & 0 deletions lib/warden/mixins/common.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
module Warden
module Mixins
Expand Down
1 change: 1 addition & 0 deletions lib/warden/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8

module Warden
Expand Down
1 change: 1 addition & 0 deletions lib/warden/session_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
module Warden
class SessionSerializer
Expand Down
1 change: 1 addition & 0 deletions lib/warden/strategies.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
module Warden
module Strategies
class << self
Expand Down
3 changes: 2 additions & 1 deletion lib/warden/strategies/base.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
module Warden
module Strategies
Expand Down Expand Up @@ -157,7 +158,7 @@ def fail(message = "Failed to Login")
def redirect!(url, params = {}, opts = {})
halt!
@status = opts[:permanent] ? 301 : 302
headers["Location"] = url
headers["Location"] = url.dup
headers["Location"] << "?" << Rack::Utils.build_query(params) unless params.empty?
headers["Content-Type"] = opts[:content_type] || 'text/plain'

Expand Down
1 change: 1 addition & 0 deletions lib/warden/test/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8

module Warden
Expand Down
1 change: 1 addition & 0 deletions lib/warden/test/mock.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8

require 'rack'
Expand Down
1 change: 1 addition & 0 deletions lib/warden/test/warden_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8

module Warden
Expand Down
1 change: 1 addition & 0 deletions lib/warden/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# encoding: utf-8
module Warden
VERSION = "1.2.6".freeze
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/request_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
module Warden::Spec
module Helpers
FAILURE_APP = lambda{|e|[401, {"Content-Type" => "text/plain"}, ["You Fail!"]] }
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/fail_with_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:fail_with_user) do
def authenticate!
request.env['warden.spec.strategies'] ||= []
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/failz.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:failz) do
def authenticate!
request.env['warden.spec.strategies'] ||= []
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/invalid.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:invalid) do
def valid?
false
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/pass.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:pass) do
def authenticate!
request.env['warden.spec.strategies'] ||= []
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/pass_with_message.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:pass_with_message) do
def authenticate!
request.env['warden.spec.strategies'] ||= []
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/password.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:password) do
def authenticate!
request.env['warden.spec.strategies'] ||= []
Expand Down
1 change: 1 addition & 0 deletions spec/helpers/strategies/single.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
Warden::Strategies.add(:single) do
def authenticate!
request.env['warden.spec.strategies'] ||= []
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
$TESTING=true

$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
Expand Down
1 change: 1 addition & 0 deletions spec/warden/authenticated_data_store_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe "authenticated data store" do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Config do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/errors_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Proxy::Errors do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/hooks_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe "standard authentication hooks" do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/manager_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Manager do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/proxy_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Proxy do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/scoped_session_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Manager do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/session_serializer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::SessionSerializer do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/strategies/base_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Strategies::Base do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/strategies_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Strategies do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/test/helpers_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Test::Helpers do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/test/mock_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Test::Mock do
Expand Down
1 change: 1 addition & 0 deletions spec/warden/test/test_mode_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'

describe Warden::Test::WardenHelpers do
Expand Down
1 change: 1 addition & 0 deletions warden.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true

require './lib/warden/version'

Expand Down

0 comments on commit f16a7fe

Please sign in to comment.