bipbop 0.2.0 → 0.3.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
  SHA1:
3
- metadata.gz: b26ea4a480ec871317bf328bed611219261c5474
4
- data.tar.gz: b529a492672e6afd79a18a74821004315a9cb645
3
+ metadata.gz: 10b1bcef3727064a83dbb4e9a582851a08046e33
4
+ data.tar.gz: 7c9fe89c3e2679c8880e84104fe026bcf903c107
5
5
  SHA512:
6
- metadata.gz: dd606d0c79ba4e7ac0d2553a1e1faf5e3d61e298b62cc8b7eae6ca3335bcbd0f302fd1c4669ce7b85724aeb047233ff80ed16504726e22fabc0603f506a8b8fd
7
- data.tar.gz: 66d8ff474b4f5178461d7c801fcd5f6a5ff7b2a92489a37b644b4ddab0a408a7e0ccd198321ead4c61e8da722fc3680e1c8399d57371549208fa3ae986158a15
6
+ metadata.gz: abed2a1a3e7b8b4cb3bdcddf18373e6d57477793e3fe243dbbece7b39f45fd4bff00a05568e725151326086103beb07a7e1c4042d8b5c939bdfb2f98b1053e63
7
+ data.tar.gz: 37d89ad2c7c3f17c6dc27f42e97e2793c6b7641e7de5d35b9dd4911c326550c680c19e0fa69bb72818bb1104f7f046ba4ca523fd7303b6f0ed5513abc14e0eac
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - '2.1.2'
4
+ - '2.0.0'
5
+ - '1.9.3'
6
+ branches:
7
+ only:
8
+ - master
9
+ addons:
10
+ code_climate:
11
+ repo_token: dc3166ef625c8da84f40cdf29dee15b3968aef1c6fd504cddde81f74ee5506a8
data/Gemfile CHANGED
@@ -16,4 +16,6 @@ group :development do
16
16
  gem "vcr", "2.9.3"
17
17
  gem "webmock", "1.19.0"
18
18
  gem "dotenv", "0.11.1"
19
+ gem 'codeclimate-test-reporter', '0.4.0', group: :test, require: nil
20
+ gem 'coveralls', '0.7.0', require: false
19
21
  end
@@ -3,6 +3,14 @@ GEM
3
3
  specs:
4
4
  addressable (2.3.6)
5
5
  builder (3.2.2)
6
+ codeclimate-test-reporter (0.4.0)
7
+ simplecov (>= 0.7.1, < 1.0.0)
8
+ coveralls (0.7.0)
9
+ multi_json (~> 1.3)
10
+ rest-client
11
+ simplecov (>= 0.7)
12
+ term-ansicolor
13
+ thor
6
14
  crack (0.4.2)
7
15
  safe_yaml (~> 1.0.0)
8
16
  descendants_tracker (0.0.4)
@@ -39,10 +47,12 @@ GEM
39
47
  rdoc
40
48
  json (1.8.1)
41
49
  jwt (1.0.0)
50
+ mime-types (2.3)
42
51
  mini_portile (0.6.0)
43
52
  multi_json (1.10.1)
44
53
  multi_xml (0.5.5)
45
54
  multipart-post (2.0.0)
55
+ netrc (0.7.7)
46
56
  nokogiri (1.6.3.1)
47
57
  mini_portile (= 0.6.0)
48
58
  oauth2 (1.0.0)
@@ -55,6 +65,9 @@ GEM
55
65
  rake (10.3.2)
56
66
  rdoc (3.12.2)
57
67
  json (~> 1.4)
68
+ rest-client (1.7.2)
69
+ mime-types (>= 1.16, < 3.0)
70
+ netrc (~> 0.7)
58
71
  rspec (2.8.0)
59
72
  rspec-core (~> 2.8.0)
60
73
  rspec-expectations (~> 2.8.0)
@@ -69,7 +82,11 @@ GEM
69
82
  multi_json (~> 1.0)
70
83
  simplecov-html (~> 0.8.0)
71
84
  simplecov-html (0.8.0)
85
+ term-ansicolor (1.3.0)
86
+ tins (~> 1.0)
87
+ thor (0.19.1)
72
88
  thread_safe (0.3.4)
89
+ tins (1.3.3)
73
90
  vcr (2.9.3)
74
91
  webmock (1.19.0)
75
92
  addressable (>= 2.3.6)
@@ -80,6 +97,8 @@ PLATFORMS
80
97
 
81
98
  DEPENDENCIES
82
99
  bundler (= 1.6.2)
100
+ codeclimate-test-reporter (= 0.4.0)
101
+ coveralls (= 0.7.0)
83
102
  dotenv (= 0.11.1)
84
103
  httparty (= 0.13.1)
85
104
  jeweler (= 2.0.1)
data/README.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # bipbop
2
2
 
3
- Ruby Wrapper for [bipbop](bipbop.com.br)
3
+ [![Gem Version](http://img.shields.io/gem/v/bipbop.svg)][gem]
4
+ [![Build Status](http://img.shields.io/travis/rafaelp/bipbop-ruby.svg)][travis]
5
+ [![Dependency Status](http://img.shields.io/gemnasium/rafaelp/bipbop-ruby.svg)][gemnasium]
6
+ [![Code Climate](http://img.shields.io/codeclimate/github/rafaelp/bipbop-ruby.svg)][codeclimate]
7
+ [![Coverage Status](http://img.shields.io/coveralls/rafaelp/bipbop-ruby.svg)][coveralls]
8
+
9
+ [gem]: https://rubygems.org/gems/bipbop
10
+ [travis]: http://travis-ci.org/rafaelp/bipbop-ruby
11
+ [gemnasium]: https://gemnasium.com/rafaelp/bipbop-ruby
12
+ [codeclimate]: https://codeclimate.com/github/rafaelp/bipbop-ruby
13
+ [coveralls]: https://coveralls.io/r/rafaelp/bipbop-ruby
14
+
15
+ Ruby Wrapper for [bipbop](http://bipbop.com.br)
4
16
 
5
17
  ## INSTALATION
6
18
 
@@ -12,18 +24,38 @@ Ruby Wrapper for [bipbop](bipbop.com.br)
12
24
 
13
25
  ```ruby
14
26
  bipbop = Bipbop.new('my api key')
15
- name = bipbop.cpfcnpj('99999999999') # where 99999999999 is the number of one cpf
16
- puts name
17
- # => "NAME OF PERSON"
27
+ bipbop.cpfcnpj('99999999999') # where 99999999999 is the number of one cpf
28
+ => "NAME OF PERSON"
18
29
  ```
19
30
 
20
31
  ### CNPJ
21
32
 
22
33
  ```ruby
23
34
  bipbop = Bipbop.new('my api key')
24
- name = bipbop.cpfcnpj('99999999000100') # where 99999999000100 is the number of cnpj
25
- puts name
26
- # => "NAME OF COMPANY LTDA"
35
+ bipbop.cpfcnpj('99999999000100') # where 99999999000100 is the number of cnpj
36
+ => "NAME OF COMPANY LTDA"
37
+ ```
38
+
39
+ ### SOCIAL
40
+
41
+ ```ruby
42
+ bipbop = Bipbop.new('my api key')
43
+ bipbop.social(document: '99999999999', email: 'user@example.com')
44
+ => {
45
+ "name" => {
46
+ "__content__" => "NAME OF PERSON",
47
+ "gender" => "male"
48
+ },
49
+ "approximate_age" => "30",
50
+ "hash" => "6CzXsZA09xMgXrHmJHUNY5X0cu7fv5yXwPGVX/i7nVE6awYftn5LpsVvdeoqbuMfBGdKIm0t1F+jrdifMraoyA==",
51
+ "criteria" => "A1",
52
+ "buy_limit" => "10214.87",
53
+ "buy_avg" => "268.33",
54
+ "influence" => "52",
55
+ "confidence" => "57",
56
+ "confidence_influence" => "56",
57
+ "confidence_criteria" => "59"
58
+ }
27
59
  ```
28
60
 
29
61
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: bipbop 0.2.0 ruby lib
5
+ # stub: bipbop 0.3.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bipbop"
9
- s.version = "0.2.0"
9
+ s.version = "0.3.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  ".rspec",
24
24
  ".ruby-gemset",
25
25
  ".ruby-version",
26
+ ".travis.yml",
26
27
  "Gemfile",
27
28
  "Gemfile.lock",
28
29
  "LICENSE.txt",
@@ -35,6 +36,8 @@ Gem::Specification.new do |s|
35
36
  "spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/invalid.yml",
36
37
  "spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cnpj.yml",
37
38
  "spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cpf.yml",
39
+ "spec/fixtures/vcr_cassettes/bipbop/social/valid-document-and-email.yml",
40
+ "spec/fixtures/vcr_cassettes/bipbop/social/valid-document.yml",
38
41
  "spec/spec_helper.rb",
39
42
  "spec/support/dotenv.rb",
40
43
  "spec/support/vcr.rb"
@@ -57,6 +60,8 @@ Gem::Specification.new do |s|
57
60
  s.add_development_dependency(%q<vcr>, ["= 2.9.3"])
58
61
  s.add_development_dependency(%q<webmock>, ["= 1.19.0"])
59
62
  s.add_development_dependency(%q<dotenv>, ["= 0.11.1"])
63
+ s.add_development_dependency(%q<codeclimate-test-reporter>, ["= 0.4.0"])
64
+ s.add_development_dependency(%q<coveralls>, ["= 0.7.0"])
60
65
  else
61
66
  s.add_dependency(%q<httparty>, ["= 0.13.1"])
62
67
  s.add_dependency(%q<rspec>, ["= 2.8.0"])
@@ -67,6 +72,8 @@ Gem::Specification.new do |s|
67
72
  s.add_dependency(%q<vcr>, ["= 2.9.3"])
68
73
  s.add_dependency(%q<webmock>, ["= 1.19.0"])
69
74
  s.add_dependency(%q<dotenv>, ["= 0.11.1"])
75
+ s.add_dependency(%q<codeclimate-test-reporter>, ["= 0.4.0"])
76
+ s.add_dependency(%q<coveralls>, ["= 0.7.0"])
70
77
  end
71
78
  else
72
79
  s.add_dependency(%q<httparty>, ["= 0.13.1"])
@@ -78,6 +85,8 @@ Gem::Specification.new do |s|
78
85
  s.add_dependency(%q<vcr>, ["= 2.9.3"])
79
86
  s.add_dependency(%q<webmock>, ["= 1.19.0"])
80
87
  s.add_dependency(%q<dotenv>, ["= 0.11.1"])
88
+ s.add_dependency(%q<codeclimate-test-reporter>, ["= 0.4.0"])
89
+ s.add_dependency(%q<coveralls>, ["= 0.7.0"])
81
90
  end
82
91
  end
83
92
 
@@ -4,20 +4,29 @@ class Bipbop
4
4
  include HTTParty
5
5
  base_uri 'irql.bipbop.com.br'
6
6
 
7
- attr_reader :api_key
7
+ attr_reader :api_key, :response
8
+
8
9
  def initialize(api_key = nil)
9
10
  @api_key = api_key || ENV['BIPBOP_API_KEY']
10
11
  end
11
12
 
12
13
  def cpfcnpj(document)
13
- response = request("SELECT FROM 'BIPBOPJS'.'CPFCNPJ' WHERE 'DOCUMENTO' = '#{document}'")
14
+ request("SELECT FROM 'BIPBOPJS'.'CPFCNPJ' WHERE 'DOCUMENTO' = '#{document}'")
14
15
  (response.code == 200) ? response["IRQL"]['body']['nome'] : nil
15
16
  end
16
17
 
18
+ def social(params)
19
+ conditions = []
20
+ conditions << "'DOCUMENTO' = '#{params[:document]}'" if params[:document]
21
+ conditions << "'EMAIL' = '#{params[:email]}'" if params[:email]
22
+ response = request("SELECT FROM 'SOCIAL'.'CONSULTA' WHERE #{conditions.join(" AND ")}")
23
+ (response.code == 200) ? response["IRQL"]['body'] : nil
24
+ end
25
+
17
26
  private
18
27
 
19
28
  def request(irql)
20
- self.class.get("/", query(irql))
29
+ @response = self.class.get("/", query(irql))
21
30
  end
22
31
 
23
32
  def query(irql)
@@ -1,7 +1,7 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Bipbop" do
4
- it { Bipbop.new }
4
+ let(:bipbop) { Bipbop.new(ENV['BIPBOP_API_KEY']) }
5
5
  describe 'api key' do
6
6
  context 'environment variable present' do
7
7
  before { ENV.stub(:[]).with('BIPBOP_API_KEY').and_return('env api key') }
@@ -15,15 +15,22 @@ describe "Bipbop" do
15
15
  end
16
16
  end
17
17
  describe 'cpfcnpj' do
18
- let(:bipbop) { Bipbop.new(ENV['BIPBOP_API_KEY']) }
19
18
  context 'invalid', vcr: { cassette_name: 'bipbop/cpfcnpj/invalid' } do
20
- it{ bipbop.cpfcnpj('99999999999').should be_nil }
19
+ it { bipbop.cpfcnpj('99999999999').should be_nil }
21
20
  end
22
21
  context 'valid cpf', vcr: { cassette_name: 'bipbop/cpfcnpj/valid-cpf' } do
23
- it{ bipbop.cpfcnpj('09116059751').should == 'RAFAEL DE LIMA PAULA' }
22
+ it { bipbop.cpfcnpj('09116059751').should == 'RAFAEL DE LIMA PAULA' }
24
23
  end
25
24
  context 'valid cnpj', vcr: { cassette_name: 'bipbop/cpfcnpj/valid-cnpj' } do
26
- it{ bipbop.cpfcnpj('05813794000126').should == 'BOLETO SIMPLES COBRANCAS LTDA - ME' }
25
+ it { bipbop.cpfcnpj('05813794000126').should == 'BOLETO SIMPLES COBRANCAS LTDA - ME' }
26
+ end
27
+ end
28
+ describe 'social' do
29
+ context 'document', vcr: { cassette_name: 'bipbop/social/valid-document' } do
30
+ it { bipbop.social(document: '09116059751').should == {"name"=>{"__content__"=>"RAFAEL DE LIMA PAULA", "gender"=>"male"}, "approximate_age"=>"30", "hash"=>"6CzXsZA09xMgXrHmJHUNY5X0cu7fv5yXwPGVX/i7nVE6awYftn5LpsVvdeoqbuMfBGdKIm0t1F+jrdifMraoyA==", "criteria"=>"A1", "buy_limit"=>"10214.87", "buy_avg"=>"268.33", "influence"=>"52", "confidence"=>"57", "confidence_influence"=>"56", "confidence_criteria"=>"59"} }
31
+ end
32
+ context 'document with email', vcr: { cassette_name: 'bipbop/social/valid-document-and-email' } do
33
+ it { bipbop.social(document: '09116059751', email: 'contato@rafael.adm.br').should == {"name"=>{"__content__"=>"RAFAEL DE LIMA PAULA", "gender"=>"male"}, "approximate_age"=>"30", "hash"=>"D9C1OOc/DF5kubLGgKxSDlGL3owYz9+eZx/Wz423G3U5lj+ZqfZF7fv3f2m4GNEHSkwFpEFuaX90fCB4Vug8EA==", "criteria"=>"A1", "buy_limit"=>"10214.87", "buy_avg"=>"268.33", "influence"=>"52", "confidence"=>"57", "confidence_influence"=>"56", "confidence_criteria"=>"59"} }
27
34
  end
28
35
  end
29
36
  end
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://irql.bipbop.com.br/?apiKey=BIPBOP_API_KEY&q=SELECT%20FROM%20'SOCIAL'.'CONSULTA'%20WHERE%20'DOCUMENTO'%20=%20'09116059751'%20AND%20'EMAIL'%20=%20'contato@rafael.adm.br'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Cache-Control:
16
+ - no-cache="set-cookie"
17
+ - public
18
+ Content-Type:
19
+ - text/xml
20
+ Date:
21
+ - Fri, 03 Oct 2014 03:11:09 GMT
22
+ Expires:
23
+ - Sat, 04 Oct 2014 03:11:08 GMT
24
+ Server:
25
+ - bipbop
26
+ Set-Cookie:
27
+ - AWSELB=AB014DFB0639528854AECF5F443FF4231F941D34070C60DB9436CE39A70DE73B27E54CADAE64AEB083A406D8BC20545C7EF0A812122A8B2F9155C493CB14894B2CE2B49520;PATH=/;MAX-AGE=86400
28
+ Content-Length:
29
+ - '872'
30
+ Connection:
31
+ - keep-alive
32
+ body:
33
+ encoding: ASCII-8BIT
34
+ string: !binary |-
35
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPElSUUw+
36
+ CiAgPGhlYWRlcj4KICAgIDxkZXNjcmlwdGlvbj5DbGFzc2lmaWNhw6fDo28g
37
+ RWNvbsO0bWljYSBwYXJhIGUtQ29tbWVyY2U8L2Rlc2NyaXB0aW9uPgogICAg
38
+ PGRhdGUtdGltZT4wMy8xMC8yMDE0IDAwOjExOjA4PC9kYXRlLXRpbWU+CiAg
39
+ ICA8ZXhlY3V0aW9uLXRpbWU+MTwvZXhlY3V0aW9uLXRpbWU+CiAgICA8cXVl
40
+ cnkgZGF0YWJhc2U9IlNPQ0lBTCIgdGFibGU9IkNPTlNVTFRBIj5TRUxFQ1Qg
41
+ RlJPTSAnU09DSUFMJy4nQ09OU1VMVEEnIFdIRVJFICdET0NVTUVOVE8nID0g
42
+ JzA5MTE2MDU5NzUxJyBBTkQgJ0VNQUlMJyA9ICdjb250YXRvQHJhZmFlbC5h
43
+ ZG0uYnInPC9xdWVyeT4KICA8L2hlYWRlcj4KICA8Ym9keT4KICAgIDxuYW1l
44
+ IGdlbmRlcj0ibWFsZSI+UkFGQUVMIERFIExJTUEgUEFVTEE8L25hbWU+CiAg
45
+ ICA8YXBwcm94aW1hdGUtYWdlPjMwPC9hcHByb3hpbWF0ZS1hZ2U+CiAgICA8
46
+ aGFzaD5EOUMxT09jL0RGNWt1YkxHZ0t4U0RsR0wzb3dZejkrZVp4L1d6NDIz
47
+ RzNVNWxqK1pxZlpGN2Z2M2YybTRHTkVIU2t3RnBFRnVhWDkwZkNCNFZ1ZzhF
48
+ QT09PC9oYXNoPgogICAgPGNyaXRlcmlhPkExPC9jcml0ZXJpYT4KICAgIDxi
49
+ dXktbGltaXQ+MTAyMTQuODc8L2J1eS1saW1pdD4KICAgIDxidXktYXZnPjI2
50
+ OC4zMzwvYnV5LWF2Zz4KICAgIDxpbmZsdWVuY2U+NTI8L2luZmx1ZW5jZT4K
51
+ ICAgIDxjb25maWRlbmNlPjU3PC9jb25maWRlbmNlPgogICAgPGNvbmZpZGVu
52
+ Y2UtaW5mbHVlbmNlPjU2PC9jb25maWRlbmNlLWluZmx1ZW5jZT4KICAgIDxj
53
+ b25maWRlbmNlLWNyaXRlcmlhPjU5PC9jb25maWRlbmNlLWNyaXRlcmlhPgog
54
+ IDwvYm9keT4KPC9JUlFMPgo=
55
+ http_version:
56
+ recorded_at: Fri, 03 Oct 2014 03:11:06 GMT
57
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://irql.bipbop.com.br/?apiKey=BIPBOP_API_KEY&q=SELECT%20FROM%20'SOCIAL'.'CONSULTA'%20WHERE%20'DOCUMENTO'%20=%20'09116059751'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Cache-Control:
16
+ - no-cache="set-cookie"
17
+ - public
18
+ Content-Type:
19
+ - text/xml
20
+ Date:
21
+ - Fri, 03 Oct 2014 03:11:07 GMT
22
+ Expires:
23
+ - Sat, 04 Oct 2014 03:11:06 GMT
24
+ Server:
25
+ - bipbop
26
+ Set-Cookie:
27
+ - AWSELB=AB014DFB0639528854AECF5F443FF4231F941D34070C60DB9436CE39A70DE73B27E54CADAE64AEB083A406D8BC20545C7EF0A812122A8B2F9155C493CB14894B2CE2B49520;PATH=/;MAX-AGE=86400
28
+ Content-Length:
29
+ - '835'
30
+ Connection:
31
+ - keep-alive
32
+ body:
33
+ encoding: ASCII-8BIT
34
+ string: !binary |-
35
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPElSUUw+
36
+ CiAgPGhlYWRlcj4KICAgIDxkZXNjcmlwdGlvbj5DbGFzc2lmaWNhw6fDo28g
37
+ RWNvbsO0bWljYSBwYXJhIGUtQ29tbWVyY2U8L2Rlc2NyaXB0aW9uPgogICAg
38
+ PGRhdGUtdGltZT4wMy8xMC8yMDE0IDAwOjEwOjQ5PC9kYXRlLXRpbWU+CiAg
39
+ ICA8ZXhlY3V0aW9uLXRpbWU+MTg8L2V4ZWN1dGlvbi10aW1lPgogICAgPHF1
40
+ ZXJ5IGRhdGFiYXNlPSJTT0NJQUwiIHRhYmxlPSJDT05TVUxUQSI+U0VMRUNU
41
+ IEZST00gJ1NPQ0lBTCcuJ0NPTlNVTFRBJyBXSEVSRSAnRE9DVU1FTlRPJyA9
42
+ ICcwOTExNjA1OTc1MSc8L3F1ZXJ5PgogIDwvaGVhZGVyPgogIDxib2R5Pgog
43
+ ICAgPG5hbWUgZ2VuZGVyPSJtYWxlIj5SQUZBRUwgREUgTElNQSBQQVVMQTwv
44
+ bmFtZT4KICAgIDxhcHByb3hpbWF0ZS1hZ2U+MzA8L2FwcHJveGltYXRlLWFn
45
+ ZT4KICAgIDxoYXNoPjZDelhzWkEwOXhNZ1hySG1KSFVOWTVYMGN1N2Z2NXlY
46
+ d1BHVlgvaTduVkU2YXdZZnRuNUxwc1Z2ZGVvcWJ1TWZCR2RLSW0wdDFGK2py
47
+ ZGlmTXJhb3lBPT08L2hhc2g+CiAgICA8Y3JpdGVyaWE+QTE8L2NyaXRlcmlh
48
+ PgogICAgPGJ1eS1saW1pdD4xMDIxNC44NzwvYnV5LWxpbWl0PgogICAgPGJ1
49
+ eS1hdmc+MjY4LjMzPC9idXktYXZnPgogICAgPGluZmx1ZW5jZT41MjwvaW5m
50
+ bHVlbmNlPgogICAgPGNvbmZpZGVuY2U+NTc8L2NvbmZpZGVuY2U+CiAgICA8
51
+ Y29uZmlkZW5jZS1pbmZsdWVuY2U+NTY8L2NvbmZpZGVuY2UtaW5mbHVlbmNl
52
+ PgogICAgPGNvbmZpZGVuY2UtY3JpdGVyaWE+NTk8L2NvbmZpZGVuY2UtY3Jp
53
+ dGVyaWE+CiAgPC9ib2R5Pgo8L0lSUUw+Cg==
54
+ http_version:
55
+ recorded_at: Fri, 03 Oct 2014 03:11:04 GMT
56
+ recorded_with: VCR 2.9.3
@@ -1,3 +1,9 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
4
+ require 'codeclimate-test-reporter'
5
+ CodeClimate::TestReporter.start
6
+
1
7
  require 'simplecov'
2
8
 
3
9
  module SimpleCov::Configuration
@@ -3,6 +3,7 @@ require 'vcr'
3
3
  VCR.configure do |c|
4
4
  c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
5
5
  c.allow_http_connections_when_no_cassette = false
6
+ c.ignore_hosts 'codeclimate.com'
6
7
  c.hook_into :webmock # or :fakeweb
7
8
  c.configure_rspec_metadata!
8
9
  c.filter_sensitive_data('BIPBOP_API_KEY') { ENV['BIPBOP_API_KEY'] }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bipbop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Lima
@@ -136,6 +136,34 @@ dependencies:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.11.1
139
+ - !ruby/object:Gem::Dependency
140
+ name: codeclimate-test-reporter
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '='
144
+ - !ruby/object:Gem::Version
145
+ version: 0.4.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '='
151
+ - !ruby/object:Gem::Version
152
+ version: 0.4.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: coveralls
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 0.7.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 0.7.0
139
167
  description: 'bipbop is the best service for consulting brazilian data. See http://bipbop.com.br/
140
168
  for more information. '
141
169
  email: contato@rafael.adm.br
@@ -149,6 +177,7 @@ files:
149
177
  - ".rspec"
150
178
  - ".ruby-gemset"
151
179
  - ".ruby-version"
180
+ - ".travis.yml"
152
181
  - Gemfile
153
182
  - Gemfile.lock
154
183
  - LICENSE.txt
@@ -161,6 +190,8 @@ files:
161
190
  - spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/invalid.yml
162
191
  - spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cnpj.yml
163
192
  - spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cpf.yml
193
+ - spec/fixtures/vcr_cassettes/bipbop/social/valid-document-and-email.yml
194
+ - spec/fixtures/vcr_cassettes/bipbop/social/valid-document.yml
164
195
  - spec/spec_helper.rb
165
196
  - spec/support/dotenv.rb
166
197
  - spec/support/vcr.rb