check_writer 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.7
1
+ 0.4.8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "check_writer"
8
- s.version = "0.4.7"
8
+ s.version = "0.4.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Winograd"]
12
- s.date = "2014-12-15"
12
+ s.date = "2015-08-03"
13
13
  s.description = "Ruby library for generating PDF checks that you can take to the bank"
14
14
  s.email = "ryan@thewinograds.com"
15
15
  s.extra_rdoc_files = [
@@ -120,15 +120,15 @@ module CheckWriter
120
120
  # Payor and payee names
121
121
  @pdf.move_to [@pdf.bounds.left, inches(0.5)]
122
122
  @pdf.line_to [@pdf.bounds.right, inches(0.5)]
123
- @pdf.bounding_box [@pdf.bounds.left + 8, inches(0.5) - 6], :width => inches(6.75) do
123
+ @pdf.bounding_box [@pdf.bounds.left + 8, inches(0.5) - 6], :width => inches(6.5) do
124
124
  @pdf.text "Payor: #{payor_name}"
125
125
  @pdf.text "Payee: #{payee_name}"
126
126
  end
127
127
 
128
128
  # Amount
129
- @pdf.move_to [@pdf.bounds.right - inches(2), inches(0.5)]
130
- @pdf.line_to [@pdf.bounds.right - inches(2), 0]
131
- @pdf.bounding_box [@pdf.bounds.left + inches(5.5), inches(0.5) - 6], :width => inches(1), :height => inches(0.5) do
129
+ @pdf.move_to [@pdf.bounds.right - inches(2.25), inches(0.5)]
130
+ @pdf.line_to [@pdf.bounds.right - inches(2.25), 0]
131
+ @pdf.bounding_box [@pdf.bounds.left + inches(5.25), inches(0.5) - 6], :width => inches(1.25), :height => inches(0.5) do
132
132
  @pdf.text "Amount", :align => :center
133
133
  @pdf.text formatted_amount, :align => :center
134
134
  end
@@ -171,7 +171,7 @@ module CheckWriter
171
171
  @pdf.bounding_box [@pdf.bounds.left + inches(4.5), @pdf.bounds.top - inches(1.25)], :width => inches(1) do
172
172
  @pdf.text formatted_date
173
173
  end
174
- @pdf.bounding_box [@pdf.bounds.right - inches(1) - 4, @pdf.bounds.top - inches(1.25)], :width => inches(1) do
174
+ @pdf.bounding_box [@pdf.bounds.right - inches(2) - 4, @pdf.bounds.top - inches(1.25)], :width => inches(2) do
175
175
  @pdf.text "<b>#{formatted_amount}</b>", :align => :right, :inline_format => true
176
176
  end
177
177
  @pdf.text_box "#{amount_in_words}#{" -"*72}", :at => [@pdf.bounds.left + 4, @pdf.bounds.top - inches(1.5)], :height => inches(0.2)
@@ -17,7 +17,7 @@ endobj
17
17
  >>
18
18
  endobj
19
19
  4 0 obj
20
- << /Length 1630
20
+ << /Length 1668
21
21
  >>
22
22
  stream
23
23
  q
@@ -46,20 +46,20 @@ BT
46
46
  [<50> 40 <61> 30 <79> 20 <65653a204a6f686e20536d69746820776974682061205265616c6c79205265616c6c79> 100 <2c205265616c6c79205265616c6c79204c6f6e67204e616d65>] TJ
47
47
  ET
48
48
 
49
- 432.000 576.000 m
50
- 432.000 540.000 l
49
+ 414.000 576.000 m
50
+ 414.000 540.000 l
51
51
 
52
52
  BT
53
- 447.324 561.384 Td
53
+ 438.324 561.384 Td
54
54
  /F1.0 12 Tf
55
55
  [<416d6f756e74>] TJ
56
56
  ET
57
57
 
58
58
 
59
59
  BT
60
- 441.312 547.512 Td
60
+ 420.63599999999997 547.512 Td
61
61
  /F1.0 12 Tf
62
- [<24312c3030332e3233>] TJ
62
+ [<24312c3030302c3030332e3233>] TJ
63
63
  ET
64
64
 
65
65
  504.000 576.000 m
@@ -103,20 +103,20 @@ BT
103
103
  [<50> 40 <61> 30 <79> 20 <65653a204a6f686e20536d69746820776974682061205265616c6c79205265616c6c79> 100 <2c205265616c6c79205265616c6c79204c6f6e67204e616d65>] TJ
104
104
  ET
105
105
 
106
- 432.000 342.000 m
107
- 432.000 306.000 l
106
+ 414.000 342.000 m
107
+ 414.000 306.000 l
108
108
 
109
109
  BT
110
- 447.324 327.384 Td
110
+ 438.324 327.384 Td
111
111
  /F1.0 12 Tf
112
112
  [<416d6f756e74>] TJ
113
113
  ET
114
114
 
115
115
 
116
116
  BT
117
- 441.312 313.512 Td
117
+ 420.63599999999997 313.512 Td
118
118
  /F1.0 12 Tf
119
- [<24312c3030332e3233>] TJ
119
+ [<24312c3030302c3030332e3233>] TJ
120
120
  ET
121
121
 
122
122
  504.000 342.000 m
@@ -165,13 +165,13 @@ xref
165
165
  0000000109 00000 n
166
166
  0000000158 00000 n
167
167
  0000000215 00000 n
168
- 0000001897 00000 n
169
- 0000002075 00000 n
168
+ 0000001935 00000 n
169
+ 0000002113 00000 n
170
170
  trailer
171
171
  << /Size 7
172
172
  /Root 2 0 R
173
173
  /Info 1 0 R
174
174
  >>
175
175
  startxref
176
- 2172
176
+ 2210
177
177
  %%EOF
Binary file
@@ -17,7 +17,7 @@ endobj
17
17
  >>
18
18
  endobj
19
19
  4 0 obj
20
- << /Length 19273
20
+ << /Length 19332
21
21
  >>
22
22
  stream
23
23
  q
@@ -636,20 +636,20 @@ BT
636
636
  [<50> 40 <61> 30 <79> 20 <65653a204a6f686e20536d69746820776974682061205265616c6c79205265616c6c79> 100 <2c205265616c6c79205265616c6c79204c6f6e67204e616d65>] TJ
637
637
  ET
638
638
 
639
- 432.000 576.000 m
640
- 432.000 540.000 l
639
+ 414.000 576.000 m
640
+ 414.000 540.000 l
641
641
 
642
642
  BT
643
- 447.324 561.384 Td
643
+ 438.324 561.384 Td
644
644
  /F1.0 12 Tf
645
645
  [<416d6f756e74>] TJ
646
646
  ET
647
647
 
648
648
 
649
649
  BT
650
- 441.312 547.512 Td
650
+ 420.63599999999997 547.512 Td
651
651
  /F1.0 12 Tf
652
- [<24312c3030332e3233>] TJ
652
+ [<24312c3030302c3030332e3233>] TJ
653
653
  ET
654
654
 
655
655
  504.000 576.000 m
@@ -1281,20 +1281,20 @@ BT
1281
1281
  [<50> 40 <61> 30 <79> 20 <65653a204a6f686e20536d69746820776974682061205265616c6c79205265616c6c79> 100 <2c205265616c6c79205265616c6c79204c6f6e67204e616d65>] TJ
1282
1282
  ET
1283
1283
 
1284
- 432.000 342.000 m
1285
- 432.000 306.000 l
1284
+ 414.000 342.000 m
1285
+ 414.000 306.000 l
1286
1286
 
1287
1287
  BT
1288
- 447.324 327.384 Td
1288
+ 438.324 327.384 Td
1289
1289
  /F1.0 12 Tf
1290
1290
  [<416d6f756e74>] TJ
1291
1291
  ET
1292
1292
 
1293
1293
 
1294
1294
  BT
1295
- 441.312 313.512 Td
1295
+ 420.63599999999997 313.512 Td
1296
1296
  /F1.0 12 Tf
1297
- [<24312c3030332e3233>] TJ
1297
+ [<24312c3030302c3030332e3233>] TJ
1298
1298
  ET
1299
1299
 
1300
1300
  504.000 342.000 m
@@ -1378,16 +1378,16 @@ ET
1378
1378
 
1379
1379
 
1380
1380
  BT
1381
- 518.624 153.38400000000001 Td
1381
+ 495.272 153.38400000000001 Td
1382
1382
  /F2.0 12 Tf
1383
- [<24312c3030332e3233>] TJ
1383
+ [<24312c3030302c3030332e3233>] TJ
1384
1384
  ET
1385
1385
 
1386
1386
 
1387
1387
  BT
1388
1388
  40 135.38400000000001 Td
1389
1389
  /F1.0 12 Tf
1390
- [<4f6e652054686f7573616e6420416e6420546872656520446f6c6c61727320416e642054> 120 <77> 10 <656e74792054687265652043656e7473202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d>] TJ
1390
+ [<4f6e65204d696c6c696f6e20416e6420546872656520446f6c6c61727320416e642054> 120 <77> 10 <656e74792054687265652043656e7473202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d202d>] TJ
1391
1391
  ET
1392
1392
 
1393
1393
 
@@ -1429,9 +1429,9 @@ ET
1429
1429
  576.000 50.400 l
1430
1430
 
1431
1431
  BT
1432
- 429.544 42.656 Td
1432
+ 421.76 42.656 Td
1433
1433
  /F1.0 8 Tf
1434
- [<4e4f> 40 <542056> 80 <414c4944204946204f> 50 <5645522024312c3030332e3233>] TJ
1434
+ [<4e4f> 40 <542056> 80 <414c4944204946204f> 50 <5645522024312c3030302c3030332e3233>] TJ
1435
1435
  ET
1436
1436
 
1437
1437
 
@@ -1531,19 +1531,19 @@ xref
1531
1531
  0000000109 00000 n
1532
1532
  0000000158 00000 n
1533
1533
  0000000215 00000 n
1534
- 0000019541 00000 n
1535
- 0000019743 00000 n
1536
- 0000019840 00000 n
1537
- 0000019942 00000 n
1538
- 0000020104 00000 n
1539
- 0000021577 00000 n
1540
- 0000021818 00000 n
1541
- 0000023178 00000 n
1534
+ 0000019600 00000 n
1535
+ 0000019802 00000 n
1536
+ 0000019899 00000 n
1537
+ 0000020001 00000 n
1538
+ 0000020163 00000 n
1539
+ 0000021636 00000 n
1540
+ 0000021877 00000 n
1541
+ 0000023237 00000 n
1542
1542
  trailer
1543
1543
  << /Size 13
1544
1544
  /Root 2 0 R
1545
1545
  /Info 1 0 R
1546
1546
  >>
1547
1547
  startxref
1548
- 24092
1548
+ 24151
1549
1549
  %%EOF
@@ -28,18 +28,18 @@ describe "CheckWriter::Check" do
28
28
  :bank_fraction => '12-9876/1234',
29
29
  :routing_number => '123456768',
30
30
  :account_number => '123456789',
31
- :amount => '1003.23',
31
+ :amount => '1000003.23',
32
32
  :memo => 'Memo: Void after 60 days'
33
33
  )
34
34
  end
35
35
 
36
36
  it "knows how many dollars and cents" do
37
- @check.dollars.should == 1003
37
+ @check.dollars.should == 1_000_003
38
38
  @check.cents.should == 23
39
39
  end
40
40
 
41
41
  it "can format the amount as currency" do
42
- @check.formatted_amount.should == "$1,003.23"
42
+ @check.formatted_amount.should == "$1,000,003.23"
43
43
  end
44
44
 
45
45
  context "a check for an amount with 0 cents" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: check_writer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-15 00:00:00.000000000 Z
12
+ date: 2015-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -203,7 +203,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  segments:
205
205
  - 0
206
- hash: 4468792958598379728
206
+ hash: -503875284365167166
207
207
  required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  none: false
209
209
  requirements: