wagon 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/wagon +3 -3
  3. data/lib/wagon/directory.rb +2 -0
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
data/bin/wagon CHANGED
@@ -13,7 +13,7 @@
13
13
  # -p, --padding Padding between households (default is 2)
14
14
  # -f, --font-size Primary font size (default is 8)
15
15
  # --page-numbers Include page numbers in the footer, e.g. (1 of 3)
16
- # --date Include the current date in the footer
16
+ # --no-date Do not include the current date in the footer
17
17
  # --no-picture Do not include pictures
18
18
  # --no-address Do not include street addresses
19
19
  # --no-phone Do not include phone numbers
@@ -44,7 +44,7 @@ class WagonApp
44
44
  @options.padding = 2
45
45
  @options.font_size = 8
46
46
  @options.page_numbers = false
47
- @options.include_date = false
47
+ @options.include_date = true
48
48
  @options.picture = true
49
49
  @options.address = true
50
50
  @options.phone_number = true
@@ -81,7 +81,7 @@ class WagonApp
81
81
  opts.on('-p', '--padding=PADDING') { |padding| @options.padding = padding }
82
82
  opts.on('-f', '--font-size=SIZE') { |size| @options.font_size = size }
83
83
  opts.on('--page-numbers') { @options.page_numbering = true }
84
- opts.on('--date') { @options.include_date = true }
84
+ opts.on('--no--date') { @options.include_date = false }
85
85
  opts.on('--no-picture') { @options.picture = false }
86
86
  opts.on('--no-address') { @options.address = false }
87
87
  opts.on('--no-phone') { @options.phone_number = false }
@@ -40,11 +40,13 @@ module Wagon
40
40
  pdf.font_size = options[:font_size].to_i
41
41
  info_count = 1 + [:address, :phone_number, :email].inject(0) { |sum, item| sum += options[item] ? 1 : 0 }
42
42
  info_height = pdf.font.height*info_count
43
+ date = options[:include_date] ? Time.new().strftime("%m/%d/%Y") : ""
43
44
 
44
45
  (0...pages).each do |page|
45
46
  pdf.start_new_page unless page == 0
46
47
  pdf.text(options[:title], :at => [pdf.bounds.right/2 - pdf.width_of(options[:title], :size => 12)/2, pdf.bounds.top - header_height + padding], :size => 12)
47
48
  pdf.text("For Church Use Only", :at => [pdf.bounds.right/2 - pdf.width_of("For Church Use Only")/2, pdf.bounds.bottom])
49
+ pdf.text(date, :at => [pdf.bounds.right - pdf.width_of(date), pdf.bounds.bottom])
48
50
  (0...rows).each do |row|
49
51
  y = pdf.bounds.top - row*grid_height - header_height
50
52
  (0...columns).each do |column|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devin Christensen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-12 00:00:00 -07:00
12
+ date: 2010-02-13 00:00:00 -07:00
13
13
  default_executable: wagon
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency