format_parser 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +2 -0
- data/CHANGELOG.md +5 -0
- data/format_parser.gemspec +2 -1
- data/lib/archive.rb +1 -3
- data/lib/format_parser/version.rb +1 -1
- data/lib/parsers/mp3_parser.rb +3 -4
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56f1a49a27872cad9d5e219919196522d322c72aafa56f610301e939e80bc8ad
|
4
|
+
data.tar.gz: 0a727444f42a4e37f077d95ea65a2e6ff7500057c96afd159c16eb6884c00611
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f17f2af50eab4fe58ca75d2be97d71236c86e48d2804c66d45d4ee0907055baf1a37ef56c476d1ddc2b4327d41a2a2980c2f0d6fc27c54cf108185771377271
|
7
|
+
data.tar.gz: d91545966335fc6e5e08b2d13de204e23caae858d38e246a6d3948521cfc57a6eca5b079587a43cbf6a413d2c6aa83a6428a7e42f9a9e490cecc9f8476697687
|
data/.github/workflows/main.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/format_parser.gemspec
CHANGED
@@ -15,6 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
minimum amount of data possible."
|
16
16
|
spec.homepage = 'https://github.com/WeTransfer/format_parser'
|
17
17
|
spec.license = 'MIT (Hippocratic)'
|
18
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
19
|
+
|
18
20
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
21
|
if spec.respond_to?(:metadata)
|
20
22
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
@@ -32,7 +34,6 @@ Gem::Specification.new do |spec|
|
|
32
34
|
|
33
35
|
spec.add_dependency 'exifr', '>= 1.3.8'
|
34
36
|
spec.add_dependency 'id3tag', '>= 0.14.2'
|
35
|
-
spec.add_dependency 'ks'
|
36
37
|
spec.add_dependency 'measurometer'
|
37
38
|
|
38
39
|
spec.add_development_dependency 'parallel_tests'
|
data/lib/archive.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
require 'ks'
|
2
|
-
|
3
1
|
module FormatParser
|
4
2
|
class Archive
|
5
3
|
include FormatParser::AttributesJSON
|
6
4
|
|
7
|
-
class Entry <
|
5
|
+
class Entry < Struct.new(:type, :size, :filename, keyword_init: true)
|
8
6
|
def to_json(*a)
|
9
7
|
to_h.to_json(*a)
|
10
8
|
end
|
data/lib/parsers/mp3_parser.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'ks'
|
2
1
|
require 'id3tag'
|
3
2
|
|
4
3
|
class FormatParser::MP3Parser
|
@@ -6,13 +5,13 @@ class FormatParser::MP3Parser
|
|
6
5
|
|
7
6
|
require_relative 'mp3_parser/id3_extraction'
|
8
7
|
|
9
|
-
class MPEGFrame <
|
8
|
+
class MPEGFrame < Struct.new(:offset_in_file, :mpeg_id, :channels, :sample_rate, :frame_length, :frame_bitrate, keyword_init: true)
|
10
9
|
end
|
11
10
|
|
12
|
-
class VBRHeader <
|
11
|
+
class VBRHeader < Struct.new(:frames, :byte_count, :toc_entries, :vbr_scale, keyword_init: true)
|
13
12
|
end
|
14
13
|
|
15
|
-
class MP3Info <
|
14
|
+
class MP3Info < Struct.new(:duration_seconds, :num_channels, :sampling_rate, keyword_init: true)
|
16
15
|
end
|
17
16
|
|
18
17
|
class InvalidDeepFetch < KeyError
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: format_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Berman
|
8
8
|
- Julik Tarkhanov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
12
|
date: 2022-11-07 00:00:00.000000000 Z
|
@@ -39,20 +39,6 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.14.2
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: ks
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
49
|
-
type: :runtime
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
56
42
|
- !ruby/object:Gem::Dependency
|
57
43
|
name: measurometer
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -287,7 +273,7 @@ licenses:
|
|
287
273
|
- MIT (Hippocratic)
|
288
274
|
metadata:
|
289
275
|
allowed_push_host: https://rubygems.org
|
290
|
-
post_install_message:
|
276
|
+
post_install_message:
|
291
277
|
rdoc_options: []
|
292
278
|
require_paths:
|
293
279
|
- lib
|
@@ -295,15 +281,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
281
|
requirements:
|
296
282
|
- - ">="
|
297
283
|
- !ruby/object:Gem::Version
|
298
|
-
version:
|
284
|
+
version: 2.6.0
|
299
285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
286
|
requirements:
|
301
287
|
- - ">="
|
302
288
|
- !ruby/object:Gem::Version
|
303
289
|
version: '0'
|
304
290
|
requirements: []
|
305
|
-
rubygems_version: 3.3.
|
306
|
-
signing_key:
|
291
|
+
rubygems_version: 3.3.17
|
292
|
+
signing_key:
|
307
293
|
specification_version: 4
|
308
294
|
summary: A library for efficient parsing of file metadata
|
309
295
|
test_files: []
|