quandl_operation 0.1.2 → 0.1.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: 0d8410610bcbdd3049efc55fef6de5e2fe284203
4
- data.tar.gz: d8d867b424f11cd70c3eaefa0bfff4c6e369aa28
3
+ metadata.gz: 8a5e2105bf1f973a787d6d65ac698fd8b17c9403
4
+ data.tar.gz: bdadfebd1c4d584d4d85b239afc0750824fd2222
5
5
  SHA512:
6
- metadata.gz: 50637635dfbbe29e86534939cf1dec6082a558328b03c7492ae2274724c98ed35eb534c0d78f1766a41768852f3d906e9fc7ebea929fe0d271ba594bbab82ee0
7
- data.tar.gz: b49dc76071b6a7241b54aa990da463b330f18a5e1bada0c08d43b48e1307d82ec245ff8822be6a3ed283bb6e4051cd98af6d1d8590c21290b4b500cf26dbf59c
6
+ metadata.gz: bd2f1f42870f9e76b8dd7963896b725708c8e51a3be47bc1c92c93e0ab7293a206064a1ca26a5c7ffbd7dd182aed66cee6257012e2c200010c730c465f857d84
7
+ data.tar.gz: d09ce4b0a6139b8c2b9630c2f96bb28338710c962818e2191b46206b89f1f7159cb13ab20f487fed8bc429a65904f07e723eaa5a7ce9b6c2eea765d86287b9b5
@@ -17,7 +17,7 @@ class Collapse
17
17
  def collapse_and_log(data, frequency)
18
18
  t1 = Time.now
19
19
  r = collapse(data, frequency)
20
- Quandl::Logger.debug "#{self.name}.perform(#{data.try(:count)} rows, #{frequency}) (#{t1.elapsed.microseconds}ms)"
20
+ Quandl::Logger.debug "#{self.name}.perform(#{data.try(:count)} rows, #{frequency}) (#{t1.elapsed.microseconds}ms)" if t1.elapsed_ms > 1
21
21
  r
22
22
  end
23
23
 
@@ -14,7 +14,7 @@ class Guess
14
14
  gap = ensure_positive_gap(gap)
15
15
  # determine the freq from the size of the smallest gap
16
16
  freq = frequency_from_gap(gap)
17
- Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
17
+ Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)" if t1.elapsed_ms > 1
18
18
  freq
19
19
  end
20
20
 
@@ -13,7 +13,7 @@ class Parse
13
13
  data = csv(data)
14
14
  data = unknown_date_format_to_julian(data)
15
15
  # data = sort(data)
16
- Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
16
+ Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)" if t1.elapsed_ms > 1
17
17
  data
18
18
  end
19
19
 
@@ -24,13 +24,10 @@ class Parse
24
24
  end
25
25
 
26
26
  def sort(data, order = :asc)
27
- data_order = sort_order?(data)
28
27
  # ascending
29
- if order == :asc && data_order != :asc
30
- data = sort_asc(data)
31
- # descending
32
- elsif order == :desc && data_order != :desc
33
- data = sort_desc(data)
28
+ case order
29
+ when :asc then data = sort_asc(data)
30
+ when :desc then data = sort_desc(data)
34
31
  end
35
32
  data
36
33
  end
@@ -14,7 +14,7 @@ class Transform
14
14
  def transform_and_log( data, type)
15
15
  t1 = Time.now
16
16
  r = transform( data, type)
17
- Quandl::Logger.debug "#{self.name}.perform(#{data.try(:count)} rows, #{type}) (#{t1.elapsed.microseconds}ms)"
17
+ Quandl::Logger.debug "#{self.name}.perform(#{data.try(:count)} rows, #{type}) (#{t1.elapsed.microseconds}ms)" if t1.elapsed_ms > 1
18
18
  r
19
19
  end
20
20
 
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Operation
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-22 00:00:00.000000000 Z
11
+ date: 2013-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake