br_danfe 0.16.0 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +20 -8
  3. data/.github/dependabot.yml +19 -0
  4. data/.rubocop.yml +24 -11
  5. data/Gemfile.lock +41 -35
  6. data/Guardfile +3 -1
  7. data/bin/_guard-core +29 -0
  8. data/bin/guard +29 -0
  9. data/br_danfe.gemspec +7 -6
  10. data/lib/br_danfe/danfe_lib/nfce.rb +11 -9
  11. data/lib/br_danfe/danfe_lib/nfce_lib/document.rb +1 -1
  12. data/lib/br_danfe/danfe_lib/nfce_lib/footer.rb +2 -2
  13. data/lib/br_danfe/danfe_lib/nfce_lib/header.rb +30 -16
  14. data/lib/br_danfe/danfe_lib/nfce_lib/key.rb +3 -3
  15. data/lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb +3 -3
  16. data/lib/br_danfe/danfe_lib/nfce_lib/product_list.rb +44 -53
  17. data/lib/br_danfe/danfe_lib/nfce_lib/recipient.rb +1 -1
  18. data/lib/br_danfe/danfe_lib/nfce_lib/total_list.rb +16 -15
  19. data/lib/br_danfe/danfe_lib/nfe.rb +11 -9
  20. data/lib/br_danfe/danfe_lib/nfe_lib/dup.rb +1 -2
  21. data/lib/br_danfe/danfe_lib/nfe_lib/emit_header.rb +6 -7
  22. data/lib/br_danfe/danfe_lib/nfe_lib/infadic.rb +2 -1
  23. data/lib/br_danfe/helper.rb +1 -1
  24. data/lib/br_danfe/mdfe.rb +1 -1
  25. data/lib/br_danfe/mdfe_lib/authorization_protocol.rb +1 -1
  26. data/lib/br_danfe/mdfe_lib/fisco_control.rb +6 -25
  27. data/lib/br_danfe/mdfe_lib/header.rb +7 -8
  28. data/lib/br_danfe/mdfe_lib/mdfe_identification.rb +1 -1
  29. data/lib/br_danfe/mdfe_lib/notes.rb +1 -1
  30. data/lib/br_danfe/qr_code.rb +1 -2
  31. data/lib/br_danfe/version.rb +1 -1
  32. data/lib/br_danfe.rb +2 -2
  33. data/spec/br_danfe/danfe_lib/nfce_lib/footer_spec.rb +3 -2
  34. data/spec/br_danfe/danfe_lib/nfce_lib/header_spec.rb +6 -4
  35. data/spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb +2 -2
  36. data/spec/br_danfe/danfe_lib/nfce_lib/key_spec.rb +2 -2
  37. data/spec/br_danfe/danfe_lib/nfce_lib/nfce_identification_spec.rb +2 -2
  38. data/spec/br_danfe/danfe_lib/nfce_lib/recipient_spec.rb +10 -10
  39. data/spec/br_danfe/danfe_lib/nfce_lib/total_list_spec.rb +12 -12
  40. data/spec/br_danfe/danfe_lib/nfce_spec.rb +2 -1
  41. data/spec/br_danfe/danfe_lib/nfe_lib/cst_spec.rb +4 -4
  42. data/spec/br_danfe/danfe_lib/nfe_lib/dest_spec.rb +178 -178
  43. data/spec/br_danfe/danfe_lib/nfe_lib/det_body_spec.rb +274 -274
  44. data/spec/br_danfe/danfe_lib/nfe_lib/document_spec.rb +77 -77
  45. data/spec/br_danfe/danfe_lib/nfe_lib/dup_spec.rb +23 -23
  46. data/spec/br_danfe/danfe_lib/nfe_lib/emit_header_spec.rb +55 -37
  47. data/spec/br_danfe/danfe_lib/nfe_lib/helper_spec.rb +34 -34
  48. data/spec/br_danfe/danfe_lib/nfe_lib/icmstot_spec.rb +19 -19
  49. data/spec/br_danfe/danfe_lib/nfe_lib/infadic_spec.rb +237 -237
  50. data/spec/br_danfe/danfe_lib/nfe_lib/infadic_vol_spec.rb +3 -2
  51. data/spec/br_danfe/danfe_lib/nfe_lib/issqn_spec.rb +16 -16
  52. data/spec/br_danfe/danfe_lib/nfe_lib/ticket_spec.rb +13 -13
  53. data/spec/br_danfe/danfe_lib/nfe_lib/transp_spec.rb +76 -76
  54. data/spec/br_danfe/danfe_lib/nfe_lib/vol_spec.rb +40 -40
  55. data/spec/br_danfe/danfe_lib/nfe_lib/xprod_spec.rb +118 -118
  56. data/spec/br_danfe/danfe_spec.rb +2 -2
  57. data/spec/br_danfe/helper_spec.rb +15 -15
  58. data/spec/br_danfe/mdfe_lib/document_spec.rb +2 -2
  59. data/spec/br_danfe/mdfe_lib/fisco_control_spec.rb +21 -7
  60. data/spec/br_danfe/mdfe_lib/header_spec.rb +27 -18
  61. data/spec/br_danfe/mdfe_lib/notes_spec.rb +5 -5
  62. data/spec/br_danfe/mdfe_lib/totalizer_spec.rb +1 -1
  63. data/spec/br_danfe/mdfe_spec.rb +4 -5
  64. data/spec/br_danfe/qr_code_spec.rb +4 -13
  65. data/spec/br_danfe/xml_spec.rb +6 -6
  66. data/spec/fixtures/mdfe/lib/fisco_control#without-barcode.pdf +0 -0
  67. data/spec/fixtures/mdfe/lib/header#render-without-qr-code.pdf +0 -0
  68. data/spec/fixtures/nfce/lib/document#render.pdf +12 -23
  69. data/spec/fixtures/nfce/lib/footer#render-with_additional_information.pdf +0 -0
  70. data/spec/fixtures/nfce/lib/footer#render.pdf +0 -0
  71. data/spec/fixtures/nfce/lib/header#render-homologation.pdf +0 -0
  72. data/spec/fixtures/nfce/lib/header#render-long_name_with_logo.pdf +0 -0
  73. data/spec/fixtures/nfce/lib/header#render-long_name_without_logo.pdf +0 -0
  74. data/spec/fixtures/nfce/lib/header#render-short_name_with_logo.pdf +0 -0
  75. data/spec/fixtures/nfce/lib/header#render-short_name_without_logo.pdf +0 -0
  76. data/spec/fixtures/nfce/lib/key#render.pdf +0 -0
  77. data/spec/fixtures/nfce/lib/nfce_identification#render.pdf +0 -0
  78. data/spec/fixtures/nfce/lib/product_list#render-with_many_products.pdf +0 -0
  79. data/spec/fixtures/nfce/lib/product_list#render-with_many_products_and_long_names.pdf +0 -0
  80. data/spec/fixtures/nfce/lib/product_list#render-with_single_product.pdf +0 -0
  81. data/spec/fixtures/nfce/lib/product_list#render-with_single_product_and_long_name.pdf +0 -0
  82. data/spec/fixtures/nfce/lib/product_list_with_many_products_and_long_names.xml +2 -2
  83. data/spec/fixtures/nfce/lib/product_list_with_single_product_and_long_name.xml +1 -1
  84. data/spec/fixtures/nfce/lib/recipient#render-company.pdf +0 -0
  85. data/spec/fixtures/nfce/lib/recipient#render-consumer_without_document.pdf +0 -0
  86. data/spec/fixtures/nfce/lib/recipient#render-foreign.pdf +0 -0
  87. data/spec/fixtures/nfce/lib/recipient#render-individual.pdf +0 -0
  88. data/spec/fixtures/nfce/lib/recipient#render-unidentified_consumer.pdf +0 -0
  89. data/spec/fixtures/nfce/lib/total_list#does_not_render-payment_methods.pdf +0 -0
  90. data/spec/fixtures/nfce/lib/total_list#render-grouped_payment_methods.pdf +0 -0
  91. data/spec/fixtures/nfce/lib/total_list#render-totals.pdf +0 -0
  92. data/spec/fixtures/nfce/lib/total_list#render-without_payment.pdf +0 -0
  93. data/spec/fixtures/nfce/lib/total_list#render.pdf +0 -0
  94. data/spec/fixtures/nfce/v4.00/multiples_xmls_on_the_same_pdf.pdf +568 -447
  95. data/spec/fixtures/nfce/v4.00/nfce-unauthorized-hom.fixture.pdf +0 -0
  96. data/spec/fixtures/nfce/v4.00/nfce-unauthorized-prod.fixture.pdf +0 -0
  97. data/spec/fixtures/nfce/v4.00/rendered_nfce.fixture.pdf +0 -0
  98. data/spec/fixtures/nfce/v4.00/saved_nfce.fixture.pdf +0 -0
  99. data/spec/fixtures/nfe/lib/emit_header#render-nfe_key.pdf +945 -0
  100. data/spec/spec_helper.rb +1 -1
  101. metadata +38 -16
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'simplecov'
2
- SimpleCov.start
2
+ SimpleCov.start unless ENV["NO_COVERAGE"]
3
3
 
4
4
  require "bundler/setup"
5
5
  require "br_danfe"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_danfe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ASSEINFO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-26 00:00:00.000000000 Z
11
+ date: 2021-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: barby
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.1.1
103
+ version: 2.1.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.1.1
110
+ version: 2.1.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: byebug
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 2.16.2
131
+ version: 2.18.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 2.16.2
138
+ version: 2.18.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: guard-rspec
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 13.0.1
173
+ version: 13.0.6
174
174
  type: :development
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: 13.0.1
180
+ version: 13.0.6
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rspec
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -196,30 +196,44 @@ dependencies:
196
196
  name: rubocop
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '='
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 0.67.0
201
+ version: 0.93.1
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '='
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 0.67.0
208
+ version: 0.93.1
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: rubocop-performance
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 1.1.0
215
+ version: 1.10.2
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: 1.10.2
223
+ - !ruby/object:Gem::Dependency
224
+ name: rubocop-rspec
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: 1.44.1
216
230
  type: :development
217
231
  prerelease: false
218
232
  version_requirements: !ruby/object:Gem::Requirement
219
233
  requirements:
220
234
  - - "~>"
221
235
  - !ruby/object:Gem::Version
222
- version: 1.1.0
236
+ version: 1.44.1
223
237
  - !ruby/object:Gem::Dependency
224
238
  name: simplecov
225
239
  requirement: !ruby/object:Gem::Requirement
@@ -250,12 +264,15 @@ dependencies:
250
264
  version: 0.10.2
251
265
  description:
252
266
  email: asseinfo@asseinfo.com.br
253
- executables: []
267
+ executables:
268
+ - _guard-core
269
+ - guard
254
270
  extensions: []
255
271
  extra_rdoc_files: []
256
272
  files:
257
273
  - ".circleci/config.yml"
258
274
  - ".codeclimate.yml"
275
+ - ".github/dependabot.yml"
259
276
  - ".gitignore"
260
277
  - ".rspec"
261
278
  - ".rubocop.yml"
@@ -266,6 +283,8 @@ files:
266
283
  - Guardfile
267
284
  - README.md
268
285
  - Rakefile
286
+ - bin/_guard-core
287
+ - bin/guard
269
288
  - br_danfe.gemspec
270
289
  - config/locales/pt-BR.yml
271
290
  - docker-compose.yml
@@ -410,8 +429,10 @@ files:
410
429
  - spec/fixtures/mdfe/lib/document#text.size.pdf
411
430
  - spec/fixtures/mdfe/lib/document#text.style.pdf
412
431
  - spec/fixtures/mdfe/lib/fisco_control#barcode.pdf
432
+ - spec/fixtures/mdfe/lib/fisco_control#without-barcode.pdf
413
433
  - spec/fixtures/mdfe/lib/header#render-qr-code.pdf
414
434
  - spec/fixtures/mdfe/lib/header#render-with_logo.pdf
435
+ - spec/fixtures/mdfe/lib/header#render-without-qr-code.pdf
415
436
  - spec/fixtures/mdfe/lib/header#render-without_logo.pdf
416
437
  - spec/fixtures/mdfe/lib/mdfe-with-multiple-pages.pdf
417
438
  - spec/fixtures/mdfe/lib/mdfe.fixture.pdf
@@ -482,6 +503,7 @@ files:
482
503
  - spec/fixtures/nfe/lib/document#lie-invalid.pdf
483
504
  - spec/fixtures/nfe/lib/document#lie-valid.pdf
484
505
  - spec/fixtures/nfe/lib/dup#render.pdf
506
+ - spec/fixtures/nfe/lib/emit_header#render-nfe_key.pdf
485
507
  - spec/fixtures/nfe/lib/emit_header#render-second_page.pdf
486
508
  - spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf
487
509
  - spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf
@@ -547,7 +569,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
547
569
  requirements:
548
570
  - - ">="
549
571
  - !ruby/object:Gem::Version
550
- version: 2.5.1
572
+ version: '2.6'
551
573
  required_rubygems_version: !ruby/object:Gem::Requirement
552
574
  requirements:
553
575
  - - ">="