timescopes 0.1.3 → 0.1.4
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/scopes.rb +8 -2
- 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: 43a59d774e561c812a827b8399e9002017c97dd0
|
4
|
+
data.tar.gz: 4904294161310b9df3108170372f8a729b5fc096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efa37052bd0105150787bf001e2cdade0d5b0e6b280f83f364632662b932d2953ceb4c1060eb83dda966e04262cbbaafad5539bd489563c0473b9e258a7a64a2
|
7
|
+
data.tar.gz: 62f532c77143ebb38f857b34d6798f7c1b677bc74b0b321a64ddfb9424a404a0b7565ae26ca962e3c3b79786a674bb8eaea53787ea2530e64dece03eb3e0d721
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/timescopes/scopes.rb
CHANGED
@@ -2,10 +2,16 @@ require 'chronic'
|
|
2
2
|
|
3
3
|
module TimeScopes
|
4
4
|
class << self
|
5
|
+
def minutely(start=nil)
|
6
|
+
start ||= Time.now
|
7
|
+
[ Chronic.parse(start_of_minute(start.utc)),
|
8
|
+
Chronic.parse(start_of_minute(1.minute.since(start.utc))) ]
|
9
|
+
end
|
10
|
+
|
5
11
|
def hourly(start=nil)
|
6
12
|
start ||= Time.now
|
7
|
-
[ Chronic.parse(
|
8
|
-
Chronic.parse(
|
13
|
+
[ Chronic.parse(start_of_hour(start.utc)),
|
14
|
+
Chronic.parse(start_of_hour(1.hour.since(start.utc))) ]
|
9
15
|
end
|
10
16
|
|
11
17
|
def daily(start=nil)
|
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.4 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.4"
|
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"]
|