creation_report 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,13 +19,13 @@ module CreationReport
19
19
  module ClassMethods
20
20
  @@number_of_days = 1000
21
21
 
22
- def created_by_hour
22
+ def created_by_hour( count = 24)
23
23
  DataSet::HourlyDataSet.new(
24
24
  count(
25
25
  :group => "DATE_FORMAT( CONVERT_TZ(#{table_name}.created_at, '+0:00', '#{((Time.zone.utc_offset/3600 + (Time.now.dst? ? 1 : 0)) rescue '-0')}:00'),'%Y-%m-%d %H')",
26
26
  :order => "#{table_name}.id ASC",
27
- :conditions => ["#{table_name}.created_at > ?", 24.hours.ago]
28
- ), 24
27
+ :conditions => ["#{table_name}.created_at > ?", count.hours.ago]
28
+ ), count
29
29
  )
30
30
  end
31
31
 
@@ -1,3 +1,3 @@
1
1
  module CreationReport
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: creation_report
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jon Collier
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  requirements: []
126
126
 
127
127
  rubyforge_project:
128
- rubygems_version: 1.8.5
128
+ rubygems_version: 1.8.24
129
129
  signing_key:
130
130
  specification_version: 3
131
131
  summary: Easily generate graphs for ActiveRecord object creation.