report 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 0.1.1 / 2012-07-19
2
+
3
+ * Enhancements
4
+
5
+ * In PDF output, start each table on a new page
6
+
1
7
  0.1.0 / 2012-07-10
2
8
 
3
9
  * Enhancements
data/README.md CHANGED
@@ -7,20 +7,6 @@ Extracted from Brighter Planet's corporate reporting system.
7
7
  ## Usage
8
8
 
9
9
  class FleetReport < Report
10
- attr_reader :batchfile
11
-
12
- def initialize(batchfile)
13
- @batchfile = batchfile
14
- end
15
-
16
- def description
17
- 'Fleet sustainability report'
18
- end
19
-
20
- def vehicles(type)
21
- @batchfile.vehicles.where(:type => type)
22
- end
23
-
24
10
  table 'Cars' do
25
11
  head do
26
12
  row 'Report type', :description
@@ -75,6 +61,20 @@ Extracted from Brighter Planet's corporate reporting system.
75
61
  xlsx.page_setup.header = 0
76
62
  xlsx.page_setup.footer = 0
77
63
  end
64
+
65
+ attr_reader :batchfile
66
+
67
+ def initialize(batchfile)
68
+ @batchfile = batchfile
69
+ end
70
+
71
+ def description
72
+ 'Fleet sustainability report'
73
+ end
74
+
75
+ def vehicles(type)
76
+ @batchfile.vehicles.where(:type => type)
77
+ end
78
78
  end
79
79
 
80
80
  b = Batchfile.first
@@ -48,7 +48,7 @@ class Report
48
48
  if first
49
49
  first = false
50
50
  else
51
- pdf.move_down 20
51
+ pdf.start_new_page
52
52
  end
53
53
  if t = make_head(table._head)
54
54
  pdf.table t, head
@@ -1,3 +1,3 @@
1
1
  class Report
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-07-10 00:00:00.000000000 Z
12
+ date: 2012-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport