rbbt-util 5.24.5 → 5.25.0
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/rbbt/resource.rb +3 -3
- data/lib/rbbt/workflow/definition.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 794b4ce4b3d681a3431389504612ad12726ae0b6
|
4
|
+
data.tar.gz: c56db77f71c8f9b5110e42263ba7ef8b20d810dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cb32a3508d30939014a28320fe56a420a76e0fffcb61326b3ade4b1440595f78bfac7fd8ce582b811442e3c81116142207b5d70be5707645c00c35e42d7c3cd
|
7
|
+
data.tar.gz: 418f3e57524983b2837fa573b9c970e3e1db41cb1e8ff6a2bf99381ce25e264320c1d5c613b69736db86a6b0dd9d8e4ba996086aba7280ec46c4bd4179c0450b
|
data/lib/rbbt/resource.rb
CHANGED
@@ -125,7 +125,7 @@ module Resource
|
|
125
125
|
case
|
126
126
|
when @resources.include?(path)
|
127
127
|
type, content = @resources[path]
|
128
|
-
when @resources.include?(path.original)
|
128
|
+
when (Path === path && @resources.include?(path.original))
|
129
129
|
type, content = @resources[path.original]
|
130
130
|
when has_rake(path)
|
131
131
|
type = :rake
|
@@ -151,12 +151,12 @@ module Resource
|
|
151
151
|
final_path = path
|
152
152
|
end
|
153
153
|
|
154
|
-
if not File.exist?
|
154
|
+
if type and not File.exist?(final_path) or force
|
155
155
|
Log.medium "Producing: #{ final_path }"
|
156
156
|
lock_filename = Persist.persistence_path(final_path, {:dir => Resource.lock_dir})
|
157
157
|
Misc.lock lock_filename do
|
158
158
|
FileUtils.rm_rf final_path if force and File.exist? final_path
|
159
|
-
if not File.exist?
|
159
|
+
if not File.exist?(final_path) or force
|
160
160
|
(remote_server and get_from_server(path, final_path)) or
|
161
161
|
begin
|
162
162
|
case type
|
@@ -153,4 +153,19 @@ module Workflow
|
|
153
153
|
end
|
154
154
|
|
155
155
|
alias export export_asynchronous
|
156
|
+
|
157
|
+
def import(source, *args)
|
158
|
+
if args.empty?
|
159
|
+
tasks = source.tasks.collect{|n,t| n} + source.helpers.collect{|n,h| n }
|
160
|
+
else
|
161
|
+
tasks = args.flatten
|
162
|
+
end
|
163
|
+
|
164
|
+
tasks.each do |task|
|
165
|
+
self.tasks[task.to_sym] = source.tasks[task.to_sym] if source.tasks.include? task.to_sym
|
166
|
+
self.task_dependencies[task.to_sym] = source.task_dependencies[task.to_sym] if source.tasks.include? task.to_sym
|
167
|
+
self.task_description[task.to_sym] = source.task_description[task.to_sym] if source.tasks.include? task.to_sym
|
168
|
+
self.helpers[task.to_sym] = source.helpers[task.to_sym] if source.helpers.include? task.to_sym
|
169
|
+
end
|
170
|
+
end
|
156
171
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|