omniauth-bike-index 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b25825b4cb961e9f644c7acf9e28836aecaaf4f9
4
- data.tar.gz: 6bf1b50351b4137525f3e598789dd88cfe452445
2
+ SHA256:
3
+ metadata.gz: ed476813826660c5afabb02e43fc77d9a423ed63dd9eeeb0864c2fd256876a46
4
+ data.tar.gz: 161e4b546c49eaa0e54728593d3d597e1ec0372374615d9a9fed19e5d4256083
5
5
  SHA512:
6
- metadata.gz: 67fb366d19685d525ef064fa78c9cd2ad5728d1813643985facef3af415e420e800dc93d056612c05a04e8002288fa3a50574e4a8af6713eec76e571850a72d9
7
- data.tar.gz: 164f1708f9cd5813db80d268bfbc1841cfe4180bea4eccb01dddff98ec4f4314a95ef52cfd14e909c501886e1d6f708c1709122bf53f3098d19b54d2cd0cbd02
6
+ metadata.gz: b19d2b3b2d040381ddba62e61ce7db388f54396958353f8c48f07597864fcf35c446aaf3948f83a48769910add600f91186f67c9a28322a62e576e0fd43a8742
7
+ data.tar.gz: 990b71281d87975209be63f652e261fb24d2ec304c3b0217e1dc98ef1f7604a1f0f48bfd2ce177bc6f14b98fa90fc45a89106ebe6917080f642aa29029377f00
@@ -3,11 +3,11 @@ gemfile:
3
3
  - Gemfile
4
4
  language: ruby
5
5
  before_install:
6
- - gem install bundler
6
+ - gem install bundler
7
7
  - gem update bundler
8
8
  rvm:
9
- - 2.2.4
10
9
  - 2.3.0
10
+ - 2.5.8
11
11
  - jruby-head
12
12
  matrix:
13
13
  allow_failures:
data/Gemfile CHANGED
@@ -1,9 +1,10 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
- gem 'rake'
3
+ gem "rake"
4
4
 
5
5
  group :test do
6
- gem 'rspec'
6
+ gem "standard"
7
+ gem "rspec"
7
8
  end
8
9
 
9
10
  gemspec
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
- require 'rspec/core/rake_task'
2
+ require "bundler/gem_tasks"
3
+ require "rspec/core/rake_task"
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  task test: :spec
7
- task default: :spec
7
+ task default: :spec
@@ -1,2 +1,2 @@
1
- require 'omniauth/bike_index/version'
2
- require 'omniauth/strategies/bike_index'
1
+ require "omniauth/bike_index/version"
2
+ require "omniauth/strategies/bike_index"
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BikeIndex
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
@@ -17,7 +17,7 @@ module OmniAuth
17
17
  "secondary_emails" => raw_info["user"]["secondary_emails"],
18
18
  "name" => raw_info["user"]["name"],
19
19
  "twitter" => raw_info["user"]["twitter"],
20
- "image" => raw_info["user"]["image"],
20
+ "image" => raw_info["user"]["image"]
21
21
  )
22
22
  end
23
23
 
@@ -32,7 +32,11 @@ module OmniAuth
32
32
  end
33
33
 
34
34
  def request_phase
35
- options[:authorize_params] = { scope: (options["scope"] || DEFAULT_SCOPE), partner: options["partner"] }
35
+ options[:authorize_params] = {
36
+ scope: (options["scope"] || DEFAULT_SCOPE),
37
+ partner: options["partner"],
38
+ unauthenticated_redirect: options["unauthenticated_redirect"]
39
+ }
36
40
  super
37
41
  end
38
42
 
@@ -1,25 +1,24 @@
1
- # -*- encoding: utf-8 -*-
2
- $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
- require 'omniauth/bike_index/version'
1
+ $LOAD_PATH.push File.expand_path("../lib", __FILE__)
2
+ require "omniauth/bike_index/version"
4
3
 
5
4
  Gem::Specification.new do |s|
6
- s.name = 'omniauth-bike-index'
7
- s.version = OmniAuth::BikeIndex::VERSION
8
- s.authors = ['Seth Herr']
9
- s.email = ['seth@bikeidnex.org']
10
- s.summary = 'Bike Index strategy for OmniAuth'
11
- s.description = 'Bike Index strategy for OmniAuth v1.2'
12
- s.homepage = 'https://github.com/bikeindex/omniauth-bike-index'
13
- s.license = 'MIT'
5
+ s.name = "omniauth-bike-index"
6
+ s.version = OmniAuth::BikeIndex::VERSION
7
+ s.authors = ["Seth Herr"]
8
+ s.email = ["seth@bikeidnex.org"]
9
+ s.summary = "Bike Index strategy for OmniAuth"
10
+ s.description = "Bike Index strategy for OmniAuth v1.2"
11
+ s.homepage = "https://github.com/bikeindex/omniauth-bike-index"
12
+ s.license = "MIT"
14
13
 
15
- s.files = `git ls-files`.split("\n")
16
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
- s.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
18
- s.require_paths = ['lib']
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
19
18
 
20
- s.add_runtime_dependency 'omniauth', '~> 1.2'
21
- s.add_runtime_dependency 'omniauth-oauth2', '~> 1.1'
19
+ s.add_runtime_dependency "omniauth", "~> 1.2"
20
+ s.add_runtime_dependency "omniauth-oauth2", "~> 1.1"
22
21
 
23
- s.add_development_dependency 'dotenv', '~> 0'
24
- s.add_development_dependency 'sinatra', '~> 0'
22
+ s.add_development_dependency "dotenv", "~> 0"
23
+ s.add_development_dependency "sinatra", "~> 0"
25
24
  end
@@ -1,37 +1,37 @@
1
- $LOAD_PATH.unshift File.expand_path('..', __FILE__)
2
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ $LOAD_PATH.unshift File.expand_path("..", __FILE__)
2
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
3
3
 
4
- require 'dotenv'
5
- require 'sinatra'
6
- require 'omniauth'
7
- require 'omniauth-bike-index'
4
+ require "dotenv"
5
+ require "sinatra"
6
+ require "omniauth"
7
+ require "omniauth-bike-index"
8
8
 
9
9
  Dotenv.load
10
10
 
11
- use Rack::Session::Cookie, :key => 'key',
12
- :domain => 'localhost',
13
- :path => '/',
14
- :expire_after => 14_400,
15
- :secret => 'secret'
11
+ use Rack::Session::Cookie, key: "key",
12
+ domain: "localhost",
13
+ path: "/",
14
+ expire_after: 14_400,
15
+ secret: "secret"
16
16
 
17
17
  use OmniAuth::Builder do
18
- provider :bike_index, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'], :scope => 'access_profile'
18
+ provider :bike_index, ENV["CLIENT_ID"], ENV["CLIENT_SECRET"], scope: "access_profile"
19
19
  end
20
20
 
21
- get '/' do
21
+ get "/" do
22
22
  <<-HTML
23
23
  <a href='/auth/bikeindex'>Sign in with Bike Index</a>
24
24
  HTML
25
25
  end
26
26
 
27
- get '/auth/failure' do
28
- env['omniauth.error'].to_s
27
+ get "/auth/failure" do
28
+ env["omniauth.error"].to_s
29
29
  end
30
30
 
31
- get '/auth/:name/callback' do
32
- auth = request.env['omniauth.auth']
31
+ get "/auth/:name/callback" do
32
+ auth = request.env["omniauth.auth"]
33
33
 
34
- puts %Q(
34
+ puts %(
35
35
  >> UID
36
36
  #{auth.uid.inspect}
37
37
 
@@ -45,5 +45,5 @@ get '/auth/:name/callback' do
45
45
  #{auth.extra.inspect}
46
46
  )
47
47
 
48
- 'Check logs for user information.'
48
+ "Check logs for user information."
49
49
  end
@@ -1,33 +1,32 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe OmniAuth::Strategies::BikeIndex do
4
4
  subject do
5
5
  @subject ||= begin
6
- args = ['client_id', 'client_secret', @options || {}].compact
6
+ args = ["client_id", "client_secret", @options || {}].compact
7
7
  OmniAuth::Strategies::BikeIndex.new(*args)
8
8
  end
9
9
  end
10
10
 
11
- context 'client options' do
12
- it 'has correct name' do
11
+ context "client options" do
12
+ it "has correct name" do
13
13
  expect(subject.options.name).to eq(:bike_index)
14
14
  end
15
15
 
16
- it 'has correct site' do
17
- expect(subject.options.client_options.site).to eq('https://bikeindex.org')
16
+ it "has correct site" do
17
+ expect(subject.options.client_options.site).to eq("https://bikeindex.org")
18
18
  end
19
19
 
20
- it 'has correct authorize url' do
21
- expect(subject.options.client_options.authorize_url).to eq('/oauth/authorize')
20
+ it "has correct authorize url" do
21
+ expect(subject.options.client_options.authorize_url).to eq("/oauth/authorize")
22
22
  end
23
-
24
23
  end
25
24
 
26
- context 'figuring stuff out' do
27
- it "gets log in" do
28
- app = lambda{|env| [200, {}, ["Hello World."]]}
29
- OmniAuth::Strategies::Developer.new(app).options.uid_field # => :email
30
- OmniAuth::Strategies::Developer.new(app, :uid_field => :name).options.uid_field # => :name
25
+ context "figuring stuff out" do
26
+ it "gets log in" do
27
+ app = lambda { |env| [200, {}, ["Hello World."]] }
28
+ OmniAuth::Strategies::Developer.new(app).options.uid_field # => :email
29
+ OmniAuth::Strategies::Developer.new(app, uid_field: :name).options.uid_field # => :name
31
30
  end
32
31
  end
33
32
  end
@@ -1,10 +1,10 @@
1
- $LOAD_PATH.unshift File.expand_path('..', __FILE__)
2
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ $LOAD_PATH.unshift File.expand_path("..", __FILE__)
2
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
3
3
 
4
- require 'rspec'
5
- require 'omniauth'
6
- require 'omniauth-bike-index'
4
+ require "rspec"
5
+ require "omniauth"
6
+ require "omniauth-bike-index"
7
7
 
8
8
  RSpec.configure do |config|
9
- config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
9
+ config.extend OmniAuth::Test::StrategyMacros, type: :strategy
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bike-index
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Herr
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-18 00:00:00.000000000 Z
11
+ date: 2020-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -89,7 +89,7 @@ homepage: https://github.com/bikeindex/omniauth-bike-index
89
89
  licenses:
90
90
  - MIT
91
91
  metadata: {}
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
@@ -104,9 +104,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubyforge_project:
108
- rubygems_version: 2.4.8
109
- signing_key:
107
+ rubyforge_project:
108
+ rubygems_version: 2.7.6.2
109
+ signing_key:
110
110
  specification_version: 4
111
111
  summary: Bike Index strategy for OmniAuth
112
112
  test_files: