nfe_reader 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +38 -0
  6. data/Rakefile +13 -0
  7. data/lib/nfe_reader/authorization.rb +12 -0
  8. data/lib/nfe_reader/carrier.rb +16 -0
  9. data/lib/nfe_reader/collection/duplicate.rb +12 -0
  10. data/lib/nfe_reader/collection.rb +34 -0
  11. data/lib/nfe_reader/customer.rb +62 -0
  12. data/lib/nfe_reader/delivery.rb +20 -0
  13. data/lib/nfe_reader/document.rb +73 -0
  14. data/lib/nfe_reader/export.rb +12 -0
  15. data/lib/nfe_reader/fiscal.rb +33 -0
  16. data/lib/nfe_reader/header.rb +129 -0
  17. data/lib/nfe_reader/information.rb +38 -0
  18. data/lib/nfe_reader/product/armament.rb +22 -0
  19. data/lib/nfe_reader/product/cane.rb +42 -0
  20. data/lib/nfe_reader/product/exportation.rb +20 -0
  21. data/lib/nfe_reader/product/fuel.rb +18 -0
  22. data/lib/nfe_reader/product/importation.rb +49 -0
  23. data/lib/nfe_reader/product/medicament.rb +19 -0
  24. data/lib/nfe_reader/product/vehicle.rb +117 -0
  25. data/lib/nfe_reader/product.rb +90 -0
  26. data/lib/nfe_reader/provider.rb +43 -0
  27. data/lib/nfe_reader/purchase.rb +14 -0
  28. data/lib/nfe_reader/removal.rb +20 -0
  29. data/lib/nfe_reader/taxation/cofins.rb +43 -0
  30. data/lib/nfe_reader/taxation/cofins_st.rb +19 -0
  31. data/lib/nfe_reader/taxation/icms.rb +86 -0
  32. data/lib/nfe_reader/taxation/importation_tax.rb +17 -0
  33. data/lib/nfe_reader/taxation/ipi.rb +41 -0
  34. data/lib/nfe_reader/taxation/issqn.rb +22 -0
  35. data/lib/nfe_reader/taxation/pis.rb +42 -0
  36. data/lib/nfe_reader/taxation/pis_st.rb +19 -0
  37. data/lib/nfe_reader/total.rb +76 -0
  38. data/lib/nfe_reader/transport.rb +97 -0
  39. data/lib/nfe_reader/version.rb +5 -0
  40. data/lib/nfe_reader.rb +129 -0
  41. data/lib/nokogiri_hash.rb +60 -0
  42. data/nfe-reader.gemspec +24 -0
  43. data/test/files/sample-nfe.xml +234 -0
  44. data/test/files/sample2-nfe.xml +192 -0
  45. data/test/nfe_reader/authorization_test.rb +22 -0
  46. data/test/nfe_reader/cane_test.rb +71 -0
  47. data/test/nfe_reader/carrier_test.rb +46 -0
  48. data/test/nfe_reader/collection/duplicate_test.rb +27 -0
  49. data/test/nfe_reader/collection_test.rb +78 -0
  50. data/test/nfe_reader/customer_test.rb +133 -0
  51. data/test/nfe_reader/delivery_test.rb +57 -0
  52. data/test/nfe_reader/document_test.rb +113 -0
  53. data/test/nfe_reader/export_test.rb +22 -0
  54. data/test/nfe_reader/fiscal_test.rb +67 -0
  55. data/test/nfe_reader/header_test.rb +135 -0
  56. data/test/nfe_reader/information_test.rb +37 -0
  57. data/test/nfe_reader/product/armament_test.rb +32 -0
  58. data/test/nfe_reader/product/exportation_test.rb +34 -0
  59. data/test/nfe_reader/product/fuel_test.rb +44 -0
  60. data/test/nfe_reader/product/importation_test.rb +64 -0
  61. data/test/nfe_reader/product/medicament_test.rb +37 -0
  62. data/test/nfe_reader/product/vehicle_test.rb +133 -0
  63. data/test/nfe_reader/product_test.rb +125 -0
  64. data/test/nfe_reader/provider_test.rb +155 -0
  65. data/test/nfe_reader/purchase_test.rb +27 -0
  66. data/test/nfe_reader/removal_test.rb +57 -0
  67. data/test/nfe_reader/taxation/cofins_st_test.rb +37 -0
  68. data/test/nfe_reader/taxation/cofins_test.rb +42 -0
  69. data/test/nfe_reader/taxation/icms_test.rb +122 -0
  70. data/test/nfe_reader/taxation/importation_tax_test.rb +32 -0
  71. data/test/nfe_reader/taxation/ipi_test.rb +78 -0
  72. data/test/nfe_reader/taxation/issqn_test.rb +42 -0
  73. data/test/nfe_reader/taxation/pis_st_test.rb +37 -0
  74. data/test/nfe_reader/taxation/pis_test.rb +42 -0
  75. data/test/nfe_reader/total_test.rb +148 -0
  76. data/test/nfe_reader/transport_test.rb +172 -0
  77. data/test/nfe_reader_test.rb +125 -0
  78. data/test/nokogiri_test.rb +27 -0
  79. data/test/test_helper.rb +13 -0
  80. metadata +201 -0
@@ -0,0 +1,13 @@
1
+ require 'bundler/setup'
2
+ require 'minitest/autorun'
3
+
4
+ begin
5
+ require 'turn/autorun'
6
+
7
+ Turn.config.format = :dot
8
+ rescue LoadError
9
+ puts 'Install the Turn gem for prettier test output.'
10
+ end
11
+
12
+ $:.unshift File.expand_path("../../lib", __FILE__)
13
+ require 'nfe_reader'
metadata ADDED
@@ -0,0 +1,201 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nfe_reader
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Eduardo Becker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: NFe XML Extractor
56
+ email:
57
+ - edu.bkr@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - lib/nfe_reader.rb
68
+ - lib/nfe_reader/authorization.rb
69
+ - lib/nfe_reader/carrier.rb
70
+ - lib/nfe_reader/collection.rb
71
+ - lib/nfe_reader/collection/duplicate.rb
72
+ - lib/nfe_reader/customer.rb
73
+ - lib/nfe_reader/delivery.rb
74
+ - lib/nfe_reader/document.rb
75
+ - lib/nfe_reader/export.rb
76
+ - lib/nfe_reader/fiscal.rb
77
+ - lib/nfe_reader/header.rb
78
+ - lib/nfe_reader/information.rb
79
+ - lib/nfe_reader/product.rb
80
+ - lib/nfe_reader/product/armament.rb
81
+ - lib/nfe_reader/product/cane.rb
82
+ - lib/nfe_reader/product/exportation.rb
83
+ - lib/nfe_reader/product/fuel.rb
84
+ - lib/nfe_reader/product/importation.rb
85
+ - lib/nfe_reader/product/medicament.rb
86
+ - lib/nfe_reader/product/vehicle.rb
87
+ - lib/nfe_reader/provider.rb
88
+ - lib/nfe_reader/purchase.rb
89
+ - lib/nfe_reader/removal.rb
90
+ - lib/nfe_reader/taxation/cofins.rb
91
+ - lib/nfe_reader/taxation/cofins_st.rb
92
+ - lib/nfe_reader/taxation/icms.rb
93
+ - lib/nfe_reader/taxation/importation_tax.rb
94
+ - lib/nfe_reader/taxation/ipi.rb
95
+ - lib/nfe_reader/taxation/issqn.rb
96
+ - lib/nfe_reader/taxation/pis.rb
97
+ - lib/nfe_reader/taxation/pis_st.rb
98
+ - lib/nfe_reader/total.rb
99
+ - lib/nfe_reader/transport.rb
100
+ - lib/nfe_reader/version.rb
101
+ - lib/nokogiri_hash.rb
102
+ - nfe-reader.gemspec
103
+ - test/files/sample-nfe.xml
104
+ - test/files/sample2-nfe.xml
105
+ - test/nfe_reader/authorization_test.rb
106
+ - test/nfe_reader/cane_test.rb
107
+ - test/nfe_reader/carrier_test.rb
108
+ - test/nfe_reader/collection/duplicate_test.rb
109
+ - test/nfe_reader/collection_test.rb
110
+ - test/nfe_reader/customer_test.rb
111
+ - test/nfe_reader/delivery_test.rb
112
+ - test/nfe_reader/document_test.rb
113
+ - test/nfe_reader/export_test.rb
114
+ - test/nfe_reader/fiscal_test.rb
115
+ - test/nfe_reader/header_test.rb
116
+ - test/nfe_reader/information_test.rb
117
+ - test/nfe_reader/product/armament_test.rb
118
+ - test/nfe_reader/product/exportation_test.rb
119
+ - test/nfe_reader/product/fuel_test.rb
120
+ - test/nfe_reader/product/importation_test.rb
121
+ - test/nfe_reader/product/medicament_test.rb
122
+ - test/nfe_reader/product/vehicle_test.rb
123
+ - test/nfe_reader/product_test.rb
124
+ - test/nfe_reader/provider_test.rb
125
+ - test/nfe_reader/purchase_test.rb
126
+ - test/nfe_reader/removal_test.rb
127
+ - test/nfe_reader/taxation/cofins_st_test.rb
128
+ - test/nfe_reader/taxation/cofins_test.rb
129
+ - test/nfe_reader/taxation/icms_test.rb
130
+ - test/nfe_reader/taxation/importation_tax_test.rb
131
+ - test/nfe_reader/taxation/ipi_test.rb
132
+ - test/nfe_reader/taxation/issqn_test.rb
133
+ - test/nfe_reader/taxation/pis_st_test.rb
134
+ - test/nfe_reader/taxation/pis_test.rb
135
+ - test/nfe_reader/total_test.rb
136
+ - test/nfe_reader/transport_test.rb
137
+ - test/nfe_reader_test.rb
138
+ - test/nokogiri_test.rb
139
+ - test/test_helper.rb
140
+ homepage: ''
141
+ licenses:
142
+ - MIT
143
+ metadata: {}
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.2.2
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: NFe XML Extractor
164
+ test_files:
165
+ - test/files/sample-nfe.xml
166
+ - test/files/sample2-nfe.xml
167
+ - test/nfe_reader/authorization_test.rb
168
+ - test/nfe_reader/cane_test.rb
169
+ - test/nfe_reader/carrier_test.rb
170
+ - test/nfe_reader/collection/duplicate_test.rb
171
+ - test/nfe_reader/collection_test.rb
172
+ - test/nfe_reader/customer_test.rb
173
+ - test/nfe_reader/delivery_test.rb
174
+ - test/nfe_reader/document_test.rb
175
+ - test/nfe_reader/export_test.rb
176
+ - test/nfe_reader/fiscal_test.rb
177
+ - test/nfe_reader/header_test.rb
178
+ - test/nfe_reader/information_test.rb
179
+ - test/nfe_reader/product/armament_test.rb
180
+ - test/nfe_reader/product/exportation_test.rb
181
+ - test/nfe_reader/product/fuel_test.rb
182
+ - test/nfe_reader/product/importation_test.rb
183
+ - test/nfe_reader/product/medicament_test.rb
184
+ - test/nfe_reader/product/vehicle_test.rb
185
+ - test/nfe_reader/product_test.rb
186
+ - test/nfe_reader/provider_test.rb
187
+ - test/nfe_reader/purchase_test.rb
188
+ - test/nfe_reader/removal_test.rb
189
+ - test/nfe_reader/taxation/cofins_st_test.rb
190
+ - test/nfe_reader/taxation/cofins_test.rb
191
+ - test/nfe_reader/taxation/icms_test.rb
192
+ - test/nfe_reader/taxation/importation_tax_test.rb
193
+ - test/nfe_reader/taxation/ipi_test.rb
194
+ - test/nfe_reader/taxation/issqn_test.rb
195
+ - test/nfe_reader/taxation/pis_st_test.rb
196
+ - test/nfe_reader/taxation/pis_test.rb
197
+ - test/nfe_reader/total_test.rb
198
+ - test/nfe_reader/transport_test.rb
199
+ - test/nfe_reader_test.rb
200
+ - test/nokogiri_test.rb
201
+ - test/test_helper.rb