omniauth-service-now 1.0.0 → 2.0.1

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
2
  SHA256:
3
- metadata.gz: 5cdf084cebc8eee55da8b756f621878b99894f6f0f52ef7f86f5c86e5f55329d
4
- data.tar.gz: eb96020d43a8153607e3485db33b832582292d2b1edbe0c216c9df7b58ff06ae
3
+ metadata.gz: 123d35fff02c6cfa91bb2577746635e75f05afc19eb7bba9168088db26cbb152
4
+ data.tar.gz: 13f295ffb0824ad2b62fd35138834ed8e7e6f577b9a922c2c946b3307ac74ab6
5
5
  SHA512:
6
- metadata.gz: d9e739d187c57a94646eb5e44e22ae608d13b23e0019173489f8280be260d4abd70b76e6ca13ed2cc65e3e6976990c4b60a81ddc6884357c305f6e1b260d3138
7
- data.tar.gz: b73725010c6e36e1e7990dd5ecc030eed329da92123d70efd05181ff7e3fa653eb16c4968d3329b1cf8f804fbad5f6006e0db8ad0448cbde99914b03f701d59a
6
+ metadata.gz: 066fea62d3cabf9ab728e6895d93d52b531154a9f1c09406358a6332db84d92041f437cdfa19171d95b93b2a2339be95b8cbe4051f73d32d6b7c5035678b4fb0
7
+ data.tar.gz: f2c3478a252b569060eb1dcbb16c909efe065373591670bce990559675ec1db13fbb99f509aa5f18bf717437e82d8ac908ea423d788f60fa4bcd5299fdfc4657
@@ -7,12 +7,12 @@ jobs:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  matrix:
10
- ruby-version: ["2.4", "2.5", "2.6", "2.7"]
10
+ ruby-version: ["3.0", "3.1", "3.2", "3.3"]
11
11
 
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Set up Ruby ${{ matrix.ruby-version }}
15
- uses: actions/setup-ruby@v1
15
+ uses: ruby/setup-ruby@v1
16
16
  with:
17
17
  ruby-version: ${{ matrix.ruby-version }}
18
18
  - name: Build and test with Rake
data/.gitignore CHANGED
@@ -15,3 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .ruby-version
19
+ .DS_Store
@@ -78,7 +78,7 @@ module OmniAuth
78
78
  end
79
79
 
80
80
  def callback_url
81
- full_host + script_name + callback_path
81
+ options.redirect_url || (full_host + callback_path)
82
82
  end
83
83
  end
84
84
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module ServiceNow
3
- VERSION = "1.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
@@ -16,7 +16,9 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.version = OmniAuth::ServiceNow::VERSION
18
18
 
19
- gem.add_dependency 'omniauth', '~> 1.5'
19
+ gem.required_ruby_version = ">= 3"
20
+
21
+ gem.add_dependency 'omniauth', '~> 2'
20
22
  gem.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
21
23
  gem.add_development_dependency 'rspec', '~> 3.5'
22
24
  gem.add_development_dependency 'rack-test'
@@ -55,4 +55,26 @@ describe OmniAuth::Strategies::ServiceNow do
55
55
  end
56
56
  end
57
57
  end
58
+
59
+ describe '#callback_url' do
60
+ let(:base_url) { 'https://example.com' }
61
+
62
+ context 'no script name present' do
63
+ it 'has the correct default callback path' do
64
+ allow(subject).to receive(:full_host) { base_url }
65
+ allow(subject).to receive(:script_name) { '' }
66
+ allow(subject).to receive(:query_string) { '' }
67
+ expect(subject.callback_url).to eq(base_url + '/auth/service_now/callback')
68
+ end
69
+ end
70
+
71
+ context 'script name' do
72
+ it 'should set the callback path with script_name' do
73
+ allow(subject).to receive(:full_host) { base_url }
74
+ allow(subject).to receive(:script_name) { '/v1' }
75
+ allow(subject).to receive(:query_string) { '' }
76
+ expect(subject.callback_url).to eq(base_url + '/v1/auth/service_now/callback')
77
+ end
78
+ end
79
+ end
58
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-service-now
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quentin Rousseau
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-16 00:00:00.000000000 Z
11
+ date: 2024-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.5'
26
+ version: '2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -125,7 +125,7 @@ homepage: https://github.com/kwent/omniauth-service-now
125
125
  licenses:
126
126
  - MIT
127
127
  metadata: {}
128
- post_install_message:
128
+ post_install_message:
129
129
  rdoc_options: []
130
130
  require_paths:
131
131
  - lib
@@ -133,15 +133,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
133
  requirements:
134
134
  - - ">="
135
135
  - !ruby/object:Gem::Version
136
- version: '0'
136
+ version: '3'
137
137
  required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 3.0.3
144
- signing_key:
143
+ rubygems_version: 3.5.3
144
+ signing_key:
145
145
  specification_version: 4
146
146
  summary: Official OmniAuth strategy for ServiceNow.
147
147
  test_files: