quandl_operation 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ class Collapse
22
22
  end
23
23
 
24
24
  def valid_collapse?(type)
25
- valid_collapses.include?( type )
25
+ valid_collapses.include?( type.try(:to_sym) )
26
26
  end
27
27
 
28
28
  def valid_collapses
@@ -30,7 +30,7 @@ class Collapse
30
30
  end
31
31
 
32
32
  def collapse(data, frequency)
33
- return false unless valid_collapse?( type )
33
+ return data unless valid_collapse?( type )
34
34
  # store the new collapsed data
35
35
  collapsed_data = {}
36
36
  range = find_end_of_range( data[0][0], frequency )
@@ -19,7 +19,7 @@ class Transform
19
19
  end
20
20
 
21
21
  def valid_transformation?(type)
22
- valid_transformations.include?( type )
22
+ valid_transformations.include?( type.try(:to_sym) )
23
23
  end
24
24
 
25
25
  def valid_transformations
@@ -34,9 +34,9 @@ class Transform
34
34
  #If type is other than these two, nothing is done.
35
35
 
36
36
  # ensure that type is in the expected format
37
- type = type.to_sym
37
+ type = type.try(:to_sym)
38
38
  # nothing to do unless valid transform
39
- return unless valid_transformation?( type )
39
+ return data unless valid_transformation?( type )
40
40
 
41
41
  temparr = Array.new
42
42
  #first make a keylist
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Operation
3
- VERSION = "0.0.13"
3
+ VERSION = "0.0.14"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-17 00:00:00.000000000 Z
12
+ date: 2013-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake