rggen-core 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rggen/core/builder/plugin_manager.rb +18 -5
- data/lib/rggen/core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7915fd6d79d893307c6b14ef89fa805139615cfd12e7400c68098a14e824fe0d
|
4
|
+
data.tar.gz: 0f41b79d7df0cfd60b46d30a411d168e1ba4bfafb337c2af1ca87616e4cdf296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3982fd1243a0181d48e3588c58493fb14457a476d1615c23e54583a09b42fe53e7625dced0405d6d6deaca22a1673f49ceb1568840ec66a8c8bbbd5f52dbaa8b
|
7
|
+
data.tar.gz: ac8fbcebc7f56751455069e11e972e319e38a379e8bf1855537444bcfb82f2fbb34f03f419e1079552fce44176ea94c56e3311a0c0b0dbfe4e9b5b6019123a2e
|
@@ -30,13 +30,13 @@ module RgGen
|
|
30
30
|
|
31
31
|
def load_plugin(setup_path_or_name)
|
32
32
|
setup_path_or_name = setup_path_or_name.to_s.strip
|
33
|
-
setup_path =
|
33
|
+
setup_path, root_dir =
|
34
34
|
if setup_file_directly_given?(setup_path_or_name)
|
35
|
-
setup_path_or_name
|
35
|
+
[setup_path_or_name, extract_root_dir(setup_path_or_name)]
|
36
36
|
else
|
37
|
-
get_setup_path(setup_path_or_name)
|
37
|
+
[get_setup_path(setup_path_or_name), nil]
|
38
38
|
end
|
39
|
-
read_setup_file(setup_path, setup_path_or_name)
|
39
|
+
read_setup_file(setup_path, setup_path_or_name, root_dir)
|
40
40
|
end
|
41
41
|
|
42
42
|
def load_plugins(plugins, no_default_plugins, activation = true)
|
@@ -69,13 +69,26 @@ module RgGen
|
|
69
69
|
File.basename(setup_path_or_name, '.*') == 'setup'
|
70
70
|
end
|
71
71
|
|
72
|
+
def extract_root_dir(setup_path)
|
73
|
+
Pathname
|
74
|
+
.new(setup_path)
|
75
|
+
.ascend.find(&method(:rggen_dir?))
|
76
|
+
&.parent
|
77
|
+
&.to_s
|
78
|
+
end
|
79
|
+
|
80
|
+
def rggen_dir?(path)
|
81
|
+
path.each_filename.to_a[-2..-1] == ['lib', 'rggen']
|
82
|
+
end
|
83
|
+
|
72
84
|
def get_setup_path(name)
|
73
85
|
base, sub_directory = name.split('/', 2)
|
74
86
|
base = base.sub(/^rggen[-_]/, '').tr('-', '_')
|
75
87
|
File.join(*['rggen', base, sub_directory, 'setup'].compact)
|
76
88
|
end
|
77
89
|
|
78
|
-
def read_setup_file(setup_path, setup_path_or_name)
|
90
|
+
def read_setup_file(setup_path, setup_path_or_name, root_dir)
|
91
|
+
root_dir && $LOAD_PATH.unshift(root_dir)
|
79
92
|
require setup_path
|
80
93
|
rescue ::LoadError
|
81
94
|
message =
|
data/lib/rggen/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rggen-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taichi Ishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docile
|
@@ -215,5 +215,5 @@ requirements: []
|
|
215
215
|
rubygems_version: 3.2.3
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
|
-
summary: rggen-core-0.25.
|
218
|
+
summary: rggen-core-0.25.1
|
219
219
|
test_files: []
|