omniauth-mastodon 0.9.0 → 0.9.1

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: 0c8d83a57269ba692e61c6b7c6d73c207fe7405a
4
- data.tar.gz: 516fa7210bacec102287f2b247dc3970a5ee14d6
3
+ metadata.gz: c5e667fb06e458185071735c5fc54a374a4d61f3
4
+ data.tar.gz: 05ea2dbe8e2560c5e909885450d096bb12987746
5
5
  SHA512:
6
- metadata.gz: e631b121d1b41832ab43da6745ee89b70b7e44e815b2da336e49094510f45513b56a4934fbb2fc540acd3774855c7393c92e1046f770a0773c08fad714bde265
7
- data.tar.gz: afa699be42f21690a91637cebecf3e412432f579fbd1f3b1751d62044cb5e2b1e0477569302fd7ec4fa7b54757c37017cad09e94a29a0790cf3e3fd66d3e09fb
6
+ metadata.gz: bff830659f2cec3a89884e3d6e016ce4803f3ed00d8d74598f32e0382ace6b3decbedac3b91702b12ae35b834b34f53bc8a019cc7378e5829eadd5f555c3b670
7
+ data.tar.gz: e332d3fe0cdeb6655d427766e03722272c0a844380324e8e3ccac8ad4faa616c5dbf0197f99b8d32ce49baf8f3f112b425235f74ce38a9631563db50d4310894
@@ -12,7 +12,7 @@ module OmniAuth
12
12
  end
13
13
 
14
14
  def patch
15
- 0
15
+ 1
16
16
  end
17
17
 
18
18
  def pre
@@ -3,10 +3,13 @@ require 'omniauth-oauth2'
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class Mastodon < OmniAuth::Strategies::OAuth2
6
+ DEFAULT_SCOPE = 'read'.freeze
7
+
6
8
  option :name, 'mastodon'
7
9
 
8
10
  option :credentials
9
11
  option :identifier
12
+ option :authorize_options, [:scope]
10
13
 
11
14
  option :client_options, {
12
15
  authorize_url: '/oauth/authorize',
@@ -47,6 +50,12 @@ module OmniAuth
47
50
  full_host + script_name + callback_path
48
51
  end
49
52
 
53
+ def authorize_params
54
+ super.tap do |params|
55
+ params[:scope] ||= DEFAULT_SCOPE
56
+ end
57
+ end
58
+
50
59
  private
51
60
 
52
61
  def get_identifier
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-mastodon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Rochko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-22 00:00:00.000000000 Z
11
+ date: 2016-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth