br_danfe 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,7 +52,7 @@ describe BrDanfe::Dest do
52
52
 
53
53
  pdf.render_file output_pdf
54
54
 
55
- expect("#{base_dir}dest.pdf").to be_same_file_as(output_pdf)
55
+ expect("#{base_dir}dest#render-v2.00.pdf").to be_same_file_as(output_pdf)
56
56
  end
57
57
  end
58
58
 
@@ -92,7 +92,7 @@ describe BrDanfe::Dest do
92
92
 
93
93
  pdf.render_file output_pdf
94
94
 
95
- expect("#{base_dir}dest.pdf").to be_same_file_as(output_pdf)
95
+ expect("#{base_dir}dest#render-v3.10.pdf").to be_same_file_as(output_pdf)
96
96
  end
97
97
  end
98
98
  end
@@ -31,8 +31,8 @@ describe BrDanfe::Helper do
31
31
  describe "when param is a complete datetime" do
32
32
  let(:param) { "2013-10-18T16:54:04-03:00" }
33
33
 
34
- it "is a formated time string in UTC" do
35
- expect(BrDanfe::Helper.format_time(param)).to eq "19:54:04"
34
+ it "is a formated time string in localtime" do
35
+ expect(BrDanfe::Helper.format_time(param)).to eq "16:54:04"
36
36
  end
37
37
  end
38
38
 
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.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ASSEINFO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -146,6 +146,7 @@ files:
146
146
  - lib/br_danfe/document.rb
147
147
  - lib/br_danfe/dup.rb
148
148
  - lib/br_danfe/emit.rb
149
+ - lib/br_danfe/emit_header.rb
149
150
  - lib/br_danfe/helper.rb
150
151
  - lib/br_danfe/icmstot.rb
151
152
  - lib/br_danfe/infadic.rb
@@ -160,7 +161,8 @@ files:
160
161
  - lib/br_danfe/xml.rb
161
162
  - lib/br_danfe/xprod.rb
162
163
  - spec/features/br_danfe_spec.rb
163
- - spec/fixtures/lib/dest.pdf
164
+ - spec/fixtures/lib/dest#render-v2.00.pdf
165
+ - spec/fixtures/lib/dest#render-v3.10.pdf
164
166
  - spec/fixtures/v2.00/nfe_simples_nacional.xml
165
167
  - spec/fixtures/v2.00/nfe_simples_nacional.xml.fixture.pdf
166
168
  - spec/fixtures/v2.00/nfe_with_cpf.xml
@@ -215,7 +217,8 @@ specification_version: 4
215
217
  summary: DANFE pdf generator for Brazilian invoices.
216
218
  test_files:
217
219
  - spec/features/br_danfe_spec.rb
218
- - spec/fixtures/lib/dest.pdf
220
+ - spec/fixtures/lib/dest#render-v2.00.pdf
221
+ - spec/fixtures/lib/dest#render-v3.10.pdf
219
222
  - spec/fixtures/v2.00/nfe_simples_nacional.xml
220
223
  - spec/fixtures/v2.00/nfe_simples_nacional.xml.fixture.pdf
221
224
  - spec/fixtures/v2.00/nfe_with_cpf.xml
@@ -1,279 +0,0 @@
1
- %PDF-1.3
2
- %����
3
- 1 0 obj
4
- << /Creator <feff0050007200610077006e>
5
- /Producer <feff0050007200610077006e>
6
- >>
7
- endobj
8
- 2 0 obj
9
- << /Type /Catalog
10
- /Pages 3 0 R
11
- >>
12
- endobj
13
- 3 0 obj
14
- << /Type /Pages
15
- /Count 1
16
- /Kids [5 0 R]
17
- >>
18
- endobj
19
- 4 0 obj
20
- << /Length 2822
21
- >>
22
- stream
23
- q
24
-
25
- BT
26
- 7.086614173228347 609.406220472441 Td
27
- /F2.0 10 Tf
28
- [<44455354494e> 20 <41> 95 <54> 90 <c152494f202f2052454d4554454e5445>] TJ
29
- ET
30
-
31
- 7.087 582.236 349.228 24.094 re
32
- S
33
-
34
- BT
35
- 9.086614173228348 600.2327086614175 Td
36
- /F3.0 6 Tf
37
- [<4e4f4d452f52415ac3> 40 <4f20534f4349414c>] TJ
38
- ET
39
-
40
-
41
- BT
42
- 9.086614173228348 585.5007086614174 Td
43
- /F1.0 10 Tf
44
- [<5363686e656964657220456c6563747269632042726173696c204c746461>] TJ
45
- ET
46
-
47
- 356.315 582.236 151.087 24.094 re
48
- S
49
-
50
- BT
51
- 358.3149606299213 600.2327086614175 Td
52
- /F3.0 6 Tf
53
- [<434e504a2f435046>] TJ
54
- ET
55
-
56
-
57
- BT
58
- 358.3149606299213 585.5007086614174 Td
59
- /F1.0 10 Tf
60
- [<38322e3734332e3238372f303030382d3830>] TJ
61
- ET
62
-
63
- 507.402 582.236 82.772 24.094 re
64
- S
65
-
66
- BT
67
- 509.4015748031497 600.2327086614175 Td
68
- /F3.0 6 Tf
69
- [<44> 35 <41> 37 <54> 50 <412044> 35 <4120454d495353c3> 40 <4f>] TJ
70
- ET
71
-
72
-
73
- BT
74
- 542.6132283464567 585.5007086614174 Td
75
- /F1.0 10 Tf
76
- [<32392f31302f32303131>] TJ
77
- ET
78
-
79
- 7.087 558.142 288.000 24.094 re
80
- S
81
-
82
- BT
83
- 9.086614173228348 576.138220472441 Td
84
- /F3.0 6 Tf
85
- [<454e44455245c74f>] TJ
86
- ET
87
-
88
-
89
- BT
90
- 9.086614173228348 561.406220472441 Td
91
- /F1.0 10 Tf
92
- [<41> 74 <7620646120536175646164652031313235>] TJ
93
- ET
94
-
95
- 295.087 558.142 136.913 24.094 re
96
- S
97
-
98
- BT
99
- 297.0866141732284 576.138220472441 Td
100
- /F3.0 6 Tf
101
- [<42> 25 <41495252> 40 <4f>] TJ
102
- ET
103
-
104
-
105
- BT
106
- 297.0866141732284 561.406220472441 Td
107
- /F1.0 10 Tf
108
- [<46727574616c>] TJ
109
- ET
110
-
111
- 432.000 558.142 75.685 24.094 re
112
- S
113
-
114
- BT
115
- 434.00000000000006 576.138220472441 Td
116
- /F3.0 6 Tf
117
- [<434550>] TJ
118
- ET
119
-
120
-
121
- BT
122
- 434.00000000000006 561.406220472441 Td
123
- /F1.0 10 Tf
124
- [<31332e3137312d333230>] TJ
125
- ET
126
-
127
- 507.402 558.142 82.772 24.094 re
128
- S
129
-
130
- BT
131
- 509.4015748031497 576.138220472441 Td
132
- /F3.0 6 Tf
133
- [<44> 35 <41> 37 <54> 50 <412044> 35 <41205341cd44> 35 <412f454e54524144> 35 <41>] TJ
134
- ET
135
-
136
-
137
- BT
138
- 542.6132283464567 561.406220472441 Td
139
- /F1.0 10 Tf
140
- [<33302f31302f32303131>] TJ
141
- ET
142
-
143
- 7.087 534.047 201.543 24.094 re
144
- S
145
-
146
- BT
147
- 9.086614173228348 552.0437322834647 Td
148
- /F3.0 6 Tf
149
- [<4d554e4943cd50494f>] TJ
150
- ET
151
-
152
-
153
- BT
154
- 9.086614173228348 537.3117322834646 Td
155
- /F1.0 10 Tf
156
- [<53554d415245>] TJ
157
- ET
158
-
159
- 208.630 534.047 115.087 24.094 re
160
- S
161
-
162
- BT
163
- 210.62992125984258 552.0437322834647 Td
164
- /F3.0 6 Tf
165
- [<464f4e452f46> 115 <4158>] TJ
166
- ET
167
-
168
-
169
- BT
170
- 210.62992125984258 537.3117322834646 Td
171
- /F1.0 10 Tf
172
- [<2831392920323130342d36333030>] TJ
173
- ET
174
-
175
- 323.717 534.047 32.315 24.094 re
176
- S
177
-
178
- BT
179
- 325.71653543307093 552.0437322834647 Td
180
- /F3.0 6 Tf
181
- [<5546>] TJ
182
- ET
183
-
184
-
185
- BT
186
- 325.71653543307093 537.3117322834646 Td
187
- /F1.0 10 Tf
188
- [<5350>] TJ
189
- ET
190
-
191
- 356.031 534.047 151.087 24.094 re
192
- S
193
-
194
- BT
195
- 358.0314960629922 552.0437322834647 Td
196
- /F3.0 6 Tf
197
- [<494e53435249c7c3> 40 <4f20455354> 50 <414455> 40 <414c>] TJ
198
- ET
199
-
200
-
201
- BT
202
- 358.0314960629922 537.3117322834646 Td
203
- /F1.0 10 Tf
204
- [<3637312e3030382e3337352e313130>] TJ
205
- ET
206
-
207
- 507.402 534.047 82.772 24.094 re
208
- S
209
-
210
- BT
211
- 509.4015748031497 552.0437322834647 Td
212
- /F3.0 6 Tf
213
- [<484f5241204445205341cd44> 35 <41>] TJ
214
- ET
215
-
216
-
217
- BT
218
- 552.6132283464567 537.3117322834646 Td
219
- /F1.0 10 Tf
220
- [<31353a33323a3435>] TJ
221
- ET
222
-
223
- Q
224
-
225
- endstream
226
- endobj
227
- 5 0 obj
228
- << /Type /Page
229
- /Parent 3 0 R
230
- /MediaBox [0 0 595.28 841.89]
231
- /Contents 4 0 R
232
- /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
233
- /Font << /F2.0 6 0 R
234
- /F3.0 7 0 R
235
- /F1.0 8 0 R
236
- >>
237
- >>
238
- >>
239
- endobj
240
- 6 0 obj
241
- << /Type /Font
242
- /Subtype /Type1
243
- /BaseFont /Times-Bold
244
- /Encoding /WinAnsiEncoding
245
- >>
246
- endobj
247
- 7 0 obj
248
- << /Type /Font
249
- /Subtype /Type1
250
- /BaseFont /Times-Italic
251
- /Encoding /WinAnsiEncoding
252
- >>
253
- endobj
254
- 8 0 obj
255
- << /Type /Font
256
- /Subtype /Type1
257
- /BaseFont /Times-Roman
258
- /Encoding /WinAnsiEncoding
259
- >>
260
- endobj
261
- xref
262
- 0 9
263
- 0000000000 65535 f
264
- 0000000015 00000 n
265
- 0000000109 00000 n
266
- 0000000158 00000 n
267
- 0000000215 00000 n
268
- 0000003089 00000 n
269
- 0000003293 00000 n
270
- 0000003391 00000 n
271
- 0000003491 00000 n
272
- trailer
273
- << /Size 9
274
- /Root 2 0 R
275
- /Info 1 0 R
276
- >>
277
- startxref
278
- 3590
279
- %%EOF