omniauth-munic 1.0 → 1.3.0

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: 1e453c7aa6dbba1c851623524a53ff2fa58c8f13
4
- data.tar.gz: 4977c2b7818114704acfec7a2369e1a09b3f3cc1
2
+ SHA256:
3
+ metadata.gz: 9b745e58bb24f47e8aa563276f61e081ce8f64829fe007b9dd8aed8514b7d39c
4
+ data.tar.gz: 2e332cae0d4d59248f72540b795629576ee9f9e84764697feca9c4c88f2f5e57
5
5
  SHA512:
6
- metadata.gz: 6bc1f787c006e54ad0a1f1113816a80fc935c6b50f4d11748f9fa25a2fde8eef3e8698dd0a170ec3734071d617fbb40ce28d1d8316f52ae4ae9c6860aea3dec5
7
- data.tar.gz: af1ff396de3b034046265a85af95b08e4c4452a29e678bfe666568702c8ee28bebb5975036312646788be646b957ff14b35c7a4254bd345175411719471d2e68
6
+ metadata.gz: 1a0367a68b80896529d34b3979a22b76e704ad6870518f4bef2728fc5ebf2ad230dc52b0ac3ad8fd2c1f5cf7350665fba913be372b340b5ff38cd12a7b717657
7
+ data.tar.gz: 88c0954fe9f4f5947cb3d59f514ee50f056b95936e21e1df06c9e2a149fa0b82ff44d61cd3276d97a410385cf5c553f1ec9745039871d5ef712ba5ae1d296def
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## v1.3.0 (14/04/2022)
4
+ - Bump omniauth-oauth2 to v1.7.0
5
+
6
+ ## v1.2.0 (12/04/2020)
7
+ - Bump omniauth-oauth2 to v1.6.0
8
+ - Rubocop clean
9
+ - Fix unit tests broken in the last release
data/Rakefile CHANGED
@@ -1 +1,3 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
data/bin/console CHANGED
@@ -1,4 +1,6 @@
1
- #!/usr/bin/env ruby
1
+ # frozen_string_literal: true
2
+
3
+ # !/usr/bin/env ruby
2
4
 
3
5
  require 'bundler/setup'
4
6
  require 'omniauth-munic'
@@ -1,37 +1,45 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OmniAuth
2
- module Strategies
3
- autoload :Munic, 'omniauth/strategies/munic'
4
+ module Strategies
5
+ autoload :Munic, 'omniauth/strategies/munic'
6
+
7
+ # MunicIO strategy
8
+ class Munic < OmniAuth::Strategies::OAuth2
9
+ # Give your strategy a name.
10
+ option :name, 'munic'
4
11
 
5
- class Munic < OmniAuth::Strategies::OAuth2
6
- # Give your strategy a name.
7
- option :name, 'munic'
12
+ # This is where you pass the options you would pass when
13
+ # initializing your consumer from the OAuth gem.
14
+ option :client_options, site: 'https://connect.munic.io'
8
15
 
9
- # This is where you pass the options you would pass when
10
- # initializing your consumer from the OAuth gem.
11
- option :client_options, {:site => 'https://connect.munic.io'}
16
+ # These are called after authentication has succeeded. If
17
+ # possible, you should try to set the UID without making
18
+ # additional calls (if the user id is returned with the token
19
+ # or as a URI parameter). This may not be possible with all
20
+ # providers.
21
+ uid { raw_info['uid'] }
12
22
 
13
- # These are called after authentication has succeeded. If
14
- # possible, you should try to set the UID without making
15
- # additional calls (if the user id is returned with the token
16
- # or as a URI parameter). This may not be possible with all
17
- # providers.
18
- uid { raw_info['uid'] }
23
+ info do
24
+ i = {
25
+ email: raw_info['email'],
26
+ full_name: raw_info['full_name'],
27
+ language: raw_info['language'],
28
+ organization_id: raw_info['organization_id'],
29
+ organization_name: raw_info['organization_name']
30
+ }
31
+ i[:time_zone] = raw_info['time_zone'] unless raw_info['time_zone'].nil?
32
+ i[:company_name] = raw_info['company_name'] unless raw_info['company_name'].nil?
33
+ i
34
+ end
19
35
 
20
- info do
21
- i = {
22
- email: raw_info['email'],
23
- full_name: raw_info['full_name'],
24
- language: raw_info['language']
25
- }
26
- i[:time_zone] = raw_info['time_zone'] unless raw_info['time_zone'].nil?
27
- i[:company] = raw_info['company'] unless raw_info['company'].nil?
28
- i[:vat] = raw_info['vat'] unless raw_info['vat'].nil?
29
- i
30
- end
36
+ def raw_info
37
+ @raw_info ||= access_token.get('/api/v1/users/me.json').parsed
38
+ end
31
39
 
32
- def raw_info
33
- @raw_info ||= access_token.get('/api/v1/users/me.json').parsed
34
- end
35
- end
40
+ def callback_url
41
+ full_host + script_name + callback_path
42
+ end
36
43
  end
44
+ end
37
45
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OmniAuth
2
- module Munic
3
- VERSION = '1.0'
4
- end
4
+ module Munic
5
+ VERSION = '1.3.0'
6
+ end
5
7
  end
@@ -1,28 +1,28 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'omniauth-munic/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.add_dependency 'omniauth-oauth2', '~> 1.3.1'
8
+ spec.name = 'omniauth-munic'
9
+ spec.version = OmniAuth::Munic::VERSION
10
+
11
+ spec.description = 'Munic.io OAuth2 strategy for OmniAuth.'
12
+ spec.summary = spec.description
8
13
 
9
- spec.name = 'omniauth-munic'
10
- spec.version = OmniAuth::Munic::VERSION
11
- spec.authors = ['maxime dufay']
12
- spec.email = ['maxime.dufay@mobile-devices.fr']
14
+ spec.authors = ['maxime dufay']
15
+ spec.email = ['maxime.dufay@mobile-devices.fr']
16
+ spec.homepage = 'https://github.com/municio/omniauth-munic'
17
+ spec.license = 'MIT'
13
18
 
14
- spec.description = 'The Munic OAuth2 strategy for OmniAuth 1.x.'
15
- spec.summary = spec.description
16
- spec.homepage = 'https://github.com/municio/omniauth-munic'
17
- spec.license = 'MIT'
19
+ spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.7', '>= 1.7.0'
18
20
 
19
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
- spec.bindir = 'exe'
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ['lib']
21
+ spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
22
+ spec.add_development_dependency 'rspec', '~> 3.8', '>= 3.8.0'
23
23
 
24
- spec.add_development_dependency 'bundler', '~> 1.9'
25
- spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
27
- spec.add_development_dependency 'omniauth-oauth2', '~> 1.3.1'
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.bindir = 'exe'
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ['lib']
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-munic
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - maxime dufay
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-10 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -16,77 +16,61 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.1
19
+ version: '1.7'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.7.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 1.3.1
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.9'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
29
+ version: '1.7'
30
+ - - ">="
39
31
  - !ruby/object:Gem::Version
40
- version: '1.9'
32
+ version: 1.7.0
41
33
  - !ruby/object:Gem::Dependency
42
34
  name: rake
43
35
  requirement: !ruby/object:Gem::Requirement
44
36
  requirements:
45
37
  - - "~>"
46
38
  - !ruby/object:Gem::Version
47
- version: '10.0'
39
+ version: '12.3'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 12.3.3
48
43
  type: :development
49
44
  prerelease: false
50
45
  version_requirements: !ruby/object:Gem::Requirement
51
46
  requirements:
52
47
  - - "~>"
53
48
  - !ruby/object:Gem::Version
54
- version: '10.0'
49
+ version: '12.3'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 12.3.3
55
53
  - !ruby/object:Gem::Dependency
56
54
  name: rspec
57
55
  requirement: !ruby/object:Gem::Requirement
58
56
  requirements:
59
57
  - - "~>"
60
58
  - !ruby/object:Gem::Version
61
- version: '3.5'
59
+ version: '3.8'
62
60
  - - ">="
63
61
  - !ruby/object:Gem::Version
64
- version: 3.5.0
62
+ version: 3.8.0
65
63
  type: :development
66
64
  prerelease: false
67
65
  version_requirements: !ruby/object:Gem::Requirement
68
66
  requirements:
69
67
  - - "~>"
70
68
  - !ruby/object:Gem::Version
71
- version: '3.5'
69
+ version: '3.8'
72
70
  - - ">="
73
71
  - !ruby/object:Gem::Version
74
- version: 3.5.0
75
- - !ruby/object:Gem::Dependency
76
- name: omniauth-oauth2
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: 1.3.1
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: 1.3.1
89
- description: The Munic OAuth2 strategy for OmniAuth 1.x.
72
+ version: 3.8.0
73
+ description: Munic.io OAuth2 strategy for OmniAuth.
90
74
  email:
91
75
  - maxime.dufay@mobile-devices.fr
92
76
  executables: []
@@ -94,6 +78,7 @@ extensions: []
94
78
  extra_rdoc_files: []
95
79
  files:
96
80
  - ".gitignore"
81
+ - CHANGELOG.md
97
82
  - Gemfile
98
83
  - README.md
99
84
  - Rakefile
@@ -122,9 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
107
  - !ruby/object:Gem::Version
123
108
  version: '0'
124
109
  requirements: []
125
- rubyforge_project:
126
- rubygems_version: 2.5.1
110
+ rubygems_version: 3.3.17
127
111
  signing_key:
128
112
  specification_version: 4
129
- summary: The Munic OAuth2 strategy for OmniAuth 1.x.
113
+ summary: Munic.io OAuth2 strategy for OmniAuth.
130
114
  test_files: []