taglib-ruby 0.3.1 → 0.4.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.
Files changed (44) hide show
  1. data/CHANGES.md +14 -0
  2. data/Gemfile +2 -10
  3. data/Guardfile +1 -1
  4. data/LICENSE.txt +2 -0
  5. data/README.md +10 -79
  6. data/Rakefile +6 -38
  7. data/docs/taglib/base.rb +52 -3
  8. data/docs/taglib/id3v2.rb +62 -1
  9. data/docs/taglib/mpeg.rb +17 -0
  10. data/docs/taglib/vorbis.rb +19 -0
  11. data/ext/taglib_base/includes.i +20 -2
  12. data/ext/taglib_base/taglib_base.i +4 -1
  13. data/ext/taglib_base/taglib_base_wrap.cxx +38 -2
  14. data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +20 -2
  15. data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +20 -2
  16. data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +38 -2
  17. data/ext/taglib_ogg/taglib_ogg_wrap.cxx +20 -2
  18. data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +29 -2
  19. data/ext/win.cmake +0 -1
  20. data/lib/taglib/base.rb +18 -0
  21. data/lib/taglib/mpeg.rb +6 -0
  22. data/lib/taglib/version.rb +2 -2
  23. data/lib/taglib/vorbis.rb +6 -0
  24. data/taglib-ruby.gemspec +50 -63
  25. data/tasks/ext.rake +5 -3
  26. data/tasks/gemspec_check.rake +19 -0
  27. data/test/fileref_open_test.rb +32 -0
  28. data/test/{test_fileref_properties.rb → fileref_properties_test.rb} +1 -1
  29. data/test/{test_fileref_write.rb → fileref_write_test.rb} +25 -1
  30. data/test/helper.rb +1 -1
  31. data/test/{test_id3v1_tag.rb → id3v1_tag_test.rb} +1 -1
  32. data/test/{test_id3v2_frames.rb → id3v2_frames_test.rb} +1 -1
  33. data/test/{test_id3v2_memory.rb → id3v2_memory_test.rb} +1 -1
  34. data/test/{test_id3v2_relative_volume.rb → id3v2_relative_volume_test.rb} +1 -1
  35. data/test/{test_id3v2_tag.rb → id3v2_tag_test.rb} +1 -1
  36. data/test/{test_id3v2_unicode.rb → id3v2_unicode_test.rb} +1 -1
  37. data/test/{test_id3v2_write.rb → id3v2_write_test.rb} +1 -1
  38. data/test/{test_mpeg_file.rb → mpeg_file_test.rb} +11 -1
  39. data/test/{test_tag.rb → tag_test.rb} +1 -1
  40. data/test/unicode_filename_test.rb +29 -0
  41. data/test/{test_vorbis_file.rb → vorbis_file_test.rb} +11 -1
  42. data/test/{test_vorbis_tag.rb → vorbis_tag_test.rb} +1 -1
  43. metadata +40 -66
  44. data/Gemfile.lock +0 -36
@@ -28,7 +28,7 @@ namespace TagLib {
28
28
 
29
29
 
30
30
  // Rename setters to Ruby convention (combining SWIG rename functions
31
- // doesn't seem to be possible, thus resort to some magic)
31
+ // does not seem to be possible, thus resort to some magic)
32
32
  %rename("%(command: ruby -e 'print(ARGV[0][3..-1].split(/(?=[A-Z])/).join(\"_\").downcase + \"=\")' )s",
33
33
  regexmatch$name="^set[A-Z]") "";
34
34
 
@@ -81,6 +81,9 @@ namespace TagLib {
81
81
  }
82
82
  %typemap(in) TagLib::FileName {
83
83
  $1 = ruby_string_to_taglib_filename($input);
84
+ if ((const char *)(TagLib::FileName)($1) == NULL) {
85
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
86
+ }
84
87
  }
85
88
  %typemap(typecheck) TagLib::FileName = char *;
86
89
  %feature("valuewrapper") TagLib::FileName;
@@ -1930,8 +1930,26 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1930
1930
 
1931
1931
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1932
1932
  #ifdef _WIN32
1933
- const char *filename = StringValuePtr(s);
1934
- return TagLib::FileName(filename);
1933
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1934
+ VALUE ospath;
1935
+ const char *utf8;
1936
+ int len;
1937
+ wchar_t *wide;
1938
+
1939
+ ospath = rb_str_encode_ospath(s);
1940
+ utf8 = StringValuePtr(ospath);
1941
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
1942
+ if (!(wide = (wchar_t *) xmalloc(sizeof(wchar_t) * len))) {
1943
+ return TagLib::FileName((const char *) NULL);
1944
+ }
1945
+ MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, len);
1946
+ TagLib::FileName filename(wide);
1947
+ xfree(wide);
1948
+ return filename;
1949
+ #else
1950
+ const char *filename = StringValuePtr(s);
1951
+ return TagLib::FileName(filename);
1952
+ #endif
1935
1953
  #else
1936
1954
  return StringValuePtr(s);
1937
1955
  #endif
@@ -4100,6 +4118,9 @@ _wrap_new_FileRef__SWIG_1(int argc, VALUE *argv, VALUE self) {
4100
4118
  }
4101
4119
  {
4102
4120
  arg1 = ruby_string_to_taglib_filename(argv[0]);
4121
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
4122
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
4123
+ }
4103
4124
  }
4104
4125
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
4105
4126
  if (!SWIG_IsOK(ecode2)) {
@@ -4133,6 +4154,9 @@ _wrap_new_FileRef__SWIG_2(int argc, VALUE *argv, VALUE self) {
4133
4154
  }
4134
4155
  {
4135
4156
  arg1 = ruby_string_to_taglib_filename(argv[0]);
4157
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
4158
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
4159
+ }
4136
4160
  }
4137
4161
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
4138
4162
  if (!SWIG_IsOK(ecode2)) {
@@ -4158,6 +4182,9 @@ _wrap_new_FileRef__SWIG_3(int argc, VALUE *argv, VALUE self) {
4158
4182
  }
4159
4183
  {
4160
4184
  arg1 = ruby_string_to_taglib_filename(argv[0]);
4185
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
4186
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
4187
+ }
4161
4188
  }
4162
4189
  result = (TagLib::FileRef *)new TagLib::FileRef(arg1);
4163
4190
  DATA_PTR(self) = result;
@@ -4552,6 +4579,9 @@ _wrap_FileRef_create__SWIG_0(int argc, VALUE *argv, VALUE self) {
4552
4579
  }
4553
4580
  {
4554
4581
  arg1 = ruby_string_to_taglib_filename(argv[0]);
4582
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
4583
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
4584
+ }
4555
4585
  }
4556
4586
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
4557
4587
  if (!SWIG_IsOK(ecode2)) {
@@ -4585,6 +4615,9 @@ _wrap_FileRef_create__SWIG_1(int argc, VALUE *argv, VALUE self) {
4585
4615
  }
4586
4616
  {
4587
4617
  arg1 = ruby_string_to_taglib_filename(argv[0]);
4618
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
4619
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
4620
+ }
4588
4621
  }
4589
4622
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
4590
4623
  if (!SWIG_IsOK(ecode2)) {
@@ -4610,6 +4643,9 @@ _wrap_FileRef_create__SWIG_2(int argc, VALUE *argv, VALUE self) {
4610
4643
  }
4611
4644
  {
4612
4645
  arg1 = ruby_string_to_taglib_filename(argv[0]);
4646
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
4647
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
4648
+ }
4613
4649
  }
4614
4650
  result = (TagLib::File *)TagLib::FileRef::create(arg1);
4615
4651
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__File, 0 | 0 );
@@ -1921,8 +1921,26 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1921
1921
 
1922
1922
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1923
1923
  #ifdef _WIN32
1924
- const char *filename = StringValuePtr(s);
1925
- return TagLib::FileName(filename);
1924
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1925
+ VALUE ospath;
1926
+ const char *utf8;
1927
+ int len;
1928
+ wchar_t *wide;
1929
+
1930
+ ospath = rb_str_encode_ospath(s);
1931
+ utf8 = StringValuePtr(ospath);
1932
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
1933
+ if (!(wide = (wchar_t *) xmalloc(sizeof(wchar_t) * len))) {
1934
+ return TagLib::FileName((const char *) NULL);
1935
+ }
1936
+ MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, len);
1937
+ TagLib::FileName filename(wide);
1938
+ xfree(wide);
1939
+ return filename;
1940
+ #else
1941
+ const char *filename = StringValuePtr(s);
1942
+ return TagLib::FileName(filename);
1943
+ #endif
1926
1944
  #else
1927
1945
  return StringValuePtr(s);
1928
1946
  #endif
@@ -1958,8 +1958,26 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1958
1958
 
1959
1959
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1960
1960
  #ifdef _WIN32
1961
- const char *filename = StringValuePtr(s);
1962
- return TagLib::FileName(filename);
1961
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1962
+ VALUE ospath;
1963
+ const char *utf8;
1964
+ int len;
1965
+ wchar_t *wide;
1966
+
1967
+ ospath = rb_str_encode_ospath(s);
1968
+ utf8 = StringValuePtr(ospath);
1969
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
1970
+ if (!(wide = (wchar_t *) xmalloc(sizeof(wchar_t) * len))) {
1971
+ return TagLib::FileName((const char *) NULL);
1972
+ }
1973
+ MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, len);
1974
+ TagLib::FileName filename(wide);
1975
+ xfree(wide);
1976
+ return filename;
1977
+ #else
1978
+ const char *filename = StringValuePtr(s);
1979
+ return TagLib::FileName(filename);
1980
+ #endif
1963
1981
  #else
1964
1982
  return StringValuePtr(s);
1965
1983
  #endif
@@ -1936,8 +1936,26 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1936
1936
 
1937
1937
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1938
1938
  #ifdef _WIN32
1939
- const char *filename = StringValuePtr(s);
1940
- return TagLib::FileName(filename);
1939
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1940
+ VALUE ospath;
1941
+ const char *utf8;
1942
+ int len;
1943
+ wchar_t *wide;
1944
+
1945
+ ospath = rb_str_encode_ospath(s);
1946
+ utf8 = StringValuePtr(ospath);
1947
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
1948
+ if (!(wide = (wchar_t *) xmalloc(sizeof(wchar_t) * len))) {
1949
+ return TagLib::FileName((const char *) NULL);
1950
+ }
1951
+ MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, len);
1952
+ TagLib::FileName filename(wide);
1953
+ xfree(wide);
1954
+ return filename;
1955
+ #else
1956
+ const char *filename = StringValuePtr(s);
1957
+ return TagLib::FileName(filename);
1958
+ #endif
1941
1959
  #else
1942
1960
  return StringValuePtr(s);
1943
1961
  #endif
@@ -3106,6 +3124,9 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
3106
3124
  }
3107
3125
  {
3108
3126
  arg1 = ruby_string_to_taglib_filename(argv[0]);
3127
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3128
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3129
+ }
3109
3130
  }
3110
3131
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
3111
3132
  if (!SWIG_IsOK(ecode2)) {
@@ -3139,6 +3160,9 @@ _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
3139
3160
  }
3140
3161
  {
3141
3162
  arg1 = ruby_string_to_taglib_filename(argv[0]);
3163
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3164
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3165
+ }
3142
3166
  }
3143
3167
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
3144
3168
  if (!SWIG_IsOK(ecode2)) {
@@ -3164,6 +3188,9 @@ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
3164
3188
  }
3165
3189
  {
3166
3190
  arg1 = ruby_string_to_taglib_filename(argv[0]);
3191
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3192
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3193
+ }
3167
3194
  }
3168
3195
  result = (TagLib::MPEG::File *)new TagLib::MPEG::File(arg1);
3169
3196
  DATA_PTR(self) = result;
@@ -3193,6 +3220,9 @@ _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
3193
3220
  }
3194
3221
  {
3195
3222
  arg1 = ruby_string_to_taglib_filename(argv[0]);
3223
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3224
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3225
+ }
3196
3226
  }
3197
3227
  res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 );
3198
3228
  if (!SWIG_IsOK(res2)) {
@@ -3234,6 +3264,9 @@ _wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) {
3234
3264
  }
3235
3265
  {
3236
3266
  arg1 = ruby_string_to_taglib_filename(argv[0]);
3267
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3268
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3269
+ }
3237
3270
  }
3238
3271
  res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 );
3239
3272
  if (!SWIG_IsOK(res2)) {
@@ -3284,6 +3317,9 @@ _wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) {
3284
3317
  }
3285
3318
  {
3286
3319
  arg1 = ruby_string_to_taglib_filename(argv[0]);
3320
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3321
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3322
+ }
3287
3323
  }
3288
3324
  res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 );
3289
3325
  if (!SWIG_IsOK(res2)) {
@@ -1925,8 +1925,26 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1925
1925
 
1926
1926
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1927
1927
  #ifdef _WIN32
1928
- const char *filename = StringValuePtr(s);
1929
- return TagLib::FileName(filename);
1928
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1929
+ VALUE ospath;
1930
+ const char *utf8;
1931
+ int len;
1932
+ wchar_t *wide;
1933
+
1934
+ ospath = rb_str_encode_ospath(s);
1935
+ utf8 = StringValuePtr(ospath);
1936
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
1937
+ if (!(wide = (wchar_t *) xmalloc(sizeof(wchar_t) * len))) {
1938
+ return TagLib::FileName((const char *) NULL);
1939
+ }
1940
+ MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, len);
1941
+ TagLib::FileName filename(wide);
1942
+ xfree(wide);
1943
+ return filename;
1944
+ #else
1945
+ const char *filename = StringValuePtr(s);
1946
+ return TagLib::FileName(filename);
1947
+ #endif
1930
1948
  #else
1931
1949
  return StringValuePtr(s);
1932
1950
  #endif
@@ -1929,8 +1929,26 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1929
1929
 
1930
1930
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1931
1931
  #ifdef _WIN32
1932
- const char *filename = StringValuePtr(s);
1933
- return TagLib::FileName(filename);
1932
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1933
+ VALUE ospath;
1934
+ const char *utf8;
1935
+ int len;
1936
+ wchar_t *wide;
1937
+
1938
+ ospath = rb_str_encode_ospath(s);
1939
+ utf8 = StringValuePtr(ospath);
1940
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
1941
+ if (!(wide = (wchar_t *) xmalloc(sizeof(wchar_t) * len))) {
1942
+ return TagLib::FileName((const char *) NULL);
1943
+ }
1944
+ MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, len);
1945
+ TagLib::FileName filename(wide);
1946
+ xfree(wide);
1947
+ return filename;
1948
+ #else
1949
+ const char *filename = StringValuePtr(s);
1950
+ return TagLib::FileName(filename);
1951
+ #endif
1934
1952
  #else
1935
1953
  return StringValuePtr(s);
1936
1954
  #endif
@@ -2450,6 +2468,9 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
2450
2468
  }
2451
2469
  {
2452
2470
  arg1 = ruby_string_to_taglib_filename(argv[0]);
2471
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
2472
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
2473
+ }
2453
2474
  }
2454
2475
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
2455
2476
  if (!SWIG_IsOK(ecode2)) {
@@ -2483,6 +2504,9 @@ _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
2483
2504
  }
2484
2505
  {
2485
2506
  arg1 = ruby_string_to_taglib_filename(argv[0]);
2507
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
2508
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
2509
+ }
2486
2510
  }
2487
2511
  ecode2 = SWIG_AsVal_bool(argv[1], &val2);
2488
2512
  if (!SWIG_IsOK(ecode2)) {
@@ -2525,6 +2549,9 @@ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
2525
2549
  }
2526
2550
  {
2527
2551
  arg1 = ruby_string_to_taglib_filename(argv[0]);
2552
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
2553
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
2554
+ }
2528
2555
  }
2529
2556
  result = (TagLib::Vorbis::File *)new TagLib::Vorbis::File(arg1);
2530
2557
  DATA_PTR(self) = result;
@@ -1,5 +1,4 @@
1
1
  SET(CMAKE_SYSTEM_NAME Windows)
2
- SET(CMAKE_BUILD_TYPE Release)
3
2
 
4
3
  SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
5
4
  SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
@@ -1 +1,19 @@
1
1
  require 'taglib_base'
2
+
3
+ module TagLib
4
+ module FileOpenable
5
+ def open(*args)
6
+ file = self.new(*args)
7
+ begin
8
+ result = yield file
9
+ ensure
10
+ file.close
11
+ end
12
+ result
13
+ end
14
+ end
15
+
16
+ class FileRef
17
+ extend FileOpenable
18
+ end
19
+ end
@@ -1 +1,7 @@
1
1
  require 'taglib_mpeg'
2
+
3
+ module TagLib::MPEG
4
+ class File
5
+ extend ::TagLib::FileOpenable
6
+ end
7
+ end
@@ -1,8 +1,8 @@
1
1
  module TagLib
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 3
5
- PATCH = 1
4
+ MINOR = 4
5
+ PATCH = 0
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -1 +1,7 @@
1
1
  require 'taglib_vorbis'
2
+
3
+ module TagLib::Ogg::Vorbis
4
+ class File
5
+ extend ::TagLib::FileOpenable
6
+ end
7
+ end
@@ -1,28 +1,49 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
5
2
 
3
+ $LOAD_PATH.push File.expand_path("../lib", __FILE__)
4
+
5
+ require 'taglib/version'
6
+
6
7
  Gem::Specification.new do |s|
7
- s.name = "taglib-ruby"
8
- s.version = "0.3.1"
8
+ s.name = "taglib-ruby"
9
+ s.version = TagLib::Version::STRING
10
+ s.authors = ["Robin Stocker"]
11
+ s.email = ["robin@nibor.org"]
12
+ s.homepage = "http://robinst.github.com/taglib-ruby/"
13
+ s.licenses = ["MIT"]
14
+ s.summary = "Ruby interface for the taglib C++ library"
15
+ s.description = <<DESC
16
+ Ruby interface for the taglib C++ library.
17
+
18
+ In contrast to other libraries, this one wraps the C++ API using SWIG,
19
+ not only the minimal C API. This means that all tags can be accessed.
20
+ DESC
21
+
22
+ s.require_paths = ["lib"]
23
+ s.requirements = ["taglib (libtag1-dev in Debian/Ubuntu, taglib-devel in Fedora/RHEL)"]
24
+
25
+ s.add_development_dependency 'bundler', '~> 1.1.0'
26
+ s.add_development_dependency 'rake-compiler', '~> 0.8'
27
+ s.add_development_dependency 'shoulda-context', '~> 1.0'
28
+ s.add_development_dependency 'yard', '~> 0.7'
9
29
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Robin Stocker"]
12
- s.date = "2012-01-22"
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
- s.email = "robin@nibor.org"
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"]
30
+ s.extensions = [
31
+ "ext/taglib_base/extconf.rb",
32
+ "ext/taglib_mpeg/extconf.rb",
33
+ "ext/taglib_id3v1/extconf.rb",
34
+ "ext/taglib_id3v2/extconf.rb",
35
+ "ext/taglib_ogg/extconf.rb",
36
+ "ext/taglib_vorbis/extconf.rb",
37
+ ]
16
38
  s.extra_rdoc_files = [
17
39
  "CHANGES.md",
18
40
  "LICENSE.txt",
19
- "README.md"
41
+ "README.md",
20
42
  ]
21
43
  s.files = [
22
44
  ".yardopts",
23
45
  "CHANGES.md",
24
46
  "Gemfile",
25
- "Gemfile.lock",
26
47
  "Guardfile",
27
48
  "LICENSE.txt",
28
49
  "README.md",
@@ -68,6 +89,7 @@ Gem::Specification.new do |s|
68
89
  "taglib-ruby.gemspec",
69
90
  "tasks/docs_coverage.rake",
70
91
  "tasks/ext.rake",
92
+ "tasks/gemspec_check.rake",
71
93
  "tasks/swig.rake",
72
94
  "test/data/Makefile",
73
95
  "test/data/add-relative-volume.cpp",
@@ -81,55 +103,20 @@ Gem::Specification.new do |s|
81
103
  "test/data/vorbis-create.cpp",
82
104
  "test/data/vorbis.oga",
83
105
  "test/helper.rb",
84
- "test/test_fileref_properties.rb",
85
- "test/test_fileref_write.rb",
86
- "test/test_id3v1_tag.rb",
87
- "test/test_id3v2_frames.rb",
88
- "test/test_id3v2_memory.rb",
89
- "test/test_id3v2_relative_volume.rb",
90
- "test/test_id3v2_tag.rb",
91
- "test/test_id3v2_unicode.rb",
92
- "test/test_id3v2_write.rb",
93
- "test/test_mpeg_file.rb",
94
- "test/test_tag.rb",
95
- "test/test_vorbis_file.rb",
96
- "test/test_vorbis_tag.rb"
106
+ "test/fileref_open_test.rb",
107
+ "test/fileref_properties_test.rb",
108
+ "test/fileref_write_test.rb",
109
+ "test/id3v1_tag_test.rb",
110
+ "test/id3v2_frames_test.rb",
111
+ "test/id3v2_memory_test.rb",
112
+ "test/id3v2_relative_volume_test.rb",
113
+ "test/id3v2_tag_test.rb",
114
+ "test/id3v2_unicode_test.rb",
115
+ "test/id3v2_write_test.rb",
116
+ "test/mpeg_file_test.rb",
117
+ "test/tag_test.rb",
118
+ "test/unicode_filename_test.rb",
119
+ "test/vorbis_file_test.rb",
120
+ "test/vorbis_tag_test.rb",
97
121
  ]
98
- s.homepage = "http://github.com/robinst/taglib-ruby"
99
- s.licenses = ["MIT"]
100
- s.require_paths = ["lib"]
101
- s.requirements = ["taglib (libtag1-dev in Debian/Ubuntu, taglib-devel in Fedora/RHEL)"]
102
- s.rubygems_version = "1.8.10"
103
- s.summary = "Ruby interface for the taglib C++ library"
104
-
105
- if s.respond_to? :specification_version then
106
- s.specification_version = 3
107
-
108
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
109
- s.add_development_dependency(%q<rake-compiler>, ["~> 0.7"])
110
- s.add_development_dependency(%q<shoulda>, ["~> 2.11"])
111
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
112
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
113
- s.add_development_dependency(%q<yard>, ["~> 0.7"])
114
- s.add_development_dependency(%q<redcarpet>, ["~> 1.0"])
115
- s.add_development_dependency(%q<guard-test>, ["~> 0.4.0"])
116
- else
117
- s.add_dependency(%q<rake-compiler>, ["~> 0.7"])
118
- s.add_dependency(%q<shoulda>, ["~> 2.11"])
119
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
120
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
121
- s.add_dependency(%q<yard>, ["~> 0.7"])
122
- s.add_dependency(%q<redcarpet>, ["~> 1.0"])
123
- s.add_dependency(%q<guard-test>, ["~> 0.4.0"])
124
- end
125
- else
126
- s.add_dependency(%q<rake-compiler>, ["~> 0.7"])
127
- s.add_dependency(%q<shoulda>, ["~> 2.11"])
128
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
129
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
130
- s.add_dependency(%q<yard>, ["~> 0.7"])
131
- s.add_dependency(%q<redcarpet>, ["~> 1.0"])
132
- s.add_dependency(%q<guard-test>, ["~> 0.4.0"])
133
- end
134
122
  end
135
-