trecs 0.3.12 → 0.3.13
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/sources/tgz_source.rb +8 -8
- data/lib/trecs/version.rb +1 -1
- 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: 70eab2db7e40d63781d3ecf10dadbca5fa489e2e
|
4
|
+
data.tar.gz: 7c7d457803dcd90f76e91241ae1552c328b397ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f05a81552e62a562f108aa7aeabf15a76517eda3dc3bbc0396aceefdbceea082f77135f9d316e0261d9fe6aff5b1c06cc42d65fa2aebfc8b5038578f4320e94
|
7
|
+
data.tar.gz: a01f0d14e5d4ccb689c63c2adf6d85fe92b572c34fa5057af9870526df1cef8cd061d2ce79239c05451225774baf0d489f7b00c9406fca37f12e71f4687b3dd2
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
require 'json'
|
3
2
|
require "fileutils"
|
4
3
|
require "zlib"
|
5
4
|
require 'archive/tar/minitar'
|
6
5
|
require "tmpdir"
|
7
6
|
require "pathname"
|
8
|
-
require "yaml"
|
9
7
|
|
10
8
|
module TRecs
|
11
9
|
class TgzSource
|
@@ -23,12 +21,13 @@ module TRecs
|
|
23
21
|
|
24
22
|
yield self
|
25
23
|
|
26
|
-
create_file('manifest.
|
27
|
-
f.write manifest.
|
24
|
+
create_file('manifest.json') do |f|
|
25
|
+
f.write manifest.to_json
|
28
26
|
end
|
29
27
|
|
30
28
|
Minitar.pack(@files_to_add.flatten, @tgz)
|
31
29
|
end
|
30
|
+
FileUtils.rm_rf(tmpdir)
|
32
31
|
end
|
33
32
|
|
34
33
|
def read
|
@@ -44,9 +43,10 @@ module TRecs
|
|
44
43
|
reader = nil
|
45
44
|
options[:source] = self
|
46
45
|
read do |source|
|
47
|
-
|
46
|
+
json_string = source.read_entry("manifest.json")
|
47
|
+
@manifest = JSON.parse(json_string, symbolize_names: true)
|
48
48
|
|
49
|
-
format = manifest[
|
49
|
+
format = manifest[:format]
|
50
50
|
reader_file = "readers/#{format}_reader"
|
51
51
|
require reader_file
|
52
52
|
reader_class_name = [
|
@@ -125,7 +125,7 @@ module TRecs
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def []=(key, value)
|
128
|
-
manifest[key.
|
128
|
+
manifest[key.to_sym] = value
|
129
129
|
end
|
130
130
|
|
131
131
|
def audio_files
|
@@ -143,7 +143,7 @@ module TRecs
|
|
143
143
|
end
|
144
144
|
private
|
145
145
|
|
146
|
-
# TODO: Este es el punto de
|
146
|
+
# TODO: Este es el punto de interseccion entre read y create_recording
|
147
147
|
def manifest
|
148
148
|
@manifest ||= {}
|
149
149
|
end
|
data/lib/trecs/version.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.13
|
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-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|