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 CHANGED
@@ -1,4 +1,4 @@
1
1
  /Gemfile.lock
2
2
  /pkg
3
3
  /tmp
4
- quandl_operation-*
4
+ *.gem
@@ -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
- CommonLogger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
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
- CommonLogger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
20
+ Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
22
21
  r
23
22
  end
24
23
 
@@ -7,7 +7,7 @@ class Time
7
7
  result = block.call
8
8
  message = "#{message} (#{timer.elapsed.microseconds}ms)"
9
9
  puts message
10
- Rails.logger.debug message
10
+ Quandl::Logger.info message
11
11
  result
12
12
  end
13
13
 
@@ -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
- CommonLogger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
16
+ Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
17
17
  data
18
18
  end
19
19
 
@@ -14,7 +14,7 @@ class Transform
14
14
  def transform_and_log(*args)
15
15
  t1 = Time.now
16
16
  r = transform(*args)
17
- CommonLogger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
17
+ Quandl::Logger.debug "#{self.name}.perform (#{t1.elapsed.microseconds}ms)"
18
18
  r
19
19
  end
20
20
 
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Operation
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
@@ -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'
@@ -22,4 +22,5 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "fivemat", "~> 1.2"
23
23
 
24
24
  s.add_runtime_dependency "activesupport", ">= 3.0.0"
25
+ s.add_runtime_dependency "quandl_logger", ">= 0.0.2"
25
26
  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.8
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-06-20 00:00:00.000000000 Z
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