ruby-audioinfo 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AudioInfo
4
+ VERSION = '0.5.4'
5
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/audioinfo/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'ruby-audioinfo'
7
+ spec.version = AudioInfo::VERSION
8
+ spec.authors = ['Guillaume Pierronnet', 'Marcello Barnaba']
9
+ spec.email = ['guillaume.pierronnet@gmail.com']
10
+ spec.summary = 'glues together various audio ruby libraries and presents a unified API to the developer'
11
+ spec.description = "#{spec.summary} Currently, supported formats are: mp3, ogg, mpc, ape, wma, flac, aac, mp4, m4a."
12
+ spec.homepage = 'https://github.com/moumar/ruby-audioinfo'
13
+ spec.license = 'GPL-3.0'
14
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5.7')
15
+ spec.metadata['homepage_uri'] = spec.homepage
16
+ spec.metadata['source_code_uri'] = spec.homepage
17
+ spec.metadata['changelog_uri'] = 'https://github.com/moumar/ruby-audioinfo/History.txt'
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
23
+ end
24
+ spec.bindir = 'exe'
25
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.add_dependency 'apetag', '>= 1.1.4'
29
+ spec.add_dependency 'flacinfo-rb', '>= 0.4'
30
+ spec.add_dependency 'moumar-wmainfo-rb', '>= 0.7'
31
+ spec.add_dependency 'mp4info', '>= 1.7.3'
32
+ spec.add_dependency 'ruby-mp3info', '>= 0.8'
33
+ spec.add_dependency 'ruby-ogginfo', '>= 0.6.13'
34
+ spec.add_dependency 'wavefile', '~> 0.6.0'
35
+ end
metadata CHANGED
@@ -1,58 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-audioinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Pierronnet
8
8
  - Marcello Barnaba
9
- autorequire:
10
- bindir: bin
9
+ autorequire:
10
+ bindir: exe
11
11
  cert_chain: []
12
- date: 2016-01-05 00:00:00.000000000 Z
12
+ date: 2020-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: ruby-mp3info
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '0.8'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0.8'
28
- - !ruby/object:Gem::Dependency
29
- name: ruby-ogginfo
15
+ name: apetag
30
16
  requirement: !ruby/object:Gem::Requirement
31
17
  requirements:
32
18
  - - ">="
33
19
  - !ruby/object:Gem::Version
34
- version: '0.7'
20
+ version: 1.1.4
35
21
  type: :runtime
36
22
  prerelease: false
37
23
  version_requirements: !ruby/object:Gem::Requirement
38
24
  requirements:
39
25
  - - ">="
40
26
  - !ruby/object:Gem::Version
41
- version: '0.7'
27
+ version: 1.1.4
42
28
  - !ruby/object:Gem::Dependency
43
- name: mp4info
29
+ name: flacinfo-rb
44
30
  requirement: !ruby/object:Gem::Requirement
45
31
  requirements:
46
32
  - - ">="
47
33
  - !ruby/object:Gem::Version
48
- version: 1.7.3
34
+ version: '0.4'
49
35
  type: :runtime
50
36
  prerelease: false
51
37
  version_requirements: !ruby/object:Gem::Requirement
52
38
  requirements:
53
39
  - - ">="
54
40
  - !ruby/object:Gem::Version
55
- version: 1.7.3
41
+ version: '0.4'
56
42
  - !ruby/object:Gem::Dependency
57
43
  name: moumar-wmainfo-rb
58
44
  requirement: !ruby/object:Gem::Requirement
@@ -68,132 +54,113 @@ dependencies:
68
54
  - !ruby/object:Gem::Version
69
55
  version: '0.7'
70
56
  - !ruby/object:Gem::Dependency
71
- name: flacinfo-rb
57
+ name: mp4info
72
58
  requirement: !ruby/object:Gem::Requirement
73
59
  requirements:
74
60
  - - ">="
75
61
  - !ruby/object:Gem::Version
76
- version: '0.4'
62
+ version: 1.7.3
77
63
  type: :runtime
78
64
  prerelease: false
79
65
  version_requirements: !ruby/object:Gem::Requirement
80
66
  requirements:
81
67
  - - ">="
82
68
  - !ruby/object:Gem::Version
83
- version: '0.4'
69
+ version: 1.7.3
84
70
  - !ruby/object:Gem::Dependency
85
- name: apetag
71
+ name: ruby-mp3info
86
72
  requirement: !ruby/object:Gem::Requirement
87
73
  requirements:
88
74
  - - ">="
89
75
  - !ruby/object:Gem::Version
90
- version: 1.1.4
76
+ version: '0.8'
91
77
  type: :runtime
92
78
  prerelease: false
93
79
  version_requirements: !ruby/object:Gem::Requirement
94
80
  requirements:
95
81
  - - ">="
96
82
  - !ruby/object:Gem::Version
97
- version: 1.1.4
83
+ version: '0.8'
98
84
  - !ruby/object:Gem::Dependency
99
- name: wavefile
85
+ name: ruby-ogginfo
100
86
  requirement: !ruby/object:Gem::Requirement
101
87
  requirements:
102
88
  - - ">="
103
89
  - !ruby/object:Gem::Version
104
- version: 0.6.0
90
+ version: 0.6.13
105
91
  type: :runtime
106
92
  prerelease: false
107
93
  version_requirements: !ruby/object:Gem::Requirement
108
94
  requirements:
109
95
  - - ">="
110
96
  - !ruby/object:Gem::Version
111
- version: 0.6.0
97
+ version: 0.6.13
112
98
  - !ruby/object:Gem::Dependency
113
- name: rdoc
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '4.0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '4.0'
126
- - !ruby/object:Gem::Dependency
127
- name: hoe
99
+ name: wavefile
128
100
  requirement: !ruby/object:Gem::Requirement
129
101
  requirements:
130
102
  - - "~>"
131
103
  - !ruby/object:Gem::Version
132
- version: '3.12'
133
- type: :development
104
+ version: 0.6.0
105
+ type: :runtime
134
106
  prerelease: false
135
107
  version_requirements: !ruby/object:Gem::Requirement
136
108
  requirements:
137
109
  - - "~>"
138
110
  - !ruby/object:Gem::Version
139
- version: '3.12'
140
- description: |-
141
- ruby-audioinfo glue together various audio ruby libraries and presents a unified
142
- API to the developper. Currently, supported formats are: mp3, ogg, mpc, ape,
143
- wma, flac, aac, mp4, m4a.
111
+ version: 0.6.0
112
+ description: 'glues together various audio ruby libraries and presents a unified API
113
+ to the developer Currently, supported formats are: mp3, ogg, mpc, ape, wma, flac,
114
+ aac, mp4, m4a.'
144
115
  email:
145
116
  - guillaume.pierronnet@gmail.com
146
- - unknown
147
117
  executables: []
148
118
  extensions: []
149
- extra_rdoc_files:
150
- - History.txt
151
- - Manifest.txt
152
- - README.rdoc
119
+ extra_rdoc_files: []
153
120
  files:
154
- - ".gemtest"
121
+ - ".github/workflows/ruby.yml"
122
+ - ".gitignore"
123
+ - ".rubocop.yml"
124
+ - ".rubocop_todo.yml"
125
+ - CODE_OF_CONDUCT.md
126
+ - Gemfile
127
+ - Gemfile.lock
155
128
  - History.txt
156
- - Manifest.txt
157
- - README.rdoc
129
+ - README.md
158
130
  - Rakefile
131
+ - bin/console
132
+ - codecov.yml
159
133
  - lib/audioinfo.rb
160
134
  - lib/audioinfo/album.rb
161
135
  - lib/audioinfo/case_insensitive_hash.rb
162
136
  - lib/audioinfo/mpcinfo.rb
163
- - test/mpcinfo.rb
164
- - test/test_audioinfo.rb
165
- - test/test_case_insensitive_hash.rb
166
- - test/test_helper.rb
167
- - test/test_wav.rb
168
- homepage: http://ruby-audioinfo.rubyforge.org
137
+ - lib/audioinfo/version.rb
138
+ - ruby-audioinfo.gemspec
139
+ homepage: https://github.com/moumar/ruby-audioinfo
169
140
  licenses:
170
141
  - GPL-3.0
171
- metadata: {}
172
- post_install_message:
173
- rdoc_options:
174
- - "--main"
175
- - README.rdoc
142
+ metadata:
143
+ homepage_uri: https://github.com/moumar/ruby-audioinfo
144
+ source_code_uri: https://github.com/moumar/ruby-audioinfo
145
+ changelog_uri: https://github.com/moumar/ruby-audioinfo/History.txt
146
+ post_install_message:
147
+ rdoc_options: []
176
148
  require_paths:
177
149
  - lib
178
150
  required_ruby_version: !ruby/object:Gem::Requirement
179
151
  requirements:
180
152
  - - ">="
181
153
  - !ruby/object:Gem::Version
182
- version: '0'
154
+ version: 2.5.7
183
155
  required_rubygems_version: !ruby/object:Gem::Requirement
184
156
  requirements:
185
157
  - - ">="
186
158
  - !ruby/object:Gem::Version
187
159
  version: '0'
188
160
  requirements: []
189
- rubyforge_project:
190
- rubygems_version: 2.2.2
191
- signing_key:
161
+ rubygems_version: 3.1.2
162
+ signing_key:
192
163
  specification_version: 4
193
- summary: ruby-audioinfo glue together various audio ruby libraries and presents a
194
- unified API to the developper
195
- test_files:
196
- - test/test_audioinfo.rb
197
- - test/test_wav.rb
198
- - test/test_helper.rb
199
- - test/test_case_insensitive_hash.rb
164
+ summary: glues together various audio ruby libraries and presents a unified API to
165
+ the developer
166
+ test_files: []
data/.gemtest DELETED
File without changes
@@ -1,9 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.rdoc
4
- Rakefile
5
- lib/audioinfo.rb
6
- lib/audioinfo/album.rb
7
- lib/audioinfo/mpcinfo.rb
8
- lib/audioinfo/case_insensitive_hash.rb
9
- test/mpcinfo.rb
@@ -1,46 +0,0 @@
1
- = ruby-audioinfo
2
-
3
- * http://ruby-audioinfo.rubyforge.org
4
- * http://rubyforge.org/projects/ruby-audioinfo/
5
- * https://github.com/moumar/ruby-audioinfo
6
-
7
- by Guillaume Pierronnet
8
-
9
- == DESCRIPTION:
10
-
11
- ruby-audioinfo glue together various audio ruby libraries and presents a unified
12
- API to the developper. Currently, supported formats are: mp3, ogg, mpc, ape,
13
- wma, flac, aac, mp4, m4a.
14
-
15
- == FEATURES/PROBLEMS:
16
-
17
- * beta write support for mp3 and ogg tags (other to be written)
18
- * unified support for tag text-encoding. AudioInfo.new("file", "utf-8") and you're done!
19
- * support for MusicBrainz tags
20
- * AudioInfo::Album class included, which gives an unified way to manage an album in a given directory.
21
-
22
- == SYNOPSIS:
23
-
24
- AudioInfo.open("audio_file.one_of_supported_extensions") do |info|
25
- info.artist # or info["artist"]
26
- info.title # or info["title"]
27
- info.length # playing time of the file
28
- info.bitrate # average bitrate
29
- info.to_h # { "artist" => "artist", "title" => "title", etc... }
30
- end
31
-
32
- == REQUIREMENTS:
33
-
34
- * ruby-mp3info[http://ruby-mp3info.rubyforge.org/]
35
- * ruby-ogginfo[http://ruby-ogginfo.rubyforge.org/]
36
- * MP4Info[http://mp4info.rubyforge.org/]
37
- * flacinfo-rb[http://rubyforge.org/projects/flacinfo-rb/]
38
- * wmainfo-rb[http://rubyforge.org/projects/wmainfo/]
39
-
40
- == INSTALL:
41
-
42
- * sudo gem install ruby-audioinfo
43
-
44
- == LICENSE:
45
-
46
- Ruby
@@ -1,8 +0,0 @@
1
- require File.dirname(__FILE__)+"/../lib/audioinfo/mpcinfo"
2
-
3
- require "pp"
4
-
5
- fn = "file.mpc"
6
- mpc = MpcInfo.new(fn)
7
- pp mpc.id3v2_tag
8
- pp mpc.infos
@@ -1,35 +0,0 @@
1
- require_relative "../lib/audioinfo"
2
- require "minitest/autorun"
3
-
4
- require "fileutils"
5
- require "tmpdir"
6
-
7
- require_relative "test_helper"
8
-
9
- class TestAudioinfo < MiniTest::Unit::TestCase
10
-
11
- FLAC_FILE = "#{Dir.tmpdir}/ruby-audioinfo-test.flac"
12
-
13
- def setup
14
- FileUtils.cp(File.join(SUPPORT_DIR, "440Hz-5sec.flac"), FLAC_FILE)
15
- end
16
-
17
- def test_flac_whitelist
18
- i = AudioInfo.new(FLAC_FILE)
19
- assert_kind_of FlacInfo, i.info
20
- end
21
-
22
- def test_flac_tags_wrapper
23
- i = AudioInfo.new(FLAC_FILE)
24
- assert_kind_of CaseInsensitiveHash, i.info.tags
25
- end
26
-
27
- def test_flac_writing
28
- title = "test with utf8éblèàqsf"
29
- ai = AudioInfo.new(FLAC_FILE)
30
- ai.title = title
31
- ai.close
32
- ai = AudioInfo.new(FLAC_FILE)
33
- assert_equal title, ai.title
34
- end
35
- end
@@ -1,28 +0,0 @@
1
- require "audioinfo"
2
- require "minitest/autorun"
3
-
4
- class TestCaseInsensitiveHash < MiniTest::Unit::TestCase
5
-
6
- def test_string_access
7
- h = CaseInsensitiveHash.new
8
- h["foo"] = "bar"
9
- assert_equal "bar", h["foo"]
10
- end
11
-
12
- def test_symbol_access
13
- h = CaseInsensitiveHash.new
14
- h[:foo] = "bar"
15
- assert_equal "bar", h[:foo]
16
- end
17
-
18
- def test_case_insensitive_access
19
- h = CaseInsensitiveHash.new
20
- h["FOO"] = "bar"
21
- assert_equal "bar", h["foo"]
22
- end
23
-
24
- def test_copy_constructor
25
- h = CaseInsensitiveHash.new({"FOO" => "bar"})
26
- assert_equal "bar", h["foo"]
27
- end
28
- end
@@ -1 +0,0 @@
1
- SUPPORT_DIR = File.expand_path("support", File.dirname(__FILE__))
@@ -1,27 +0,0 @@
1
- require_relative "../lib/audioinfo"
2
- require "minitest/autorun"
3
-
4
- require "fileutils"
5
- require "tmpdir"
6
-
7
- require_relative "test_helper"
8
-
9
- class TestWav < MiniTest::Unit::TestCase
10
-
11
- WAV_FILE = "#{Dir.tmpdir}/ruby-audioinfo-test.wav"
12
-
13
- def setup
14
- FileUtils.cp(File.join(SUPPORT_DIR, "piano2.wav"), WAV_FILE)
15
- end
16
-
17
- def test_wav_whitelist
18
- i = AudioInfo.new(WAV_FILE)
19
- assert_kind_of WaveFile::Info, i.info
20
- end
21
-
22
- def test_wav_length
23
- i = AudioInfo.new(WAV_FILE)
24
- assert_equal i.length, 6
25
- end
26
-
27
- end