tickseries 0.1.1alpha → 0.1.2alpha
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/features/01-ticks-init.feature +2 -2
- data/features/step_definitions/01-ticks-init_steps.rb +2 -2
- data/lib/tickseries.rb +1 -1
- 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: 4a21e3b6c8365691ebc6e0dbd3818ed1dd8920fa35c6393c5c094f2de96655fa
|
4
|
+
data.tar.gz: 383946976304ac60b0c4c962e3124637c81e4a59e1cbe345a51c261b991c4b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f535d806db2ea0b12ef4002631ced244840141ba2a6de61a7d645b78e6d341036781b51d7ee88fdad30ebbcd94bd2d8a279462489f69f7d3d6dfb9618b6ef7aa
|
7
|
+
data.tar.gz: bded7af785cefbb3f211bd3de1c975a6b381249757f51b45d128c0349d58e374c479b7f7e934b058f5ea4e451c30809bd4d5349ad2090cab6a63e3d92c3532fe
|
@@ -6,8 +6,8 @@ Feature: Initialization of Tick
|
|
6
6
|
When creating a tick with '<params>' it should result in <timestamp> and <price>
|
7
7
|
Examples:
|
8
8
|
| params | timestamp | price |
|
9
|
-
| {s: :foo, t: 1555767235,
|
10
|
-
| {s: "foo", t: 1555767235123,
|
9
|
+
| {s: :foo, t: 1555767235, m: 123 } | 1555767235000 | 123.0 |
|
10
|
+
| {s: "foo", t: 1555767235123, m: 1.21 } | 1555767235123 | 1.21 |
|
11
11
|
| ["foo", "1555767235", "225" ] | 1555767235000 | 225.0 |
|
12
12
|
| :foo, 1555767235, 225 | 1555767235000 | 225.0 |
|
13
13
|
| 1555767235, 225 | 1555767235000 | 225.0 |
|
@@ -5,8 +5,8 @@ When "creating a tick without parameters it should raise ArgumentError" do
|
|
5
5
|
expect { Tick.new }.to raise_error(ArgumentError)
|
6
6
|
end
|
7
7
|
|
8
|
-
When /^creating a tick with '([^']*)' it should result in (\S*) and (\S*)$/ do |params, timestamp,
|
8
|
+
When /^creating a tick with '([^']*)' it should result in (\S*) and (\S*)$/ do |params, timestamp, measurement|
|
9
9
|
eval "@tick = Tick.new(#{params})"
|
10
10
|
expect(@tick.t).to eq(Integer(timestamp))
|
11
|
-
expect(@tick.
|
11
|
+
expect(@tick.m).to eq(BigDecimal(measurement,8))
|
12
12
|
end
|
data/lib/tickseries.rb
CHANGED
@@ -134,7 +134,7 @@ module TickSeries
|
|
134
134
|
|
135
135
|
# TimeSeries::Series is the second part of the module. It contains a single measurement ("Messpunkt") of the series.
|
136
136
|
class Tick
|
137
|
-
attr_reader :t, :
|
137
|
+
attr_reader :t, :m, :v, :p
|
138
138
|
|
139
139
|
# The constructor is build as flexible as I was able to. It accepts
|
140
140
|
# * a Hash containing < :t | :time | :timestamp > with an integer or string value required in seconds or milliseconds
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tickseries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2alpha
|
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: 2019-04-
|
11
|
+
date: 2019-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: csv
|