bipbop 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9143d63b27879a8dfd71732fd8da9977b3f8bac9
4
+ data.tar.gz: 4fb5662420f39b2f2c1c87a465bf3061cf6ebda4
5
+ SHA512:
6
+ metadata.gz: d5e2217f0a4f475c43ebe7d3dcf17d8570397d637bcfcf3a4c89aee65bdc6b92a2d90fcce975f9dd34e82dadf10f2d68e723d81cb3501399432cd694abc3910a
7
+ data.tar.gz: e05e324eba0334e5a330aea59a78c2e26b9c65e9dd4daf6dd7e634bfbd8aca70645222976cc0fd2e092c4a04b464a3479887c4903dace1175b72af2fd12cda08
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ bipbop
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.1.2
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ gem 'httparty', '0.13.1'
7
+
8
+ # Add dependencies to develop your gem here.
9
+ # Include everything needed to run rake, tests, features, etc.
10
+ group :development do
11
+ gem "rspec", "~> 2.8.0"
12
+ gem "rdoc", "~> 3.12"
13
+ gem "bundler", "~> 1.0"
14
+ gem "jeweler", "~> 2.0.1"
15
+ gem "simplecov", ">= 0"
16
+ gem "vcr", "2.9.3"
17
+ gem "webmock", "1.19.0"
18
+ gem "dotenv", "0.11.1"
19
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,90 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ addressable (2.3.6)
5
+ builder (3.2.2)
6
+ crack (0.4.2)
7
+ safe_yaml (~> 1.0.0)
8
+ descendants_tracker (0.0.4)
9
+ thread_safe (~> 0.3, >= 0.3.1)
10
+ diff-lcs (1.1.3)
11
+ docile (1.1.5)
12
+ dotenv (0.11.1)
13
+ dotenv-deployment (~> 0.0.2)
14
+ dotenv-deployment (0.0.2)
15
+ faraday (0.9.0)
16
+ multipart-post (>= 1.2, < 3)
17
+ git (1.2.8)
18
+ github_api (0.12.1)
19
+ addressable (~> 2.3)
20
+ descendants_tracker (~> 0.0.4)
21
+ faraday (~> 0.8, < 0.10)
22
+ hashie (>= 3.2)
23
+ multi_json (>= 1.7.5, < 2.0)
24
+ nokogiri (~> 1.6.3)
25
+ oauth2
26
+ hashie (3.3.1)
27
+ highline (1.6.21)
28
+ httparty (0.13.1)
29
+ json (~> 1.8)
30
+ multi_xml (>= 0.5.2)
31
+ jeweler (2.0.1)
32
+ builder
33
+ bundler (>= 1.0)
34
+ git (>= 1.2.5)
35
+ github_api
36
+ highline (>= 1.6.15)
37
+ nokogiri (>= 1.5.10)
38
+ rake
39
+ rdoc
40
+ json (1.8.1)
41
+ jwt (1.0.0)
42
+ mini_portile (0.6.0)
43
+ multi_json (1.10.1)
44
+ multi_xml (0.5.5)
45
+ multipart-post (2.0.0)
46
+ nokogiri (1.6.3.1)
47
+ mini_portile (= 0.6.0)
48
+ oauth2 (1.0.0)
49
+ faraday (>= 0.8, < 0.10)
50
+ jwt (~> 1.0)
51
+ multi_json (~> 1.3)
52
+ multi_xml (~> 0.5)
53
+ rack (~> 1.2)
54
+ rack (1.5.2)
55
+ rake (10.3.2)
56
+ rdoc (3.12.2)
57
+ json (~> 1.4)
58
+ rspec (2.8.0)
59
+ rspec-core (~> 2.8.0)
60
+ rspec-expectations (~> 2.8.0)
61
+ rspec-mocks (~> 2.8.0)
62
+ rspec-core (2.8.0)
63
+ rspec-expectations (2.8.0)
64
+ diff-lcs (~> 1.1.2)
65
+ rspec-mocks (2.8.0)
66
+ safe_yaml (1.0.4)
67
+ simplecov (0.9.1)
68
+ docile (~> 1.1.0)
69
+ multi_json (~> 1.0)
70
+ simplecov-html (~> 0.8.0)
71
+ simplecov-html (0.8.0)
72
+ thread_safe (0.3.4)
73
+ vcr (2.9.3)
74
+ webmock (1.19.0)
75
+ addressable (>= 2.3.6)
76
+ crack (>= 0.3.2)
77
+
78
+ PLATFORMS
79
+ ruby
80
+
81
+ DEPENDENCIES
82
+ bundler (~> 1.0)
83
+ dotenv (= 0.11.1)
84
+ httparty (= 0.13.1)
85
+ jeweler (~> 2.0.1)
86
+ rdoc (~> 3.12)
87
+ rspec (~> 2.8.0)
88
+ simplecov
89
+ vcr (= 2.9.3)
90
+ webmock (= 1.19.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2014 Rafael Lima
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # bipbop
2
+
3
+ Ruby Wrapper for [bipbop](bipbop.com.br)
4
+
5
+ ## INSTALATION
6
+
7
+ gem install bipbop
8
+
9
+ ## USAGE
10
+
11
+ ### CPF
12
+
13
+ ```ruby
14
+ 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"
18
+ ```
19
+
20
+ ### CNPJ
21
+
22
+ ```ruby
23
+ 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"
27
+ ```
28
+
29
+
30
+ ## LICENSE
31
+
32
+ bipbop is released under the MIT License.
33
+
34
+ ## AUTHOR
35
+
36
+ ### **Rafael Lima**
37
+
38
+ Working at [Boleto Simples](https://boletosimples.com.br)
39
+
40
+ Site: [http://rafael.adm.br](http://rafael.adm.br)
41
+
42
+ Github: [http://github.com/rafaelp](http://github.com/rafaelp)
43
+
44
+ Twitter: [http://twitter.com/rafaelp](http://twitter.com/rafaelp)
45
+
46
+ ### Did you like?
47
+
48
+ [Recommend me at Working With Rails](http://workingwithrails.com/recommendation/new/person/14248-rafael-lima)
data/Rakefile ADDED
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
+ gem.name = "bipbop"
18
+ gem.homepage = "http://github.com/rafaelp/bipbop-ruby"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Ruby bindings for the bipbop API}
21
+ gem.description = %Q{bipbop is the best service for consulting brazilian data. See http://bipbop.com.br/ for more information. }
22
+ gem.email = "contato@rafael.adm.br"
23
+ gem.authors = ["Rafael Lima"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ desc "Code coverage detail"
35
+ task :simplecov do
36
+ ENV['COVERAGE'] = "true"
37
+ Rake::Task['spec'].execute
38
+ end
39
+
40
+ task :default => :spec
41
+
42
+ require 'rdoc/task'
43
+ Rake::RDocTask.new do |rdoc|
44
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
+
46
+ rdoc.rdoc_dir = 'rdoc'
47
+ rdoc.title = "bipbop #{version}"
48
+ rdoc.rdoc_files.include('README*')
49
+ rdoc.rdoc_files.include('lib/**/*.rb')
50
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/bipbop.gemspec ADDED
@@ -0,0 +1,83 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: bipbop 0.1.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "bipbop"
9
+ s.version = "0.1.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
13
+ s.authors = ["Rafael Lima"]
14
+ s.date = "2014-10-03"
15
+ s.description = "bipbop is the best service for consulting brazilian data. See http://bipbop.com.br/ for more information. "
16
+ s.email = "contato@rafael.adm.br"
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".rspec",
24
+ ".ruby-gemset",
25
+ ".ruby-version",
26
+ "Gemfile",
27
+ "Gemfile.lock",
28
+ "LICENSE.txt",
29
+ "README.md",
30
+ "Rakefile",
31
+ "VERSION",
32
+ "bipbop.gemspec",
33
+ "lib/bipbop.rb",
34
+ "spec/bipbop_spec.rb",
35
+ "spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/invalid.yml",
36
+ "spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cnpj.yml",
37
+ "spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cpf.yml",
38
+ "spec/spec_helper.rb",
39
+ "spec/support/dotenv.rb",
40
+ "spec/support/vcr.rb"
41
+ ]
42
+ s.homepage = "http://github.com/rafaelp/bipbop-ruby"
43
+ s.licenses = ["MIT"]
44
+ s.rubygems_version = "2.2.2"
45
+ s.summary = "Ruby bindings for the bipbop API"
46
+
47
+ if s.respond_to? :specification_version then
48
+ s.specification_version = 4
49
+
50
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
+ s.add_runtime_dependency(%q<httparty>, ["= 0.13.1"])
52
+ s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
53
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
54
+ s.add_development_dependency(%q<bundler>, ["~> 1.0"])
55
+ s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
56
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
57
+ s.add_development_dependency(%q<vcr>, ["= 2.9.3"])
58
+ s.add_development_dependency(%q<webmock>, ["= 1.19.0"])
59
+ s.add_development_dependency(%q<dotenv>, ["= 0.11.1"])
60
+ else
61
+ s.add_dependency(%q<httparty>, ["= 0.13.1"])
62
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
63
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
66
+ s.add_dependency(%q<simplecov>, [">= 0"])
67
+ s.add_dependency(%q<vcr>, ["= 2.9.3"])
68
+ s.add_dependency(%q<webmock>, ["= 1.19.0"])
69
+ s.add_dependency(%q<dotenv>, ["= 0.11.1"])
70
+ end
71
+ else
72
+ s.add_dependency(%q<httparty>, ["= 0.13.1"])
73
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
74
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
75
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
76
+ s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
77
+ s.add_dependency(%q<simplecov>, [">= 0"])
78
+ s.add_dependency(%q<vcr>, ["= 2.9.3"])
79
+ s.add_dependency(%q<webmock>, ["= 1.19.0"])
80
+ s.add_dependency(%q<dotenv>, ["= 0.11.1"])
81
+ end
82
+ end
83
+
data/lib/bipbop.rb ADDED
@@ -0,0 +1,27 @@
1
+ require 'httparty'
2
+
3
+ class Bipbop
4
+ include HTTParty
5
+ base_uri 'irql.bipbop.com.br'
6
+
7
+ attr_reader :api_key
8
+ def initialize(api_key = nil)
9
+ @api_key = api_key
10
+ end
11
+
12
+ def cpfcnpj(document)
13
+ response = request("SELECT FROM 'BIPBOPJS'.'CPFCNPJ' WHERE 'DOCUMENTO' = '#{document}'")
14
+ (response.code == 200) ? response["IRQL"]['body']['nome'] : nil
15
+ end
16
+
17
+ private
18
+
19
+ def request(irql)
20
+ self.class.get("/", query(irql))
21
+ end
22
+
23
+ def query(irql)
24
+ { :query => {'q' => irql, 'apiKey' => @api_key}}
25
+ end
26
+
27
+ end
@@ -0,0 +1,21 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Bipbop" do
4
+ it { Bipbop.new }
5
+ describe 'api key' do
6
+ it { Bipbop.new('api key').api_key.should == 'api key' }
7
+ it { Bipbop.new.api_key.should be_nil }
8
+ end
9
+ describe 'cpfcnpj' do
10
+ let(:bipbop) { Bipbop.new(ENV['BIPBOP_API_KEY']) }
11
+ context 'invalid', vcr: { cassette_name: 'bipbop/cpfcnpj/invalid' } do
12
+ it{ bipbop.cpfcnpj('99999999999').should be_nil }
13
+ end
14
+ context 'valid cpf', vcr: { cassette_name: 'bipbop/cpfcnpj/valid-cpf' } do
15
+ it{ bipbop.cpfcnpj('09116059751').should == 'RAFAEL DE LIMA PAULA' }
16
+ end
17
+ context 'valid cnpj', vcr: { cassette_name: 'bipbop/cpfcnpj/valid-cnpj' } do
18
+ it{ bipbop.cpfcnpj('05813794000126').should == 'BOLETO SIMPLES COBRANCAS LTDA - ME' }
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://irql.bipbop.com.br/?apiKey=BIPBOP_API_KEY&q=SELECT%20FROM%20'BIPBOPJS'.'CPFCNPJ'%20WHERE%20'DOCUMENTO'%20=%20'99999999999'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 500
13
+ message: Internal Server Error
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 01:42:35 GMT
22
+ Expires:
23
+ - Sat, 03 Oct 2015 01:42:35 GMT
24
+ Server:
25
+ - bipbop
26
+ Set-Cookie:
27
+ - AWSELB=AB014DFB0639528854AECF5F443FF4231F941D340774F350D54A5846185FBE31D8DBA5572864AEB083A406D8BC20545C7EF0A812122A8B2F9155C493CB14894B2CE2B49520;PATH=/;MAX-AGE=86400
28
+ Content-Length:
29
+ - '317'
30
+ Connection:
31
+ - keep-alive
32
+ body:
33
+ encoding: ASCII-8BIT
34
+ string: !binary |-
35
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPElSUUw+
36
+ CiAgPGhlYWRlcj4KICAgIDxkZXNjcmlwdGlvbj5JbnRlcm5hbCBTZXJ2ZXIg
37
+ RXJyb3I8L2Rlc2NyaXB0aW9uPgogICAgPGRhdGUtdGltZT4wMi8xMC8yMDE0
38
+ IDIyOjQyOjM1PC9kYXRlLXRpbWU+CiAgICA8ZXhjZXB0aW9uIGNvZGU9IjAi
39
+ IHNvdXJjZT0iRXhjZXB0aW9uRGF0YWJhc2UiPk8gZG9jdW1lbnRvIGluZm9y
40
+ bWFkbyBuw6NvIMOpIHbDoWxpZG8sIHZlcmlmaXF1ZSBlIHRlbnRlIG5vdmFt
41
+ ZW50ZTwvZXhjZXB0aW9uPgogIDwvaGVhZGVyPgogIDxib2R5Lz4KPC9JUlFM
42
+ Pgo=
43
+ http_version:
44
+ recorded_at: Fri, 03 Oct 2014 01:42:32 GMT
45
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://irql.bipbop.com.br/?apiKey=BIPBOP_API_KEY&q=SELECT%20FROM%20'BIPBOPJS'.'CPFCNPJ'%20WHERE%20'DOCUMENTO'%20=%20'05813794000126'
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 01:42:35 GMT
22
+ Expires:
23
+ - Sat, 03 Oct 2015 01:42:35 GMT
24
+ Server:
25
+ - bipbop
26
+ Set-Cookie:
27
+ - AWSELB=AB014DFB0639528854AECF5F443FF4231F941D340774F350D54A5846185FBE31D8DBA5572864AEB083A406D8BC20545C7EF0A812122A8B2F9155C493CB14894B2CE2B49520;PATH=/;MAX-AGE=86400
28
+ Content-Length:
29
+ - '360'
30
+ Connection:
31
+ - keep-alive
32
+ body:
33
+ encoding: UTF-8
34
+ string: |
35
+ <?xml version="1.0" encoding="UTF-8"?>
36
+ <IRQL>
37
+ <header>
38
+ <date-time>02/10/2014 22:42:35</date-time>
39
+ <execution-time>0</execution-time>
40
+ <query database="BIPBOPJS" table="CPFCNPJ">SELECT FROM 'BIPBOPJS'.'CPFCNPJ' WHERE 'DOCUMENTO' = '05813794000126'</query>
41
+ </header>
42
+ <body>
43
+ <nome>BOLETO SIMPLES COBRANCAS LTDA - ME</nome>
44
+ </body>
45
+ </IRQL>
46
+ http_version:
47
+ recorded_at: Fri, 03 Oct 2014 01:42:33 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://irql.bipbop.com.br/?apiKey=BIPBOP_API_KEY&q=SELECT%20FROM%20'BIPBOPJS'.'CPFCNPJ'%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 01:42:35 GMT
22
+ Expires:
23
+ - Sat, 03 Oct 2015 01:42:35 GMT
24
+ Server:
25
+ - bipbop
26
+ Set-Cookie:
27
+ - AWSELB=AB014DFB0639528854AECF5F443FF4231F941D340774F350D54A5846185FBE31D8DBA5572864AEB083A406D8BC20545C7EF0A812122A8B2F9155C493CB14894B2CE2B49520;PATH=/;MAX-AGE=86400
28
+ Content-Length:
29
+ - '342'
30
+ Connection:
31
+ - keep-alive
32
+ body:
33
+ encoding: UTF-8
34
+ string: |
35
+ <?xml version="1.0" encoding="UTF-8"?>
36
+ <IRQL>
37
+ <header>
38
+ <date-time>02/10/2014 22:42:35</date-time>
39
+ <execution-time>0</execution-time>
40
+ <query database="BIPBOPJS" table="CPFCNPJ">SELECT FROM 'BIPBOPJS'.'CPFCNPJ' WHERE 'DOCUMENTO' = '09116059751'</query>
41
+ </header>
42
+ <body>
43
+ <nome>RAFAEL DE LIMA PAULA</nome>
44
+ </body>
45
+ </IRQL>
46
+ http_version:
47
+ recorded_at: Fri, 03 Oct 2014 01:42:33 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,29 @@
1
+ require 'simplecov'
2
+
3
+ module SimpleCov::Configuration
4
+ def clean_filters
5
+ @filters = []
6
+ end
7
+ end
8
+
9
+ SimpleCov.configure do
10
+ clean_filters
11
+ load_adapter 'test_frameworks'
12
+ end
13
+
14
+ ENV["COVERAGE"] && SimpleCov.start do
15
+ add_filter "/.rvm/"
16
+ end
17
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
19
+
20
+ require 'rspec'
21
+ require 'bipbop'
22
+
23
+ # Requires supporting files with custom matchers and macros, etc,
24
+ # in ./support/ and its subdirectories.
25
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
26
+
27
+ RSpec.configure do |config|
28
+
29
+ end
@@ -0,0 +1,2 @@
1
+ require 'dotenv'
2
+ Dotenv.load
@@ -0,0 +1,9 @@
1
+ require 'vcr'
2
+
3
+ VCR.configure do |c|
4
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
5
+ c.allow_http_connections_when_no_cassette = false
6
+ c.hook_into :webmock # or :fakeweb
7
+ c.configure_rspec_metadata!
8
+ c.filter_sensitive_data('BIPBOP_API_KEY') { ENV['BIPBOP_API_KEY'] }
9
+ end
metadata ADDED
@@ -0,0 +1,191 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bipbop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Rafael Lima
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.13.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.13.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.8.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.8.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jeweler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 2.0.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 2.0.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: vcr
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 2.9.3
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 2.9.3
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 1.19.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 1.19.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: dotenv
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 0.11.1
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 0.11.1
139
+ description: 'bipbop is the best service for consulting brazilian data. See http://bipbop.com.br/
140
+ for more information. '
141
+ email: contato@rafael.adm.br
142
+ executables: []
143
+ extensions: []
144
+ extra_rdoc_files:
145
+ - LICENSE.txt
146
+ - README.md
147
+ files:
148
+ - ".document"
149
+ - ".rspec"
150
+ - ".ruby-gemset"
151
+ - ".ruby-version"
152
+ - Gemfile
153
+ - Gemfile.lock
154
+ - LICENSE.txt
155
+ - README.md
156
+ - Rakefile
157
+ - VERSION
158
+ - bipbop.gemspec
159
+ - lib/bipbop.rb
160
+ - spec/bipbop_spec.rb
161
+ - spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/invalid.yml
162
+ - spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cnpj.yml
163
+ - spec/fixtures/vcr_cassettes/bipbop/cpfcnpj/valid-cpf.yml
164
+ - spec/spec_helper.rb
165
+ - spec/support/dotenv.rb
166
+ - spec/support/vcr.rb
167
+ homepage: http://github.com/rafaelp/bipbop-ruby
168
+ licenses:
169
+ - MIT
170
+ metadata: {}
171
+ post_install_message:
172
+ rdoc_options: []
173
+ require_paths:
174
+ - lib
175
+ required_ruby_version: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ required_rubygems_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ requirements: []
186
+ rubyforge_project:
187
+ rubygems_version: 2.2.2
188
+ signing_key:
189
+ specification_version: 4
190
+ summary: Ruby bindings for the bipbop API
191
+ test_files: []