vorbis_comment 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c90b6b8340f3d9803cd9980e108c0f7936b23d1b
4
- data.tar.gz: 57e5dd707b494b65b68e434d468b1953e4568113
2
+ SHA256:
3
+ metadata.gz: 0b89ea7bfed9c3da81aacb819f3d7c2980650a9cce7fdd03e83a1e2dba02f7a7
4
+ data.tar.gz: 833bc2079f53a5621f67ee1dfc8a79f37965c288742f2f80f2858e64a5a23363
5
5
  SHA512:
6
- metadata.gz: 9a7523adca07a0149d22faf56ca3816b67b06d8de700957bbe0c00e503cf10445a1061a2df3bc44d6353d1c2fa8a889669ed1c064b4b735c55e6e33f687889f6
7
- data.tar.gz: 89ee6f29dd467a75dc93b1b5ace2a9944f6753dbf992a5a7040ef70417510e69ade85417c959e9478d416a1d0b26fba107e5b6a4f8325c85a7db68ea244e734b
6
+ metadata.gz: d8b484fd6ad7f5a1ae4688520a72cabf4180e43f3e0337ce642b93aaf6626a68d72b573e7e650f0e6b0380655311c7f68ff603c3d4b594bb5a37ef6f6013daad
7
+ data.tar.gz: 4dc90982a5312fffdc0cf31a57579b34a3085c5994990685025c03b4ccee976aee9109258fc2761d29d062b60cbc6289610a801e067dececc5b39baeeb1b9808
data/Rakefile CHANGED
@@ -1,24 +1,25 @@
1
1
  require 'rake'
2
2
  require 'rake/clean'
3
- require 'rake/rdoctask'
4
3
 
5
4
  CLEAN.include %w"rdoc vorbis_comment_ext.*o vcedit.o Makefile mkmf.log vorbis_comment-*.gem"
6
5
 
7
- Rake::RDocTask.new do |rdoc|
6
+ RDOC_OPTS = ["--line-numbers", "--inline-source", '--main', 'README']
7
+
8
+ begin
9
+ gem 'hanna-nouveau'
10
+ RDOC_OPTS.concat(['-f', 'hanna'])
11
+ rescue Gem::LoadError
12
+ end
13
+
14
+ require "rdoc/task"
15
+ RDoc::Task.new do |rdoc|
8
16
  rdoc.rdoc_dir = "rdoc"
9
- rdoc.options += ["--quiet", "--line-numbers", "--inline-source"]
17
+ rdoc.options += RDOC_OPTS
10
18
  rdoc.main = "vorbis_comment.rb"
11
19
  rdoc.title = "ruby-vorbis_comment: Vorbis Comment Reader/Writer Library"
12
20
  rdoc.rdoc_files.add ["LICENSE", "vorbis_comment.rb"]
13
21
  end
14
22
 
15
- desc "Update docs and upload to rubyforge.org"
16
- task :doc_rforge => [:rdoc]
17
- task :doc_rforge do
18
- sh %{chmod -R g+w rdoc/*}
19
- sh %{scp -rp rdoc/* rubyforge.org:/var/www/gforge-projects/vorbiscomment}
20
- end
21
-
22
23
  desc "Package ruby-vorbis_comment"
23
24
  task :package => :clean do
24
25
  sh %{#{FileUtils::RUBY} -S gem build vorbis_comment.gemspec}
@@ -31,5 +32,5 @@ end
31
32
 
32
33
  desc "Run tests"
33
34
  task :default do
34
- sh %{#{FileUtils::RUBY} test/test_vorbis_comment.rb}
35
+ sh %{#{FileUtils::RUBY} -I. test/test_vorbis_comment.rb}
35
36
  end
@@ -2,7 +2,9 @@
2
2
  require 'rubygems'
3
3
  require 'vorbis_comment'
4
4
  require 'fileutils'
5
- require 'test/unit'
5
+ gem 'minitest'
6
+ ENV['MT_NO_PLUGINS'] = '1' # Work around stupid autoloading of plugins
7
+ require 'minitest/autorun'
6
8
 
7
9
  begin
8
10
  VorbisComment.new(File.join(File.dirname(__FILE__), 'lt8k.ogg')).fields
@@ -10,7 +12,7 @@ rescue VorbisComment::InvalidDataError
10
12
  puts('The linked version of libvorbis has problems with files < 8K in size')
11
13
  end
12
14
 
13
- class VorbisCommentTest < Test::Unit::TestCase
15
+ class VorbisCommentTest < Minitest::Test
14
16
  def vc(filename)
15
17
  VorbisComment.new(File.join(File.dirname(__FILE__), filename))
16
18
  end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # This library implements a Vorbis Comment reader/writer.
3
- # If called from the command line, it prints out the contents of the APEv2 tag
4
- # for the given filename arguments.
3
+ # If called from the command line, it prints out the contents of the Vorbis
4
+ # comments for the given filename arguments.
5
5
  #
6
6
  # ruby-vorbis_comment is a pure Ruby library for manipulating Vorbis comments.
7
7
  # It wraps libvorbis and libogg, so it should be completely standards
@@ -9,7 +9,7 @@
9
9
  # FLAC, and Speex files.
10
10
  #
11
11
  # The library includes a C extension, which may or may not build cleanly on all
12
- # architectures. It is developed and tested on OpenBSD i386 and amd64. If it
12
+ # architectures. It is developed and tested on OpenBSD amd64. If it
13
13
  # doesn't work on your machine, please try to get it to work and send in a
14
14
  # patch.
15
15
  #
@@ -31,13 +31,14 @@
31
31
  # # You need to update/modify the fields given, not reassign it
32
32
  # a.remove! # clear the list of vorbis comments from the file
33
33
  #
34
- # To run the tests for the library, run test_vorbis_comment.rb.
34
+ # To build the library, run <tt>rake build</tt>. To run the tests for the library
35
+ # after building, run <tt>rake</tt>.
35
36
  #
36
37
  # If you find any bugs, would like additional documentation, or want to submit a
37
- # patch, please use Rubyforge (http://rubyforge.org/projects/vorbis_comment/).
38
+ # patch, please use GitHub (https://github.com/jeremyevans/ruby-vorbis_comment/issues).
38
39
  # One known bug is that it doesn't like files less than 8K in size.
39
40
  #
40
- # The RDoc for the project is available on http://vorbiscomment.rubyforge.org.
41
+ # The RDoc for the project is available on http://ruby-vorbiscomment.jeremyevans.net
41
42
  #
42
43
  # The most current source code can be accessed via github
43
44
  # (http://github.com/jeremyevans/ruby-vorbis_comment/). Note that
@@ -50,7 +51,7 @@
50
51
  # The C part of this library is copyright Jeremy Evans and Tilman Sauerbeck and
51
52
  # is licensed under the GNU LGPL.
52
53
  #
53
- # Copyright (c) 2007,2010,2013 Jeremy Evans
54
+ # Copyright (c) 2007,2010,2013,2020 Jeremy Evans
54
55
  #
55
56
  # Permission is hereby granted, free of charge, to any person obtaining a copy
56
57
  # of this software and associated documentation files (the "Software"), to deal
@@ -18,7 +18,6 @@
18
18
  */
19
19
 
20
20
  #include <ruby.h>
21
- #include <st.h>
22
21
  #include <stdio.h>
23
22
  #include <stdbool.h>
24
23
  #include <errno.h>
@@ -100,9 +99,9 @@ VALUE read_fields (VALUE self) {
100
99
  VALUE write_fields (VALUE self, VALUE comments) {
101
100
  vcedit_state *state;
102
101
  vorbis_comment *vc;
103
- struct RArray *items, *comment;
104
- VALUE filename;
102
+ VALUE filename, comment, key, value;
105
103
  int i, j;
104
+ long len;
106
105
 
107
106
  filename = rb_iv_get(self, "@filename");
108
107
  state = vcedit_state_new(StringValuePtr(filename));
@@ -124,10 +123,12 @@ VALUE write_fields (VALUE self, VALUE comments) {
124
123
  vorbis_comment_clear(vc);
125
124
  vorbis_comment_init(vc);
126
125
 
127
- items = RARRAY(comments);
128
- for (i = 0; i < RARRAY_LEN(items); i++) {
129
- comment = RARRAY_PTR(items)[i];
130
- vorbis_comment_add_tag(vc, StringValuePtr(RARRAY_PTR(comment)[0]), StringValuePtr(RARRAY_PTR(comment)[1]));
126
+ len = RARRAY_LEN(comments);
127
+ for (i = 0; i < len; i++) {
128
+ comment = rb_ary_entry(comments, i);
129
+ key = rb_ary_entry(comment, 0);
130
+ value = rb_ary_entry(comment, 1);
131
+ vorbis_comment_add_tag(vc, StringValuePtr(key), StringValuePtr(value));
131
132
  }
132
133
 
133
134
  switch (vcedit_write (state)) {
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vorbis_comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-02-26 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cicphash
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.0.0
27
27
  description:
@@ -34,39 +34,40 @@ files:
34
34
  - LICENSE
35
35
  - Rakefile
36
36
  - extconf.rb
37
- - test/manyfields.ogg
37
+ - test/blank.ogg
38
38
  - test/corrupt.ogg
39
+ - test/empty_key.ogg
39
40
  - test/lt8k.ogg
40
- - test/blank.ogg
41
+ - test/manyfields.ogg
41
42
  - test/test_vorbis_comment.rb
42
43
  - test/title.ogg
43
- - test/empty_key.ogg
44
44
  - vcedit.c
45
45
  - vcedit.h
46
46
  - vorbis_comment.rb
47
47
  - vorbis_comment_ext.c
48
- homepage: http://vorbiscomment.rubyforge.org
49
- licenses: []
48
+ homepage: http://ruby-vorbiscomment.jeremyevans.net
49
+ licenses:
50
+ - MIT
51
+ - LGPL-2.0-or-later
50
52
  metadata: {}
51
53
  post_install_message:
52
54
  rdoc_options:
53
- - --inline-source
54
- - --line-numbers
55
+ - "--inline-source"
56
+ - "--line-numbers"
55
57
  require_paths:
56
- - .
58
+ - "."
57
59
  required_ruby_version: !ruby/object:Gem::Requirement
58
60
  requirements:
59
- - - '>='
61
+ - - ">="
60
62
  - !ruby/object:Gem::Version
61
63
  version: '0'
62
64
  required_rubygems_version: !ruby/object:Gem::Requirement
63
65
  requirements:
64
- - - '>='
66
+ - - ">="
65
67
  - !ruby/object:Gem::Version
66
68
  version: '0'
67
69
  requirements: []
68
- rubyforge_project: vorbiscomment
69
- rubygems_version: 2.0.0
70
+ rubygems_version: 3.1.2
70
71
  signing_key:
71
72
  specification_version: 4
72
73
  summary: Vorbis Comment Reader/Writer Library