id3tag 0.13.0 → 0.14.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 525262f63858eb113a587b48909af73be7b1acf8e99e883ec84e3aa82f2eff1f
4
- data.tar.gz: db8abc12784aaa9083c99431a68c1029fcb183887369cdec5489fef5c6591625
3
+ metadata.gz: 667971eff7efb32a7d5b35c40bf93f66cf435c7aca6e24a6ca6c8d02cd90e783
4
+ data.tar.gz: ae499c107a5cf5f75b1906a6259552061e9143e4f302cfbbadd4f3e4e62436b2
5
5
  SHA512:
6
- metadata.gz: 4b2630fb570762b4f5d9da031bf5900b7d5649e29b99fdb32929b21e8d021ebde82a5c3e4da2f26cc52999bd4bbf1b7abcaff53ed8ee4bafb02e497b46fc7ca9
7
- data.tar.gz: 922932d0dc2838926d2c0a78c31a43954aa2037a338d07f171faa52d7f0f7d69142433a2d98f49f06ce7f01eaa0fb6b824d4d56ac279ec2a94d6e2dbe4681d92
6
+ metadata.gz: 93641cd6c5d2ef1febf87859bed72ec3f2aa92b79ed250f2e51dbf37373043c6bc39f07cb280e2ae171d25f6b1add950fc571706edce5bf35561d46dac5ab851
7
+ data.tar.gz: bb9cb24084969d9b1e3b986f2b872e534ee67cfbf72599705fac60a931952c6765be3c95dffa08619763eb013740a6a2c5e8a6a799bb373a1c9c2e4a255fcf66
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem install id3tag
12
12
 
13
13
  Or add the gem to your Gemfile:
14
14
  ```
15
- gem 'id3tag', '~> 0.13.0'
15
+ gem 'id3tag', '~> 0.14.0'
16
16
  ```
17
17
 
18
18
  ## How to use
@@ -15,7 +15,7 @@ module ID3Tag
15
15
  end
16
16
 
17
17
  def content
18
- @content.encode(destination_encoding, source_encoding)
18
+ EncodingUtil.encode(@content, source_encoding)
19
19
  end
20
20
  end
21
21
  end
@@ -9,15 +9,11 @@ module ID3Tag
9
9
  end
10
10
 
11
11
  def content
12
- @content.encode(destination_encoding, source_encoding)
12
+ EncodingUtil.encode(@content, source_encoding)
13
13
  end
14
14
 
15
15
  private
16
16
 
17
- def destination_encoding
18
- Encoding::UTF_8
19
- end
20
-
21
17
  def source_encoding
22
18
  Encoding::ISO8859_1
23
19
  end
@@ -32,7 +32,7 @@ module ID3Tag
32
32
  end
33
33
 
34
34
  def encoded_content
35
- content_without_encoding_byte_and_language.encode(destination_encoding, source_encoding)
35
+ EncodingUtil.encode(content_without_encoding_byte_and_language, source_encoding)
36
36
  end
37
37
 
38
38
  def content_without_encoding_byte_and_language
@@ -21,7 +21,7 @@ module ID3Tag
21
21
  private
22
22
 
23
23
  def encoded_content
24
- content_without_encoding_byte.encode(destination_encoding, source_encoding, **ID3Tag.configuration.string_encode_options)
24
+ EncodingUtil.encode(content_without_encoding_byte, source_encoding)
25
25
  end
26
26
 
27
27
  def source_encoding
@@ -30,10 +30,6 @@ module ID3Tag
30
30
  end.to_s
31
31
  end
32
32
 
33
- def destination_encoding
34
- Encoding::UTF_8.to_s
35
- end
36
-
37
33
  def get_encoding_byte
38
34
  raw_content_io.rewind
39
35
  raw_content_io.getbyte
@@ -38,7 +38,7 @@ module ID3Tag
38
38
 
39
39
  def first_frame_by_id(*ids)
40
40
  first_existing_id = ids.find { |id| frame_ids.include?(id) }
41
- first_existing_id && get_frame(first_existing_id)
41
+ first_existing_id && get_frames(first_existing_id).first
42
42
  end
43
43
 
44
44
  def all_frames_by_id(*ids)
@@ -1,3 +1,3 @@
1
1
  module ID3Tag
2
- VERSION = "0.13.0"
2
+ VERSION = "0.14.0"
3
3
  end
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.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krists Ozols
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-04 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler