taglib-ruby 0.4.0 → 0.5.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.
- data/CHANGES.md +5 -0
- data/README.md +2 -1
- data/docs/taglib/base.rb +2 -1
- data/docs/taglib/flac.rb +176 -0
- data/docs/taglib/id3v2.rb +1 -1
- data/ext/taglib_base/includes.i +2 -1
- data/ext/taglib_base/taglib_base_wrap.cxx +1 -1
- data/ext/taglib_flac/extconf.rb +4 -0
- data/ext/taglib_flac/taglib_flac.i +101 -0
- data/ext/taglib_flac/taglib_flac_wrap.cxx +4579 -0
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +1 -1
- data/ext/taglib_id3v2/taglib_id3v2.i +1 -8
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +1 -1
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +1 -1
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +1 -1
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +1 -1
- data/lib/taglib.rb +1 -0
- data/lib/taglib/flac.rb +7 -0
- data/lib/taglib/version.rb +1 -1
- data/taglib-ruby.gemspec +12 -1
- data/tasks/docs_coverage.rake +17 -2
- data/tasks/ext.rake +3 -0
- data/tasks/swig.rake +7 -1
- data/test/data/Makefile +5 -2
- data/test/data/flac-create.cpp +80 -0
- data/test/data/flac.flac +0 -0
- data/test/data/globe_east_90.jpg +0 -0
- data/test/flac_file_test.rb +101 -0
- data/test/flac_file_write_test.rb +81 -0
- data/test/id3v2_frames_test.rb +2 -2
- data/test/id3v2_memory_test.rb +1 -1
- data/test/id3v2_write_test.rb +2 -1
- metadata +98 -62
    
        data/test/id3v2_frames_test.rb
    CHANGED
    
    | @@ -25,7 +25,7 @@ class TestID3v2Frames < Test::Unit::TestCase | |
| 25 25 | 
             
                end
         | 
| 26 26 |  | 
| 27 27 | 
             
                should "be enumerable" do
         | 
| 28 | 
            -
                  ids = @frames.collect{ |frame| frame.frame_id }
         | 
| 28 | 
            +
                  ids = @frames.collect { |frame| frame.frame_id }
         | 
| 29 29 | 
             
                  assert_equal ["TIT2", "TPE1", "TALB", "TRCK", "TDRC",
         | 
| 30 30 | 
             
                                "COMM", "COMM", "TCON", "TXXX", "COMM", "APIC"], ids
         | 
| 31 31 | 
             
                end
         | 
| @@ -57,7 +57,7 @@ class TestID3v2Frames < Test::Unit::TestCase | |
| 57 57 | 
             
                should "be removable by ID" do
         | 
| 58 58 | 
             
                  frames = @tag.frame_list
         | 
| 59 59 | 
             
                  @tag.remove_frames('COMM')
         | 
| 60 | 
            -
                  tit2 = frames.find{ |f| f.frame_id == 'TIT2' }
         | 
| 60 | 
            +
                  tit2 = frames.find { |f| f.frame_id == 'TIT2' }
         | 
| 61 61 | 
             
                  # Other frames should still be accessible
         | 
| 62 62 | 
             
                  assert_equal "Dummy Title", tit2.to_s
         | 
| 63 63 | 
             
                end
         | 
    
        data/test/id3v2_memory_test.rb
    CHANGED
    
    | @@ -73,7 +73,7 @@ class TestID3v2Memory < Test::Unit::TestCase | |
| 73 73 | 
             
                  @tag.add_frame tcom
         | 
| 74 74 | 
             
                  # the following leads to an ObjectPreviouslyDeleted error (see Issue #8)
         | 
| 75 75 | 
             
                  assert_nothing_raised do
         | 
| 76 | 
            -
                    @tag.frame_list.find{ |fr| 'TCOM' == fr.frame_id }
         | 
| 76 | 
            +
                    @tag.frame_list.find { |fr| 'TCOM' == fr.frame_id }
         | 
| 77 77 | 
             
                  end
         | 
| 78 78 | 
             
                end
         | 
| 79 79 |  | 
    
        data/test/id3v2_write_test.rb
    CHANGED
    
    | @@ -6,6 +6,7 @@ class TestID3v2Write < Test::Unit::TestCase | |
| 6 6 |  | 
| 7 7 | 
             
              SAMPLE_FILE = "test/data/sample.mp3"
         | 
| 8 8 | 
             
              OUTPUT_FILE = "test/data/output.mp3"
         | 
| 9 | 
            +
              PICTURE_FILE = "test/data/globe_east_540.jpg"
         | 
| 9 10 |  | 
| 10 11 | 
             
              context "TagLib::MPEG::File" do
         | 
| 11 12 | 
             
                setup do
         | 
| @@ -37,7 +38,7 @@ class TestID3v2Write < Test::Unit::TestCase | |
| 37 38 | 
             
                  end
         | 
| 38 39 |  | 
| 39 40 | 
             
                  should "be able to add a new frame to it and read it back" do
         | 
| 40 | 
            -
                    picture_data = File.open( | 
| 41 | 
            +
                    picture_data = File.open(PICTURE_FILE, 'rb') { |f| f.read }
         | 
| 41 42 |  | 
| 42 43 | 
             
                    apic = TagLib::ID3v2::AttachedPictureFrame.new
         | 
| 43 44 | 
             
                    apic.mime_type = "image/jpeg"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,83 +1,107 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification
         | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: taglib-ruby
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 11
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 5
         | 
| 9 | 
            +
              - 0
         | 
| 10 | 
            +
              version: 0.5.0
         | 
| 6 11 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors:
         | 
| 12 | 
            +
            authors: 
         | 
| 8 13 | 
             
            - Robin Stocker
         | 
| 9 14 | 
             
            autorequire: 
         | 
| 10 15 | 
             
            bindir: bin
         | 
| 11 16 | 
             
            cert_chain: []
         | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
               | 
| 17 | 
            +
             | 
| 18 | 
            +
            date: 2012-04-15 00:00:00 Z
         | 
| 19 | 
            +
            dependencies: 
         | 
| 20 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 21 | 
            +
              version_requirements: &id001 !ruby/object:Gem::Requirement 
         | 
| 17 22 | 
             
                none: false
         | 
| 18 | 
            -
                requirements:
         | 
| 23 | 
            +
                requirements: 
         | 
| 19 24 | 
             
                - - ~>
         | 
| 20 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 25 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 26 | 
            +
                    hash: 19
         | 
| 27 | 
            +
                    segments: 
         | 
| 28 | 
            +
                    - 1
         | 
| 29 | 
            +
                    - 1
         | 
| 30 | 
            +
                    - 0
         | 
| 21 31 | 
             
                    version: 1.1.0
         | 
| 32 | 
            +
              prerelease: false
         | 
| 33 | 
            +
              requirement: *id001
         | 
| 22 34 | 
             
              type: :development
         | 
| 35 | 
            +
              name: bundler
         | 
| 36 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 37 | 
            +
              version_requirements: &id002 !ruby/object:Gem::Requirement 
         | 
| 38 | 
            +
                none: false
         | 
| 39 | 
            +
                requirements: 
         | 
| 40 | 
            +
                - - ~>
         | 
| 41 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 42 | 
            +
                    hash: 27
         | 
| 43 | 
            +
                    segments: 
         | 
| 44 | 
            +
                    - 0
         | 
| 45 | 
            +
                    - 8
         | 
| 46 | 
            +
                    version: "0.8"
         | 
| 23 47 | 
             
              prerelease: false
         | 
| 24 | 
            -
               | 
| 25 | 
            -
             | 
| 48 | 
            +
              requirement: *id002
         | 
| 49 | 
            +
              type: :development
         | 
| 26 50 | 
             
              name: rake-compiler
         | 
| 27 | 
            -
             | 
| 51 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 52 | 
            +
              version_requirements: &id003 !ruby/object:Gem::Requirement 
         | 
| 28 53 | 
             
                none: false
         | 
| 29 | 
            -
                requirements:
         | 
| 54 | 
            +
                requirements: 
         | 
| 30 55 | 
             
                - - ~>
         | 
| 31 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            -
                     | 
| 33 | 
            -
             | 
| 56 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 57 | 
            +
                    hash: 15
         | 
| 58 | 
            +
                    segments: 
         | 
| 59 | 
            +
                    - 1
         | 
| 60 | 
            +
                    - 0
         | 
| 61 | 
            +
                    version: "1.0"
         | 
| 34 62 | 
             
              prerelease: false
         | 
| 35 | 
            -
               | 
| 36 | 
            -
             | 
| 63 | 
            +
              requirement: *id003
         | 
| 64 | 
            +
              type: :development
         | 
| 37 65 | 
             
              name: shoulda-context
         | 
| 38 | 
            -
             | 
| 66 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 67 | 
            +
              version_requirements: &id004 !ruby/object:Gem::Requirement 
         | 
| 39 68 | 
             
                none: false
         | 
| 40 | 
            -
                requirements:
         | 
| 69 | 
            +
                requirements: 
         | 
| 41 70 | 
             
                - - ~>
         | 
| 42 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 43 | 
            -
                     | 
| 44 | 
            -
             | 
| 71 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 72 | 
            +
                    hash: 5
         | 
| 73 | 
            +
                    segments: 
         | 
| 74 | 
            +
                    - 0
         | 
| 75 | 
            +
                    - 7
         | 
| 76 | 
            +
                    version: "0.7"
         | 
| 45 77 | 
             
              prerelease: false
         | 
| 46 | 
            -
               | 
| 47 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 48 | 
            -
              name: yard
         | 
| 49 | 
            -
              requirement: &14713800 !ruby/object:Gem::Requirement
         | 
| 50 | 
            -
                none: false
         | 
| 51 | 
            -
                requirements:
         | 
| 52 | 
            -
                - - ~>
         | 
| 53 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version: '0.7'
         | 
| 78 | 
            +
              requirement: *id004
         | 
| 55 79 | 
             
              type: :development
         | 
| 56 | 
            -
               | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 80 | 
            +
              name: yard
         | 
| 81 | 
            +
            description: |
         | 
| 82 | 
            +
              Ruby interface for the taglib C++ library, for reading and writing
         | 
| 83 | 
            +
              meta-data (tags) of many audio formats.
         | 
| 84 | 
            +
              
         | 
| 61 85 | 
             
              In contrast to other libraries, this one wraps the C++ API using SWIG,
         | 
| 62 | 
            -
             | 
| 63 86 | 
             
              not only the minimal C API. This means that all tags can be accessed.
         | 
| 64 87 |  | 
| 65 | 
            -
             | 
| 66 | 
            -
            email:
         | 
| 88 | 
            +
            email: 
         | 
| 67 89 | 
             
            - robin@nibor.org
         | 
| 68 90 | 
             
            executables: []
         | 
| 69 | 
            -
             | 
| 91 | 
            +
             | 
| 92 | 
            +
            extensions: 
         | 
| 70 93 | 
             
            - ext/taglib_base/extconf.rb
         | 
| 71 94 | 
             
            - ext/taglib_mpeg/extconf.rb
         | 
| 72 95 | 
             
            - ext/taglib_id3v1/extconf.rb
         | 
| 73 96 | 
             
            - ext/taglib_id3v2/extconf.rb
         | 
| 74 97 | 
             
            - ext/taglib_ogg/extconf.rb
         | 
| 75 98 | 
             
            - ext/taglib_vorbis/extconf.rb
         | 
| 76 | 
            -
             | 
| 99 | 
            +
            - ext/taglib_flac/extconf.rb
         | 
| 100 | 
            +
            extra_rdoc_files: 
         | 
| 77 101 | 
             
            - CHANGES.md
         | 
| 78 102 | 
             
            - LICENSE.txt
         | 
| 79 103 | 
             
            - README.md
         | 
| 80 | 
            -
            files:
         | 
| 104 | 
            +
            files: 
         | 
| 81 105 | 
             
            - .yardopts
         | 
| 82 106 | 
             
            - CHANGES.md
         | 
| 83 107 | 
             
            - Gemfile
         | 
| @@ -87,6 +111,7 @@ files: | |
| 87 111 | 
             
            - Rakefile
         | 
| 88 112 | 
             
            - docs/default/fulldoc/html/css/common.css
         | 
| 89 113 | 
             
            - docs/taglib/base.rb
         | 
| 114 | 
            +
            - docs/taglib/flac.rb
         | 
| 90 115 | 
             
            - docs/taglib/id3v1.rb
         | 
| 91 116 | 
             
            - docs/taglib/id3v2.rb
         | 
| 92 117 | 
             
            - docs/taglib/mpeg.rb
         | 
| @@ -97,6 +122,8 @@ files: | |
| 97 122 | 
             
            - ext/taglib_base/includes.i
         | 
| 98 123 | 
             
            - ext/taglib_base/taglib_base.i
         | 
| 99 124 | 
             
            - ext/taglib_base/taglib_base_wrap.cxx
         | 
| 125 | 
            +
            - ext/taglib_flac/taglib_flac.i
         | 
| 126 | 
            +
            - ext/taglib_flac/taglib_flac_wrap.cxx
         | 
| 100 127 | 
             
            - ext/taglib_id3v1/extconf.rb
         | 
| 101 128 | 
             
            - ext/taglib_id3v1/taglib_id3v1.i
         | 
| 102 129 | 
             
            - ext/taglib_id3v1/taglib_id3v1_wrap.cxx
         | 
| @@ -117,6 +144,7 @@ files: | |
| 117 144 | 
             
            - ext/win.cmake
         | 
| 118 145 | 
             
            - lib/taglib.rb
         | 
| 119 146 | 
             
            - lib/taglib/base.rb
         | 
| 147 | 
            +
            - lib/taglib/flac.rb
         | 
| 120 148 | 
             
            - lib/taglib/id3v1.rb
         | 
| 121 149 | 
             
            - lib/taglib/id3v2.rb
         | 
| 122 150 | 
             
            - lib/taglib/mpeg.rb
         | 
| @@ -131,7 +159,10 @@ files: | |
| 131 159 | 
             
            - test/data/Makefile
         | 
| 132 160 | 
             
            - test/data/add-relative-volume.cpp
         | 
| 133 161 | 
             
            - test/data/crash.mp3
         | 
| 162 | 
            +
            - test/data/flac-create.cpp
         | 
| 163 | 
            +
            - test/data/flac.flac
         | 
| 134 164 | 
             
            - test/data/globe_east_540.jpg
         | 
| 165 | 
            +
            - test/data/globe_east_90.jpg
         | 
| 135 166 | 
             
            - test/data/id3v1-create.cpp
         | 
| 136 167 | 
             
            - test/data/id3v1.mp3
         | 
| 137 168 | 
             
            - test/data/relative-volume.mp3
         | 
| @@ -143,6 +174,8 @@ files: | |
| 143 174 | 
             
            - test/fileref_open_test.rb
         | 
| 144 175 | 
             
            - test/fileref_properties_test.rb
         | 
| 145 176 | 
             
            - test/fileref_write_test.rb
         | 
| 177 | 
            +
            - test/flac_file_test.rb
         | 
| 178 | 
            +
            - test/flac_file_write_test.rb
         | 
| 146 179 | 
             
            - test/id3v1_tag_test.rb
         | 
| 147 180 | 
             
            - test/id3v2_frames_test.rb
         | 
| 148 181 | 
             
            - test/id3v2_memory_test.rb
         | 
| @@ -155,32 +188,34 @@ files: | |
| 155 188 | 
             
            - test/unicode_filename_test.rb
         | 
| 156 189 | 
             
            - test/vorbis_file_test.rb
         | 
| 157 190 | 
             
            - test/vorbis_tag_test.rb
         | 
| 191 | 
            +
            - ext/taglib_flac/extconf.rb
         | 
| 158 192 | 
             
            homepage: http://robinst.github.com/taglib-ruby/
         | 
| 159 | 
            -
            licenses:
         | 
| 193 | 
            +
            licenses: 
         | 
| 160 194 | 
             
            - MIT
         | 
| 161 195 | 
             
            post_install_message: 
         | 
| 162 196 | 
             
            rdoc_options: []
         | 
| 163 | 
            -
             | 
| 197 | 
            +
             | 
| 198 | 
            +
            require_paths: 
         | 
| 164 199 | 
             
            - lib
         | 
| 165 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 200 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 166 201 | 
             
              none: false
         | 
| 167 | 
            -
              requirements:
         | 
| 168 | 
            -
              - -  | 
| 169 | 
            -
                - !ruby/object:Gem::Version
         | 
| 170 | 
            -
                   | 
| 171 | 
            -
                  segments:
         | 
| 202 | 
            +
              requirements: 
         | 
| 203 | 
            +
              - - ">="
         | 
| 204 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 205 | 
            +
                  hash: 3
         | 
| 206 | 
            +
                  segments: 
         | 
| 172 207 | 
             
                  - 0
         | 
| 173 | 
            -
                   | 
| 174 | 
            -
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 208 | 
            +
                  version: "0"
         | 
| 209 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 175 210 | 
             
              none: false
         | 
| 176 | 
            -
              requirements:
         | 
| 177 | 
            -
              - -  | 
| 178 | 
            -
                - !ruby/object:Gem::Version
         | 
| 179 | 
            -
                   | 
| 180 | 
            -
                  segments:
         | 
| 211 | 
            +
              requirements: 
         | 
| 212 | 
            +
              - - ">="
         | 
| 213 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 214 | 
            +
                  hash: 3
         | 
| 215 | 
            +
                  segments: 
         | 
| 181 216 | 
             
                  - 0
         | 
| 182 | 
            -
                   | 
| 183 | 
            -
            requirements:
         | 
| 217 | 
            +
                  version: "0"
         | 
| 218 | 
            +
            requirements: 
         | 
| 184 219 | 
             
            - taglib (libtag1-dev in Debian/Ubuntu, taglib-devel in Fedora/RHEL)
         | 
| 185 220 | 
             
            rubyforge_project: 
         | 
| 186 221 | 
             
            rubygems_version: 1.8.10
         | 
| @@ -188,4 +223,5 @@ signing_key: | |
| 188 223 | 
             
            specification_version: 3
         | 
| 189 224 | 
             
            summary: Ruby interface for the taglib C++ library
         | 
| 190 225 | 
             
            test_files: []
         | 
| 226 | 
            +
             | 
| 191 227 | 
             
            has_rdoc: 
         |