cotcube-bardata 0.1.8 → 0.1.9.1
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/cotcube-bardata/cached.rb +3 -2
- data/lib/cotcube-bardata/provide.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a288595522cb8414d8db207702ccfa4f2982aee92aea7fbd9bbb69dc9bff951
|
|
4
|
+
data.tar.gz: 05707b28f388968d3fad8cf4d5145fb0b85c5c8cd30f3cd68b722bac5d4874d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1a8385d8dc58b8955aa443e3dda7e66bcb2ed172518d8bf6070e6506e33bdab805a4b9d821c1aa7fc308d69bba5bfa5a80ed5fb3fca8afffeec01ff9a9e10e1
|
|
7
|
+
data.tar.gz: 12013f03b33649879ab5f93778a9a4cf8a9586b2080b7113dac60171681dd5a158fea1d5c9695edc64f6e1ea738c33d0b82c776f0b881b38112cb2b99a76df8a
|
data/CHANGELOG.md
CHANGED
|
@@ -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.
|
|
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.
|
|
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-
|
|
11
|
+
date: 2021-01-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|