omniauth-munic 1.1 → 1.2.0

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
- SHA1:
3
- metadata.gz: 61b4d29b6b2af33eed5a572f209f1dad2cae411f
4
- data.tar.gz: bb6d8b524afb1030537c87a2ae6c33c59cb0a630
2
+ SHA256:
3
+ metadata.gz: 949b67fc09f5a588fd91a5eea460c27954d72d10ddec4ad99f5e3d3a6231b189
4
+ data.tar.gz: 37ce14a6b38964427d3050b5408f566632fe4ce8e10feae3bba45b583e9be170
5
5
  SHA512:
6
- metadata.gz: 3b4cb2e5b48bd3f93fd969d8fe3f558c52de96b0cbf76e847ddf8eedb0dd503f4cca2b3c8f3165a92cb8b3d4c3ce9dc8c0e5f1ee4f39fbe5aae60842550cd764
7
- data.tar.gz: accd4c7da34484b0c44aa88c31d2ce5fb471a8245e2de3ec98d15596e704053525179740c6aae5c4f5f943cb5f9fe6b932aee905fdc767f4cfc9d2c78cbfd07b
6
+ metadata.gz: 335d598ae88ba5ae26b7609860e4ae1f933b9b8f2ab3c0f3cc9baf0b79a744df6cde19b6d6958c5a5f31e162b06867d0386c2bd90f37d023dd5bd9feb17d5d54
7
+ data.tar.gz: 6e07a162acf18f7cc034306bbeeca58aa9965e7e690239c325c21541b041977d2aa816b7171794a66342ae2c60dabc4402a071d0967e39d07d743f704b30a85f
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## v1.2.0 (12/04/2020)
4
+ - Bump omniauth-oauth2 to v1.6.0
5
+ - Rubocop clean
6
+ - 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'
@@ -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,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OmniAuth
2
- module Munic
3
- VERSION = '1.1'
4
- end
4
+ module Munic
5
+ VERSION = '1.2.0'
6
+ end
5
7
  end
@@ -1,38 +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
- organization_id: raw_info['organization_id'],
26
- organization_name: raw_info['organization_name']
27
- }
28
- i[:time_zone] = raw_info['time_zone'] unless raw_info['time_zone'].nil?
29
- i[:company_name] = raw_info['company_name'] unless raw_info['company_name'].nil?
30
- i
31
- end
36
+ def raw_info
37
+ @raw_info ||= access_token.get('/api/v1/users/me.json').parsed
38
+ end
32
39
 
33
- def raw_info
34
- @raw_info ||= access_token.get('/api/v1/users/me.json').parsed
35
- end
36
- end
40
+ def callback_url
41
+ full_host + script_name + callback_path
42
+ end
37
43
  end
44
+ end
38
45
  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_dependency 'omniauth-oauth2', '~> 1.6.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.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.1'
4
+ version: 1.2.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: 2018-10-18 00:00:00.000000000 Z
11
+ date: 2020-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -16,77 +16,49 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.1
19
+ version: 1.6.0
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.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
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.9'
26
+ version: 1.6.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - "~>"
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
- version: '10.0'
33
+ version: 12.3.3
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - "~>"
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: '10.0'
40
+ version: 12.3.3
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rspec
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '3.5'
47
+ version: '3.8'
62
48
  - - ">="
63
49
  - !ruby/object:Gem::Version
64
- version: 3.5.0
50
+ version: 3.8.0
65
51
  type: :development
66
52
  prerelease: false
67
53
  version_requirements: !ruby/object:Gem::Requirement
68
54
  requirements:
69
55
  - - "~>"
70
56
  - !ruby/object:Gem::Version
71
- version: '3.5'
57
+ version: '3.8'
72
58
  - - ">="
73
59
  - !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.
60
+ version: 3.8.0
61
+ description: Munic.io OAuth2 strategy for OmniAuth.
90
62
  email:
91
63
  - maxime.dufay@mobile-devices.fr
92
64
  executables: []
@@ -94,6 +66,7 @@ extensions: []
94
66
  extra_rdoc_files: []
95
67
  files:
96
68
  - ".gitignore"
69
+ - CHANGELOG.md
97
70
  - Gemfile
98
71
  - README.md
99
72
  - Rakefile
@@ -122,9 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
95
  - !ruby/object:Gem::Version
123
96
  version: '0'
124
97
  requirements: []
125
- rubyforge_project:
126
- rubygems_version: 2.5.1
98
+ rubygems_version: 3.1.2
127
99
  signing_key:
128
100
  specification_version: 4
129
- summary: The Munic OAuth2 strategy for OmniAuth 1.x.
101
+ summary: Munic.io OAuth2 strategy for OmniAuth.
130
102
  test_files: []