id3tag 0.12.0 → 0.12.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
  SHA256:
3
- metadata.gz: 622d36527a37667a879b10d57e1375687d961461c51fe9bdd57637f8911b797d
4
- data.tar.gz: 0a10600c4a862998e60334795481c839814637a2d34a32e387245d7c5648cddb
3
+ metadata.gz: 19488a0e5c2d7354946f8c02f9190134580fde95820eb2ab3e35b559e4c85819
4
+ data.tar.gz: 5b25ad975028445328117b0aaa443e4b781ca86bed14101366baa8fbf57915d0
5
5
  SHA512:
6
- metadata.gz: 681cea3d65d268544530e47096994732ebcc533a476e7bc843f50d6ad18eb7f77e4b7a81cc012a36f49cd063176a2a2cd37f77193c32eeb4e69e03fa8b511749
7
- data.tar.gz: a7aea6358d52bca1d416cafeafdca93a797df5f91273528961a22b0658b46e6f9c0684806dbdbc22757961ab3012fe8bf7731bdab804e57bd2a2a3521fc0b09d
6
+ metadata.gz: 7d717cde84a8bcad1bcfb93c8f024e64fa315933bccd199f68a748c7b54c5ef57f7b184f926da63627eec14af1eeb769380e73dbe5f6cd5cefe657a1ef1782ff
7
+ data.tar.gz: 4a80fd637e147b07f2ba2c35f5cbee826c430a778e86d3bec69bdf2e581f87e5c9794ea6542e60697f12826e51060f7f87b11cecb6c3fa507b815a7c85c1d548
@@ -1,7 +1,7 @@
1
1
  module ID3Tag
2
2
  class Configuration
3
- ResetError = Class.new(StandardError)
4
3
  include Singleton
4
+ ResetError = Class.new(StandardError)
5
5
  StackItem = Struct.new(:configuration)
6
6
 
7
7
  class << self
@@ -10,7 +10,9 @@ module ID3Tag
10
10
  end
11
11
 
12
12
  def configuration
13
- value = instance.instance_variable_get(:@stack).last&.configuration || instance.instance_variable_get(:@global_configuration)
13
+ value_from_stack = instance.instance_variable_get(:@stack).last
14
+ value = value_from_stack && value_from_stack.configuration
15
+ value ||= instance.instance_variable_get(:@global_configuration)
14
16
  yield value if block_given?
15
17
  value
16
18
  end
@@ -21,7 +23,9 @@ module ID3Tag
21
23
  end
22
24
 
23
25
  def local_configuration
24
- stack_item = StackItem.new((@stack.last&.configuration || @global_configuration).dup)
26
+ instance_to_copy = @stack.last && @stack.last.configuration
27
+ instance_to_copy ||= @global_configuration
28
+ stack_item = StackItem.new(instance_to_copy.dup)
25
29
  stack_backup = @stack.dup
26
30
  @stack << stack_item
27
31
  begin
@@ -1,3 +1,3 @@
1
1
  module ID3Tag
2
- VERSION = "0.12.0"
2
+ VERSION = "0.12.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: id3tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krists Ozols