quandl_operation 0.1.2 → 0.1.3
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.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 8a5e2105bf1f973a787d6d65ac698fd8b17c9403
         | 
| 4 | 
            +
              data.tar.gz: bdadfebd1c4d584d4d85b239afc0750824fd2222
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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 | 
            -
                   | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 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 |  | 
    
        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. | 
| 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- | 
| 11 | 
            +
            date: 2013-07-23 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rake
         |