br_danfe 0.0.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -3
- data/br_danfe.gemspec +1 -0
- data/config/locales/pt-BR.yml +14 -0
- data/lib/br_danfe/cce.rb +28 -0
- data/lib/br_danfe/cce_lib/barcode.rb +24 -0
- data/lib/br_danfe/cce_lib/correction.rb +22 -0
- data/lib/br_danfe/cce_lib/document.rb +44 -0
- data/lib/br_danfe/cce_lib/footer.rb +15 -0
- data/lib/br_danfe/cce_lib/header.rb +15 -0
- data/lib/br_danfe/cce_lib/nfe_key.rb +23 -0
- data/lib/br_danfe/cce_lib/protocol.rb +23 -0
- data/lib/br_danfe/danfe.rb +16 -16
- data/lib/br_danfe/danfe_lib/cep.rb +9 -0
- data/lib/br_danfe/danfe_lib/consts.rb +6 -0
- data/lib/br_danfe/danfe_lib/cst.rb +30 -0
- data/lib/br_danfe/danfe_lib/dest.rb +86 -0
- data/lib/br_danfe/danfe_lib/det_body.rb +75 -0
- data/lib/br_danfe/danfe_lib/det_header.rb +40 -0
- data/lib/br_danfe/danfe_lib/document.rb +135 -0
- data/lib/br_danfe/danfe_lib/dup.rb +52 -0
- data/lib/br_danfe/danfe_lib/emit.rb +23 -0
- data/lib/br_danfe/danfe_lib/emit_header.rb +82 -0
- data/lib/br_danfe/danfe_lib/helper.rb +64 -0
- data/lib/br_danfe/danfe_lib/icmstot.rb +33 -0
- data/lib/br_danfe/danfe_lib/infadic.rb +80 -0
- data/lib/br_danfe/danfe_lib/issqn.rb +24 -0
- data/lib/br_danfe/danfe_lib/options.rb +24 -0
- data/lib/br_danfe/danfe_lib/phone.rb +13 -0
- data/lib/br_danfe/danfe_lib/plate.rb +9 -0
- data/lib/br_danfe/danfe_lib/ticket.rb +17 -0
- data/lib/br_danfe/danfe_lib/transp.rb +51 -0
- data/lib/br_danfe/danfe_lib/vol.rb +41 -0
- data/lib/br_danfe/danfe_lib/xml.rb +38 -0
- data/lib/br_danfe/danfe_lib/xprod.rb +48 -0
- data/lib/br_danfe/version.rb +1 -1
- data/lib/br_danfe.rb +1 -1
- data/spec/features/cce_spec.rb +28 -0
- data/spec/features/danfe_spec.rb +3 -3
- data/spec/fixtures/cce/lib/barcode#render.pdf +511 -0
- data/spec/fixtures/cce/lib/correction#render.pdf +100 -0
- data/spec/fixtures/cce/lib/document#box.pdf +55 -0
- data/spec/fixtures/cce/lib/document#box.with.block.pdf +72 -0
- data/spec/fixtures/cce/lib/document#text.align.pdf +70 -0
- data/spec/fixtures/cce/lib/document#text.pad.pdf +70 -0
- data/spec/fixtures/cce/lib/document#text.simple.pdf +70 -0
- data/spec/fixtures/cce/lib/document#text.size.pdf +70 -0
- data/spec/fixtures/cce/lib/document#text.style.pdf +70 -0
- data/spec/fixtures/cce/lib/footer#render.pdf +114 -0
- data/spec/fixtures/cce/lib/header#render.pdf +72 -0
- data/spec/fixtures/cce/lib/nfe_key#render.pdf +88 -0
- data/spec/fixtures/cce/lib/protocol#render.pdf +88 -0
- data/spec/fixtures/cce/v1.00/cce.fixture.pdf +659 -0
- data/spec/fixtures/cce/v1.00/cce.xml +1 -0
- data/spec/fixtures/{lib → nfe/lib}/dest#render-v2.00.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/dest#render-v3.10.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/dest#render-with_cnpj.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/dest#render-with_cpf.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/dest#render-with_ie.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/det_body#render-csosn.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/det_body#render-cst.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/det_body#render-fci.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/det_body#render-icms_st.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/det_header#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/document#lcnpj-blank.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/document#lcnpj-invalid.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/document#lcnpj-valid.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/document#lie-blank.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/document#lie-invalid.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/document#lie-valid.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/dup#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/emit#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/emit_header#render-with_logo.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/emit_header#render-without_logo.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/icmstot#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/infadic#render-extra_volume.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/infadic#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/issqn#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/ticket#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/transp#render-modfrete_0.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/transp#render-modfrete_1.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/transp#render-modfrete_2.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/transp#render-modfrete_9.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/transp#render.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/vol#render-blank-boxes.pdf +0 -0
- data/spec/fixtures/{lib → nfe/lib}/vol#render.pdf +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_simples_nacional.xml +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_simples_nacional.xml.fixture.pdf +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_extra_volumes.xml +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_extra_volumes.xml.fixture.pdf +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_fci.xml +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_fci.xml.fixture.pdf +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_logo.xml +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_ns.xml +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_with_ns.xml.fixture.pdf +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_without_ns.xml +0 -0
- data/spec/fixtures/{v2.00 → nfe/v2.00}/nfe_without_ns.xml.fixture.pdf +0 -0
- data/spec/fixtures/{v3.10 → nfe/v3.10}/nfe_simples_nacional.xml +0 -0
- data/spec/fixtures/{v3.10 → nfe/v3.10}/nfe_simples_nacional.xml.fixture.pdf +0 -0
- data/spec/lib/cce_lib/barcode_spec.rb +26 -0
- data/spec/lib/cce_lib/correction_spec.rb +26 -0
- data/spec/lib/cce_lib/document_spec.rb +115 -0
- data/spec/lib/cce_lib/footer_spec.rb +25 -0
- data/spec/lib/cce_lib/header_spec.rb +25 -0
- data/spec/lib/cce_lib/nfe_key_spec.rb +26 -0
- data/spec/lib/cce_lib/protocol_spec.rb +26 -0
- data/spec/lib/{cep_spec.rb → danfe_lib/cep_spec.rb} +2 -2
- data/spec/lib/{cst_spec.rb → danfe_lib/cst_spec.rb} +3 -3
- data/spec/lib/{dest_spec.rb → danfe_lib/dest_spec.rb} +4 -4
- data/spec/lib/{det_body_spec.rb → danfe_lib/det_body_spec.rb} +4 -4
- data/spec/lib/{det_header_spec.rb → danfe_lib/det_header_spec.rb} +4 -4
- data/spec/lib/{document_spec.rb → danfe_lib/document_spec.rb} +3 -3
- data/spec/lib/{dup_spec.rb → danfe_lib/dup_spec.rb} +4 -4
- data/spec/lib/{emit_header_spec.rb → danfe_lib/emit_header_spec.rb} +4 -4
- data/spec/lib/{emit_spec.rb → danfe_lib/emit_spec.rb} +4 -4
- data/spec/lib/{helper_spec.rb → danfe_lib/helper_spec.rb} +11 -11
- data/spec/lib/{icmstot_spec.rb → danfe_lib/icmstot_spec.rb} +4 -4
- data/spec/lib/{infadic_spec.rb → danfe_lib/infadic_spec.rb} +4 -4
- data/spec/lib/{issqn_spec.rb → danfe_lib/issqn_spec.rb} +4 -4
- data/spec/lib/{options_spec.rb → danfe_lib/options_spec.rb} +3 -3
- data/spec/lib/{phone_spec.rb → danfe_lib/phone_spec.rb} +3 -3
- data/spec/lib/{plate_spec.rb → danfe_lib/plate_spec.rb} +2 -2
- data/spec/lib/{ticket_spec.rb → danfe_lib/ticket_spec.rb} +4 -4
- data/spec/lib/{transp_spec.rb → danfe_lib/transp_spec.rb} +4 -4
- data/spec/lib/{vol_spec.rb → danfe_lib/vol_spec.rb} +4 -4
- data/spec/lib/{xml_spec.rb → danfe_lib/xml_spec.rb} +2 -2
- data/spec/lib/{xprod_spec.rb → danfe_lib/xprod_spec.rb} +5 -5
- metadata +242 -174
- data/lib/br_danfe/cep.rb +0 -7
- data/lib/br_danfe/consts.rb +0 -4
- data/lib/br_danfe/cst.rb +0 -28
- data/lib/br_danfe/dest.rb +0 -84
- data/lib/br_danfe/det_body.rb +0 -73
- data/lib/br_danfe/det_header.rb +0 -38
- data/lib/br_danfe/document.rb +0 -133
- data/lib/br_danfe/dup.rb +0 -50
- data/lib/br_danfe/emit.rb +0 -21
- data/lib/br_danfe/emit_header.rb +0 -80
- data/lib/br_danfe/helper.rb +0 -62
- data/lib/br_danfe/icmstot.rb +0 -31
- data/lib/br_danfe/infadic.rb +0 -78
- data/lib/br_danfe/issqn.rb +0 -22
- data/lib/br_danfe/options.rb +0 -22
- data/lib/br_danfe/phone.rb +0 -11
- data/lib/br_danfe/plate.rb +0 -7
- data/lib/br_danfe/ticket.rb +0 -15
- data/lib/br_danfe/transp.rb +0 -49
- data/lib/br_danfe/vol.rb +0 -39
- data/lib/br_danfe/xml.rb +0 -36
- data/lib/br_danfe/xprod.rb +0 -46
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: br_danfe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ASSEINFO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -70,70 +70,84 @@ dependencies:
|
|
70
70
|
name: i18n
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: br_documents
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.0.8
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.0.8
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: byebug
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 3.5.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.5.1
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rspec
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: 3.0.0
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: 3.0.0
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: simplecov
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: 0.9.0
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: 0.9.0
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: codeclimate-test-reporter
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: '0'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
description:
|
@@ -142,9 +156,9 @@ executables: []
|
|
142
156
|
extensions: []
|
143
157
|
extra_rdoc_files: []
|
144
158
|
files:
|
145
|
-
- .gitignore
|
146
|
-
- .rspec
|
147
|
-
- .travis.yml
|
159
|
+
- ".gitignore"
|
160
|
+
- ".rspec"
|
161
|
+
- ".travis.yml"
|
148
162
|
- Gemfile
|
149
163
|
- README.md
|
150
164
|
- Rakefile
|
@@ -152,98 +166,129 @@ files:
|
|
152
166
|
- circle.yml
|
153
167
|
- config/locales/pt-BR.yml
|
154
168
|
- lib/br_danfe.rb
|
155
|
-
- lib/br_danfe/
|
156
|
-
- lib/br_danfe/
|
157
|
-
- lib/br_danfe/
|
169
|
+
- lib/br_danfe/cce.rb
|
170
|
+
- lib/br_danfe/cce_lib/barcode.rb
|
171
|
+
- lib/br_danfe/cce_lib/correction.rb
|
172
|
+
- lib/br_danfe/cce_lib/document.rb
|
173
|
+
- lib/br_danfe/cce_lib/footer.rb
|
174
|
+
- lib/br_danfe/cce_lib/header.rb
|
175
|
+
- lib/br_danfe/cce_lib/nfe_key.rb
|
176
|
+
- lib/br_danfe/cce_lib/protocol.rb
|
158
177
|
- lib/br_danfe/danfe.rb
|
159
|
-
- lib/br_danfe/
|
160
|
-
- lib/br_danfe/
|
161
|
-
- lib/br_danfe/
|
162
|
-
- lib/br_danfe/
|
163
|
-
- lib/br_danfe/
|
164
|
-
- lib/br_danfe/
|
165
|
-
- lib/br_danfe/
|
166
|
-
- lib/br_danfe/
|
167
|
-
- lib/br_danfe/
|
168
|
-
- lib/br_danfe/
|
169
|
-
- lib/br_danfe/
|
170
|
-
- lib/br_danfe/
|
171
|
-
- lib/br_danfe/
|
172
|
-
- lib/br_danfe/
|
173
|
-
- lib/br_danfe/
|
174
|
-
- lib/br_danfe/
|
178
|
+
- lib/br_danfe/danfe_lib/cep.rb
|
179
|
+
- lib/br_danfe/danfe_lib/consts.rb
|
180
|
+
- lib/br_danfe/danfe_lib/cst.rb
|
181
|
+
- lib/br_danfe/danfe_lib/dest.rb
|
182
|
+
- lib/br_danfe/danfe_lib/det_body.rb
|
183
|
+
- lib/br_danfe/danfe_lib/det_header.rb
|
184
|
+
- lib/br_danfe/danfe_lib/document.rb
|
185
|
+
- lib/br_danfe/danfe_lib/dup.rb
|
186
|
+
- lib/br_danfe/danfe_lib/emit.rb
|
187
|
+
- lib/br_danfe/danfe_lib/emit_header.rb
|
188
|
+
- lib/br_danfe/danfe_lib/helper.rb
|
189
|
+
- lib/br_danfe/danfe_lib/icmstot.rb
|
190
|
+
- lib/br_danfe/danfe_lib/infadic.rb
|
191
|
+
- lib/br_danfe/danfe_lib/issqn.rb
|
192
|
+
- lib/br_danfe/danfe_lib/options.rb
|
193
|
+
- lib/br_danfe/danfe_lib/phone.rb
|
194
|
+
- lib/br_danfe/danfe_lib/plate.rb
|
195
|
+
- lib/br_danfe/danfe_lib/ticket.rb
|
196
|
+
- lib/br_danfe/danfe_lib/transp.rb
|
197
|
+
- lib/br_danfe/danfe_lib/vol.rb
|
198
|
+
- lib/br_danfe/danfe_lib/xml.rb
|
199
|
+
- lib/br_danfe/danfe_lib/xprod.rb
|
175
200
|
- lib/br_danfe/version.rb
|
176
|
-
-
|
177
|
-
- lib/br_danfe/xml.rb
|
178
|
-
- lib/br_danfe/xprod.rb
|
201
|
+
- spec/features/cce_spec.rb
|
179
202
|
- spec/features/danfe_spec.rb
|
180
|
-
- spec/fixtures/lib/
|
181
|
-
- spec/fixtures/lib/
|
182
|
-
- spec/fixtures/lib/
|
183
|
-
- spec/fixtures/lib/
|
184
|
-
- spec/fixtures/lib/
|
185
|
-
- spec/fixtures/lib/
|
186
|
-
- spec/fixtures/lib/
|
187
|
-
- spec/fixtures/lib/
|
188
|
-
- spec/fixtures/lib/
|
189
|
-
- spec/fixtures/lib/
|
190
|
-
- spec/fixtures/lib/
|
191
|
-
- spec/fixtures/lib/
|
192
|
-
- spec/fixtures/lib/
|
193
|
-
- spec/fixtures/
|
194
|
-
- spec/fixtures/
|
195
|
-
- spec/fixtures/lib/document#lie-valid.pdf
|
196
|
-
- spec/fixtures/lib/dup#render.pdf
|
197
|
-
- spec/fixtures/lib/emit#render.pdf
|
198
|
-
- spec/fixtures/lib/emit_header#render-with_logo.pdf
|
199
|
-
- spec/fixtures/lib/emit_header#render-without_logo.pdf
|
200
|
-
- spec/fixtures/lib/icmstot#render.pdf
|
201
|
-
- spec/fixtures/lib/infadic#render-extra_volume.pdf
|
202
|
-
- spec/fixtures/lib/infadic#render.pdf
|
203
|
-
- spec/fixtures/lib/issqn#render.pdf
|
204
|
-
- spec/fixtures/lib/ticket#render.pdf
|
205
|
-
- spec/fixtures/lib/transp#render-modfrete_0.pdf
|
206
|
-
- spec/fixtures/lib/transp#render-modfrete_1.pdf
|
207
|
-
- spec/fixtures/lib/transp#render-modfrete_2.pdf
|
208
|
-
- spec/fixtures/lib/transp#render-modfrete_9.pdf
|
209
|
-
- spec/fixtures/lib/transp#render.pdf
|
210
|
-
- spec/fixtures/lib/vol#render-blank-boxes.pdf
|
211
|
-
- spec/fixtures/lib/vol#render.pdf
|
203
|
+
- spec/fixtures/cce/lib/barcode#render.pdf
|
204
|
+
- spec/fixtures/cce/lib/correction#render.pdf
|
205
|
+
- spec/fixtures/cce/lib/document#box.pdf
|
206
|
+
- spec/fixtures/cce/lib/document#box.with.block.pdf
|
207
|
+
- spec/fixtures/cce/lib/document#text.align.pdf
|
208
|
+
- spec/fixtures/cce/lib/document#text.pad.pdf
|
209
|
+
- spec/fixtures/cce/lib/document#text.simple.pdf
|
210
|
+
- spec/fixtures/cce/lib/document#text.size.pdf
|
211
|
+
- spec/fixtures/cce/lib/document#text.style.pdf
|
212
|
+
- spec/fixtures/cce/lib/footer#render.pdf
|
213
|
+
- spec/fixtures/cce/lib/header#render.pdf
|
214
|
+
- spec/fixtures/cce/lib/nfe_key#render.pdf
|
215
|
+
- spec/fixtures/cce/lib/protocol#render.pdf
|
216
|
+
- spec/fixtures/cce/v1.00/cce.fixture.pdf
|
217
|
+
- spec/fixtures/cce/v1.00/cce.xml
|
212
218
|
- spec/fixtures/logo.png
|
213
|
-
- spec/fixtures/v2.00
|
214
|
-
- spec/fixtures/
|
215
|
-
- spec/fixtures/
|
216
|
-
- spec/fixtures/
|
217
|
-
- spec/fixtures/
|
218
|
-
- spec/fixtures/
|
219
|
-
- spec/fixtures/
|
220
|
-
- spec/fixtures/
|
221
|
-
- spec/fixtures/
|
222
|
-
- spec/fixtures/
|
223
|
-
- spec/fixtures/
|
224
|
-
- spec/fixtures/
|
225
|
-
- spec/fixtures/
|
226
|
-
- spec/lib/
|
227
|
-
- spec/lib/
|
228
|
-
- spec/lib/
|
229
|
-
- spec/lib/
|
230
|
-
- spec/lib/
|
231
|
-
- spec/lib/
|
232
|
-
- spec/lib/
|
233
|
-
- spec/lib/
|
234
|
-
- spec/lib/
|
235
|
-
- spec/lib/
|
236
|
-
- spec/lib/
|
237
|
-
- spec/lib/
|
238
|
-
- spec/lib/
|
239
|
-
- spec/lib/
|
240
|
-
- spec/lib/
|
241
|
-
- spec/lib/
|
242
|
-
- spec/lib/
|
243
|
-
- spec/lib/
|
244
|
-
- spec/lib/
|
245
|
-
- spec/
|
246
|
-
- spec/
|
219
|
+
- spec/fixtures/nfe/lib/dest#render-v2.00.pdf
|
220
|
+
- spec/fixtures/nfe/lib/dest#render-v3.10.pdf
|
221
|
+
- spec/fixtures/nfe/lib/dest#render-with_cnpj.pdf
|
222
|
+
- spec/fixtures/nfe/lib/dest#render-with_cpf.pdf
|
223
|
+
- spec/fixtures/nfe/lib/dest#render-with_ie.pdf
|
224
|
+
- spec/fixtures/nfe/lib/det_body#render-csosn.pdf
|
225
|
+
- spec/fixtures/nfe/lib/det_body#render-cst.pdf
|
226
|
+
- spec/fixtures/nfe/lib/det_body#render-fci.pdf
|
227
|
+
- spec/fixtures/nfe/lib/det_body#render-icms_st.pdf
|
228
|
+
- spec/fixtures/nfe/lib/det_header#render.pdf
|
229
|
+
- spec/fixtures/nfe/lib/document#lcnpj-blank.pdf
|
230
|
+
- spec/fixtures/nfe/lib/document#lcnpj-invalid.pdf
|
231
|
+
- spec/fixtures/nfe/lib/document#lcnpj-valid.pdf
|
232
|
+
- spec/fixtures/nfe/lib/document#lie-blank.pdf
|
233
|
+
- spec/fixtures/nfe/lib/document#lie-invalid.pdf
|
234
|
+
- spec/fixtures/nfe/lib/document#lie-valid.pdf
|
235
|
+
- spec/fixtures/nfe/lib/dup#render.pdf
|
236
|
+
- spec/fixtures/nfe/lib/emit#render.pdf
|
237
|
+
- spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf
|
238
|
+
- spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf
|
239
|
+
- spec/fixtures/nfe/lib/icmstot#render.pdf
|
240
|
+
- spec/fixtures/nfe/lib/infadic#render-extra_volume.pdf
|
241
|
+
- spec/fixtures/nfe/lib/infadic#render.pdf
|
242
|
+
- spec/fixtures/nfe/lib/issqn#render.pdf
|
243
|
+
- spec/fixtures/nfe/lib/ticket#render.pdf
|
244
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_0.pdf
|
245
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_1.pdf
|
246
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_2.pdf
|
247
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_9.pdf
|
248
|
+
- spec/fixtures/nfe/lib/transp#render.pdf
|
249
|
+
- spec/fixtures/nfe/lib/vol#render-blank-boxes.pdf
|
250
|
+
- spec/fixtures/nfe/lib/vol#render.pdf
|
251
|
+
- spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml
|
252
|
+
- spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml.fixture.pdf
|
253
|
+
- spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml
|
254
|
+
- spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml.fixture.pdf
|
255
|
+
- spec/fixtures/nfe/v2.00/nfe_with_fci.xml
|
256
|
+
- spec/fixtures/nfe/v2.00/nfe_with_fci.xml.fixture.pdf
|
257
|
+
- spec/fixtures/nfe/v2.00/nfe_with_logo.xml
|
258
|
+
- spec/fixtures/nfe/v2.00/nfe_with_ns.xml
|
259
|
+
- spec/fixtures/nfe/v2.00/nfe_with_ns.xml.fixture.pdf
|
260
|
+
- spec/fixtures/nfe/v2.00/nfe_without_ns.xml
|
261
|
+
- spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf
|
262
|
+
- spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml
|
263
|
+
- spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf
|
264
|
+
- spec/lib/cce_lib/barcode_spec.rb
|
265
|
+
- spec/lib/cce_lib/correction_spec.rb
|
266
|
+
- spec/lib/cce_lib/document_spec.rb
|
267
|
+
- spec/lib/cce_lib/footer_spec.rb
|
268
|
+
- spec/lib/cce_lib/header_spec.rb
|
269
|
+
- spec/lib/cce_lib/nfe_key_spec.rb
|
270
|
+
- spec/lib/cce_lib/protocol_spec.rb
|
271
|
+
- spec/lib/danfe_lib/cep_spec.rb
|
272
|
+
- spec/lib/danfe_lib/cst_spec.rb
|
273
|
+
- spec/lib/danfe_lib/dest_spec.rb
|
274
|
+
- spec/lib/danfe_lib/det_body_spec.rb
|
275
|
+
- spec/lib/danfe_lib/det_header_spec.rb
|
276
|
+
- spec/lib/danfe_lib/document_spec.rb
|
277
|
+
- spec/lib/danfe_lib/dup_spec.rb
|
278
|
+
- spec/lib/danfe_lib/emit_header_spec.rb
|
279
|
+
- spec/lib/danfe_lib/emit_spec.rb
|
280
|
+
- spec/lib/danfe_lib/helper_spec.rb
|
281
|
+
- spec/lib/danfe_lib/icmstot_spec.rb
|
282
|
+
- spec/lib/danfe_lib/infadic_spec.rb
|
283
|
+
- spec/lib/danfe_lib/issqn_spec.rb
|
284
|
+
- spec/lib/danfe_lib/options_spec.rb
|
285
|
+
- spec/lib/danfe_lib/phone_spec.rb
|
286
|
+
- spec/lib/danfe_lib/plate_spec.rb
|
287
|
+
- spec/lib/danfe_lib/ticket_spec.rb
|
288
|
+
- spec/lib/danfe_lib/transp_spec.rb
|
289
|
+
- spec/lib/danfe_lib/vol_spec.rb
|
290
|
+
- spec/lib/danfe_lib/xml_spec.rb
|
291
|
+
- spec/lib/danfe_lib/xprod_spec.rb
|
247
292
|
- spec/spec_helper.rb
|
248
293
|
- spec/support/have_same_content_of.rb
|
249
294
|
homepage: http://github.com/asseinfo/br_danfe
|
@@ -256,88 +301,111 @@ require_paths:
|
|
256
301
|
- lib
|
257
302
|
required_ruby_version: !ruby/object:Gem::Requirement
|
258
303
|
requirements:
|
259
|
-
- -
|
304
|
+
- - ">="
|
260
305
|
- !ruby/object:Gem::Version
|
261
306
|
version: '2.0'
|
262
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
308
|
requirements:
|
264
|
-
- -
|
309
|
+
- - ">="
|
265
310
|
- !ruby/object:Gem::Version
|
266
311
|
version: '0'
|
267
312
|
requirements: []
|
268
313
|
rubyforge_project:
|
269
|
-
rubygems_version: 2.
|
314
|
+
rubygems_version: 2.4.2
|
270
315
|
signing_key:
|
271
316
|
specification_version: 4
|
272
317
|
summary: DANFE pdf generator for Brazilian invoices.
|
273
318
|
test_files:
|
319
|
+
- spec/features/cce_spec.rb
|
274
320
|
- spec/features/danfe_spec.rb
|
275
|
-
- spec/fixtures/lib/
|
276
|
-
- spec/fixtures/lib/
|
277
|
-
- spec/fixtures/lib/
|
278
|
-
- spec/fixtures/lib/
|
279
|
-
- spec/fixtures/lib/
|
280
|
-
- spec/fixtures/lib/
|
281
|
-
- spec/fixtures/lib/
|
282
|
-
- spec/fixtures/lib/
|
283
|
-
- spec/fixtures/lib/
|
284
|
-
- spec/fixtures/lib/
|
285
|
-
- spec/fixtures/lib/
|
286
|
-
- spec/fixtures/lib/
|
287
|
-
- spec/fixtures/lib/
|
288
|
-
- spec/fixtures/
|
289
|
-
- spec/fixtures/
|
290
|
-
- spec/fixtures/lib/document#lie-valid.pdf
|
291
|
-
- spec/fixtures/lib/dup#render.pdf
|
292
|
-
- spec/fixtures/lib/emit#render.pdf
|
293
|
-
- spec/fixtures/lib/emit_header#render-with_logo.pdf
|
294
|
-
- spec/fixtures/lib/emit_header#render-without_logo.pdf
|
295
|
-
- spec/fixtures/lib/icmstot#render.pdf
|
296
|
-
- spec/fixtures/lib/infadic#render-extra_volume.pdf
|
297
|
-
- spec/fixtures/lib/infadic#render.pdf
|
298
|
-
- spec/fixtures/lib/issqn#render.pdf
|
299
|
-
- spec/fixtures/lib/ticket#render.pdf
|
300
|
-
- spec/fixtures/lib/transp#render-modfrete_0.pdf
|
301
|
-
- spec/fixtures/lib/transp#render-modfrete_1.pdf
|
302
|
-
- spec/fixtures/lib/transp#render-modfrete_2.pdf
|
303
|
-
- spec/fixtures/lib/transp#render-modfrete_9.pdf
|
304
|
-
- spec/fixtures/lib/transp#render.pdf
|
305
|
-
- spec/fixtures/lib/vol#render-blank-boxes.pdf
|
306
|
-
- spec/fixtures/lib/vol#render.pdf
|
321
|
+
- spec/fixtures/cce/lib/barcode#render.pdf
|
322
|
+
- spec/fixtures/cce/lib/correction#render.pdf
|
323
|
+
- spec/fixtures/cce/lib/document#box.pdf
|
324
|
+
- spec/fixtures/cce/lib/document#box.with.block.pdf
|
325
|
+
- spec/fixtures/cce/lib/document#text.align.pdf
|
326
|
+
- spec/fixtures/cce/lib/document#text.pad.pdf
|
327
|
+
- spec/fixtures/cce/lib/document#text.simple.pdf
|
328
|
+
- spec/fixtures/cce/lib/document#text.size.pdf
|
329
|
+
- spec/fixtures/cce/lib/document#text.style.pdf
|
330
|
+
- spec/fixtures/cce/lib/footer#render.pdf
|
331
|
+
- spec/fixtures/cce/lib/header#render.pdf
|
332
|
+
- spec/fixtures/cce/lib/nfe_key#render.pdf
|
333
|
+
- spec/fixtures/cce/lib/protocol#render.pdf
|
334
|
+
- spec/fixtures/cce/v1.00/cce.fixture.pdf
|
335
|
+
- spec/fixtures/cce/v1.00/cce.xml
|
307
336
|
- spec/fixtures/logo.png
|
308
|
-
- spec/fixtures/v2.00
|
309
|
-
- spec/fixtures/
|
310
|
-
- spec/fixtures/
|
311
|
-
- spec/fixtures/
|
312
|
-
- spec/fixtures/
|
313
|
-
- spec/fixtures/
|
314
|
-
- spec/fixtures/
|
315
|
-
- spec/fixtures/
|
316
|
-
- spec/fixtures/
|
317
|
-
- spec/fixtures/
|
318
|
-
- spec/fixtures/
|
319
|
-
- spec/fixtures/
|
320
|
-
- spec/fixtures/
|
321
|
-
- spec/lib/
|
322
|
-
- spec/lib/
|
323
|
-
- spec/lib/
|
324
|
-
- spec/lib/
|
325
|
-
- spec/lib/
|
326
|
-
- spec/lib/
|
327
|
-
- spec/lib/
|
328
|
-
- spec/lib/
|
329
|
-
- spec/lib/
|
330
|
-
- spec/lib/
|
331
|
-
- spec/lib/
|
332
|
-
- spec/lib/
|
333
|
-
- spec/lib/
|
334
|
-
- spec/lib/
|
335
|
-
- spec/lib/
|
336
|
-
- spec/lib/
|
337
|
-
- spec/lib/
|
338
|
-
- spec/lib/
|
339
|
-
- spec/lib/
|
340
|
-
- spec/
|
341
|
-
- spec/
|
337
|
+
- spec/fixtures/nfe/lib/dest#render-v2.00.pdf
|
338
|
+
- spec/fixtures/nfe/lib/dest#render-v3.10.pdf
|
339
|
+
- spec/fixtures/nfe/lib/dest#render-with_cnpj.pdf
|
340
|
+
- spec/fixtures/nfe/lib/dest#render-with_cpf.pdf
|
341
|
+
- spec/fixtures/nfe/lib/dest#render-with_ie.pdf
|
342
|
+
- spec/fixtures/nfe/lib/det_body#render-csosn.pdf
|
343
|
+
- spec/fixtures/nfe/lib/det_body#render-cst.pdf
|
344
|
+
- spec/fixtures/nfe/lib/det_body#render-fci.pdf
|
345
|
+
- spec/fixtures/nfe/lib/det_body#render-icms_st.pdf
|
346
|
+
- spec/fixtures/nfe/lib/det_header#render.pdf
|
347
|
+
- spec/fixtures/nfe/lib/document#lcnpj-blank.pdf
|
348
|
+
- spec/fixtures/nfe/lib/document#lcnpj-invalid.pdf
|
349
|
+
- spec/fixtures/nfe/lib/document#lcnpj-valid.pdf
|
350
|
+
- spec/fixtures/nfe/lib/document#lie-blank.pdf
|
351
|
+
- spec/fixtures/nfe/lib/document#lie-invalid.pdf
|
352
|
+
- spec/fixtures/nfe/lib/document#lie-valid.pdf
|
353
|
+
- spec/fixtures/nfe/lib/dup#render.pdf
|
354
|
+
- spec/fixtures/nfe/lib/emit#render.pdf
|
355
|
+
- spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf
|
356
|
+
- spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf
|
357
|
+
- spec/fixtures/nfe/lib/icmstot#render.pdf
|
358
|
+
- spec/fixtures/nfe/lib/infadic#render-extra_volume.pdf
|
359
|
+
- spec/fixtures/nfe/lib/infadic#render.pdf
|
360
|
+
- spec/fixtures/nfe/lib/issqn#render.pdf
|
361
|
+
- spec/fixtures/nfe/lib/ticket#render.pdf
|
362
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_0.pdf
|
363
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_1.pdf
|
364
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_2.pdf
|
365
|
+
- spec/fixtures/nfe/lib/transp#render-modfrete_9.pdf
|
366
|
+
- spec/fixtures/nfe/lib/transp#render.pdf
|
367
|
+
- spec/fixtures/nfe/lib/vol#render-blank-boxes.pdf
|
368
|
+
- spec/fixtures/nfe/lib/vol#render.pdf
|
369
|
+
- spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml
|
370
|
+
- spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml.fixture.pdf
|
371
|
+
- spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml
|
372
|
+
- spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml.fixture.pdf
|
373
|
+
- spec/fixtures/nfe/v2.00/nfe_with_fci.xml
|
374
|
+
- spec/fixtures/nfe/v2.00/nfe_with_fci.xml.fixture.pdf
|
375
|
+
- spec/fixtures/nfe/v2.00/nfe_with_logo.xml
|
376
|
+
- spec/fixtures/nfe/v2.00/nfe_with_ns.xml
|
377
|
+
- spec/fixtures/nfe/v2.00/nfe_with_ns.xml.fixture.pdf
|
378
|
+
- spec/fixtures/nfe/v2.00/nfe_without_ns.xml
|
379
|
+
- spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf
|
380
|
+
- spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml
|
381
|
+
- spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf
|
382
|
+
- spec/lib/cce_lib/barcode_spec.rb
|
383
|
+
- spec/lib/cce_lib/correction_spec.rb
|
384
|
+
- spec/lib/cce_lib/document_spec.rb
|
385
|
+
- spec/lib/cce_lib/footer_spec.rb
|
386
|
+
- spec/lib/cce_lib/header_spec.rb
|
387
|
+
- spec/lib/cce_lib/nfe_key_spec.rb
|
388
|
+
- spec/lib/cce_lib/protocol_spec.rb
|
389
|
+
- spec/lib/danfe_lib/cep_spec.rb
|
390
|
+
- spec/lib/danfe_lib/cst_spec.rb
|
391
|
+
- spec/lib/danfe_lib/dest_spec.rb
|
392
|
+
- spec/lib/danfe_lib/det_body_spec.rb
|
393
|
+
- spec/lib/danfe_lib/det_header_spec.rb
|
394
|
+
- spec/lib/danfe_lib/document_spec.rb
|
395
|
+
- spec/lib/danfe_lib/dup_spec.rb
|
396
|
+
- spec/lib/danfe_lib/emit_header_spec.rb
|
397
|
+
- spec/lib/danfe_lib/emit_spec.rb
|
398
|
+
- spec/lib/danfe_lib/helper_spec.rb
|
399
|
+
- spec/lib/danfe_lib/icmstot_spec.rb
|
400
|
+
- spec/lib/danfe_lib/infadic_spec.rb
|
401
|
+
- spec/lib/danfe_lib/issqn_spec.rb
|
402
|
+
- spec/lib/danfe_lib/options_spec.rb
|
403
|
+
- spec/lib/danfe_lib/phone_spec.rb
|
404
|
+
- spec/lib/danfe_lib/plate_spec.rb
|
405
|
+
- spec/lib/danfe_lib/ticket_spec.rb
|
406
|
+
- spec/lib/danfe_lib/transp_spec.rb
|
407
|
+
- spec/lib/danfe_lib/vol_spec.rb
|
408
|
+
- spec/lib/danfe_lib/xml_spec.rb
|
409
|
+
- spec/lib/danfe_lib/xprod_spec.rb
|
342
410
|
- spec/spec_helper.rb
|
343
411
|
- spec/support/have_same_content_of.rb
|
data/lib/br_danfe/cep.rb
DELETED
data/lib/br_danfe/consts.rb
DELETED
data/lib/br_danfe/cst.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
module BrDanfe
|
2
|
-
class Cst
|
3
|
-
def self.to_danfe(xml)
|
4
|
-
value = origin(xml)
|
5
|
-
|
6
|
-
if csosn?(xml)
|
7
|
-
value += xml.css("ICMS/*/CSOSN").text
|
8
|
-
elsif cst?(xml)
|
9
|
-
value += xml.css("ICMS/*/CST").text
|
10
|
-
end
|
11
|
-
|
12
|
-
value
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
def self.origin(xml)
|
17
|
-
xml.css("ICMS/*/orig").text
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.cst?(xml)
|
21
|
-
xml.css("ICMS/*/CST").text != ""
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.csosn?(xml)
|
25
|
-
xml.css("ICMS/*/CSOSN").text != ""
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|