eac_templates 0.2.0 → 0.3.0

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: 4b08055198ad24804549c202f6d2745d6f8be3e1f2e7439ea736e66420a50e33
4
- data.tar.gz: 72016290a6f36b2d3fd0a7064fcb9d640a44edd9dad291bb1f8f4a4c0c44790c
3
+ metadata.gz: 7f12706546bf46d8517098bc6c070cfc6fb805dc160c4eb0e9a8216f7d46852e
4
+ data.tar.gz: 88ed7d531bb707d9b9c0b03abf4dd40ca8444976ad6d9cdd6b5558f184706ce2
5
5
  SHA512:
6
- metadata.gz: ff3beaf8ea770953ed37043944a725d045b27db070faa53e5d4bc1e6a3f91166c13b1c97b59626b41adbe63e28ebee3cbf3992a184c760a4090f4f30f6757d96
7
- data.tar.gz: fe944bafe9c0b6a62d0f00fd2ed6da628b4f7865d5d86ea52bff9573e58c2f7d662b43ec593ae4a63876145bbe0eb46dc6920734d7e50362edb36f3b7ffd4a24
6
+ metadata.gz: 8673350ac1bcca993d36c03ecc8564707e3f3c72ec2428adfdaaaca9e8298ee1885677b4ddfa71f08f02628490d38fae6373273813478384400a29e1cd1dfb06
7
+ data.tar.gz: cc714645f6104566f1a15fc8d439bf95048f5ea82bf81f1e82796c4407b29a8a44b7a4a90aed98eb262ca248c5764a89303c3fa2a80933d0878b4ae032141429
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/patches'
4
+ require 'eac_templates/from_all_gems'
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/from_gem'
4
+ ::EacTemplates::FromGem.include_all
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/searcher'
4
+
5
+ module EacTemplates
6
+ class FromGem
7
+ class << self
8
+ def include_all(searcher = nil)
9
+ ::Gem::Specification.each { |gemspec| new(gemspec, searcher).include }
10
+ end
11
+ end
12
+
13
+ TEMPLATES_DIR_SUBPATH = 'template'
14
+
15
+ common_constructor :gemspec, :searcher, default: [nil] do
16
+ self.searcher ||= ::EacTemplates::Searcher.default
17
+ end
18
+
19
+ # @return [Boolean]
20
+ delegate :exist?, to: :path
21
+
22
+ # @return [Pathname]
23
+ def include
24
+ return nil unless exist?
25
+
26
+ searcher.included_paths << path
27
+ path
28
+ end
29
+
30
+ # @return [Pathname]
31
+ def path
32
+ gemspec.gem_dir.to_pathname.join(TEMPLATES_DIR_SUBPATH)
33
+ end
34
+ end
35
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTemplates
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
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.2.0
4
+ version: 0.3.0
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: 2021-09-24 00:00:00.000000000 Z
11
+ date: 2021-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_config
@@ -59,8 +59,11 @@ extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
61
  - lib/eac_templates.rb
62
+ - lib/eac_templates/core_ext.rb
62
63
  - lib/eac_templates/directory.rb
63
64
  - lib/eac_templates/file.rb
65
+ - lib/eac_templates/from_all_gems.rb
66
+ - lib/eac_templates/from_gem.rb
64
67
  - lib/eac_templates/patches.rb
65
68
  - lib/eac_templates/patches/module.rb
66
69
  - lib/eac_templates/patches/module/erb_template.rb