quandl_cassinatra 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,19 +63,15 @@ module Searchable
63
63
  # ensure integer
64
64
  value = value.to_i
65
65
  # 0 is the current observation
66
- if value == 0
67
- order(:desc)
68
- limit( 1 )
69
- # negative value implies ascending order
70
- elsif value < 0
66
+ if value < 0
71
67
  order(:asc)
72
- offset( ( value * -1 ) - 1 )
68
+ offset( value * -1 )
73
69
  limit( 1 )
74
70
  # postive value is an offset of current observation
75
71
  else
76
72
  order(:desc)
77
- offset( value - 1 )
78
- limit(1)
73
+ offset( value )
74
+ limit( 1 )
79
75
  end
80
76
  }
81
77
 
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Cassinatra
3
- VERSION = '0.0.12'
3
+ VERSION = '0.0.13'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_cassinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: