trecs 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/trecs/frame.rb +9 -8
- data/lib/trecs/readers/json_reader.rb +1 -1
- data/lib/trecs/version.rb +1 -1
- data/spec/trecs/frame_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6107266d394e28fb21dc987e8765e8c128f559bc
|
4
|
+
data.tar.gz: b8561a6a99466ef9132bdab0fad22cc49d2c7428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a11db9103866bfe2765e283ae04127959824a8a518e915356326d6b199fc8caf1577c3558ee5ecde82c8c050f9edcfd9d563853e1e08bc376a35040f4b5cc349
|
7
|
+
data.tar.gz: 038b7d75f200bcf8a648272df9687a0ca8a180251cdbe131b844748a94f2ccdc758bb4147965426409a40db76e2881667e5d3c8fcfcf988a30a9394cd1c8830d
|
data/Gemfile.lock
CHANGED
data/lib/trecs/frame.rb
CHANGED
@@ -29,16 +29,17 @@ module TRecs
|
|
29
29
|
alias :to_str :to_s
|
30
30
|
|
31
31
|
def ==(other)
|
32
|
-
|
32
|
+
other = Frame(other)
|
33
|
+
to_s == other.to_s && format == other.format
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
end
|
38
|
+
|
39
|
+
def Frame(opts)
|
40
|
+
case opts
|
41
|
+
when TRecs::Frame then opts
|
42
|
+
else
|
43
|
+
TRecs::Frame.new(opts)
|
42
44
|
end
|
43
|
-
module_function :Frame
|
44
45
|
end
|
@@ -23,7 +23,7 @@ module TRecs
|
|
23
23
|
json_string = source.read_entry("frames.json") || "{}"
|
24
24
|
parsed_json = JSON.parse(json_string, symbolize_names: true)
|
25
25
|
parsed_json.each do |time, value|
|
26
|
-
frames[Integer(time.to_s)] =
|
26
|
+
frames[Integer(time.to_s)] = Frame(value)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
frames
|
data/lib/trecs/version.rb
CHANGED
data/spec/trecs/frame_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trecs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Iachetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|