ocean-rails 1.25.0 → 1.25.1

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: d4503764ecbaf7727d17852978ec1bd891d1ad78
4
- data.tar.gz: f481e468809272a0216791edfa6bacb4e54be380
3
+ metadata.gz: fb4ad2372d6dff1a25460793b4e953dd31b592a9
4
+ data.tar.gz: de69dc5015dabaa738b1212e322182ea648860a3
5
5
  SHA512:
6
- metadata.gz: 1e193a45bec1a86983317add48766a50eb6f5d5bdcdbdf419107fcd8132020416cbf7bb7be20f5157a264becc84b4b4dc9175f29a4c0f992924dcd054a4196cb
7
- data.tar.gz: 12dd83d6db363cd40df5b6baea61385c669e028e9993682d44d962fdb5700f96bc7a9fcdebf6741f739c7bcc08157130a3f077ec419935ced42286cbc6e325f4
6
+ metadata.gz: 0e5771f4439ea8dad68a8a4f074d97cabd6a8c1bf206cc63f73c1c0825114627be5ca00c44e3086f00fe4dcceda8e80d81885fa2eb3bee098b0a588fcfd1b4e1
7
+ data.tar.gz: c305deeb97a55bb63428144c1289b8827c5d78312b886fd75e63b263a7b89b8fc1079957cb85110be9185a99fdeb8dc5d2352e08a16dcc8e1db0757e2c4fa6ca
@@ -47,13 +47,16 @@ module ApiResource
47
47
  def collection_internal(conds={}, group, search, page, page_size)
48
48
  if index_only != []
49
49
  new_conds = {}
50
- ranges = {}
51
50
  index_only.each do |key|
52
51
  val = conds[key]
53
- next if val.blank?
54
- if ranged_matchers.include?(key) && val.include?(",")
55
- from, to = val.split(",")
56
- new_conds[key] = DateTime.parse(from)..DateTime.parse(to)
52
+ next unless val
53
+ if ranged_matchers.include?(key)
54
+ if val.include?(",")
55
+ from, to = val.split(",")
56
+ new_conds[key] = Range.new(DateTime.parse(from), DateTime.parse(to))
57
+ else
58
+ new_conds[key] = DateTime.parse(val)
59
+ end
57
60
  else
58
61
  new_conds[key] = val
59
62
  end
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "1.25.0"
2
+ VERSION = "1.25.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.0
4
+ version: 1.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson