omniauth-boletosimples 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +24 -3
- data/lib/omniauth/boletosimples/version.rb +1 -1
- data/lib/omniauth/strategies/boletosimples.rb +5 -0
- data/spec/omniauth/strategies/boletosimples_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b742697f424af46dc74bbb6062d47703eef7c4a
|
4
|
+
data.tar.gz: 044cb75aa7c69832e01897412e92be0799d129d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c117b12aa265ad470ced3972ee533d0e92588ed7f549e4cfe36413f06a80e649779abdbc51180a6a5903a91319e5c7a10c729fae95451acfdea2ba2d4e467699
|
7
|
+
data.tar.gz: 02979513f6af92372e24ee2a6cb6dab829edb74f00f9b0fc51814663cacfa80fbe836b7bee2b763dd41e85208a22dff38dfb284d4289fe1b589c6fde311f015f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -29,17 +29,38 @@ end
|
|
29
29
|
The possible attributes to be returned at the moment are:
|
30
30
|
|
31
31
|
```ruby
|
32
|
-
info['
|
32
|
+
info['person_type']
|
33
|
+
info['person_name']
|
33
34
|
info['email']
|
34
|
-
|
35
|
-
|
35
|
+
info['cnpj_cpf']
|
36
|
+
|
37
|
+
extra['address_street_name']
|
38
|
+
extra['address_number']
|
39
|
+
extra['address_complement']
|
40
|
+
extra['address_state']
|
41
|
+
extra['address_city_name']
|
42
|
+
extra['address_neighborhood']
|
43
|
+
extra['address_postal_code']
|
44
|
+
extra['phone_number']
|
45
|
+
extra['banking_bank_number']
|
46
|
+
extra['banking_agency_number']
|
47
|
+
extra['banking_account_number']
|
48
|
+
extra['banking_account_digit']
|
49
|
+
extra['banking_person_type']
|
50
|
+
extra['banking_person_name']
|
51
|
+
extra['banking_cnpj_cpf']
|
52
|
+
extra['paypal_account']
|
36
53
|
```
|
37
54
|
|
38
55
|
The actual set of attributes returned depends on the scopes set. The currently available scopes are:
|
39
56
|
|
40
57
|
```
|
58
|
+
login
|
41
59
|
profile
|
42
60
|
email
|
61
|
+
phone
|
62
|
+
address
|
63
|
+
banking
|
43
64
|
write
|
44
65
|
read
|
45
66
|
webhook
|
@@ -55,6 +55,11 @@ module OmniAuth
|
|
55
55
|
environment = options.environment || :production
|
56
56
|
options.client_options[:site] = ENVIRONMENTS[environment.to_sym]
|
57
57
|
options.client_options[:authorize_url] = "#{ENVIRONMENTS[environment.to_sym]}/api/v1/oauth2/authorize"
|
58
|
+
options.client_options[:connection_opts] = {
|
59
|
+
headers: {
|
60
|
+
'User-Agent' => options.user_agent,
|
61
|
+
}
|
62
|
+
} if options.user_agent
|
58
63
|
end
|
59
64
|
|
60
65
|
def raw_info
|
@@ -34,6 +34,13 @@ describe OmniAuth::Strategies::BoletoSimples do
|
|
34
34
|
it 'has correct token url' do
|
35
35
|
subject.client.options[:token_url].should eq('/api/v1/oauth2/token')
|
36
36
|
end
|
37
|
+
|
38
|
+
it 'has correct connection_opts' do
|
39
|
+
@options = { :user_agent => 'email@example.com' }
|
40
|
+
subject.setup_phase
|
41
|
+
subject.client.options[:connection_opts].should eq({:headers=>{:"User-Agent"=>"email@example.com"}})
|
42
|
+
end
|
43
|
+
|
37
44
|
end
|
38
45
|
|
39
46
|
describe '#callback_path' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-boletosimples
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafael Lima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|