groupdate 2.0.2 → 2.0.3

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: af27fcb8fcdb2e8bb300ca3ad248690b47b750df
4
- data.tar.gz: c7db61278cb56b67bafdb01beceadaa2236e955b
3
+ metadata.gz: 0f508159d00896699f39ded75030c0a5222f995b
4
+ data.tar.gz: 3463e516136dec2e0f06cd321f4a8a8f7b913cab
5
5
  SHA512:
6
- metadata.gz: 1f1be192a48bc96363a39627f69aaa0d1f598c39f91f3dd0728d47c1c49d2e4bafc15b54e7e3d7437247e5bda8e8b68a452db55e3fff156ab6ab1dce8fa77778
7
- data.tar.gz: 681d43a72eb1c7b97c91d923b5de0de2517a114bb202e97a7f902ca9ff24cd71678a4a453736adf71331837058b43fde744aba26e08c419b20ae7a99ffd273ef
6
+ metadata.gz: 2fc8f83f7a9d755b4b4fd4ab6066b1d90d0160e1e0e4bb21f9d4a8d28ff0fe93840747c2618d3124bccf23b7415ad0bb553f7bd53d516ed8e17f9b49ffb5d452
7
+ data.tar.gz: b9f8b64e5a7a175f116a2079457d16c5d75515f791e3308a98bfc89ff4976b913e4f3e90f7cdeb762dc0aec8f95ad84168525fd594fa353b87939019421af1ee
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.0.3
2
+
3
+ - implemented respond_to?
4
+
1
5
  # 2.0.2
2
6
 
3
7
  - where, joins, and includes no longer need to be before the group_by method
@@ -99,5 +99,9 @@ module Groupdate
99
99
  end
100
100
  end
101
101
 
102
+ def respond_to?(method, include_all = false)
103
+ ActiveRecord::Calculations.method_defined?(method) || @relation.respond_to?(method) || super
104
+ end
105
+
102
106
  end # Series
103
107
  end
@@ -1,3 +1,3 @@
1
1
  module Groupdate
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
data/test/test_helper.rb CHANGED
@@ -491,6 +491,14 @@ module TestGroupdate
491
491
  assert_raises(NoMethodError) { User.group_by_day(:created_at).no_such_method }
492
492
  end
493
493
 
494
+ def test_respond_to_where
495
+ assert User.group_by_day(:created_at).respond_to?(:order)
496
+ end
497
+
498
+ def test_respond_to_bad_method
499
+ assert !User.group_by_day(:created_at).respond_to?(:no_such_method)
500
+ end
501
+
494
502
  # helpers
495
503
 
496
504
  def assert_result_time(method, expected, time_str, time_zone = false, options = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane