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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf851a920d7446fe1c3d68f8d18ee41b5acb7fe5
4
- data.tar.gz: 05368a54c9eb55be54e89a75cff82c3365382be7
3
+ metadata.gz: 70eab2db7e40d63781d3ecf10dadbca5fa489e2e
4
+ data.tar.gz: 7c7d457803dcd90f76e91241ae1552c328b397ab
5
5
  SHA512:
6
- metadata.gz: 9d7fed63ddbc398e90f9f72ba7a343c8253010675beead5660110c80233d3bf097477b012b107732af27a7ca4cdc2463a32a09208c9b05f08b5009faef4196fb
7
- data.tar.gz: da28f5eaaa23cec437915f8cc114c94571483187ba318f7f6f062edf91af150f9d4a8a6670068c9773e55b2d70512efc541bb8c9902e04ea9ffe8e1678a9c44d
6
+ metadata.gz: 1f05a81552e62a562f108aa7aeabf15a76517eda3dc3bbc0396aceefdbceea082f77135f9d316e0261d9fe6aff5b1c06cc42d65fa2aebfc8b5038578f4320e94
7
+ data.tar.gz: a01f0d14e5d4ccb689c63c2adf6d85fe92b572c34fa5057af9870526df1cef8cd061d2ce79239c05451225774baf0d489f7b00c9406fca37f12e71f4687b3dd2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trecs (0.3.12)
4
+ trecs (0.3.13)
5
5
  minitar (~> 0.5.4)
6
6
  trollop (~> 2.0)
7
7
 
@@ -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.yaml') do |f|
27
- f.write manifest.to_yaml
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
- @manifest = YAML.load(source.read_entry("manifest.yaml"))
46
+ json_string = source.read_entry("manifest.json")
47
+ @manifest = JSON.parse(json_string, symbolize_names: true)
48
48
 
49
- format = manifest["format"]
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.to_s] = value
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 intersección entre read y create_recording
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
@@ -1,3 +1,3 @@
1
1
  module TRecs
2
- VERSION = "0.3.12"
2
+ VERSION = "0.3.13"
3
3
  end
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.12
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-05 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop