rtaglib 0.1.0 → 0.1.1

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/ext/extconf.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require "mkmf"
2
- $CFLAGS+=" -WAll"
2
+ $CFLAGS+=" -WAll "
3
3
  dir_config("tag_c")
4
4
  if have_library("tag_c") and have_header("taglib/tag_c.h")
5
- #$CFLAGS+=`pkg-config --cflags taglib`
5
+ $CFLAGS+=`pkg-config --cflags taglib`
6
6
  create_makefile("rtaglib")
7
7
  else
8
8
  print "*** ERROR: Need taglib library\n"
data/ext/mkmf.log CHANGED
@@ -1,6 +1,6 @@
1
1
  have_library: checking for main() in -ltag_c... -------------------- yes
2
2
 
3
- "i686-pc-linux-gnu-gcc -o conftest -I/home/cdx/ruby/rtaglib/ext -I/usr/lib/ruby/1.8/i686-linux -O2 -march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -pipe -ffast-math -fPIC -WAll conftest.c -L'/usr/lib' -Wl,-R'/usr/lib' -lruby18-static -ltag_c -ldl -lcrypt -lm -lc"
3
+ "i686-pc-linux-gnu-gcc -o conftest -I/home/cdx/ruby/rtaglib/ext -I/usr/lib/ruby/1.8/i686-linux -O2 -march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -pipe -ffast-math -fPIC -WAll conftest.c -L'/usr/lib' -Wl,-R'/usr/lib' -lruby18-static -ltag_c -ldl -lcrypt -lm -lc"
4
4
  checked program was:
5
5
  /* begin */
6
6
 
@@ -13,7 +13,7 @@ int t() { main(); return 0; }
13
13
 
14
14
  have_header: checking for taglib/tag_c.h... -------------------- yes
15
15
 
16
- "i686-pc-linux-gnu-gcc -E -I/home/cdx/ruby/rtaglib/ext -I/usr/lib/ruby/1.8/i686-linux -O2 -march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -pipe -ffast-math -fPIC -WAll conftest.c -o conftest.i"
16
+ "i686-pc-linux-gnu-gcc -E -I/home/cdx/ruby/rtaglib/ext -I/usr/lib/ruby/1.8/i686-linux -O2 -march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -pipe -ffast-math -fPIC -WAll conftest.c -o conftest.i"
17
17
  checked program was:
18
18
  /* begin */
19
19
  #include <taglib/tag_c.h>
data/ext/rtaglib.c CHANGED
@@ -97,11 +97,11 @@ Init_rtaglib()
97
97
  "comment", cTagFileFile_comment, 0}, {
98
98
  "comment=", cTagFileFile_comment_set, 1}, {
99
99
  "genre", cTagFileFile_genre, 0}, {
100
- "genre=", cTagFileFile_genre_set, 0}, {
100
+ "genre=", cTagFileFile_genre_set, 1}, {
101
101
  "track", cTagFileFile_track, 0}, {
102
102
  "track=", cTagFileFile_track_set, 1}, {
103
103
  "year", cTagFileFile_year, 0}, {
104
- "year=", cTagFileFile_year, 1}, {
104
+ "year=", cTagFileFile_year_set, 1}, {
105
105
  "length", cTagFileFile_length, 0}, {
106
106
  "bitrate", cTagFileFile_bitrate, 0}, {
107
107
  "samplerate", cTagFileFile_samplerate, 0}, {
data/ext/test.rb CHANGED
@@ -1 +1,13 @@
1
+ #!/bin/env ruby
2
+ require 'ftools'
3
+ require 'rubygems'
4
+ require 'rtaglib'
5
+ temp="/tmp/test.mp3"
6
+ File.copy("../tests/saw.mp3",temp)
7
+ tag=::TagFile::File.new(temp)
8
+ tag.genre="Rock"
9
+ tag.save
10
+ p tag.genre
11
+ File.delete(temp)
12
+
1
13
 
data/svn-commit.tmp ADDED
@@ -0,0 +1,4 @@
1
+ First version of rtaglib on rubyforge
2
+ --Esta línea y las que están debajo serán ignoradas--
3
+
4
+ A .
data/tests/saw.mp3 CHANGED
Binary file
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require_gem 'rtaglib'
4
+ require 'test/unit'
5
+ class RtaglibTestCase < Test::Unit::TestCase
6
+ def initialize(*args)
7
+ super
8
+ @file=::TagFile::File.new(File.dirname(__FILE__)+"/saw.mp3")
9
+
10
+ end
11
+ def test_title()
12
+ assert_equal("Saw",@file.title)
13
+ end
14
+ def test_artist()
15
+ assert_equal("Claudio Bustos",@file.artist)
16
+ end
17
+ def test_album()
18
+ assert_equal("Catori",@file.album)
19
+ end
20
+ def test_genre()
21
+ assert_equal("Lo-Fi",@file.genre)
22
+ end
23
+ def test_track()
24
+ assert_equal(1,@file.track)
25
+ end
26
+ def test_year()
27
+ assert_equal(2005,@file.year)
28
+ end
29
+ def test_comment()
30
+ assert_equal("Test for catori",@file.comment)
31
+ end
32
+ end
33
+
34
+ # arch-tag: test
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+ require 'ftools'
3
+ require 'rubygems'
4
+ require_gem 'rtaglib'
5
+ require 'test/unit'
6
+ class RtaglibTestCase < Test::Unit::TestCase
7
+ def initialize(*args)
8
+ super
9
+ @original=File.dirname(__FILE__)+"/saw.mp3"
10
+ end
11
+ def setup
12
+ @copy="/tmp/test_"+sprintf("%06d",rand(10000))+".mp3"
13
+ File.copy(@original,@copy)
14
+ @file=::TagFile::File.new(@copy)
15
+ end
16
+ def teardown
17
+ File.delete(@copy)
18
+ end
19
+ def test_title()
20
+ @file.title="Saw2"
21
+ @file.save
22
+ assert_equal("Saw2",@file.title)
23
+ end
24
+ def test_artist()
25
+ @file.artist="Nobody"
26
+ @file.save
27
+ assert_equal("Nobody",@file.artist)
28
+ end
29
+ def test_album()
30
+ @file.album="Dupa"
31
+ @file.save
32
+ assert_equal("Dupa",@file.album)
33
+ end
34
+ def test_genre()
35
+ @file.genre="Progressive Rock"
36
+ @file.save
37
+ assert_equal("Progressive Rock",@file.genre)
38
+ end
39
+ def test_track()
40
+ @file.track=2
41
+ @file.save
42
+ assert_equal(2,@file.track)
43
+ end
44
+ def test_year()
45
+ @file.year=2010
46
+ @file.save
47
+ assert_equal(2010,@file.year)
48
+ end
49
+ def test_comment()
50
+ @file.comment="New Comment"
51
+ @file.save
52
+ assert_equal("New Comment",@file.comment)
53
+ end
54
+ end
55
+
56
+ # arch-tag: test
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rtaglib
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
7
- date: 2005-12-30 00:00:00 -03:00
6
+ version: 0.1.1
7
+ date: 2006-01-11 00:00:00 -03:00
8
8
  summary: Bindings for taglib
9
9
  require_paths:
10
10
  - lib
@@ -33,18 +33,21 @@ authors:
33
33
  files:
34
34
  - "./ext"
35
35
  - "./tests"
36
- - "./ext/extconf.rb"
36
+ - "./svn-commit.tmp"
37
+ - "./ext/test.rb"
37
38
  - "./ext/rtaglib.c"
39
+ - "./ext/extconf.rb"
38
40
  - "./ext/mkmf.log"
39
- - "./ext/test.rb"
41
+ - "./tests/test_read.rb"
40
42
  - "./tests/saw.mp3"
41
- - "./tests/test_audioinfo.rb"
43
+ - "./tests/test_write.rb"
44
+ - tests/test_read.rb
42
45
  - tests/saw.mp3
43
- - tests/test_audioinfo.rb
44
- - ext/extconf.rb
46
+ - tests/test_write.rb
47
+ - ext/test.rb
45
48
  - ext/rtaglib.c
49
+ - ext/extconf.rb
46
50
  - ext/mkmf.log
47
- - ext/test.rb
48
51
  test_files: []
49
52
  rdoc_options: []
50
53
  extra_rdoc_files: []
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require_gem 'rtaglib'
4
- require 'test/unit'
5
- class RtaglibTestCase < Test::Unit::TestCase
6
-
7
- def initialize(*args)
8
- super
9
- @file=::TagFile::File.new(File.dirname(__FILE__)+"/saw.mp3")
10
- end
11
-
12
- end
13
-
14
- # arch-tag: test