eco-rake 0.2.11 → 0.2.13
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/CHANGELOG.md +14 -2
- data/lib/eco-rake/lib/task/runner_launch.rb +16 -5
- data/lib/eco-rake/subtask.rb +4 -0
- data/lib/eco-rake/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fa2f6b50e9f4d3e5d1f14b7f5cf7a19de136fc43374a2851a11f8b2906ce96e
|
4
|
+
data.tar.gz: bfe879b5318215faa020ced4cba5190493a45938c396833313101d2a87558c52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c45dbb6ebd27e1c6093f45228b551142d3ac61d741fdf6c061b93f05bdebcb687bebc59ebe470088261d42e8b288a3c3f01bdef3495e86fe58c33a5d739c8ef
|
7
|
+
data.tar.gz: ba7997121ccd67390febb2256323f3207556e5bea4c6114bd3fbd010a36ec623e7336e3a792c3d3d2e6382dee8e3d5f99f407cbf3c456ffb1da896421d638900
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
## [0.2.
|
5
|
+
## [0.2.14] - 2025-02-xx
|
6
6
|
|
7
7
|
### Added
|
8
8
|
|
@@ -10,7 +10,19 @@ All notable changes to this project will be documented in this file.
|
|
10
10
|
|
11
11
|
### Fixed
|
12
12
|
|
13
|
-
## [0.2.
|
13
|
+
## [0.2.13] - 2025-02-25
|
14
|
+
|
15
|
+
### Fixed
|
16
|
+
|
17
|
+
- Task option name compatibility on ruby command.
|
18
|
+
|
19
|
+
## [0.2.12] - 2025-02-25
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
|
23
|
+
- Backwards compatibility on task runners.
|
24
|
+
|
25
|
+
## [0.2.11] - 2025-02-25
|
14
26
|
|
15
27
|
### Fixed
|
16
28
|
|
@@ -14,11 +14,22 @@ class EcoRake
|
|
14
14
|
attr_const :target_enviro, required: true
|
15
15
|
option_reopen :enviro, default_lookup: :target_enviro
|
16
16
|
|
17
|
-
option_reopen :task, type: [], desc: 'Target task to run', required: true
|
18
|
-
|
19
17
|
# Offer native way to declare tasks
|
20
18
|
class << self
|
19
|
+
def task_option
|
20
|
+
option_get(:task)
|
21
|
+
end
|
22
|
+
|
21
23
|
def subtask(name, desc = nil, **kargs, &block)
|
24
|
+
unless task_option&.enum?
|
25
|
+
option_reopen(
|
26
|
+
:task,
|
27
|
+
type: [],
|
28
|
+
desc: 'Target task to run',
|
29
|
+
required: true
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
22
33
|
EcoRake::Subtask.new(name, desc, **kargs, &block).tap do |subtask|
|
23
34
|
raise "Task '#{name}' is already defined" if subtasks.key?(subtask.name)
|
24
35
|
|
@@ -39,10 +50,10 @@ class EcoRake
|
|
39
50
|
def task(*args)
|
40
51
|
if (callback = target_subtask.callback)
|
41
52
|
instance_exec(*args, &callback)
|
42
|
-
elsif respond_to?(target_subtask.
|
43
|
-
send(target_subtask.
|
53
|
+
elsif respond_to?(target_subtask.command_name, true)
|
54
|
+
send(target_subtask.command_name)
|
44
55
|
else
|
45
|
-
msg = "Undefined method to perform '#{target_subtask.
|
56
|
+
msg = "Undefined method to perform '#{target_subtask.command_name}'"
|
46
57
|
raise msg
|
47
58
|
end
|
48
59
|
end
|
data/lib/eco-rake/subtask.rb
CHANGED
data/lib/eco-rake/version.rb
CHANGED