timescopes 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/timescopes/rails/active_record_extension.rb +1 -1
- data/lib/timescopes/scopes.rb +2 -3
- data/timescopes.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37f712c84a8d716def153568ae19fd64d43cd9ad
|
4
|
+
data.tar.gz: 964a00daa2724c0d2a70458916b276b003c8c198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a05632fb7563371152717216f8e568a3e12dae938d1fb48a1c62dd45d33b82b63edef197a590bce781cf4f9431fad93da6d7ba40597722c6c9f598ebe06270d5
|
7
|
+
data.tar.gz: bf4d908eb59e1720ed6d3047d06f235254521ec85bf782b289f82514859b7e06bc1f8175050485efa16008ab77d72382806d38efaf15276df0f249add02a0bdc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.9
|
@@ -5,7 +5,7 @@ module TimeScopes
|
|
5
5
|
|
6
6
|
module ClassMethods
|
7
7
|
def timescoped!(opts={})
|
8
|
-
default_scopes = [:minutely, :hourly, :daily, :weekly, :monthly, :yearly, :
|
8
|
+
default_scopes = [:minutely, :hourly, :daily, :weekly, :monthly, :yearly, :alltime]
|
9
9
|
|
10
10
|
field = opts[:field] || "created_at"
|
11
11
|
scopes = if opts[:only]
|
data/lib/timescopes/scopes.rb
CHANGED
@@ -69,11 +69,10 @@ module TimeScopes
|
|
69
69
|
end
|
70
70
|
alias_method :year, :yearly
|
71
71
|
|
72
|
-
def
|
73
|
-
[ Chronic.parse('
|
72
|
+
def alltime(start=nil)
|
73
|
+
[ Chronic.parse('1970-01-01 00:00:00Z'),
|
74
74
|
Chronic.parse(start_of_day(1.day.from_now.utc)) ]
|
75
75
|
end
|
76
|
-
alias_method :total, :overall
|
77
76
|
|
78
77
|
def start_of_minute(time)
|
79
78
|
time.strftime("%Y-%m-%d %H:%M:00Z")
|
data/timescopes.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: timescopes 0.1.
|
5
|
+
# stub: timescopes 0.1.9 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "timescopes"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.9"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|