cobregratis 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +18 -18
- data/cobregratis.gemspec +2 -2
- data/examples/example.rb +10 -10
- data/lib/cobregratis/base.rb +2 -1
- data/lib/cobregratis/customer.rb +4 -0
- data/lib/cobregratis/version.rb +1 -1
- data/lib/cobregratis.rb +2 -1
- data/spec/cobregratis/customer_spec.rb +12 -0
- metadata +20 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0d6622e24bc92652f9b597b2a6e87c50878b6fc
|
4
|
+
data.tar.gz: 3c69ebd7debcaa43eb6b791c3402da2ba1629021
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6b4f6cd02a5314a35f97d99a02feed40a612ce95e77422aad28eec329e95752ca7c0cf501121244b7b5523318fa4671398baea2d2f9768ee433a3153cbc4c18
|
7
|
+
data.tar.gz: a6b4736d705914040a212f5de1e5a7399475c93e06a47da848eb89cb301d0331fa4c69cbff4fe72a44e2d6277f62cda6fde8d2e01519f5920d76fdf22f31b536
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.0.0-p451
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,36 +1,36 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cobregratis (0.4.
|
4
|
+
cobregratis (0.4.1)
|
5
5
|
activeresource (~> 4.0)
|
6
6
|
activesupport (~> 4.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (4.
|
12
|
-
activesupport (= 4.
|
13
|
-
builder (~> 3.1
|
11
|
+
activemodel (4.1.1)
|
12
|
+
activesupport (= 4.1.1)
|
13
|
+
builder (~> 3.1)
|
14
14
|
activeresource (4.0.0)
|
15
15
|
activemodel (~> 4.0)
|
16
16
|
activesupport (~> 4.0)
|
17
17
|
rails-observers (~> 0.1.1)
|
18
|
-
activesupport (4.
|
19
|
-
i18n (~> 0.6, >= 0.6.
|
20
|
-
|
21
|
-
|
18
|
+
activesupport (4.1.1)
|
19
|
+
i18n (~> 0.6, >= 0.6.9)
|
20
|
+
json (~> 1.7, >= 1.7.7)
|
21
|
+
minitest (~> 5.1)
|
22
22
|
thread_safe (~> 0.1)
|
23
|
-
tzinfo (~>
|
24
|
-
|
25
|
-
builder (3.1.4)
|
23
|
+
tzinfo (~> 1.1)
|
24
|
+
builder (3.2.2)
|
26
25
|
diff-lcs (1.2.5)
|
27
26
|
docile (1.1.2)
|
28
27
|
i18n (0.6.9)
|
29
|
-
|
28
|
+
json (1.8.1)
|
29
|
+
minitest (5.3.4)
|
30
30
|
multi_json (1.8.4)
|
31
31
|
rails-observers (0.1.2)
|
32
32
|
activemodel (~> 4.0)
|
33
|
-
rake (10.
|
33
|
+
rake (10.3.2)
|
34
34
|
rspec (2.14.1)
|
35
35
|
rspec-core (~> 2.14.0)
|
36
36
|
rspec-expectations (~> 2.14.0)
|
@@ -44,16 +44,16 @@ GEM
|
|
44
44
|
multi_json
|
45
45
|
simplecov-html (~> 0.8.0)
|
46
46
|
simplecov-html (0.8.0)
|
47
|
-
thread_safe (0.
|
48
|
-
|
49
|
-
|
47
|
+
thread_safe (0.3.3)
|
48
|
+
tzinfo (1.1.0)
|
49
|
+
thread_safe (~> 0.1)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
53
53
|
|
54
54
|
DEPENDENCIES
|
55
|
-
bundler (= 1.5.
|
55
|
+
bundler (= 1.5.3)
|
56
56
|
cobregratis!
|
57
|
-
rake (= 10.
|
57
|
+
rake (= 10.3.2)
|
58
58
|
rspec (= 2.14.1)
|
59
59
|
simplecov (= 0.8.2)
|
data/cobregratis.gemspec
CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_runtime_dependency 'activeresource', "~> 4.0"
|
23
23
|
spec.add_runtime_dependency 'activesupport', "~> 4.0"
|
24
|
-
spec.add_development_dependency "rake", "10.
|
24
|
+
spec.add_development_dependency "rake", "10.3.2"
|
25
25
|
spec.add_development_dependency 'rspec', "2.14.1"
|
26
|
-
spec.add_development_dependency 'bundler', "1.5.
|
26
|
+
spec.add_development_dependency 'bundler', "1.5.3"
|
27
27
|
spec.add_development_dependency 'simplecov', "0.8.2"
|
28
28
|
end
|
29
29
|
|
data/examples/example.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
$: << File.expand_path('../../lib', __FILE__)
|
2
|
+
require 'cobregratis'
|
2
3
|
require 'pp'
|
3
4
|
|
4
5
|
Cobregratis::Base.site = 'https://app.cobregratis.com.br'
|
5
|
-
Cobregratis::Base.user = '
|
6
|
+
Cobregratis::Base.user = 'token-do-usuario'
|
6
7
|
Cobregratis::Base.password = 'X'
|
7
8
|
|
8
9
|
@bank_billet = Cobregratis::BankBillet.create({
|
@@ -11,14 +12,13 @@ Cobregratis::Base.password = 'X'
|
|
11
12
|
:name => 'Rafael Lima',
|
12
13
|
})
|
13
14
|
|
14
|
-
|
15
|
-
@billets = Cobregratis::BankBillet.find(:all)
|
15
|
+
@bank_billets = Cobregratis::BankBillet.find(:all)
|
16
16
|
|
17
|
-
@
|
18
|
-
puts "Nosso Número: #{
|
19
|
-
puts "Vencimento: #{
|
20
|
-
puts "Valor: #{
|
21
|
-
puts "Sacado: #{
|
22
|
-
puts "URL: #{
|
17
|
+
@bank_billets.each do |bank_billet|
|
18
|
+
puts "Nosso Número: #{bank_billet.our_number}\n";
|
19
|
+
puts "Vencimento: #{bank_billet.expire_at}\n";
|
20
|
+
puts "Valor: #{bank_billet.amount}\n";
|
21
|
+
puts "Sacado: #{bank_billet.name}\n";
|
22
|
+
puts "URL: #{bank_billet.external_link}\n";
|
23
23
|
puts "=================================\n";
|
24
24
|
end
|
data/lib/cobregratis/base.rb
CHANGED
data/lib/cobregratis/version.rb
CHANGED
data/lib/cobregratis.rb
CHANGED
@@ -5,9 +5,10 @@ module Cobregratis
|
|
5
5
|
require 'cobregratis/base'
|
6
6
|
require 'cobregratis/bank_billet_account'
|
7
7
|
require 'cobregratis/bank_billet'
|
8
|
+
require 'cobregratis/customer'
|
8
9
|
require 'cobregratis/service'
|
9
10
|
end
|
10
11
|
|
11
12
|
def gem_path
|
12
|
-
Gem::Specification.find_by_name('
|
13
|
+
Gem::Specification.find_by_name('cobregratis').full_gem_path
|
13
14
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe Cobregratis::Customer do
|
4
|
+
before(:each) do
|
5
|
+
@customer = Cobregratis::Customer.new
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should be instance of Cobregratis::Base" do
|
9
|
+
@customer.kind_of?(Cobregratis::Base).should be_true
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobregratis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafael Lima
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: activeresource
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
34
|
type: :runtime
|
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: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 10.
|
47
|
+
version: 10.3.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: 10.
|
54
|
+
version: 10.3.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.5.
|
75
|
+
version: 1.5.3
|
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
|
-
version: 1.5.
|
82
|
+
version: 1.5.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,11 +100,11 @@ executables: []
|
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
|
-
-
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
107
|
-
-
|
103
|
+
- .bundle/config
|
104
|
+
- .document
|
105
|
+
- .gitignore
|
106
|
+
- .ruby-gemset
|
107
|
+
- .ruby-version
|
108
108
|
- Gemfile
|
109
109
|
- Gemfile.lock
|
110
110
|
- LICENSE
|
@@ -119,11 +119,13 @@ files:
|
|
119
119
|
- lib/cobregratis/bank_billet.rb
|
120
120
|
- lib/cobregratis/bank_billet_account.rb
|
121
121
|
- lib/cobregratis/base.rb
|
122
|
+
- lib/cobregratis/customer.rb
|
122
123
|
- lib/cobregratis/service.rb
|
123
124
|
- lib/cobregratis/version.rb
|
124
125
|
- spec/cobregratis/bank_billet_account_spec.rb
|
125
126
|
- spec/cobregratis/bank_billet_spec.rb
|
126
127
|
- spec/cobregratis/base_spec.rb
|
128
|
+
- spec/cobregratis/customer_spec.rb
|
127
129
|
- spec/cobregratis/service_spec.rb
|
128
130
|
- spec/spec.opts
|
129
131
|
- spec/spec_helper.rb
|
@@ -137,17 +139,17 @@ require_paths:
|
|
137
139
|
- lib
|
138
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
139
141
|
requirements:
|
140
|
-
- -
|
142
|
+
- - '>='
|
141
143
|
- !ruby/object:Gem::Version
|
142
144
|
version: '0'
|
143
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
146
|
requirements:
|
145
|
-
- -
|
147
|
+
- - '>='
|
146
148
|
- !ruby/object:Gem::Version
|
147
149
|
version: '0'
|
148
150
|
requirements: []
|
149
151
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.2.
|
152
|
+
rubygems_version: 2.2.2
|
151
153
|
signing_key:
|
152
154
|
specification_version: 4
|
153
155
|
summary: Ruby Wrapper around Cobre Grátis API
|
@@ -155,6 +157,7 @@ test_files:
|
|
155
157
|
- spec/cobregratis/bank_billet_account_spec.rb
|
156
158
|
- spec/cobregratis/bank_billet_spec.rb
|
157
159
|
- spec/cobregratis/base_spec.rb
|
160
|
+
- spec/cobregratis/customer_spec.rb
|
158
161
|
- spec/cobregratis/service_spec.rb
|
159
162
|
- spec/spec.opts
|
160
163
|
- spec/spec_helper.rb
|