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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc1f97ad83033f25caf56594d2a9a785531a2792
4
- data.tar.gz: d4a3440225617d1338ca2af76547f495fca68227
3
+ metadata.gz: 43a59d774e561c812a827b8399e9002017c97dd0
4
+ data.tar.gz: 4904294161310b9df3108170372f8a729b5fc096
5
5
  SHA512:
6
- metadata.gz: 4faa070b23de1f9db17170df5e79518b3a83f1f282ce80268ec693cef11e957503590e34fcd6889baa7e4382a50bf319d9a5c064a3b67c12c99956fdaaea5d8f
7
- data.tar.gz: 3dd7a6c46cebcd41f05d9be9da65dc76133b2f16d47fb549edc50f37512afe2a1adbdd27fe51d9fc35e9d6e9540459b18ab1ecabdbca66f9824332ee9e02756c
6
+ metadata.gz: efa37052bd0105150787bf001e2cdade0d5b0e6b280f83f364632662b932d2953ceb4c1060eb83dda966e04262cbbaafad5539bd489563c0473b9e258a7a64a2
7
+ data.tar.gz: 62f532c77143ebb38f857b34d6798f7c1b677bc74b0b321a64ddfb9424a404a0b7565ae26ca962e3c3b79786a674bb8eaea53787ea2530e64dece03eb3e0d721
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -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(start.strftime("%Y-%m-%d #{start.hour}:00:00Z")),
8
- Chronic.parse(start.strftime("%Y-%m-%d #{start.hour}:59:59Z")) ]
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.3 ruby lib
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.3"
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"]
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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Hunter