timescopes 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1643c8affd87519a7ee139fc8608870933363ff
4
- data.tar.gz: b4fd4deed1b8aca04463d08ff0c236647fa9bffb
3
+ metadata.gz: 98a6efb52f14903fc708521eae295b3fc4b09967
4
+ data.tar.gz: a3227af5899a4cd61cd051b8238aba93854b2f56
5
5
  SHA512:
6
- metadata.gz: 15f522ce7a05aebe84deb952e3ac817b688d93467e51bc9228ab394549c2f35751f01cd07cd28d88998c5ec41951aefd67a018faaa99c794724ffccae9104dca
7
- data.tar.gz: 849437851c86b03590db879153fef893c4dda9685d525521a49dc2d4337e96bf5a892746ce6dc1d6fc837db7a828bb42c976e2844556b18f29c8cdcf1373a1a3
6
+ metadata.gz: 71d88f8a40c71b06d2faaa70dfa8d99981a174464b9655c5f33e0077d8f60d332af89d98815672836c30f7fbaf026fc49f1ee3487cf33d90d3723e9362efd779
7
+ data.tar.gz: 022f1bb08842a7289488d9268a67309a8471a3d34d66a41fed357c1441db24514f116470793d932e8cdc5d1ce9f44e87511785dd9d5c9c99d364e00dcb3eac91
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -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]
8
+ default_scopes = [:minutely, :hourly, :daily, :weekly, :monthly, :yearly, :total]
9
9
 
10
10
  field = opts[:field] || "created_at"
11
11
  scopes = if opts[:only]
@@ -18,7 +18,7 @@ module TimeScopes
18
18
  1.year.since(start).utc
19
19
  when :rolling_7, :rolling_30
20
20
  1.day.since(start).utc
21
- when :overall, nil
21
+ when :total, :overall, nil
22
22
  nil
23
23
  else
24
24
  raise "Unknown scope passed to TimeScopes.next_range"
@@ -70,9 +70,10 @@ module TimeScopes
70
70
  alias_method :year, :yearly
71
71
 
72
72
  def overall(start=nil)
73
- [ Chronic.parse('2000-01-01 00:00:00'),
73
+ [ Chronic.parse('2000-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
76
77
 
77
78
  def start_of_minute(time)
78
79
  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.7 ruby lib
5
+ # stub: timescopes 0.1.8 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "timescopes"
9
- s.version = "0.1.7"
9
+ s.version = "0.1.8"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timescopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Hunter