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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe05cbbbe59c6dd0c7b4c9278ea403d438a3d0c2
4
- data.tar.gz: a3216e1f8be91800714f9c87c15b8cfdfb722ca2
3
+ metadata.gz: e0d6622e24bc92652f9b597b2a6e87c50878b6fc
4
+ data.tar.gz: 3c69ebd7debcaa43eb6b791c3402da2ba1629021
5
5
  SHA512:
6
- metadata.gz: e22cea9249d2fa2a8394be62eeff6bb8db2f468795da1ff183c230edee49507ce4c5de15506dbe2462d87b4005fa251d98d7e9d818402e1ef113964e1616f43a
7
- data.tar.gz: e61fb6fbe5ee0a9adf2d4ca4c2377002b551fc7bd35f742846ed3bee4d852808cc7e1cca24e1693907e9bdf4bc9a8493c450c0f474bda6047bfb890a289ccd89
6
+ metadata.gz: b6b4f6cd02a5314a35f97d99a02feed40a612ce95e77422aad28eec329e95752ca7c0cf501121244b7b5523318fa4671398baea2d2f9768ee433a3153cbc4c18
7
+ data.tar.gz: a6b4736d705914040a212f5de1e5a7399475c93e06a47da848eb89cb301d0331fa4c69cbff4fe72a44e2d6277f62cda6fde8d2e01519f5920d76fdf22f31b536
data/.gitignore CHANGED
@@ -17,3 +17,5 @@ tmtags
17
17
  coverage
18
18
  rdoc
19
19
  pkg
20
+
21
+ .idea
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.0.0-p451
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.1.0'
2
+ ruby '2.0.0'
3
3
 
4
4
  # Specify your gem's dependencies in cobregratis.gemspec
5
5
  gemspec
data/Gemfile.lock CHANGED
@@ -1,36 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cobregratis (0.4.0)
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.0.2)
12
- activesupport (= 4.0.2)
13
- builder (~> 3.1.0)
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.0.2)
19
- i18n (~> 0.6, >= 0.6.4)
20
- minitest (~> 4.2)
21
- multi_json (~> 1.3)
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 (~> 0.3.37)
24
- atomic (1.1.14)
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
- minitest (4.7.5)
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.1.1)
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.1.3)
48
- atomic
49
- tzinfo (0.3.38)
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.2)
55
+ bundler (= 1.5.3)
56
56
  cobregratis!
57
- rake (= 10.1.1)
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.1.1"
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.2"
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
- require 'lib/cobregratis'
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 = 'ddxm00pJnGhrYJhyypUgpwqkbvKMASEznqRM2MANv6nqz08APfWxdurtUJoz'
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
- sleep(1)
15
- @billets = Cobregratis::BankBillet.find(:all)
15
+ @bank_billets = Cobregratis::BankBillet.find(:all)
16
16
 
17
- @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";
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
@@ -1,5 +1,6 @@
1
1
  module Cobregratis
2
2
  class Base < ActiveResource::Base
3
- self.site = "https://app.cobregratis.com.br"
3
+ self.site = 'https://app.cobregratis.com.br'
4
+ self.include_root_in_json = true
4
5
  end
5
6
  end
@@ -0,0 +1,4 @@
1
+ module Cobregratis
2
+ class Customer < Base
3
+ end
4
+ end
@@ -1,3 +1,3 @@
1
1
  module Cobregratis
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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('jumpup-heroku').full_gem_path
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.0
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.1.1
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.1.1
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.2
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.2
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
- - ".bundle/config"
104
- - ".document"
105
- - ".gitignore"
106
- - ".ruby-gemset"
107
- - ".ruby-version"
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.0.rc.1
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