omniauth-timber-cantina 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c91854d03098691c075d3aefa36160e6b1711023
4
- data.tar.gz: 5b4dbc137f2a4b4814157cd899939028abd5171a
3
+ metadata.gz: 93eb0c949625d3690386f8e0bc51b5af59bea691
4
+ data.tar.gz: 7de6f6075d2c3c2624090a41261487a6899e74e5
5
5
  SHA512:
6
- metadata.gz: b6e96e6dbc2311b5dfaff59210306df0ca146f3afcd02c96fdd4b3a45dbf1897a0a19802ee64d40c1a1e5d2898175db93294da60ab57c1112217d29e1bdff555
7
- data.tar.gz: 6fc73f5f3b18a8c825f202df6fde9efc3d84316ce4c461bfd1070bfa032fcf8eb4d093cbeb159d17ebd7c109107cf192c39d43b26f18d62cc044421bc2df3253
6
+ metadata.gz: a95093bd404b276c9e2ecfa5b07bfe210a7798490ff32ff2a8f6a5eee89ace03ea900458ee10480420ff77f04bb3235a2a0e890b91bb0af0d9469d0d64627d17
7
+ data.tar.gz: 5ee06a3d89024606d4139c160eb8138526de5f2eddad99de5b60535117f9e2ee3cfd55782009e9c249dc3e0d992b3a748ef12f6c969cbad576dcd13d1f50e260
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.1.5
5
- - 2.2.0
6
- script: rspec spec
3
+ - 2.3.7
4
+ - 2.4.4
5
+ - 2.5.1
6
+ script: rspec spec
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
- require "bundler/gem_tasks"
2
-
1
+ require 'bundler/gem_tasks'
@@ -2,30 +2,33 @@ require 'omniauth-oauth2'
2
2
 
3
3
  module OmniAuth
4
4
  module Strategies
5
+ # Basic authentication strategy for Timber Cantina
5
6
  class TimberCantina < OmniAuth::Strategies::OAuth2
6
7
  option :name, :timber_cantina
7
8
 
8
- option :client_options, {
9
- :site => "https://cantina.budh.nl",
10
- :authorize_url => "/oauth/authorize"
11
- }
9
+ option :client_options,
10
+ site: 'https://cantina.budh.nl',
11
+ authorize_url: '/oauth/authorize'
12
12
 
13
- uid { raw_info["id"] }
13
+ uid { raw_info['id'] }
14
14
 
15
15
  info do
16
16
  {
17
- :email => raw_info["email"],
18
- :name => raw_info["name"],
19
- :api_access_enabled => raw_info["api_access_enabled"],
20
- :application_permissions => raw_info["application_permissions"]
17
+ email: raw_info['email'],
18
+ name: raw_info['name'],
19
+ api_access_enabled: raw_info['api_access_enabled'],
20
+ application_permissions: raw_info['application_permissions']
21
21
  # and anything else you want to return to your API consumers
22
22
  }
23
23
  end
24
24
 
25
+ def callback_url
26
+ full_host + script_name + callback_path
27
+ end
28
+
25
29
  def raw_info
26
30
  @raw_info ||= access_token.get('/api/v1/me.json').parsed
27
31
  end
28
-
29
32
  end
30
33
  end
31
- end
34
+ end
@@ -1,7 +1,7 @@
1
1
  module Omniauth
2
2
  module Timber
3
3
  module Cantina
4
- VERSION = "0.0.2"
4
+ VERSION = '0.0.3'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
- require "omniauth/timber/cantina/version"
1
+ require 'omniauth/timber/cantina/version'
2
2
 
3
3
  module Omniauth
4
4
  module Timber
@@ -1,2 +1,2 @@
1
- require "omniauth/timber/cantina"
2
- require "omniauth/strategies/timber_cantina"
1
+ require 'omniauth/timber/cantina'
2
+ require 'omniauth/strategies/timber_cantina'
@@ -8,10 +8,10 @@ Gem::Specification.new do |spec|
8
8
  spec.name = 'omniauth-timber-cantina'
9
9
  spec.version = Omniauth::Timber::Cantina::VERSION
10
10
  spec.authors = ['Johan Kok']
11
- spec.email = ['info@johankok.nl']
11
+ spec.email = ['webmaster@boomdenhaag.nl']
12
12
  spec.summary = %q{OmniAuth strategy for Timber Cantina SSO application.}
13
13
  spec.description = %q{OmniAuth strategy for Timber Cantina SSO application.}
14
- spec.homepage = 'https://github.com/johankok/omniauth-timber-cantina'
14
+ spec.homepage = 'https://github.com/boom-den-haag/omniauth-timber-cantina'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0")
@@ -4,38 +4,33 @@ describe OmniAuth::Strategies::TimberCantina do
4
4
  subject { OmniAuth::Strategies::TimberCantina.new({}) }
5
5
 
6
6
 
7
- context "client options" do
7
+ context 'client options' do
8
8
  it 'should have correct site' do
9
- expect(subject.options.client_options.site).to eq "https://cantina.budh.nl"
9
+ expect(subject.options.client_options.site).to eq 'https://cantina.budh.nl'
10
10
  end
11
11
 
12
12
  it 'should have correct authorize url' do
13
13
  expect(subject.options.client_options.authorize_url).to eq '/oauth/authorize'
14
14
  end
15
15
 
16
- describe "should be able to customize" do
16
+ describe 'should be able to customize' do
17
17
  let(:custom_site) { 'http://localhost:3000' }
18
18
  let(:custom_authorize_url) { '/admin_users/oauth/authorize' }
19
19
  let(:custom) do
20
20
  OmniAuth::Strategies::TimberCantina.new('KEY', 'SECRET',
21
- {
22
- client_options: {
23
- site: custom_site,
24
- authorize_url: custom_authorize_url
25
- }
26
- }
27
- )
21
+ client_options: {
22
+ site: custom_site,
23
+ authorize_url: custom_authorize_url
24
+ })
28
25
  end
29
26
 
30
- it "for site" do
27
+ it 'for site' do
31
28
  expect(custom.options.client_options.site).to eq custom_site
32
29
  end
33
30
 
34
- it "for authorize url" do
31
+ it 'for authorize url' do
35
32
  expect(custom.options.client_options.authorize_url).to eq custom_authorize_url
36
33
  end
37
-
38
34
  end
39
35
  end
40
-
41
- end
36
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-timber-cantina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Kok
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-01 00:00:00.000000000 Z
11
+ date: 2018-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -88,7 +88,7 @@ dependencies:
88
88
  version: 3.2.0
89
89
  description: OmniAuth strategy for Timber Cantina SSO application.
90
90
  email:
91
- - info@johankok.nl
91
+ - webmaster@boomdenhaag.nl
92
92
  executables: []
93
93
  extensions: []
94
94
  extra_rdoc_files: []
@@ -107,7 +107,7 @@ files:
107
107
  - omniauth-timber-cantina.gemspec
108
108
  - spec/omniauth/strategies/omniauth_timber_cantina_spec.rb
109
109
  - spec/spec_helper.rb
110
- homepage: https://github.com/johankok/omniauth-timber-cantina
110
+ homepage: https://github.com/boom-den-haag/omniauth-timber-cantina
111
111
  licenses:
112
112
  - MIT
113
113
  metadata: {}
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.5.2.1
130
+ rubygems_version: 2.6.14
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: OmniAuth strategy for Timber Cantina SSO application.