taglib-ruby 1.1.3 → 2.0.0
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.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +16 -0
 - data/README.md +15 -11
 - data/docs/taglib/mpeg.rb +1 -9
 - data/ext/extconf_common.rb +21 -12
 - data/ext/taglib_aiff/taglib_aiff.i +4 -0
 - data/ext/taglib_aiff/taglib_aiff_wrap.cxx +222 -59
 - data/ext/taglib_base/includes.i +14 -14
 - data/ext/taglib_base/taglib_base.i +21 -0
 - data/ext/taglib_base/taglib_base_wrap.cxx +289 -350
 - data/ext/taglib_flac/taglib_flac.i +7 -3
 - data/ext/taglib_flac/taglib_flac_wrap.cxx +233 -336
 - data/ext/taglib_flac_picture/taglib_flac_picture.i +4 -0
 - data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +125 -71
 - data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +92 -51
 - data/ext/taglib_id3v2/taglib_id3v2.i +5 -0
 - data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +524 -414
 - data/ext/taglib_mp4/taglib_mp4.i +21 -18
 - data/ext/taglib_mp4/taglib_mp4_wrap.cxx +2062 -1467
 - data/ext/taglib_mpeg/taglib_mpeg.i +5 -0
 - data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +414 -300
 - data/ext/taglib_ogg/taglib_ogg.i +0 -2
 - data/ext/taglib_ogg/taglib_ogg_wrap.cxx +44 -42
 - data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +27 -48
 - data/ext/taglib_wav/taglib_wav.i +5 -2
 - data/ext/taglib_wav/taglib_wav_wrap.cxx +179 -89
 - data/lib/taglib/version.rb +3 -3
 - data/tasks/ext.rake +23 -39
 - data/tasks/swig.rake +14 -4
 - data/test/id3v2_write_test.rb +1 -1
 - data/test/wav_examples_test.rb +1 -1
 - data/test/wav_file_test.rb +1 -1
 - data/test/wav_file_write_test.rb +6 -6
 - metadata +3 -3
 
    
        data/test/id3v2_write_test.rb
    CHANGED
    
    | 
         @@ -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,  
     | 
| 
      
 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
         
     | 
    
        data/test/wav_examples_test.rb
    CHANGED
    
    | 
         @@ -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. 
     | 
| 
      
 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 }
         
     | 
    
        data/test/wav_file_test.rb
    CHANGED
    
    
    
        data/test/wav_file_write_test.rb
    CHANGED
    
    | 
         @@ -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. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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:  
     | 
| 
      
 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:  
     | 
| 
      
 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. 
     | 
| 
      
 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
         
     |