quandl_operation 0.0.8 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/lib/quandl/operation/collapse/guess.rb +1 -1
- data/lib/quandl/operation/collapse.rb +1 -2
- data/lib/quandl/operation/core_ext/time.rb +1 -1
- data/lib/quandl/operation/parse.rb +1 -1
- data/lib/quandl/operation/transform.rb +1 -1
- data/lib/quandl/operation/version.rb +1 -1
- data/lib/quandl/operation.rb +2 -1
- data/quandl_operation.gemspec +1 -0
- metadata +18 -3
- data/lib/quandl/operation/common_logger.rb +0 -21
data/.gitignore
CHANGED
@@ -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
|
-
|
17
|
+
Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
|
18
18
|
freq
|
19
19
|
end
|
20
20
|
|
@@ -11,14 +11,13 @@ class Collapse
|
|
11
11
|
def perform(data, frequency)
|
12
12
|
data = Parse.sort( data )
|
13
13
|
data = collapse_and_log(data, frequency)
|
14
|
-
|
15
14
|
data
|
16
15
|
end
|
17
16
|
|
18
17
|
def collapse_and_log(*args)
|
19
18
|
t1 = Time.now
|
20
19
|
r = collapse(*args)
|
21
|
-
|
20
|
+
Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
|
22
21
|
r
|
23
22
|
end
|
24
23
|
|
@@ -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
|
-
|
16
|
+
Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
|
17
17
|
data
|
18
18
|
end
|
19
19
|
|
data/lib/quandl/operation.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'quandl/logger'
|
2
|
+
|
1
3
|
require "quandl/operation/version"
|
2
4
|
|
3
5
|
require "active_support"
|
@@ -6,7 +8,6 @@ require "active_support/core_ext/hash"
|
|
6
8
|
require "active_support/core_ext/object"
|
7
9
|
|
8
10
|
require 'quandl/operation/core_ext'
|
9
|
-
require 'quandl/operation/common_logger'
|
10
11
|
require 'quandl/operation/collapse'
|
11
12
|
require 'quandl/operation/transform'
|
12
13
|
require 'quandl/operation/parse'
|
data/quandl_operation.gemspec
CHANGED
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.
|
4
|
+
version: 0.0.10
|
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-
|
12
|
+
date: 2013-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 3.0.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: quandl_logger
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 0.0.2
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.0.2
|
78
94
|
description: Data will be operated
|
79
95
|
email:
|
80
96
|
- blake@hilscher.ca
|
@@ -94,7 +110,6 @@ files:
|
|
94
110
|
- lib/quandl/operation.rb
|
95
111
|
- lib/quandl/operation/collapse.rb
|
96
112
|
- lib/quandl/operation/collapse/guess.rb
|
97
|
-
- lib/quandl/operation/common_logger.rb
|
98
113
|
- lib/quandl/operation/core_ext.rb
|
99
114
|
- lib/quandl/operation/core_ext/array.rb
|
100
115
|
- lib/quandl/operation/core_ext/date.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Quandl
|
2
|
-
module Operation
|
3
|
-
|
4
|
-
class CommonLogger
|
5
|
-
|
6
|
-
class << self
|
7
|
-
|
8
|
-
delegate :info, :debug, :with_time_elapsed, to: :logger, allow_nil: true
|
9
|
-
|
10
|
-
def logger
|
11
|
-
@@logger if defined?(@@logger)
|
12
|
-
end
|
13
|
-
def use(value)
|
14
|
-
@@logger = value
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|