id3tag 0.2.0 → 0.2.1

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
2
  SHA1:
3
- metadata.gz: d7e015abc718273110bec0cb6fcdb8036de50f37
4
- data.tar.gz: 0b3b5d6b9acdd5cf5393fc9a97ef594f393e0101
3
+ metadata.gz: e6b0b5c61e35171280ba6a4c9141159ba0079e25
4
+ data.tar.gz: ad16f770564f70a30b3504fb5945656a2693f37a
5
5
  SHA512:
6
- metadata.gz: 1db6cc3bd2407e2bfc6a172e508adc8b11907bd00903b9006aea4b94d0d1c8c620351dc6f22de95405ea6fb16e0784b42456bbde45121fdc56b1e0b44bb0f6e3
7
- data.tar.gz: 3357247645ce3d9c07be8b0633c95a782361471297bc9bfaefc2d1566db2f4f584adba69c0678dab721e2597986fb9aa11e45149e3c4a13fb2df8cd678da6fa5
6
+ metadata.gz: 3580b6133eeef63c3b3b14e5f508df15473756d928aaf595171835750c85616a25fd2251f2ae6e9cffe538d3e99fc198fdb55768788ae7b948f2c66e6b2e3b6f
7
+ data.tar.gz: 18a2596b48760925683077237bb01871a82cf4f82ff350fef323e4e8da8eb0e4d129ad05d988abd2d9ca9b413c398adae0ec45dab8d8fb67d4a8325e6c6925b6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
data/id3tag.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "id3tag"
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Krists Ozols"]
12
- s.date = "2013-10-19"
12
+ s.date = "2013-10-20"
13
13
  s.description = "Native Ruby ID3 tag reader that aims for 100% covarage of ID3v2.x and ID3v1.x standards"
14
14
  s.email = "krists@iesals.lv"
15
15
  s.extra_rdoc_files = [
@@ -29,13 +29,14 @@ module ID3Tag
29
29
  end
30
30
 
31
31
  def read_next_frame_size
32
- size_bytes = case frame_size_length
32
+ case @major_version_number
33
33
  when 4
34
- read_next_bytes(frame_size_length)
34
+ SynchsafeInteger.decode(NumberUtil.convert_string_to_32bit_integer(read_next_bytes(4)))
35
35
  when 3
36
- "\x00" + read_next_bytes(frame_size_length)
36
+ NumberUtil.convert_string_to_32bit_integer(read_next_bytes(4))
37
+ when 2
38
+ NumberUtil.convert_string_to_32bit_integer("\x00" + read_next_bytes(3))
37
39
  end
38
- SynchsafeInteger.decode(NumberUtil.convert_string_to_32bit_integer(size_bytes))
39
40
  end
40
41
 
41
42
  def read_next_frame_flags
@@ -50,10 +51,6 @@ module ID3Tag
50
51
  @major_version_number > 2
51
52
  end
52
53
 
53
- def frame_size_length
54
- @major_version_number <= 2 ? 3 : 4
55
- end
56
-
57
54
  def read_next_bytes(limit)
58
55
  @input.read(limit)
59
56
  end
data/tags CHANGED
@@ -157,13 +157,12 @@ footer_present? lib/id3tag/id3_v2_tag_header.rb /^ def footer_present?$/;" f
157
157
  frame_class lib/id3tag/frames/v2/frame_fabricator.rb /^ def frame_class$/;" f class:ID3Tag.Frames.V2
158
158
  frame_flags lib/id3tag/frames/v2/basic_frame.rb /^ def frame_flags$/;" f class:ID3Tag.Frames.V2.BasicFrame
159
159
  frame_id lib/id3tag/tag.rb /^ def frame_id(version, name)$/;" f class:ID3Tag
160
- frame_id_length lib/id3tag/id3_v2_frame_parser.rb /^ def frame_id_length$/;" f class:ID3Tag
160
+ frame_id_length lib/id3tag/id3_v2_frame_parser.rb /^ def frame_id_length$/;" f class:ID3Tag.ID3V2FrameParser
161
161
  frame_ids lib/id3tag/tag.rb /^ def frame_ids$/;" f class:ID3Tag
162
- frame_size_length lib/id3tag/id3_v2_frame_parser.rb /^ def frame_size_length$/;" f class:ID3Tag
163
162
  frames lib/id3tag/id3_v1_frame_parser.rb /^ def frames$/;" f class:ID3Tag.ID3V1FrameParser
164
163
  frames lib/id3tag/id3_v2_frame_parser.rb /^ def frames$/;" f class:ID3Tag.ID3V2FrameParser
165
164
  frames lib/id3tag/tag.rb /^ def frames$/;" f class:ID3Tag
166
- frames_has_flags? lib/id3tag/id3_v2_frame_parser.rb /^ def frames_has_flags?$/;" f class:ID3Tag
165
+ frames_has_flags? lib/id3tag/id3_v2_frame_parser.rb /^ def frames_has_flags?$/;" f class:ID3Tag.ID3V2FrameParser
167
166
  genre lib/id3tag/tag.rb /^ def genre$/;" f class:ID3Tag
168
167
  genre_frame lib/id3tag/id3_v1_frame_parser.rb /^ def genre_frame$/;" f class:ID3Tag.ID3V1FrameParser
169
168
  genre_parser lib/id3tag/frames/v2/genre_frame.rb /^ def genre_parser$/;" f class:ID3Tag.Frames.V2.GenreFrame
@@ -219,7 +218,7 @@ mp3_fixture spec/support/mp3_fixtures.rb /^def mp3_fixture(filename)$/;" f
219
218
  output lib/id3tag/unsynchronization.rb /^ def output$/;" f class:ID3Tag.Unsynchronization
220
219
  output_bytes lib/id3tag/unsynchronization.rb /^ def output_bytes$/;" f class:ID3Tag.Unsynchronization
221
220
  owner_identifier lib/id3tag/frames/v2/unique_file_id_frame.rb /^ def owner_identifier$/;" f class:ID3Tag.Frames.V2.UniqueFileIdFrame
222
- padding_or_eof_reached? lib/id3tag/id3_v2_frame_parser.rb /^ def padding_or_eof_reached?$/;" f class:ID3Tag
221
+ padding_or_eof_reached? lib/id3tag/id3_v2_frame_parser.rb /^ def padding_or_eof_reached?$/;" f class:ID3Tag.ID3V2FrameParser
223
222
  position_and_count_of_data_length_bytes lib/id3tag/frames/v2/basic_frame.rb /^ def position_and_count_of_data_length_bytes$/;" f class:ID3Tag.Frames.V2.BasicFrame
224
223
  position_and_count_of_data_length_bytes lib/id3tag/frames/v2/frame_flags.rb /^ def position_and_count_of_data_length_bytes$/;" f class:ID3Tag.Frames.V2.FrameFlags
225
224
  position_and_count_of_encryption_id_bytes lib/id3tag/frames/v2/basic_frame.rb /^ def position_and_count_of_encryption_id_bytes$/;" f class:ID3Tag.Frames.V2.BasicFrame
@@ -239,15 +238,15 @@ read lib/id3tag/tag.rb /^ def read(source, version = :all)$/;" f class:ID3T
239
238
  read_additional_info_byte lib/id3tag/frames/v2/basic_frame.rb /^ def read_additional_info_byte(position, byte_count)$/;" f class:ID3Tag.Frames.V2.BasicFrame
240
239
  read_from_pos_till_limit lib/id3tag/id3_v1_frame_parser.rb /^ def read_from_pos_till_limit(position, limit)$/;" f class:ID3Tag.ID3V1FrameParser
241
240
  read_from_pos_till_null_byte_or_limit lib/id3tag/id3_v1_frame_parser.rb /^ def read_from_pos_till_null_byte_or_limit(position, limit)$/;" f class:ID3Tag.ID3V1FrameParser
242
- read_next_bytes lib/id3tag/id3_v2_frame_parser.rb /^ def read_next_bytes(limit)$/;" f class:ID3Tag
243
- read_next_frame_flags lib/id3tag/id3_v2_frame_parser.rb /^ def read_next_frame_flags$/;" f class:ID3Tag
241
+ read_next_bytes lib/id3tag/id3_v2_frame_parser.rb /^ def read_next_bytes(limit)$/;" f class:ID3Tag.ID3V2FrameParser
242
+ read_next_frame_flags lib/id3tag/id3_v2_frame_parser.rb /^ def read_next_frame_flags$/;" f class:ID3Tag.ID3V2FrameParser
244
243
  read_next_frame_id lib/id3tag/id3_v2_frame_parser.rb /^ def read_next_frame_id$/;" f class:ID3Tag.ID3V2FrameParser
245
244
  read_next_frame_size lib/id3tag/id3_v2_frame_parser.rb /^ def read_next_frame_size$/;" f class:ID3Tag.ID3V2FrameParser
246
245
  read_only? lib/id3tag/frames/v2/basic_frame.rb /^ def read_only?$/;" f class:ID3Tag.Frames.V2.BasicFrame
247
246
  read_only? lib/id3tag/frames/v2/frame_flags.rb /^ def read_only?$/;" f class:ID3Tag.Frames.V2.FrameFlags
248
247
  read_only? lib/id3tag/frames/v2/frame_header_flags.rb /^ def read_only?$/;" f class:ID3Tag.Frames.V2.FrameFlags
249
248
  remove lib/id3tag/unsynchronization.rb /^ def remove$/;" f class:ID3Tag.Unsynchronization
250
- rewind_input lib/id3tag/id3_v2_frame_parser.rb /^ def rewind_input$/;" f class:ID3Tag
249
+ rewind_input lib/id3tag/id3_v2_frame_parser.rb /^ def rewind_input$/;" f class:ID3Tag.ID3V2FrameParser
251
250
  source_encoding lib/id3tag/frames/v1/text_frame.rb /^ def source_encoding$/;" f class:ID3Tag.Frames.V1.TextFrame
252
251
  source_encoding lib/id3tag/frames/v2/text_frame.rb /^ def source_encoding$/;" f class:ID3Tag.Frames.V2.TextFrame
253
252
  status_byte_from_flags lib/id3tag/frames/v2/frame_header_flags.rb /^ def status_byte_from_flags$/;" f class:ID3Tag.Frames.V2.FrameFlags
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: id3tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krists Ozols
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-19 00:00:00.000000000 Z
11
+ date: 2013-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debugger