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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb69873f0a79171d7ae771a54063aded5bb12994
4
- data.tar.gz: c8ff225473b4b67b9cafa22430cc34c0c1f6bccf
3
+ metadata.gz: 4b742697f424af46dc74bbb6062d47703eef7c4a
4
+ data.tar.gz: 044cb75aa7c69832e01897412e92be0799d129d5
5
5
  SHA512:
6
- metadata.gz: 66d1540bf4eb0adf976d5ce16ae1b0dbd301a1cb0c97bc965d80593f91bd1b3ae09a35ad2840c024d477f7083b039909104b6c5ffbaf7924d5c7d1af2b3f7b6d
7
- data.tar.gz: ef8dc9ea47a69b755a67f470e9b3bc9ebe631b740fa8b7d92844c709e970b3ef07a76268688b89162cf10cfdbaf2a401d1b82c15696fd16895b031aecb619855
6
+ metadata.gz: c117b12aa265ad470ced3972ee533d0e92588ed7f549e4cfe36413f06a80e649779abdbc51180a6a5903a91319e5c7a10c729fae95451acfdea2ba2d4e467699
7
+ data.tar.gz: 02979513f6af92372e24ee2a6cb6dab829edb74f00f9b0fc51814663cacfa80fbe836b7bee2b763dd41e85208a22dff38dfb284d4289fe1b589c6fde311f015f
data/Gemfile.lock CHANGED
@@ -11,7 +11,7 @@ GIT
11
11
  PATH
12
12
  remote: .
13
13
  specs:
14
- omniauth-boletosimples (0.0.1)
14
+ omniauth-boletosimples (0.0.2)
15
15
  omniauth-oauth2 (~> 1.1.0)
16
16
 
17
17
  GEM
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['name']
32
+ info['person_type']
33
+ info['person_name']
33
34
  info['email']
34
-
35
- extra['raw_info']
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
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BoletoSimples
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -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.1
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-08 00:00:00.000000000 Z
11
+ date: 2014-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2