eac_templates 0.7.0 → 0.7.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: 6760f4ce4cf38f54efeecca766e9c0871e8c25b2243f08a538456732c5f5ff83
4
- data.tar.gz: 4bc5d3c58bf1a5e99f8bd577a75588caef089aad7d3f10d94d2659d1986a8baf
3
+ metadata.gz: 522c055175cdd8071434bde5d46f183e3e5b85860245a252652e32f1a1290d1d
4
+ data.tar.gz: fa967917ba840088f4d9c100d6562c2292868ab364aef53908f694e06ad45e13
5
5
  SHA512:
6
- metadata.gz: c15346833718e092f413eed81e1370bcbc61595ad0a935c985be8ecb37589b10941a6b2e952c7ab06a55c8bb590caaa60bf31801153307e107c07bc3060f5898
7
- data.tar.gz: fa8ce19ec361c461f8d3182477bec458566cca407c21d647da4255b6dd06b86c60d75c4bfd29086633bad4084ed4915bd11487675fe3ed05e9ce9fed8bcc1532
6
+ metadata.gz: 0cdff6347533d27db344662b811b9c73204a9714fad7c30f43b74700f5ea3d602c8229a012f680c3e9f9cc0b3f5bfd77770392120377957b1d9913fcc770f705
7
+ data.tar.gz: a3ae082c6e003663774cb8db1ad1f37b0cdfd931dceda4fdf8d46c0a56f958992da42450a7108e14fc0f1c217fd2155c9587a6bcca6dafdab76db05c12f35874
@@ -53,6 +53,14 @@ module EacTemplates
53
53
  raise ::EacTemplates::Errors::NotFound, "No template found: #{self}"
54
54
  end
55
55
 
56
+ # @return [String]
57
+ def to_s
58
+ v = 'NOT_FOUND'
59
+ v = directory.to_s if directory?
60
+ v = file.to_s if file?
61
+ "#{self.class.name}[#{v}]"
62
+ end
63
+
56
64
  private
57
65
 
58
66
  # @return [EacTemplates::Abstract::Directory]
@@ -10,6 +10,11 @@ module EacTemplates
10
10
  # @return [Pathname]
11
11
  delegate :path_for_search, to: :owner
12
12
 
13
+ # @return [String]
14
+ def to_s
15
+ "#{self.class.name}[#{path_for_search}]"
16
+ end
17
+
13
18
  private
14
19
 
15
20
  def source_object_uncached
@@ -28,18 +28,23 @@ module EacTemplates
28
28
  PATH_FOR_SEARCH_PREFIX
29
29
  end
30
30
 
31
+ # @return [String]
32
+ def to_s
33
+ "#{self.class.name}[#{path_for_search}]"
34
+ end
35
+
31
36
  protected
32
37
 
33
38
  # @return [Array<Pathname>]
34
39
  def real_paths_uncached
35
40
  source_set.included_paths.lazy.map { |source_single| source_single_search(source_single) }
36
- .select(&:present?)
41
+ .reject(&:nil?) # rubocop:disable Style/CollectionCompact
37
42
  end
38
43
 
39
44
  # @param path [Pathname]
40
45
  # @return [Boolean]
41
46
  def select_path?(path)
42
- path.present? && path.send("#{type}?")
47
+ !path.nil? && path.send("#{type}?")
43
48
  end
44
49
 
45
50
  # @param source_single [EacTemplates::Sources::Single]
@@ -17,6 +17,11 @@ module EacTemplates
17
17
  def <<(single)
18
18
  add(single)
19
19
  end
20
+
21
+ # @return [String]
22
+ def to_s
23
+ "#{self.class.name}[#{map(&:to_s).join(', ')}]"
24
+ end
20
25
  end
21
26
  end
22
27
  end
@@ -44,6 +44,11 @@ module EacTemplates
44
44
  @included_paths ||= ::EacTemplates::Sources::InternalSet.new
45
45
  end
46
46
 
47
+ # @return [String]
48
+ def to_s
49
+ "#{self.class.name}[#{included_paths}]"
50
+ end
51
+
47
52
  private
48
53
 
49
54
  def raise_template_not_found(subpath)
@@ -24,6 +24,11 @@ module EacTemplates
24
24
  r = path.join(subpath)
25
25
  r.exist? ? r : nil
26
26
  end
27
+
28
+ # @return [String]
29
+ def to_s
30
+ "#{self.class.name}[#{path}]"
31
+ end
27
32
  end
28
33
  end
29
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTemplates
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_config