apetag 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/apetag.rb +3 -8
  2. data/test/test_apetag.rb +2 -2
  3. metadata +4 -3
data/apetag.rb CHANGED
@@ -11,15 +11,10 @@
11
11
  #
12
12
  # The module is in written in pure Ruby, so it should be useable on all
13
13
  # platforms that Ruby supports. It has been tested on OpenBSD.
14
- # The minimum python version required should be 1.8, but it has only been tested
14
+ # The minimum Ruby version required should be 1.8, but it has only been tested
15
15
  # on 1.8.4. Modifying the code to work with previous version shouldn't be
16
16
  # difficult, though there aren't any plans to do so.
17
17
  #
18
- # The library is complete, but it hasn't been used, so there may still be
19
- # some bugs in it. I haven't found any bugs in my normal use of it that I
20
- # haven't already fixed, though. RDoc documentation is available, as is
21
- # Test::Unit based testing.
22
- #
23
18
  # General Use:
24
19
  #
25
20
  # require 'apetag'
@@ -363,7 +358,7 @@ class ApeTag
363
358
  ape_item_keys.add(item.key_downcased)
364
359
  ape_items[item.key] = item
365
360
  end
366
- raise ApeTagError, "Data remaing after specified number of items parsed" if offset != tag_data.length
361
+ raise ApeTagError, "Data remaining after specified number of items parsed" if offset != tag_data.length
367
362
  @fields = ape_items
368
363
  end
369
364
 
@@ -388,7 +383,7 @@ class ApeTag
388
383
  raise ApeTagError, "Tag size (#{tag_size}) larger than possible" if tag_size + id3.length > file_size
389
384
  raise ApeTagError, "Tag size (#{tag_size}) is larger than #{MAX_SIZE}" if tag_size > MAX_SIZE
390
385
  raise ApeTagError, "Item count (#{tag_item_count}) is larger than #{MAX_ITEM_COUNT}" if tag_item_count > MAX_ITEM_COUNT
391
- raise ApeTagError, "Item count (#{tag_item_count}) is larger than possible" if tag_item_count > tag_size-64/ApeItem::MIN_SIZE
386
+ raise ApeTagError, "Item count (#{tag_item_count}) is larger than possible" if tag_item_count > (tag_size-64)/ApeItem::MIN_SIZE
392
387
  file.seek(-tag_size-id3.length, IO::SEEK_END)
393
388
  @tag_start=file.pos
394
389
  @tag_header=file.read(32)
data/test/test_apetag.rb CHANGED
@@ -277,12 +277,12 @@ class ApeTagTest < Test::Unit::TestCase
277
277
  data[48] = 1
278
278
  assert_raises(ApeTagError){ApeTag.new(StringIO.new(data)).raw}
279
279
 
280
- # Test unmatched header and footer item size, header size wrong
280
+ # Test unmatched header and footer item count, header size wrong
281
281
  data[48] = 0
282
282
  data[16] = 1
283
283
  assert_raises(ApeTagError){ApeTag.new(StringIO.new(data)).raw}
284
284
 
285
- # Test unmatched header and footer item size, footer size wrong
285
+ # Test unmatched header and footer item count, footer size wrong
286
286
  data = EXAMPLE_APE_TAG.dup
287
287
  data[48] -=1
288
288
  assert_raises(ApeTagError){ApeTag.new(StringIO.new(data)).fields}
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: apetag
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-01-14 00:00:00 -08:00
6
+ version: 1.0.1
7
+ date: 2007-05-06 00:00:00 -07:00
8
8
  summary: APEv2 Tag Parser/Generator
9
9
  require_paths:
10
10
  - .
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors:
29
30
  - Jeremy Evans
30
31
  files: