taglib-ruby 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Changes in Releases of taglib-ruby
2
2
  ==================================
3
3
 
4
+ ## 0.3.1 (2012-01-22)
5
+
6
+ * Fix ObjectPreviouslyDeleted exception after calling
7
+ TagLib::ID3v2::Tag#add_frame (#8)
8
+ * Make installation under MacPorts work out of the box (#7)
9
+
4
10
  ## 0.3.0 (2012-01-02)
5
11
 
6
12
  * Add support for Ogg Vorbis
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010, 2011 Robin Stocker
1
+ Copyright (c) 2010-2012 Robin Stocker
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -149,7 +149,7 @@ License
149
149
  taglib-ruby is distributed under the MIT License,
150
150
  see LICENSE.txt for details.
151
151
 
152
- Copyright (c) 2010, 2011 Robin Stocker.
152
+ Copyright (c) 2010-2012 Robin Stocker.
153
153
 
154
154
  [taglib]: http://developer.kde.org/~wheeler/taglib.html
155
155
  [flattr-img]: http://api.flattr.com/button/flattr-badge-large.png
@@ -1,3 +1,7 @@
1
+ # Default opt dirs to help mkmf find taglib
2
+ configure_args = "--with-opt-dir=/usr/local:/opt/local:/sw "
3
+ ENV['CONFIGURE_ARGS'] = configure_args + ENV.fetch('CONFIGURE_ARGS', "")
4
+
1
5
  require 'mkmf'
2
6
 
3
7
  def error msg
@@ -78,7 +78,14 @@ VALUE taglib_id3v2_framelist_to_ruby_array(TagLib::ID3v2::FrameList *list) {
78
78
  }
79
79
  %apply TagLib::ID3v2::FrameList & { const TagLib::ID3v2::FrameList & };
80
80
 
81
- %apply SWIGTYPE *DISOWN { TagLib::ID3v2::Frame *frame };
81
+ %typemap(in, noblock=1) TagLib::ID3v2::Frame * (int res = 0) {
82
+ res = SWIG_ConvertPtr($input, %as_voidptrptr(&$1), $descriptor, SWIG_POINTER_DISOWN | %convertptr_flags);
83
+ if (!SWIG_IsOK(res)) {
84
+ %argument_fail(res, "$type", $symname, $argnum);
85
+ }
86
+ SWIG_RubyUnlinkObjects($1);
87
+ SWIG_RubyRemoveTracking($1);
88
+ }
82
89
  %ignore TagLib::ID3v2::Tag::removeFrame(Frame *, bool);
83
90
  %include <taglib/id3v2tag.h>
84
91
  %clear TagLib::ID3v2::Frame *;
@@ -3388,7 +3388,8 @@ _wrap_Tag_add_frame(int argc, VALUE *argv, VALUE self) {
3388
3388
  if (!SWIG_IsOK(res2)) {
3389
3389
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::Frame *","addFrame", 2, argv[0] ));
3390
3390
  }
3391
- SWIG_RubyUnlinkObjects(SWIG_as_voidptr(arg2));
3391
+ SWIG_RubyUnlinkObjects(arg2);
3392
+ SWIG_RubyRemoveTracking(arg2);
3392
3393
  (arg1)->addFrame(arg2);
3393
3394
  return Qnil;
3394
3395
  fail:
@@ -3416,7 +3417,8 @@ _wrap_Tag_remove_frame(int argc, VALUE *argv, VALUE self) {
3416
3417
  if (!SWIG_IsOK(res2)) {
3417
3418
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::Frame *","removeFrame", 2, argv[0] ));
3418
3419
  }
3419
- SWIG_RubyUnlinkObjects(SWIG_as_voidptr(arg2));
3420
+ SWIG_RubyUnlinkObjects(arg2);
3421
+ SWIG_RubyRemoveTracking(arg2);
3420
3422
  (arg1)->removeFrame(arg2);
3421
3423
  return Qnil;
3422
3424
  fail:
@@ -2,7 +2,7 @@ module TagLib
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- PATCH = 0
5
+ PATCH = 1
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
data/taglib-ruby.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "taglib-ruby"
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robin Stocker"]
12
- s.date = "2012-01-02"
12
+ s.date = "2012-01-22"
13
13
  s.description = "Ruby interface for the taglib C++ library.\n\nIn contrast to other libraries, this one wraps the C++ API using SWIG,\nnot only the minimal C API. This means that all tags can be accessed.\n"
14
14
  s.email = "robin@nibor.org"
15
15
  s.extensions = ["ext/taglib_base/extconf.rb", "ext/taglib_mpeg/extconf.rb", "ext/taglib_id3v1/extconf.rb", "ext/taglib_id3v2/extconf.rb", "ext/taglib_ogg/extconf.rb", "ext/taglib_vorbis/extconf.rb"]
@@ -67,6 +67,16 @@ class TestID3v2Memory < Test::Unit::TestCase
67
67
  end
68
68
  end
69
69
 
70
+ should "not throw when adding frame via Tag.add_frame" do
71
+ tcom = TagLib::ID3v2::TextIdentificationFrame.new('TCOM', TagLib::String::Latin1)
72
+ tcom.text = "Some composer"
73
+ @tag.add_frame tcom
74
+ # the following leads to an ObjectPreviouslyDeleted error (see Issue #8)
75
+ assert_nothing_raised do
76
+ @tag.frame_list.find{ |fr| 'TCOM' == fr.frame_id }
77
+ end
78
+ end
79
+
70
80
  teardown do
71
81
  if @file
72
82
  @file.close
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: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-02 00:00:00.000000000 Z
12
+ date: 2012-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
16
- requirement: &18528240 !ruby/object:Gem::Requirement
16
+ requirement: &15279760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.7'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *18528240
24
+ version_requirements: *15279760
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: shoulda
27
- requirement: &18527040 !ruby/object:Gem::Requirement
27
+ requirement: &15277940 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.11'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *18527040
35
+ version_requirements: *15277940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &18525980 !ruby/object:Gem::Requirement
38
+ requirement: &15274780 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *18525980
46
+ version_requirements: *15274780
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &18525180 !ruby/object:Gem::Requirement
49
+ requirement: &15426340 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *18525180
57
+ version_requirements: *15426340
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: yard
60
- requirement: &18524140 !ruby/object:Gem::Requirement
60
+ requirement: &15424280 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0.7'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *18524140
68
+ version_requirements: *15424280
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: redcarpet
71
- requirement: &18523500 !ruby/object:Gem::Requirement
71
+ requirement: &15421060 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *18523500
79
+ version_requirements: *15421060
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-test
82
- requirement: &18522720 !ruby/object:Gem::Requirement
82
+ requirement: &15515540 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: 0.4.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *18522720
90
+ version_requirements: *15515540
91
91
  description: ! 'Ruby interface for the taglib C++ library.
92
92
 
93
93
 
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  segments:
202
202
  - 0
203
- hash: -1593774999472274460
203
+ hash: -3440148928620656920
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  none: false
206
206
  requirements: