stockcruncher 1.3.1 → 1.3.2

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: 6c5f9d2cc2dba8ad0fbd9882cebcda893500e0f029610107004481b0b236d6b9
4
- data.tar.gz: 65815caea89d856ef4e4c76365df166bdb971302a95f6665d657c0ba6420e671
3
+ metadata.gz: 56cbc10941fcfdc6ccee0273cf5b2f43f4a98c1f3b53b1554a53ea45020c604e
4
+ data.tar.gz: ce451b4498697f9c6148167771296219c4f83ffdef3f1fbefb4c8a12f7a747e4
5
5
  SHA512:
6
- metadata.gz: 19b7f5eafd15cbcc5713a6729e17c3a2ae5dd4c471f0d77c7becb4ba10be08c6c492f4469b7ab4a93858215a406d95fced52cde98cffd0644c081ce331b43e9a
7
- data.tar.gz: c73d7c0caa396f0cf1b06f88f74e2e1cdbd0c7b7fa1739e4b72df4e5852b16e847a46d09071699db51bc6ed07a85e51766c8259221214d62e845ed15331bc980
6
+ metadata.gz: 5b3bcfdbe1805e95c4729e33ad26b4ea676d63a5e638150fca0a26d75682a96d6d4d71a16e9458ef75423f82fc4ba0a4f7442e838865ac9d27b57fbb817dbaed
7
+ data.tar.gz: fbe77bb52c0b0d51d6f480246c9467ca4838f9afd385e573c35342b40ada8973f0f5f52c65d159ae85f332d8e0a38e244cf5149b386dc10872323d5990726451
data/README.md CHANGED
@@ -5,12 +5,14 @@
5
5
  [![Gem Version][gem-img]][gem]
6
6
 
7
7
  1. [Overview](#overview)
8
- 2. [Description](#role-description)
9
- 3. [Setup](#setup)
10
- 4. [Usage](#usage)
11
- 5. [Limitations](#limitations)
12
- 6. [Development](#development)
13
- 7. [Miscellaneous](#miscellaneous)
8
+ 1. [Description](#description)
9
+ 1. [Setup](#setup)
10
+ 1. [Usage](#usage)
11
+ 1. [Environment variables](#environment-variables)
12
+ 1. [Examples](#examples)
13
+ 1. [Limitations](#limitations)
14
+ 1. [Development](#development)
15
+ 1. [Miscellaneous](#miscellaneous)
14
16
 
15
17
  ## Overview
16
18
 
@@ -41,6 +43,17 @@ An interactive help is available with:
41
43
 
42
44
  $ stockcruncher help [subcommand]
43
45
 
46
+ ## Environment variables
47
+
48
+ Parameters in /etc/stockcruncher/stockcrunucher.yml can be overloaded with
49
+ environment variables.
50
+ Environment variables should match SCR_<COMPONENTID>_<ITEM>.
51
+ Component ID are as follow.
52
+ - AlphaVantage: AV
53
+ - InfluxDB: IDB
54
+ Items are upcase keys. See template /etc/stockcruncher/stockcrunucher.yml for
55
+ reference.
56
+
44
57
  ## Examples
45
58
 
46
59
  To get daily time serie data of a symbol:
@@ -51,6 +64,10 @@ To get last day endpoint data of a symbol:
51
64
 
52
65
  $ stockcruncher quote AAPL
53
66
 
67
+ To override a parameter with environment variable:
68
+
69
+ $ SCR_IDB_HOST=192.168.0.80; stockcruncher quote AAPL
70
+
54
71
  ## Limitations
55
72
 
56
73
  Data are currently scraped from AlphaVantage API.
@@ -48,7 +48,7 @@ module StockCruncher
48
48
  RANGES.each do |n|
49
49
  next if values.size < n
50
50
 
51
- h["lwma#{n}"] = sma(values[0, n], volumes[0, n])
51
+ h["vwma#{n}"] = sma(values[0, n], volumes[0, n])
52
52
  end
53
53
  h
54
54
  end
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module StockCruncher
5
- VERSION = '1.3.1'
5
+ VERSION = '1.3.2'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stockcruncher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Delaplace
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-19 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler