fig 0.1.33 → 0.1.34
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.
- data/lib/fig/environment.rb +1 -4
- data/lib/fig/os.rb +11 -5
- metadata +2 -2
data/lib/fig/environment.rb
CHANGED
|
@@ -151,10 +151,7 @@ module Fig
|
|
|
151
151
|
target = File.join(target, File.basename(file))
|
|
152
152
|
end
|
|
153
153
|
end
|
|
154
|
-
|
|
155
|
-
@os.log_info("retrieving #{target}")
|
|
156
|
-
@os.copy(file, target)
|
|
157
|
-
end
|
|
154
|
+
@os.copy(file, target, "retrieving")
|
|
158
155
|
file = target
|
|
159
156
|
end
|
|
160
157
|
file
|
data/lib/fig/os.rb
CHANGED
|
@@ -246,15 +246,21 @@ module Fig
|
|
|
246
246
|
}
|
|
247
247
|
end
|
|
248
248
|
|
|
249
|
-
def copy(source, target)
|
|
250
|
-
FileUtils.mkdir_p(File.dirname(target))
|
|
249
|
+
def copy(source, target, msg = nil)
|
|
251
250
|
if File.directory?(source)
|
|
252
|
-
source = source + "/."
|
|
253
251
|
FileUtils.mkdir_p(target)
|
|
252
|
+
Dir.foreach(source) do |child|
|
|
253
|
+
if child != "." and child != ".."
|
|
254
|
+
copy(File.join(source, child), File.join(target, child), msg)
|
|
255
|
+
end
|
|
256
|
+
end
|
|
254
257
|
else
|
|
255
|
-
FileUtils.
|
|
258
|
+
if !FileUtils.uptodate?(target, source)
|
|
259
|
+
log_info "#{msg} #{target}" if msg
|
|
260
|
+
FileUtils.mkdir_p(File.dirname(target))
|
|
261
|
+
FileUtils.cp(source, target)
|
|
262
|
+
end
|
|
256
263
|
end
|
|
257
|
-
FileUtils.cp_r(source, target)
|
|
258
264
|
end
|
|
259
265
|
|
|
260
266
|
def move_file(dir, from, to)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fig
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.34
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthew Foemmel
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2011-06-
|
|
12
|
+
date: 2011-06-17 00:00:00 -05:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|