cotcube-bardata 0.1.8 → 0.1.9.1

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
  SHA256:
3
- metadata.gz: a701303a258aaaf6050922e35eaacf53ce09fc43fc25778492ebb0b11fb9890c
4
- data.tar.gz: 389709153f639e14638832e701f19a295181e1b81e26a8aa2ba2baf5c0587ee9
3
+ metadata.gz: 8a288595522cb8414d8db207702ccfa4f2982aee92aea7fbd9bbb69dc9bff951
4
+ data.tar.gz: 05707b28f388968d3fad8cf4d5145fb0b85c5c8cd30f3cd68b722bac5d4874d1
5
5
  SHA512:
6
- metadata.gz: ee32360405d9597e82c6eb9d7678895ecd1c7db9872ed2ecdd8efbd4fc0cd2ec4cea21d2546e867a45af3655ab251a34d39855d7b7d7865458ea60ff8ba65811
7
- data.tar.gz: 7a4387b1834d811a61e9bd04fbe0a263f7f4a730b2a15cb928fb956929acefa5097a502fa548c26356f5ccac051d7f037344c42e320400a8a5eab55266119b81
6
+ metadata.gz: d1a8385d8dc58b8955aa443e3dda7e66bcb2ed172518d8bf6070e6506e33bdab805a4b9d821c1aa7fc308d69bba5bfa5a80ed5fb3fca8afffeec01ff9a9e10e1
7
+ data.tar.gz: 12013f03b33649879ab5f93778a9a4cf8a9586b2080b7113dac60171681dd5a158fea1d5c9695edc64f6e1ea738c33d0b82c776f0b881b38112cb2b99a76df8a
@@ -1,3 +1,8 @@
1
+ ## 0.1.9.1 (January 29, 2021)
2
+ - provide: added new interval 'synth', mixing available dailies with synthetic days based on quarters
3
+ - minor change / cleanup
4
+ - setting gemspec to use rake 13 and changing version spec to overcome warnings
5
+
1
6
  ## 0.1.8 (January 27, 2021)
2
7
  - in helpers, #extended_range_for_date: fixed comparison signs
3
8
  - range_matrix: applied cops, noted appearance of Cotcube::Helpers.simple_series_stats
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.1.9.1
@@ -8,6 +8,7 @@ module Cotcube
8
8
  symbol: nil, id: nil,
9
9
  range: nil,
10
10
  config: init,
11
+ debug: false,
11
12
  timezone: Time.find_zone('America/Chicago'),
12
13
  filter: :full, # most probably either :full or :rth
13
14
  force_update: false, # force reloading via provide_quarters
@@ -60,8 +61,8 @@ module Cotcube
60
61
  end
61
62
  return result
62
63
  elsif File.mtime(file) + 1.day > File.mtime(quarters_file)
63
- puts "CACHE #{File.mtime(file)}\t#{file}"
64
- puts "QUART #{File.mtime(quarters_file)}\t#{quarters_file}"
64
+ puts "CACHE #{File.mtime(file)}\t#{file}" if debug
65
+ puts "QUART #{File.mtime(quarters_file)}\t#{quarters_file}" if debug
65
66
  result = if range.nil?
66
67
  base
67
68
  else
@@ -40,6 +40,11 @@ module Cotcube
40
40
  raise 'Missing implementation to reduce cached days to weeks or months'
41
41
  when :dailies, :daily
42
42
  provide_daily contract: contract, symbol: symbol, id: id, config: config, range: range
43
+ when :synth, :synthetic, :synthetic_days
44
+ days = provide_cached contract: contract, symbol: symbol, id: id, config: config, filter: filter,
45
+ range: range, force_recent: force_recent
46
+ dailies = provide_daily contract: contract, symbol: symbol, id: id, config: config, range: range
47
+ dailies[..-2] + days.select { |d| d[:datetime] > dailies[-2][:datetime] }
43
48
  else
44
49
  raise ArgumentError, "Unsupported or unknown interval '#{interval}' in Bardata.provide"
45
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cotcube-bardata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin L. Tischendorf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport