boletoman 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a62aa93b0f790679bb266c6ccbdefd77f0d3d78c
4
- data.tar.gz: fccacda66c32b14badadcdd50c276a754e4a581b
3
+ metadata.gz: 4c4d807fb70182bb6cb5360928a83330f75cc65e
4
+ data.tar.gz: 06d89aa8f0e35a238d5ade257068ace2bbc2f122
5
5
  SHA512:
6
- metadata.gz: 61980fad534000a2b554f19dac4a3679d7e4d9cceab7623ea62e4c4aa30616ef1083e1c9eef41dc98b64ed3c06b89920fc57d6fb6203f5d2f795cf9e4f0038b1
7
- data.tar.gz: d6f32fa23b48bfcedbd5cf28258897898c9e49d8fc219f6e394a3c75dbbe6c4cd13855b91d10bad24fb107d35599313982ddf1a1fba2afda8d5d89ef3af188f3
6
+ metadata.gz: 932ad28f2e3002b3be0e616969779daf924368a3a8a7ec095f20afd11468c6310718adb5b5060ea090956f496138424e0fa13e4cf83e1f39628f3e45bbc72f40
7
+ data.tar.gz: f5551431912be623c1f41de819e8b30311c7b378e3038106b6c15ab5cbf8d5417b50a3a76df5426be07c5e02297439c6cb861d04147edd27c512cb3a5dbfdb75
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.0.3 (03/09/2018)
2
+
3
+ * Adiciona opção `verbose` que permite logar xmls do savon
4
+ * Corrige formatação quando os campos `interest_percentage` e `penalty_percentage` não são passados para o gerador do Santander
5
+
1
6
  ### 0.0.2 (03/09/2018)
2
7
 
3
8
  * Adiciona suporte ao banco Santander
data/README.md CHANGED
@@ -41,6 +41,7 @@ Configure o acesso, se estiver no Rails, pode ser colocado em `config/initialize
41
41
  Boletoman.configure do |config|
42
42
  config.env = :production # qualquer outro symbol será considerado ambiente de desenvolvimento
43
43
  config.redis = $redis # opcional: instancia do redis para cachear o token
44
+ config.verbose = true # default é false
44
45
 
45
46
  config.itau = Boletoman::Itau.configure do |itau_config|
46
47
  itau_config.client_id = 'kl3j2423'
data/boletoman.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Glauco Custódio"]
10
10
  spec.email = ["glauco.custodio@gmail.com"]
11
11
 
12
- spec.summary = %q{Gema responsável por gerar boletos em pdf para bancos brasileiros que requerem chamada a serviços web para obter o código de barras previamente.}
13
- spec.description = %q{Gema responsável por gerar boletos em pdf para bancos brasileiros que requerem chamada a serviços web para obter o código de barras previamente.}
12
+ spec.summary = %q{Gerador de boletos registrados.}
13
+ spec.description = %q{Gerador de boletos registrados.}
14
14
  spec.homepage = "https://github.com/glaucocustodio/boletoman"
15
15
  spec.license = "MIT"
16
16
 
@@ -33,5 +33,5 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency 'faraday'
34
34
  spec.add_dependency 'activesupport'
35
35
  spec.add_dependency 'bbrcobranca'
36
- spec.add_dependency 'savon'
36
+ spec.add_dependency 'savon', '~> 2'
37
37
  end
@@ -12,10 +12,11 @@ module Boletoman
12
12
  end
13
13
 
14
14
  class Configuration
15
- attr_accessor :env, :redis, :itau, :santander
15
+ attr_accessor :env, :verbose, :redis, :itau, :santander
16
16
 
17
17
  def initialize
18
18
  @env = :dev
19
+ @verbose = false
19
20
  end
20
21
 
21
22
  def production_env?
@@ -56,7 +56,7 @@ module Boletoman
56
56
  end
57
57
 
58
58
  def penalty_percentage
59
- as_int(raw[:boleto][:penalty_percentage]) || '00'
59
+ raw[:boleto][:penalty_percentage] ? as_int(raw[:boleto][:penalty_percentage]) : '00'
60
60
  end
61
61
 
62
62
  def penalty_days
@@ -64,7 +64,7 @@ module Boletoman
64
64
  end
65
65
 
66
66
  def interest_percentage
67
- as_int(raw[:boleto][:interest_percentage]) || '00'
67
+ raw[:boleto][:interest_percentage] ? as_int(raw[:boleto][:interest_percentage]) : '00'
68
68
  end
69
69
 
70
70
  def full_nosso_numero
@@ -31,11 +31,11 @@ module Boletoman
31
31
  end
32
32
 
33
33
  def config_options
34
- wsdl_config.merge(extra_config_options)
34
+ basic_config.merge(extra_config_options)
35
35
  end
36
36
 
37
- def wsdl_config
38
- { wsdl: wsdl }
37
+ def basic_config
38
+ { wsdl: wsdl, log: ::Boletoman.configuration.verbose }
39
39
  end
40
40
 
41
41
  def extra_config_options
@@ -1,3 +1,3 @@
1
1
  module Boletoman
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boletoman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glauco Custódio
@@ -168,18 +168,17 @@ dependencies:
168
168
  name: savon
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '2'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
181
- description: Gema responsável por gerar boletos em pdf para bancos brasileiros que
182
- requerem chamada a serviços web para obter o código de barras previamente.
180
+ version: '2'
181
+ description: Gerador de boletos registrados.
183
182
  email:
184
183
  - glauco.custodio@gmail.com
185
184
  executables: []
@@ -250,6 +249,5 @@ rubyforge_project:
250
249
  rubygems_version: 2.6.11
251
250
  signing_key:
252
251
  specification_version: 4
253
- summary: Gema responsável por gerar boletos em pdf para bancos brasileiros que requerem
254
- chamada a serviços web para obter o código de barras previamente.
252
+ summary: Gerador de boletos registrados.
255
253
  test_files: []