omniauth-ynab 0.0.1 → 0.0.3
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 +4 -4
- data/lib/omniauth/strategies/ynab.rb +5 -3
- data/lib/omniauth-ynab/version.rb +2 -2
- data/omniauth-ynab.gemspec +1 -1
- data/spec/omniauth/strategies/ynab_spec.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9308aeefdc011f387199e9c0262faf89a4be831
|
4
|
+
data.tar.gz: 899a5d68374be13df2c746c7428817607255b51b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5662355804d35b9a943644b471953ef5cb2e7211c5b821e84424f7517309f6eabc168e2b7afdce9d05e28fe130b3657946c1011ac311434824e2155b09b6d3a
|
7
|
+
data.tar.gz: 9016150b2cf383ebc65bf2baf2ab4639fe4880c02d61a1e47bb2aac0db59b9da0121b79d29bd8f3c5c4158058cca5952ca79a4a6c6bdad22b1e37230473caf82
|
@@ -11,7 +11,7 @@ module OmniAuth
|
|
11
11
|
# You must generally register your application with the provider and
|
12
12
|
# utilize an application id and secret in order to authenticate using
|
13
13
|
# OAuth 2.0.
|
14
|
-
class
|
14
|
+
class YNAB
|
15
15
|
include OmniAuth::Strategy
|
16
16
|
|
17
17
|
def self.inherited(subclass)
|
@@ -22,7 +22,9 @@ module OmniAuth
|
|
22
22
|
|
23
23
|
option :client_id, nil
|
24
24
|
option :client_secret, nil
|
25
|
-
option :client_options, {
|
25
|
+
option :client_options, {
|
26
|
+
:site => 'https://app.youneedabudget.com'
|
27
|
+
}
|
26
28
|
option :authorize_params, {}
|
27
29
|
option :authorize_options, [:scope]
|
28
30
|
option :token_params, {}
|
@@ -124,4 +126,4 @@ module OmniAuth
|
|
124
126
|
end
|
125
127
|
end
|
126
128
|
|
127
|
-
OmniAuth.config.add_camelization "ynab", "
|
129
|
+
OmniAuth.config.add_camelization "ynab", "YNAB"
|
data/omniauth-ynab.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require "helper"
|
2
2
|
|
3
|
-
describe OmniAuth::Strategies::
|
3
|
+
describe OmniAuth::Strategies::YNAB do # rubocop:disable Metrics/BlockLength
|
4
4
|
def app
|
5
5
|
lambda do |_env|
|
6
6
|
[200, {}, ["Hello."]]
|
7
7
|
end
|
8
8
|
end
|
9
|
-
let(:fresh_strategy) { Class.new(OmniAuth::Strategies::
|
9
|
+
let(:fresh_strategy) { Class.new(OmniAuth::Strategies::YNAB) }
|
10
10
|
|
11
11
|
before do
|
12
12
|
OmniAuth.config.test_mode = true
|
@@ -20,7 +20,7 @@ describe OmniAuth::Strategies::Ynab do # rubocop:disable Metrics/BlockLength
|
|
20
20
|
subject { fresh_strategy }
|
21
21
|
|
22
22
|
it "performs the OmniAuth::Strategy included hook" do
|
23
|
-
expect(OmniAuth.strategies).to include(OmniAuth::Strategies::
|
23
|
+
expect(OmniAuth.strategies).to include(OmniAuth::Strategies::YNAB)
|
24
24
|
expect(OmniAuth.strategies).to include(subject)
|
25
25
|
end
|
26
26
|
end
|
@@ -89,8 +89,8 @@ describe OmniAuth::Strategies::Ynab do # rubocop:disable Metrics/BlockLength
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
describe OmniAuth::Strategies::
|
93
|
-
let(:error) { Class.new(OmniAuth::Strategies::
|
92
|
+
describe OmniAuth::Strategies::YNAB::CallbackError do
|
93
|
+
let(:error) { Class.new(OmniAuth::Strategies::YNAB::CallbackError) }
|
94
94
|
describe "#message" do
|
95
95
|
subject { error }
|
96
96
|
it "includes all of the attributes" do
|