trecs 0.3.6 → 0.3.7

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
  SHA1:
3
- metadata.gz: 0399b5f7904cfb0bfa55d3940408738df99734fb
4
- data.tar.gz: ddcc1d853e2f5f383ee6fc33fb29d29635fa2c7d
3
+ metadata.gz: e0cb21cd44124e576c798b443b41514a8e6e01e3
4
+ data.tar.gz: 60679b0a99113175582856b8a87a6062ac56a914
5
5
  SHA512:
6
- metadata.gz: 87eee5915a421f28b38a64723bce05ef81bbcd38fa2a64001b34d1ebbac775a75a1ffe0016daa4e8aa236039ad79a08ac46a3c77744b4af223133f7058f9bde1
7
- data.tar.gz: 91eb678e599bd7ba27fe6ad7f2526f6829e9eed77951cdb83ebca2aaf66c3a8d1c04cdad0aa19e0d65517de998fd6ce1c2a246ee0f33a31cfeef5c09784ea6c7
6
+ metadata.gz: 54230288c76f386d607128dbba4407904cf989dc23f250daf1cd6c1ddf25ab11cf3fe1707229dc7e572c2d59beb82be215f9399c0af9cadfa7ed7e0acb29e0c6
7
+ data.tar.gz: 8de0ca57d332630b4cb7ce66c4d82829b2205d39460d1c5980eb1f248bc06580de2dbf57e5235c8fdc98ec0897c35858cf29952d6ae75d3b7b69a6437c7a7045
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trecs (0.3.6)
4
+ trecs (0.3.7)
5
5
  minitar (~> 0.5.4)
6
6
  trollop (~> 2.0)
7
7
 
@@ -19,9 +19,14 @@ module TRecs
19
19
  source = TRecs::TgzSource.new(trecs_backend: input_file)
20
20
  @frames = get_frames(source)
21
21
 
22
- @from = options.fetch(:from) { nil }
23
- @to = options.fetch(:to) { nil }
24
- @speed = options.fetch(:speed) { nil }
22
+ @from = options.fetch(:from) { nil }
23
+ @from &&= @from.to_i
24
+
25
+ @to = options.fetch(:to) { nil }
26
+ @to &&= @to.to_i
27
+
28
+ @speed = options.fetch(:speed) { nil }
29
+ @speed &&= @speed.to_f
25
30
  end
26
31
 
27
32
  def perform
@@ -32,11 +37,10 @@ module TRecs
32
37
  end
33
38
  end
34
39
 
35
-
36
40
  private
37
41
 
38
42
  def timestamps
39
- @timestamps ||= frames.keys.map(&:to_i).sort
43
+ @timestamps ||= frames.keys.sort
40
44
  if from
41
45
  @timestamps = @timestamps.select { |t| t > from }
42
46
  @timestamps.unshift(from)
data/lib/trecs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TRecs
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti