eac_templates 0.5.0 → 0.5.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: a7a7b07116547967179751347b5600225f96205ee1b1da0fc7bb35d795439fdc
4
- data.tar.gz: 04cbf8ec7ee2fd753d25a171925bf1d45f61850c2c0ae5f794894f1494be60c6
3
+ metadata.gz: 02c1db1cefd43c90ea04e40096c2bbe73a932827259cc1e249cd830dde64e949
4
+ data.tar.gz: 3339fb93550f9bdb819b5c7278d5905fd9da0481096115cccaa8eca74f1a704c
5
5
  SHA512:
6
- metadata.gz: 003734ea51a3c498ee9a49413c0d59a08f48be07183b88491f283eee82cae5beae103a307eb1e7d4c98cfb48c8c720cdf0f4c1b32ebf7ea5861de76d4aeeed16
7
- data.tar.gz: 48876f4adbbb31f1e34d1593b931c5ac6c62b3525cd626c05aecb1a64adc7eacde058fb46a6a74038de2b3de0a0b866b4c9ba6199f7cde355856fb48e59f831d
6
+ metadata.gz: eaadc382fd654d49eb8b5c8f9ce40a71f19f01a9181ddbac397cd378baa839706f46578e8428724e2a7b31471159476b8c2b9209cd7a07db81ad3304fd6d35b8
7
+ data.tar.gz: 4f876c41e037302bcbc4759c442d3466cc9ba30a188a219a7414256bdddb22c7e2777f5b7cc4c005b5f8de2b7f3eefffe7b9b61d79f3a1d0b1b9b65e1b2890aa
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub __FILE__
4
+ EacRubyUtils.require_sub __FILE__
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub __FILE__
4
+ EacRubyUtils.require_sub __FILE__
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub __FILE__
4
+ EacRubyUtils.require_sub __FILE__
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_templates/sources/from_gem'
4
- ::EacTemplates::Sources::FromGem.include_all
4
+ EacTemplates::Sources::FromGem.include_all
@@ -27,7 +27,7 @@ module EacTemplates
27
27
  ::EacTemplates::Sources::File.by_subpath(self, nil, subpath, source_set: self)
28
28
  end
29
29
 
30
- def template(subpath, required = true)
30
+ def template(subpath, required = true) # rubocop:disable Style/OptionalBooleanParameter
31
31
  found_file = file(subpath)
32
32
  return found_file if found_file.found?
33
33
 
@@ -47,8 +47,9 @@ module EacTemplates
47
47
  private
48
48
 
49
49
  def raise_template_not_found(subpath)
50
- raise ::EacTemplates::Abstract::NotFoundError, 'Template not found for subpath ' \
51
- "\"#{subpath}\" (Included paths: #{included_paths.to_a.join(::File::PATH_SEPARATOR)})"
50
+ raise ::EacTemplates::Abstract::NotFoundError,
51
+ 'Template not found for subpath ' \
52
+ "\"#{subpath}\" (Included paths: #{included_paths.to_a.join(::File::PATH_SEPARATOR)})"
52
53
  end
53
54
  end
54
55
  end
@@ -35,9 +35,9 @@ module EacTemplates
35
35
  private
36
36
 
37
37
  def variables_uncached
38
- content.scan(VARIABLE_PATTERN).map(&:first).map do |name|
38
+ content.scan(VARIABLE_PATTERN).map(&:first).to_set do |name| # rubocop:disable Style/MapToSet
39
39
  sanitize_variable_name(name)
40
- end.to_set
40
+ end
41
41
  end
42
42
 
43
43
  def sanitize_variable_name(variable_name)
@@ -35,10 +35,9 @@ module EacTemplates
35
35
  private
36
36
 
37
37
  def apply_fs_object(source_relative, target)
38
- if ::File.directory?(source_absolute(source_relative))
39
- apply_directory(source_relative, target)
40
- elsif ::File.file?(source_absolute(source_relative))
41
- end
38
+ return unless ::File.directory?(source_absolute(source_relative))
39
+
40
+ apply_directory(source_relative, target)
42
41
  end
43
42
 
44
43
  def source_absolute(source_relative)
@@ -15,7 +15,8 @@ module EacTemplates
15
15
  def variable_value(name)
16
16
  return variable_fetch(name) if variable_exist?(name)
17
17
 
18
- raise VariableNotFoundError, "Variable \"#{name}\" not found in #{source}"
18
+ raise ::EacTemplates::Variables::NotFoundError,
19
+ "Variable \"#{name}\" not found in #{source}"
19
20
  end
20
21
  end
21
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTemplates
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.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.5.0
4
+ version: 0.5.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: 2023-05-04 00:00:00.000000000 Z
11
+ date: 2024-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_config
@@ -16,42 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.12'
19
+ version: '0.14'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.14.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '0.12'
29
+ version: '0.14'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.14.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: eac_ruby_utils
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '0.112'
39
+ version: '0.121'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '0.112'
46
+ version: '0.121'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: eac_ruby_gem_support
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 0.5.1
53
+ version: '0.10'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 0.5.1
60
+ version: '0.10'
55
61
  description:
56
62
  email:
57
63
  executables: []
@@ -112,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
118
  requirements:
113
119
  - - ">="
114
120
  - !ruby/object:Gem::Version
115
- version: '0'
121
+ version: '2.7'
116
122
  required_rubygems_version: !ruby/object:Gem::Requirement
117
123
  requirements:
118
124
  - - ">="