groupdate 0.1.6 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +8 -0
- data/lib/groupdate/version.rb +1 -1
- data/test/groupdate_test.rb +3 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f28f0b992e2888b1f1adcf75bf3170f6e3d8fb6
|
4
|
+
data.tar.gz: c0184bc2c7cb5362559856fc897f5f215a2bab35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 657151e8e0ebdc8d823af7c0d0116691d846f4347d52b22bf7951b1cdd89e65f50435ff70a19fc30b093c6c28e7c11fa49880c208b9afa0f3fac340aa4cc2a35
|
7
|
+
data.tar.gz: 7bb1f7899d84420aea67ebf935a5d6029985a9953fed4b7343cbe410fdc43aef0961118cd103c8966796c0b19008a0e87d5d59b61d52df18bb93b4fb94bb0f7f
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -19,6 +19,8 @@ Supports PostgreSQL and MySQL
|
|
19
19
|
|
20
20
|
[![Build Status](https://travis-ci.org/ankane/groupdate.png)](https://travis-ci.org/ankane/groupdate)
|
21
21
|
|
22
|
+
:cupid: Goes hand in hand with [Chartkick](http://ankane.github.io/chartkick/)
|
23
|
+
|
22
24
|
## Usage
|
23
25
|
|
24
26
|
```ruby
|
@@ -225,6 +227,12 @@ User.group_by_day_of_week(:created_at).count
|
|
225
227
|
|
226
228
|
These are *not* a result of groupdate (and unfortunately cannot be fixed by groupdate)
|
227
229
|
|
230
|
+
## History
|
231
|
+
|
232
|
+
View the [changelog](https://github.com/ankane/groupdate/blob/master/CHANGELOG.md)
|
233
|
+
|
234
|
+
Groupdate follows [Semantic Versioning](http://semver.org/)
|
235
|
+
|
228
236
|
## Contributing
|
229
237
|
|
230
238
|
1. Fork it
|
data/lib/groupdate/version.rb
CHANGED
data/test/groupdate_test.rb
CHANGED
@@ -245,12 +245,10 @@ describe Groupdate do
|
|
245
245
|
assert_zeros method, created_at, keys, range_start, range_end, "Pacific Time (US & Canada)", true
|
246
246
|
end
|
247
247
|
|
248
|
-
def time_key(key
|
248
|
+
def time_key(key)
|
249
249
|
if RUBY_PLATFORM == "java"
|
250
250
|
if User.connection.adapter_name == "PostgreSQL"
|
251
251
|
Time.parse(key).utc.strftime("%Y-%m-%d %H:%M:%S%z")[0..-3]
|
252
|
-
elsif java_hack
|
253
|
-
Time.parse(key).utc.strftime("%Y-%m-%d %H:%M:%S")
|
254
252
|
else
|
255
253
|
Time.parse(key).strftime("%Y-%m-%d %H:%M:%S").gsub(/ 00\:00\:00\z/, "")
|
256
254
|
end
|
@@ -263,9 +261,9 @@ describe Groupdate do
|
|
263
261
|
end
|
264
262
|
end
|
265
263
|
|
266
|
-
def number_key(key
|
264
|
+
def number_key(key)
|
267
265
|
if RUBY_PLATFORM == "java"
|
268
|
-
if User.connection.adapter_name == "PostgreSQL"
|
266
|
+
if User.connection.adapter_name == "PostgreSQL"
|
269
267
|
key.to_f
|
270
268
|
else
|
271
269
|
key
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groupdate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -103,6 +103,7 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- .gitignore
|
105
105
|
- .travis.yml
|
106
|
+
- CHANGELOG.md
|
106
107
|
- Gemfile
|
107
108
|
- LICENSE.txt
|
108
109
|
- README.md
|