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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20e5986d43228afba669a7b5928f555a302680bc
4
- data.tar.gz: e0190e033c4fa7a3b51eefa09254a61f44d55337
3
+ metadata.gz: 0f28f0b992e2888b1f1adcf75bf3170f6e3d8fb6
4
+ data.tar.gz: c0184bc2c7cb5362559856fc897f5f215a2bab35
5
5
  SHA512:
6
- metadata.gz: 059e84d54ea52420c4d2fa12ae479623652b704b03246c937f249548b9f55db8ca1e3a469404350b62c8b127d9276cefdc22f2f463d62fcdb35aec6de90baaa8
7
- data.tar.gz: 5d61f760f0cc7a01d83df61b11b687c20761fd345e8e6152ae4b7f1955d57d54ba6a2e03ec759364ab12da0baf94007b99a8db1990be3708a04e82ad2e89a22f
6
+ metadata.gz: 657151e8e0ebdc8d823af7c0d0116691d846f4347d52b22bf7951b1cdd89e65f50435ff70a19fc30b093c6c28e7c11fa49880c208b9afa0f3fac340aa4cc2a35
7
+ data.tar.gz: 7bb1f7899d84420aea67ebf935a5d6029985a9953fed4b7343cbe410fdc43aef0961118cd103c8966796c0b19008a0e87d5d59b61d52df18bb93b4fb94bb0f7f
@@ -0,0 +1,3 @@
1
+ ## 1.0.0
2
+
3
+ - First major release
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
@@ -1,3 +1,3 @@
1
1
  module Groupdate
2
- VERSION = "0.1.6"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -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, java_hack = false)
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, java_hack = false)
264
+ def number_key(key)
267
265
  if RUBY_PLATFORM == "java"
268
- if User.connection.adapter_name == "PostgreSQL" and !java_hack
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.1.6
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-08 00:00:00.000000000 Z
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