report_cat 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -12
- data/app/views/report_cat/reports/_google_charts.html.erb +0 -1
- data/config/version.txt +1 -1
- data/spec/dummy/log/test.log +1167 -0
- metadata +107 -107
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af0f201fd275808d945c29791d52b3f809e434a6
|
4
|
+
data.tar.gz: b6f5935554c157ed45930cea450682c5d6c3c6c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57c59be1f81c9f67725fb3c16b0d5147ac4b5d0b70d380c0e287b19108be4cd03931ff5c3885bff3fcee9fe1762d14ed655aa84cc5a48782aa4e8904e2c42e76
|
7
|
+
data.tar.gz: 644a479dac4b52ddb9d4fc0455c3b80c615525f0cf711d2af4dd71aa595b822808e5d31358cf1289d2ffe8b3281bdc7e836c4cecabeea49fdfc50bfa692c139b
|
data/README.md
CHANGED
@@ -56,21 +56,21 @@ It provides the following matchers:
|
|
56
56
|
|
57
57
|
### Adding Params
|
58
58
|
|
59
|
-
add_param( name, type, value = nil, options = {} )
|
59
|
+
`add_param( name, type, value = nil, options = {} )`
|
60
60
|
|
61
61
|
types = :check_box, :date, :select, :text_field
|
62
62
|
options = :hidden, :values
|
63
63
|
|
64
64
|
### Adding Columns
|
65
65
|
|
66
|
-
add_column( name, type, options = {} )
|
66
|
+
`add_column( name, type, options = {} )`
|
67
67
|
|
68
68
|
types = :date, :float, :integer, :moving_average, :ratio, :report, :string
|
69
69
|
options = :hidden, :sql
|
70
70
|
|
71
71
|
### Adding Charts
|
72
72
|
|
73
|
-
add_chart( name, type, label, values, options = {} )
|
73
|
+
`add_chart( name, type, label, values, options = {} )`
|
74
74
|
|
75
75
|
types = :area, :bar, :column, :line, :pie
|
76
76
|
|
@@ -86,22 +86,22 @@ You can place new reports anywhere you like, but `app/reports` is the recommende
|
|
86
86
|
|
87
87
|
2. Create a subclass of `ReportCat::Core::Report`, `ReportCat::Report::DateRangeReport` or `ReportCat::Report::CohortReport`
|
88
88
|
|
89
|
-
|
89
|
+
class MyReport << ReportCat::Report::DateRangeReport
|
90
90
|
|
91
|
-
|
91
|
+
def initialize
|
92
92
|
super( :name => :my_report, :from => :users, :order_by => 'users.id asc' )
|
93
93
|
add_column( :total, :integer, :sql => 'count( users.id )' )
|
94
94
|
add_chart( :chart, :line, :start_date, :total )
|
95
|
-
|
96
|
-
|
95
|
+
end
|
96
|
+
end
|
97
97
|
|
98
98
|
3. Or build one on the fly
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
100
|
+
report = ReportCat::Core::DateRangeReport.new( :name => :my_report, :from => :users, :order_by => 'users.id asc' )
|
101
|
+
report.add_column( :total, :integer, :sql => 'count( users.id )' )
|
102
|
+
report.add_chart( :chart, :line, :start_date, :total )
|
103
|
+
report.generate
|
104
|
+
report.rows.each { |row| puts "Total = #{row[0]} }
|
105
105
|
|
106
106
|
|
107
107
|
### Reload Reports In Development Mode
|
data/config/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
502
|