br_nfe 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -1
  3. data/README.markdown +263 -1
  4. data/br_nfe.gemspec +14 -5
  5. data/lib/br_nfe/base.rb +6 -1
  6. data/lib/br_nfe/helper/cpf_cnpj.rb +0 -5
  7. data/lib/br_nfe/helper/have_address.rb +1 -5
  8. data/lib/br_nfe/helper/have_rps.rb +7 -0
  9. data/lib/br_nfe/servico/betha/base.rb +52 -41
  10. data/lib/br_nfe/servico/betha/build_response.rb +141 -0
  11. data/lib/br_nfe/servico/betha/v1/build_response.rb +4 -102
  12. data/lib/br_nfe/servico/betha/v1/consulta_lote_rps.rb +3 -1
  13. data/lib/br_nfe/servico/betha/v1/consulta_nfs_por_rps.rb +5 -2
  14. data/lib/br_nfe/servico/betha/v1/consulta_nfse.rb +2 -1
  15. data/lib/br_nfe/servico/betha/v1/gateway.rb +66 -56
  16. data/lib/br_nfe/servico/betha/v1/recepcao_lote_rps.rb +16 -8
  17. data/lib/br_nfe/servico/betha/v2/build_response.rb +159 -0
  18. data/lib/br_nfe/servico/betha/v2/cancelamento_nfs.rb +8 -3
  19. data/lib/br_nfe/servico/betha/v2/consulta_lote_rps.rb +7 -4
  20. data/lib/br_nfe/servico/betha/v2/consulta_nfse_por_rps.rb +5 -5
  21. data/lib/br_nfe/servico/betha/v2/envio_lote_rps_sincrono.rb +7 -3
  22. data/lib/br_nfe/servico/betha/v2/gateway.rb +79 -56
  23. data/lib/br_nfe/servico/betha/v2/gera_nfse.rb +8 -3
  24. data/lib/br_nfe/servico/betha/v2/recepcao_lote_rps.rb +9 -4
  25. data/lib/br_nfe/servico/betha/v2/substituicao_nfse.rb +8 -4
  26. data/lib/br_nfe/servico/response/nota_fiscal.rb +13 -4
  27. data/lib/br_nfe/servico/rps.rb +2 -2
  28. data/lib/br_nfe/version.rb +1 -1
  29. data/lib/br_nfe.rb +2 -1
  30. data/test/br_nfe/base_test.rb +55 -1
  31. data/test/br_nfe/destinatario_test.rb +19 -0
  32. data/test/br_nfe/emitente_test.rb +20 -0
  33. data/test/br_nfe/endereco_test.rb +9 -0
  34. data/test/br_nfe/helper/cpf_cnpj_test.rb +61 -0
  35. data/test/br_nfe/servico/base_test.rb +28 -0
  36. data/test/br_nfe/servico/betha/base_test.rb +61 -32
  37. data/test/br_nfe/servico/betha/v1/build_response_test.rb +6 -7
  38. data/test/br_nfe/servico/betha/v1/cancelamento_nfs_test.rb +6 -0
  39. data/test/br_nfe/servico/betha/v1/consulta_lote_rps_test.rb +4 -0
  40. data/test/br_nfe/servico/betha/v1/consulta_nfse_test.rb +17 -0
  41. data/test/br_nfe/servico/betha/v1/gateway_test.rb +17 -40
  42. data/test/br_nfe/servico/betha/v1/recepcao_lote_rps_test.rb +12 -2
  43. data/test/br_nfe/servico/betha/v2/cancelamento_nfs_test.rb +40 -0
  44. data/test/br_nfe/servico/betha/v2/consulta_lote_rps_test.rb +38 -0
  45. data/test/br_nfe/servico/betha/v2/consulta_nfse_por_rps_test.rb +36 -0
  46. data/test/br_nfe/servico/betha/v2/envio_lote_rps_sincrono_test.rb +46 -0
  47. data/test/br_nfe/servico/betha/v2/gateway_test.rb +372 -0
  48. data/test/br_nfe/servico/betha/v2/gera_nfse_test.rb +58 -0
  49. data/test/br_nfe/servico/betha/v2/recepcao_lote_rps_test.rb +103 -0
  50. data/test/br_nfe/servico/betha/v2/substituicao_nfse_test.rb +80 -0
  51. data/test/br_nfe/servico/intermediario_test.rb +16 -0
  52. data/test/br_nfe/servico/rps_test.rb +141 -0
  53. data/test/factories/servico/betha/v1/gateway.rb +1 -1
  54. data/test/factories/servico/betha/v2/cancelamento_nfs.rb +7 -0
  55. data/test/factories/servico/betha/v2/consulta_lote_rps.rb +6 -0
  56. data/test/factories/servico/betha/v2/consulta_nfse_por_rps.rb +6 -0
  57. data/test/factories/servico/betha/v2/envio_lote_rps_sincrono.rb +5 -0
  58. data/test/factories/servico/betha/v2/gateway.rb +5 -0
  59. data/test/factories/servico/betha/v2/gera_nfse.rb +6 -0
  60. data/test/factories/servico/betha/v2/recepcao_lote_rps.rb +5 -0
  61. data/test/factories/servico/betha/v2/substituicao_nfse.rb +8 -0
  62. metadata +50 -17
  63. data/Gemfile +0 -15
  64. data/Rakefile +0 -13
  65. data/lib/br_nfe/seed.rb +0 -195
  66. data/lib/br_nfe/servico/betha/v2/response.rb +0 -23
  67. data/test/certificado.rb +0 -12
  68. data/test/test_helper.rb +0 -39
data/test/test_helper.rb DELETED
@@ -1,39 +0,0 @@
1
- # encoding: UTF-8
2
- require 'bundler/setup'
3
- Bundler.require(:default, :test)
4
-
5
- ENV["RAILS_ENV"] = "test"
6
- require "rails/test_help"
7
- require 'minitest/autorun'
8
- require "minitest/rails"
9
- require 'minitest/matchers_vaccine'
10
-
11
- require 'shoulda/matchers'
12
- require "minitest/reporters"
13
- require 'mocha/mini_test'
14
-
15
-
16
- require 'factory_girl_rails'
17
-
18
- require 'certificado'
19
-
20
-
21
- Minitest::Reporters.use!
22
-
23
- ActiveSupport::TestCase.test_order = :sorted
24
-
25
- FactoryGirl.definition_file_paths = [File.expand_path('../factories', __FILE__)]
26
- FactoryGirl.find_definitions
27
-
28
- class Module
29
- include Minitest::Spec::DSL
30
- end
31
-
32
- class Object
33
- alias context describe
34
- end
35
-
36
- class MiniTest::Spec
37
- include Shoulda::Matchers::ActiveModel
38
- include FactoryGirl::Syntax::Methods
39
- end