bipbop 0.1.0 → 0.2.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: 9143d63b27879a8dfd71732fd8da9977b3f8bac9
4
- data.tar.gz: 4fb5662420f39b2f2c1c87a465bf3061cf6ebda4
3
+ metadata.gz: b26ea4a480ec871317bf328bed611219261c5474
4
+ data.tar.gz: b529a492672e6afd79a18a74821004315a9cb645
5
5
  SHA512:
6
- metadata.gz: d5e2217f0a4f475c43ebe7d3dcf17d8570397d637bcfcf3a4c89aee65bdc6b92a2d90fcce975f9dd34e82dadf10f2d68e723d81cb3501399432cd694abc3910a
7
- data.tar.gz: e05e324eba0334e5a330aea59a78c2e26b9c65e9dd4daf6dd7e634bfbd8aca70645222976cc0fd2e092c4a04b464a3479887c4903dace1175b72af2fd12cda08
6
+ metadata.gz: dd606d0c79ba4e7ac0d2553a1e1faf5e3d61e298b62cc8b7eae6ca3335bcbd0f302fd1c4669ce7b85724aeb047233ff80ed16504726e22fabc0603f506a8b8fd
7
+ data.tar.gz: 66d8ff474b4f5178461d7c801fcd5f6a5ff7b2a92489a37b644b4ddab0a408a7e0ccd198321ead4c61e8da722fc3680e1c8399d57371549208fa3ae986158a15
data/Gemfile CHANGED
@@ -8,11 +8,11 @@ gem 'httparty', '0.13.1'
8
8
  # Add dependencies to develop your gem here.
9
9
  # Include everything needed to run rake, tests, features, etc.
10
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"
11
+ gem "rspec", "2.8.0"
12
+ gem "rdoc", "3.12.2"
13
+ gem "bundler", "1.6.2"
14
+ gem "jeweler", "2.0.1"
15
+ gem "simplecov", "0.9.1"
16
16
  gem "vcr", "2.9.3"
17
17
  gem "webmock", "1.19.0"
18
18
  gem "dotenv", "0.11.1"
@@ -79,12 +79,12 @@ PLATFORMS
79
79
  ruby
80
80
 
81
81
  DEPENDENCIES
82
- bundler (~> 1.0)
82
+ bundler (= 1.6.2)
83
83
  dotenv (= 0.11.1)
84
84
  httparty (= 0.13.1)
85
- jeweler (~> 2.0.1)
86
- rdoc (~> 3.12)
87
- rspec (~> 2.8.0)
88
- simplecov
85
+ jeweler (= 2.0.1)
86
+ rdoc (= 3.12.2)
87
+ rspec (= 2.8.0)
88
+ simplecov (= 0.9.1)
89
89
  vcr (= 2.9.3)
90
90
  webmock (= 1.19.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.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.1.0 ruby lib
5
+ # stub: bipbop 0.2.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bipbop"
9
- s.version = "0.1.0"
9
+ s.version = "0.2.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"]
@@ -49,32 +49,32 @@ Gem::Specification.new do |s|
49
49
 
50
50
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
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"])
52
+ s.add_development_dependency(%q<rspec>, ["= 2.8.0"])
53
+ s.add_development_dependency(%q<rdoc>, ["= 3.12.2"])
54
+ s.add_development_dependency(%q<bundler>, ["= 1.6.2"])
55
+ s.add_development_dependency(%q<jeweler>, ["= 2.0.1"])
56
+ s.add_development_dependency(%q<simplecov>, ["= 0.9.1"])
57
57
  s.add_development_dependency(%q<vcr>, ["= 2.9.3"])
58
58
  s.add_development_dependency(%q<webmock>, ["= 1.19.0"])
59
59
  s.add_development_dependency(%q<dotenv>, ["= 0.11.1"])
60
60
  else
61
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"])
62
+ s.add_dependency(%q<rspec>, ["= 2.8.0"])
63
+ s.add_dependency(%q<rdoc>, ["= 3.12.2"])
64
+ s.add_dependency(%q<bundler>, ["= 1.6.2"])
65
+ s.add_dependency(%q<jeweler>, ["= 2.0.1"])
66
+ s.add_dependency(%q<simplecov>, ["= 0.9.1"])
67
67
  s.add_dependency(%q<vcr>, ["= 2.9.3"])
68
68
  s.add_dependency(%q<webmock>, ["= 1.19.0"])
69
69
  s.add_dependency(%q<dotenv>, ["= 0.11.1"])
70
70
  end
71
71
  else
72
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"])
73
+ s.add_dependency(%q<rspec>, ["= 2.8.0"])
74
+ s.add_dependency(%q<rdoc>, ["= 3.12.2"])
75
+ s.add_dependency(%q<bundler>, ["= 1.6.2"])
76
+ s.add_dependency(%q<jeweler>, ["= 2.0.1"])
77
+ s.add_dependency(%q<simplecov>, ["= 0.9.1"])
78
78
  s.add_dependency(%q<vcr>, ["= 2.9.3"])
79
79
  s.add_dependency(%q<webmock>, ["= 1.19.0"])
80
80
  s.add_dependency(%q<dotenv>, ["= 0.11.1"])
@@ -6,7 +6,7 @@ class Bipbop
6
6
 
7
7
  attr_reader :api_key
8
8
  def initialize(api_key = nil)
9
- @api_key = api_key
9
+ @api_key = api_key || ENV['BIPBOP_API_KEY']
10
10
  end
11
11
 
12
12
  def cpfcnpj(document)
@@ -3,8 +3,16 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
  describe "Bipbop" do
4
4
  it { Bipbop.new }
5
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 }
6
+ context 'environment variable present' do
7
+ before { ENV.stub(:[]).with('BIPBOP_API_KEY').and_return('env api key') }
8
+ it { Bipbop.new('api key').api_key.should == 'api key' }
9
+ it { Bipbop.new.api_key.should == 'env api key' }
10
+ end
11
+ context 'no environment variable' do
12
+ before { ENV.stub(:[]).with('BIPBOP_API_KEY').and_return(nil) }
13
+ it { Bipbop.new('api key').api_key.should == 'api key' }
14
+ it { Bipbop.new.api_key.should be_nil }
15
+ end
8
16
  end
9
17
  describe 'cpfcnpj' do
10
18
  let(:bipbop) { Bipbop.new(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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Lima
@@ -28,72 +28,72 @@ dependencies:
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.8.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: '3.12'
47
+ version: 3.12.2
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: '3.12'
54
+ version: 3.12.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
61
+ version: 1.6.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: 1.6.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - '='
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - '='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.0.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.9.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 0.9.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: vcr
99
99
  requirement: !ruby/object:Gem::Requirement