rbinvoice 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/TODO +2 -0
  2. data/VERSION +1 -1
  3. data/lib/rbinvoice.rb +4 -2
  4. data/rbinvoice.gemspec +2 -2
  5. metadata +3 -3
data/TODO CHANGED
@@ -7,4 +7,6 @@
7
7
  - LaTeX+liquid template
8
8
  - more tests
9
9
  - print the pdflatex results to std{out,err} only if the user gives a --verbose flag.
10
+ - Fix LaTeX escaping for double quotes.
11
+
10
12
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/lib/rbinvoice.rb CHANGED
@@ -65,8 +65,9 @@ module RbInvoice
65
65
 
66
66
  def self.escape_for_latex(str)
67
67
  str.gsub('&', '\\\\&'). # tricky b/c '\&' has special meaning to gsub.
68
- gsub('"', '\"').
69
- gsub('$', '\$')
68
+ gsub('"', '\texttt{"}').
69
+ gsub('$', '\$').
70
+ gsub('+', '$+$')
70
71
  end
71
72
 
72
73
  def self.write_latex(tasks, invoice_date, filename, opts)
@@ -125,6 +126,7 @@ module RbInvoice
125
126
  return 3.upto(ss.last_row).select { |row|
126
127
  to_client_key(ss.cell(row, COL_CLIENT) || '') == client
127
128
  }.map { |row|
129
+ raise "Invalid task times: #{ss.cell(row, COL_START_TIME)}-#{ss.cell(row, COL_END_TIME)}" if ss.cell(row, COL_START_TIME) && ss.cell(row, COL_END_TIME) && ss.cell(row, COL_TOTAL_TIME) == '0:00:00'
128
130
  [ss.cell(row, COL_DATE), ss.cell(row, COL_TASK), interval_to_decimal(ss.cell(row, COL_TOTAL_TIME))]
129
131
  }
130
132
  end
data/rbinvoice.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rbinvoice"
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul A. Jungwirth"]
12
- s.date = "2012-08-16"
12
+ s.date = "2012-08-23"
13
13
  s.description = " Reads hours from a Google Spreadsheet and generates a PDF invoice.\n"
14
14
  s.email = "pj@illuminatedcomputing.com"
15
15
  s.executables = ["rbinvoice", "rbinvoice"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbinvoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
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: 2012-08-16 00:00:00.000000000 Z
12
+ date: 2012-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  segments:
183
183
  - 0
184
- hash: 2224465151709756124
184
+ hash: 1152283729066738972
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  none: false
187
187
  requirements: