trecs 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: 757f42c4df411d64d4dc4d17376c0f745bd944da
4
- data.tar.gz: e36e0606e3856f86687f4a541c9c359878ada950
3
+ metadata.gz: 83eccd67f68d1a54db2d98b7651d28d5b556bbe6
4
+ data.tar.gz: 78aa67212bc365a20d630edec08c0dc9d7f93784
5
5
  SHA512:
6
- metadata.gz: dc09b46d6ea86b06692337e2d449576ff3881505c9084592855d6a2c89f94dc42cf80c1119d6aebae34a98a80239c903378f7d052acf668be2b7144494066862
7
- data.tar.gz: e558d76ab3bf1277184acc067db519a9b99c3b8e6687b9607bf5ddda5c5ee7fe775d9b249da9924506db463e7ba244af44981f2b9884cf53efcacc2a2d8aa328
6
+ metadata.gz: f9d480236bcdb4803e6cdfd990d10459a5d8e3c583f9653c30217dbdc039fc8ff436b6a95e01bbe92cca68e12a348a84566c2f1351a9cef418217cb39417c5ed
7
+ data.tar.gz: a190df120622377885bc671f967e53e043e01c821e8721fa13b0bed43afaee7b75a436bffdf8c2cf0f4e0eb31fed9d4a6d64f14b322a8ec433d5462c17534477
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trecs (0.1.0)
4
+ trecs (0.1.2)
5
5
  rubyzip (~> 1.1.4)
6
6
  trollop (~> 2.0)
7
7
 
@@ -1,4 +1,5 @@
1
1
  require 'yaml/store'
2
+ require "pathname"
2
3
 
3
4
  module TRecs
4
5
  class YamlStoreReader
@@ -12,7 +13,7 @@ module TRecs
12
13
  @file = options.fetch(:trecs_file)
13
14
  File.open(@file)
14
15
 
15
- store = YAML::Store.new "/tmp/hola.trecs"
16
+ store = YAML::Store.new Pathname(@file)
16
17
  @frames = store.transaction do
17
18
  store["frames"]
18
19
  end
@@ -19,9 +19,9 @@ module TRecs
19
19
  curr_data = @file.read(len)
20
20
  @full_output << curr_data
21
21
 
22
- #data_array = @full_output.each_line.to_a
23
- #height = data_array.size > @height ? @height : 0
24
- #frame = data_array[-height..-1].join
22
+ data_array = @full_output.each_line.to_a
23
+ height = data_array.size > @height ? @height : 0
24
+ frame = data_array[-height..-1].join
25
25
 
26
26
  frame = @prev_frame + curr_data
27
27
 
data/lib/trecs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TRecs
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
Binary file
Binary file
@@ -7,7 +7,7 @@ module TRecs
7
7
  context "file" do
8
8
  Given(:input_file) { "tmp/input_file.txt" }
9
9
  Given { FileUtils.touch(input_file) }
10
- When(:strategy) { RawFileStrategy.new(file: input_file) }
10
+ When(:strategy) { RawFileStrategy.new(input_file: input_file) }
11
11
  Then { Pathname(strategy.file).to_s == input_file }
12
12
  end
13
13
 
@@ -22,10 +22,10 @@ module TRecs
22
22
  Given { FileUtils.touch(existent) }
23
23
  Given { FileUtils.rm(inexistent, force: true) }
24
24
 
25
- When(:strategy1) { RawFileStrategy.new(file: existent) }
25
+ When(:strategy1) { RawFileStrategy.new(input_file: existent) }
26
26
  Then { expect(strategy1).not_to have_failed }
27
27
 
28
- When(:strategy2) { RawFileStrategy.new(file: inexistent) }
28
+ When(:strategy2) { RawFileStrategy.new(input_file: inexistent) }
29
29
  Then { expect(strategy2).to have_failed(Errno::ENOENT, /No such file or directory/) }
30
30
  end
31
31
  end
@@ -35,7 +35,7 @@ module TRecs
35
35
  Given { FileUtils.touch(input_file) }
36
36
 
37
37
  Given(:strategy) {
38
- RawFileStrategy.new(file: input_file)
38
+ RawFileStrategy.new(input_file: input_file)
39
39
  }
40
40
  Given(:recorder) { Object.new }
41
41
  When { strategy.recorder = recorder }
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.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti
@@ -189,6 +189,8 @@ files:
189
189
  - pkg/trecs-0.0.7.gem
190
190
  - pkg/trecs-0.0.8.gem
191
191
  - pkg/trecs-0.0.9.gem
192
+ - pkg/trecs-0.1.0.gem
193
+ - pkg/trecs-0.1.1.gem
192
194
  - sandbox/create_recording.rb
193
195
  - sandbox/lipsum_end
194
196
  - sandbox/lipsum_start