omniauth-discord 1.1.0 → 1.2.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
2
  SHA256:
3
- metadata.gz: 5a19b6c4bf2c6b7007749e7cffecb160e7da0b333c9a2be2607aeabeb1098453
4
- data.tar.gz: 826c1db9c50b1d94ab02b973a6a4e642393a5bac5d44f6372bcafa739589a814
3
+ metadata.gz: dd7659142ba5f22d8146f7844aa6d56b3c3c6a7201e623d00e0c6f0656875f4d
4
+ data.tar.gz: cd9dce4beb227213e08f3897b2e332fe89679d1edf0adb54e4144e22836415e4
5
5
  SHA512:
6
- metadata.gz: 845d18523d8844e0b8e85e2a6b102377dfc4a391a44c04c98978d74b0e28e27a6bf3e379d15a1cb54f3ccbda5977ee14617d6e8031e424b1710a98506bd379a6
7
- data.tar.gz: 2f409257c5d20cdd4d275fa425981807139ecd7ed3bf902dde9de6a272244206b7d0ecbf9978d41344ce6db043159a5fdadf7797c005755f05f0db57798e1c9d
6
+ metadata.gz: 611bda0c4d19ea05645a15413cb2ed035465a48c959b56fbaa618c8daf206d1deb9253423b4407cae247f935e4d96e8f20c9614bc9a0d1c46e920846f15c648a
7
+ data.tar.gz: d3a9c813cf4258adaa9bae74ecbd2c21cb11141dc88e8c68b193d4d489e78018f442ee4bd2f51d320d817a9b183339b1d1b3ad970b286e276f2eae69b3c733ce
data/Rakefile CHANGED
@@ -1,7 +1 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new
5
-
6
- desc 'Run specs'
7
- task default: :spec
1
+ require "bundler/gem_tasks"
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Discord
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ module OmniAuth
12
12
  authorize_url: 'oauth2/authorize',
13
13
  token_url: 'oauth2/token'
14
14
 
15
- option :authorize_options, %i[scope permissions prompt]
15
+ option :authorize_options, %i[scope guild_id permissions prompt]
16
16
 
17
17
  uid { raw_info['id'] }
18
18
 
@@ -4,12 +4,12 @@ require 'omniauth/discord/version'
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'omniauth-discord'
6
6
  spec.version = Omniauth::Discord::VERSION
7
- spec.authors = ['Adão Raul']
8
- spec.email = ['adao.raul@gmail.com']
7
+ spec.authors = ["Dean Perry", 'Adão Raul']
8
+ spec.email = ["dean@deanpcmad.com", 'adao.raul@gmail.com']
9
9
 
10
10
  spec.summary = 'Discord OAuth2 Strategy for OmniAuth'
11
11
  spec.description = spec.summary
12
- spec.homepage = 'http://github.com/adaoraul/omniauth-discord'
12
+ spec.homepage = 'https://github.com/deanpcmad/omniauth-discord'
13
13
  spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
@@ -17,12 +17,5 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_runtime_dependency 'omniauth', '~> 2.1.0'
21
- spec.add_runtime_dependency 'omniauth-oauth2'
22
-
23
- spec.add_development_dependency 'rack-test'
24
- spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'simplecov'
27
- spec.add_development_dependency 'webmock'
20
+ spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.6'
28
21
  end
metadata CHANGED
@@ -1,138 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-discord
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Dean Perry
7
8
  - Adão Raul
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
12
+ date: 2024-03-02 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: omniauth
15
+ name: omniauth-oauth2
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: 2.1.0
20
+ version: '1.6'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - "~>"
25
26
  - !ruby/object:Gem::Version
26
- version: 2.1.0
27
- - !ruby/object:Gem::Dependency
28
- name: omniauth-oauth2
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rack-test
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: webmock
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
27
+ version: '1.6'
111
28
  description: Discord OAuth2 Strategy for OmniAuth
112
29
  email:
30
+ - dean@deanpcmad.com
113
31
  - adao.raul@gmail.com
114
32
  executables: []
115
33
  extensions: []
116
34
  extra_rdoc_files: []
117
35
  files:
118
- - ".github/workflows/gem-push.yml"
119
- - ".github/workflows/rspec.yml"
120
36
  - ".gitignore"
121
- - ".rubocop.yml"
122
- - ".travis.yml"
123
37
  - Gemfile
124
38
  - LICENSE.txt
125
39
  - README.md
126
40
  - Rakefile
127
- - example/Gemfile
128
- - example/Gemfile.lock
129
- - example/config.ru
130
41
  - lib/omniauth-discord.rb
131
42
  - lib/omniauth/discord.rb
132
43
  - lib/omniauth/discord/version.rb
133
44
  - lib/omniauth/strategies/discord.rb
134
45
  - omniauth-discord.gemspec
135
- homepage: http://github.com/adaoraul/omniauth-discord
46
+ homepage: https://github.com/deanpcmad/omniauth-discord
136
47
  licenses:
137
48
  - MIT
138
49
  metadata: {}
@@ -151,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
62
  - !ruby/object:Gem::Version
152
63
  version: '0'
153
64
  requirements: []
154
- rubygems_version: 3.1.4
65
+ rubygems_version: 3.4.22
155
66
  signing_key:
156
67
  specification_version: 4
157
68
  summary: Discord OAuth2 Strategy for OmniAuth
@@ -1,33 +0,0 @@
1
- name: Ruby Gem
2
-
3
- on:
4
- release:
5
- types:
6
- - created
7
-
8
- jobs:
9
- build:
10
-
11
- name: Build + Publish Gem
12
- runs-on: ubuntu-latest
13
- permissions:
14
- contents: read
15
- packages: write
16
-
17
- steps:
18
- - uses: actions/checkout@v2
19
- - name: Set up Ruby
20
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
21
- with:
22
- ruby-version: 2.7.2
23
-
24
- - name: Publish to RubyGems
25
- run: |
26
- mkdir -p $HOME/.gem
27
- touch $HOME/.gem/credentials
28
- chmod 0600 $HOME/.gem/credentials
29
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
30
- gem build *.gemspec
31
- gem push *.gem
32
- env:
33
- GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
@@ -1,25 +0,0 @@
1
- name: Ruby
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- test:
11
-
12
- runs-on: ubuntu-latest
13
- strategy:
14
- matrix:
15
- ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
16
-
17
- steps:
18
- - uses: actions/checkout@v2
19
- - name: Set up Ruby
20
- uses: ruby/setup-ruby@v1.131.0
21
- with:
22
- ruby-version: ${{ matrix.ruby-version }}
23
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
24
- - name: Run tests
25
- run: bundle exec rake
data/.rubocop.yml DELETED
@@ -1,18 +0,0 @@
1
- Rails:
2
- Enabled: false
3
-
4
- Style/FrozenStringLiteralComment:
5
- Enabled: false
6
-
7
- Metrics/LineLength:
8
- Max: 120
9
-
10
- Style/Documentation:
11
- Enabled: false
12
-
13
- Naming/FileName:
14
- Enabled: false
15
-
16
- Metrics/BlockLength:
17
- ExcludedMethods:
18
- - describe
data/.travis.yml DELETED
@@ -1,28 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=ABC123
4
-
5
- language: ruby
6
- before_install: gem install bundler
7
-
8
- rvm:
9
- - 2.6.1
10
- - 2.3.0
11
- - jruby-head
12
-
13
- gemfile:
14
- - Gemfile
15
-
16
- notifications:
17
- email: true
18
-
19
- before_script:
20
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
21
- - chmod +x ./cc-test-reporter
22
- - ./cc-test-reporter before-build
23
-
24
- script:
25
- - bundle exec rspec
26
-
27
- after_script:
28
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/example/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'sinatra'
4
- gem 'sinatra-reloader'
5
- gem 'omniauth-discord', path: '../'
6
- gem 'puma'
7
- gem 'pry'
data/example/Gemfile.lock DELETED
@@ -1,77 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- omniauth-discord (1.1.0)
5
- omniauth (~> 2.1.0)
6
- omniauth-oauth2
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- coderay (1.1.3)
12
- faraday (2.7.4)
13
- faraday-net_http (>= 2.0, < 3.1)
14
- ruby2_keywords (>= 0.0.4)
15
- faraday-net_http (3.0.2)
16
- hashie (5.0.0)
17
- jwt (2.7.0)
18
- method_source (1.0.0)
19
- multi_json (1.15.0)
20
- multi_xml (0.6.0)
21
- mustermann (3.0.0)
22
- ruby2_keywords (~> 0.0.1)
23
- nio4r (2.5.9)
24
- oauth2 (2.0.9)
25
- faraday (>= 0.17.3, < 3.0)
26
- jwt (>= 1.0, < 3.0)
27
- multi_xml (~> 0.5)
28
- rack (>= 1.2, < 4)
29
- snaky_hash (~> 2.0)
30
- version_gem (~> 1.1)
31
- omniauth (2.1.1)
32
- hashie (>= 3.4.6)
33
- rack (>= 2.2.3)
34
- rack-protection
35
- omniauth-oauth2 (1.8.0)
36
- oauth2 (>= 1.4, < 3)
37
- omniauth (~> 2.0)
38
- pry (0.14.2)
39
- coderay (~> 1.1)
40
- method_source (~> 1.0)
41
- puma (6.2.1)
42
- nio4r (~> 2.0)
43
- rack (2.2.6.4)
44
- rack-protection (3.0.5)
45
- rack
46
- ruby2_keywords (0.0.5)
47
- sinatra (3.0.5)
48
- mustermann (~> 3.0)
49
- rack (~> 2.2, >= 2.2.4)
50
- rack-protection (= 3.0.5)
51
- tilt (~> 2.0)
52
- sinatra-contrib (3.0.5)
53
- multi_json
54
- mustermann (~> 3.0)
55
- rack-protection (= 3.0.5)
56
- sinatra (= 3.0.5)
57
- tilt (~> 2.0)
58
- sinatra-reloader (1.0)
59
- sinatra-contrib
60
- snaky_hash (2.0.1)
61
- hashie
62
- version_gem (~> 1.1, >= 1.1.1)
63
- tilt (2.1.0)
64
- version_gem (1.1.2)
65
-
66
- PLATFORMS
67
- x86_64-linux
68
-
69
- DEPENDENCIES
70
- omniauth-discord!
71
- pry
72
- puma
73
- sinatra
74
- sinatra-reloader
75
-
76
- BUNDLED WITH
77
- 2.4.10
data/example/config.ru DELETED
@@ -1,39 +0,0 @@
1
- require 'bundler/setup'
2
- require 'omniauth'
3
- require 'omniauth-discord'
4
- require 'sinatra'
5
- require "sinatra/reloader"
6
-
7
- configure do
8
- set :sessions, true
9
- set :run, false
10
- set :raise_errors, true
11
- end
12
-
13
- use Rack::Session::Cookie, secret: '123456789'
14
-
15
- use OmniAuth::Builder do
16
- provider :discord, ENV['DISCORD_CLIENT_ID'], ENV['DISCORD_CLIENT_ID'], scope: ENV['SCOPE']
17
- end
18
-
19
- get '/' do
20
- content_type 'text/html'
21
- <<-HTML
22
- <html>
23
- <body>
24
- <form method='post' action='/auth/discord'>
25
- <input type="hidden" name="authenticity_token" value='#{request.env["rack.session"]["csrf"]}'>
26
- <button type='submit'>Login with Discord</button>
27
- </form>
28
- </body>
29
- </html>
30
- HTML
31
- end
32
-
33
- get '/auth/:provider/callback' do
34
- content_type 'application/json'
35
- request.env['omniauth.auth'].to_json
36
- end
37
-
38
-
39
- run Sinatra::Application