aranha-parsers 0.7.1 → 0.7.2

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: b49b2b95850fa90b40ef009a9238577a17fefe5cbe49d23cb72be9be24e91546
4
- data.tar.gz: 47b4f7becc2cba914955d7c37418fbab3048550fa99d9446a77b8c73d0e8a659
3
+ metadata.gz: 291b1da2b4559d999dc1534f79ed111bcfa83f3d6c79e62a049a6eec74443163
4
+ data.tar.gz: 65f36ed9cee9d1230f9746da5fc6c2e2a3d3c89cf991257ba27aa0451115a9c1
5
5
  SHA512:
6
- metadata.gz: 82922c7b14bd371a8eca750edd40e1efbd95cdf4fc455262f7ee7a4125cd5e4341057187544f17253fdf91f6cf624addbbcd21682c303d39e0b8da2519249f49
7
- data.tar.gz: 8ae0858f712dbcb477278df6a25f1e781453f522659ccd579ba90bcdb9a2a68f876fa137703ec7000fa624b72f23351ee363d9ca96c0569de7b9835a9a6561d0
6
+ metadata.gz: 1e0c6c83985297d6ae1ea39be8471d477982f379c3176c057275f7c758ec3d05d9452110a506e78cb165cff84a639fac774c66b5e5714b606e226f76ad7f604c
7
+ data.tar.gz: 34b367289ee0c693bbf77f47c6fa000f61791e7a9f0e88e21f5f7fb1bcb2bb6ded0dbd3b0603c069ec0c881e3d021281b3793410025262770bacd03eff2dd306
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/core_ext/module/delegation'
4
- require 'eac_ruby_utils/require_sub'
4
+ require 'eac_ruby_utils/core_ext'
5
5
  require 'yaml'
6
6
 
7
7
  module Aranha
8
8
  module Parsers
9
9
  class SourceAddress
10
- ::EacRubyUtils.require_sub __FILE__
10
+ require_sub __FILE__
11
11
 
12
12
  class << self
13
13
  SUBS = [
@@ -35,12 +35,8 @@ module Aranha
35
35
  end
36
36
  end
37
37
 
38
- attr_reader :sub
39
-
40
- def initialize(source)
41
- @sub = self.class.detect_sub(source)
42
- end
43
-
38
+ enable_simple_cache
39
+ common_constructor :source
44
40
  delegate :content, :url, to: :sub
45
41
 
46
42
  def to_s
@@ -50,6 +46,12 @@ module Aranha
50
46
  def serialize
51
47
  sub.serialize.strip + "\n"
52
48
  end
49
+
50
+ private
51
+
52
+ def sub_uncached
53
+ self.class.detect_sub(source)
54
+ end
53
55
  end
54
56
  end
55
57
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.7.1'
5
+ VERSION = '0.7.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aranha-parsers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-28 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport