br_boleto 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Gemfile +0 -0
- data/Gemfile.lock +2 -2
- data/History.txt +0 -0
- data/LICENSE +0 -0
- data/Rakefile +0 -0
- data/br_boleto.gemspec +1 -1
- data/lib/br_boleto/active_model_base.rb +0 -0
- data/lib/br_boleto/association/have_pagamentos.rb +0 -0
- data/lib/br_boleto/boleto/sicoob.rb +0 -0
- data/lib/br_boleto/calculos/digitos.rb +0 -0
- data/lib/br_boleto/calculos/fator_vencimento.rb +0 -0
- data/lib/br_boleto/calculos/fatores_de_multiplicacao.rb +0 -0
- data/lib/br_boleto/calculos/linha_digitavel.rb +0 -0
- data/lib/br_boleto/calculos/modulo10.rb +0 -0
- data/lib/br_boleto/calculos/modulo11.rb +0 -0
- data/lib/br_boleto/calculos/modulo11_fator3197.rb +0 -0
- data/lib/br_boleto/calculos/modulo11_fator_de2a7.rb +0 -0
- data/lib/br_boleto/calculos/modulo11_fator_de2a9.rb +0 -0
- data/lib/br_boleto/calculos/modulo11_fator_de2a9_resto_zero.rb +0 -0
- data/lib/br_boleto/calculos/modulo11_fator_de9a2.rb +0 -0
- data/lib/br_boleto/calculos/modulo11_fator_de9a2_resto_x.rb +0 -0
- data/lib/br_boleto/calculos/modulo_numero_de_controle.rb +0 -0
- data/lib/br_boleto/helper/cpf_cnpj.rb +0 -0
- data/lib/br_boleto/helper/format_value.rb +0 -0
- data/lib/br_boleto/helper/number.rb +0 -0
- data/lib/br_boleto/remessa/cnab240/helper/header_arquivo.rb +0 -0
- data/lib/br_boleto/remessa/cnab240/helper/header_lote.rb +0 -0
- data/lib/br_boleto/remessa/cnab240/helper/trailer_arquivo.rb +0 -0
- data/lib/br_boleto/remessa/cnab240/helper/trailer_lote.rb +0 -0
- data/lib/br_boleto/remessa/cnab400/helper/header.rb +0 -0
- data/lib/br_boleto/remessa/cnab400/helper/trailer.rb +0 -0
- data/lib/br_boleto/remessa/lote.rb +0 -0
- data/lib/br_boleto/remessa/pagamento.rb +6 -1
- data/lib/br_boleto/string_methods.rb +0 -0
- data/lib/br_boleto/validations.rb +0 -0
- data/lib/br_boleto/version.rb +1 -1
- data/test/br_boleto/association/have_conta_test.rb +0 -0
- data/test/br_boleto/association/have_pagamentos_test.rb +0 -0
- data/test/br_boleto/boleto/sicoob_test.rb +0 -0
- data/test/br_boleto/calculos/digitos_test.rb +0 -0
- data/test/br_boleto/calculos/fator_vencimento_test.rb +0 -0
- data/test/br_boleto/calculos/fatores_de_multiplicacao_test.rb +0 -0
- data/test/br_boleto/calculos/linha_digitavel_test.rb +0 -0
- data/test/br_boleto/calculos/modulo10_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_fator3197_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_fator_de2a7_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_fator_de2a9_resto_zero_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_fator_de2a9_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_fator_de9a2_resto_x_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_fator_de9a2_test.rb +0 -0
- data/test/br_boleto/calculos/modulo11_test.rb +0 -0
- data/test/br_boleto/calculos/modulo_numero_de_controle_test.rb +0 -0
- data/test/br_boleto/helper/number_test.rb +0 -0
- data/test/br_boleto/remessa/base_test.rb +0 -0
- data/test/br_boleto/remessa/cnab240/helper/header_arquivo_test.rb +0 -0
- data/test/br_boleto/remessa/cnab240/helper/header_lote_test.rb +0 -0
- data/test/br_boleto/remessa/cnab240/helper/trailer_arquivo_test.rb +0 -0
- data/test/br_boleto/remessa/cnab240/helper/trailer_lote_test.rb +0 -0
- data/test/br_boleto/remessa/lote_test.rb +0 -0
- data/test/br_boleto/remessa/pagamento_test.rb +10 -3
- data/test/br_boleto/retorno/base_test.rb +0 -0
- data/test/factories/boleto/base.rb +0 -0
- data/test/factories/boleto/boleto_caixa.rb +0 -0
- data/test/factories/boleto/boleto_sicoob.rb +0 -0
- data/test/factories/conta/base.rb +0 -0
- data/test/factories/pagador.rb +0 -0
- data/test/factories/remessa/base.rb +0 -0
- data/test/factories/remessa/cnab240/base.rb +0 -0
- data/test/factories/remessa/cnab240/caixa.rb +0 -0
- data/test/factories/remessa/cnab240/sicoob.rb +0 -0
- data/test/factories/remessa/cnab400/base.rb +0 -0
- data/test/factories/remessa/cnab400/sicoob.rb +0 -0
- data/test/factories/remessa/lote.rb +0 -0
- data/test/factories/retorno/pagamento.rb +0 -0
- data/test/fixtures/retorno/cnab240/caixa.ret +0 -0
- data/test/fixtures/retorno/cnab240/padrao240.ret +0 -0
- data/test/fixtures/retorno/cnab400/sicoob.ret +0 -0
- data/test/inheritance/boleto_test.rb +0 -0
- data/test/inheritance/sicoob_test.rb +0 -0
- data/test/test_helper.rb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 821f1c29e52c955ce6bd1b053f7d775a190e79e3
|
4
|
+
data.tar.gz: 37fa7feec7becf3ff2dd10117c0c63f8cc62d814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5256bb0859e09c6bddca1482268eafc410f591e28a2be4902f893f3af62255556febefe844e1aad8ca3b9e7d5d6a2de912cab575e55bb1fb5c495abdfb787b9
|
7
|
+
data.tar.gz: 30db9fe04f7603a67cd9ef7cb113eac391793fe75b10efdb7fe318b59307d3bd26e194c20b1b6613362d5323ad87916a72b1aaddf49f0a816d452bc7ccc9c7a4
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
data/History.txt
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/br_boleto.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.homepage = "https://github.com/Brunomm/br_boleto"
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split("\n").reject{|fil|
|
16
|
-
fil.include?('documentacoes_boletos/')
|
16
|
+
fil.include?('documentacoes_boletos/') || fil.include?('gemfiles/')
|
17
17
|
}
|
18
18
|
gem.test_files = `git ls-files -- test`.split("\n")
|
19
19
|
# gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -307,8 +307,13 @@ module BrBoleto
|
|
307
307
|
@parcela
|
308
308
|
end
|
309
309
|
|
310
|
+
# Nosso número deve retornar apenas letras e números
|
311
|
+
# Ex: self.nosso_numero = '0100245-P'
|
312
|
+
# self.nosso_numero
|
313
|
+
# ~> '0100245P'
|
314
|
+
#
|
310
315
|
def nosso_numero
|
311
|
-
"#{@nosso_numero}".
|
316
|
+
"#{@nosso_numero}".remove(/[^\d\w]/i)
|
312
317
|
end
|
313
318
|
|
314
319
|
validates :nosso_numero, :data_vencimento, :valor_documento, presence: true
|
File without changes
|
File without changes
|
data/lib/br_boleto/version.rb
CHANGED
@@ -2,7 +2,7 @@ module BrBoleto
|
|
2
2
|
module Version
|
3
3
|
MAJOR = 2 #inclui alterações de API e pode quebrar compatibilidade com versões anteriores
|
4
4
|
MINOR = 2 #inclui novas funcionalidades, sem quebrar APIs existentes
|
5
|
-
PATCH =
|
5
|
+
PATCH = 5 #corrige bugs ou traz melhorias em implementações já existentes
|
6
6
|
CURRENT = "#{MAJOR}.#{MINOR}.#{PATCH}"
|
7
7
|
end
|
8
8
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -184,11 +184,18 @@ describe BrBoleto::Remessa::Pagamento do
|
|
184
184
|
subject.parcela.must_equal '1'
|
185
185
|
end
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
187
|
+
describe '#nosso_numero' do
|
188
|
+
it "deve retornar apenas numeros e letras" do
|
189
|
+
subject.nosso_numero = 'A1!@#$%*()-234vc.,;-56789o0'
|
190
|
+
subject.nosso_numero.must_equal 'A1234vc56789o0'
|
191
|
+
end
|
192
|
+
it "deve retornar corretamente o nosso_numero quando o DV é uma letra" do
|
193
|
+
subject.nosso_numero = '001240002-P'
|
194
|
+
subject.nosso_numero.must_equal '001240002P'
|
195
|
+
end
|
190
196
|
end
|
191
197
|
|
198
|
+
|
192
199
|
describe "default_values" do
|
193
200
|
let(:object) { subject.class.new() }
|
194
201
|
it "for data_emissao" do object.data_emissao.must_equal Date.today end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/factories/pagador.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/test_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: br_boleto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno M. Mergen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -352,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
352
|
version: '0'
|
353
353
|
requirements: []
|
354
354
|
rubyforge_project:
|
355
|
-
rubygems_version: 2.
|
355
|
+
rubygems_version: 2.6.10
|
356
356
|
signing_key:
|
357
357
|
specification_version: 4
|
358
358
|
summary: Emissão de Boletos Bancários em Ruby
|