taglib-ruby 1.1.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,7 @@ class TestID3v2Write < Test::Unit::TestCase
54
54
  end
55
55
 
56
56
  should 'be able to save ID3v2.3' do
57
- success = @file.save(TagLib::MPEG::File::ID3v2, true, 3)
57
+ success = @file.save(TagLib::MPEG::File::ID3v2, TagLib::File::StripOthers, TagLib::ID3v2::V3)
58
58
  assert_equal true, success
59
59
  @file.close
60
60
  @file = nil
@@ -19,7 +19,7 @@ class WAVExamples < Test::Unit::TestCase
19
19
 
20
20
  # Saving ID3v2 cover-art to disk
21
21
  TagLib::RIFF::WAV::File.open("#{DATA_FILE_PREFIX}sample.wav") do |file|
22
- id3v2_tag = file.tag
22
+ id3v2_tag = file.id3v2_tag
23
23
  cover = id3v2_tag.frame_list('APIC').first
24
24
  ext = cover.mime_type.rpartition('/')[2]
25
25
  File.open("#{DATA_FILE_PREFIX}cover-art.#{ext}", 'wb') { |f| f.write cover.picture }
@@ -40,7 +40,7 @@ class WAVFileTest < Test::Unit::TestCase
40
40
 
41
41
  context 'ID3V2 tag' do
42
42
  setup do
43
- @tag = @file.tag
43
+ @tag = @file.id3v2_tag
44
44
  end
45
45
 
46
46
  should 'exist' do
@@ -33,18 +33,18 @@ class WAVFileWriteTest < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  should 'have one picture frame' do
36
- assert_equal 2, @file.tag.frame_list('APIC').size
36
+ assert_equal 2, @file.id3v2_tag.frame_list('APIC').size
37
37
  end
38
38
 
39
39
  should 'be able to remove all picture frames' do
40
- @file.tag.remove_frames('APIC')
40
+ @file.id3v2_tag.remove_frames('APIC')
41
41
  success = @file.save
42
42
  assert success
43
43
  @file.close
44
44
  @file = nil
45
45
 
46
46
  reloaded do |file|
47
- assert_equal 0, file.tag.frame_list('APIC').size
47
+ assert_equal 0, file.id3v2_tag.frame_list('APIC').size
48
48
  end
49
49
  end
50
50
 
@@ -58,18 +58,18 @@ class WAVFileWriteTest < Test::Unit::TestCase
58
58
  apic.picture = picture_data
59
59
  apic.type = TagLib::ID3v2::AttachedPictureFrame::BackCover
60
60
 
61
- @file.tag.add_frame(apic)
61
+ @file.id3v2_tag.add_frame(apic)
62
62
  success = @file.save
63
63
  assert success
64
64
  @file.close
65
65
  @file = nil
66
66
 
67
67
  reloaded do |file|
68
- assert_equal 3, file.tag.frame_list('APIC').size
68
+ assert_equal 3, file.id3v2_tag.frame_list('APIC').size
69
69
  end
70
70
 
71
71
  reloaded do |file|
72
- written_apic = file.tag.frame_list('APIC')[2]
72
+ written_apic = file.id3v2_tag.frame_list('APIC')[2]
73
73
  assert_equal 'image/jpeg', written_apic.mime_type
74
74
  assert_equal 'desc', written_apic.description
75
75
  assert_equal picture_data, written_apic.picture
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taglib-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Stocker
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-12-29 00:00:00.000000000 Z
13
+ date: 2024-10-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  version: '0'
281
281
  requirements:
282
282
  - taglib (libtag1-dev in Debian/Ubuntu, taglib-devel in Fedora/RHEL)
283
- rubygems_version: 3.4.0.dev
283
+ rubygems_version: 3.4.10
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: Ruby interface for the taglib C++ library