titanic 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/titanic.rb +11 -15
- data/lib/titanic/version.rb +1 -1
- metadata +2 -2
data/lib/titanic.rb
CHANGED
@@ -133,23 +133,19 @@ module Titanic
|
|
133
133
|
|
134
134
|
build_path = archive_path uuid
|
135
135
|
verify ['url', 'prefix']
|
136
|
-
|
137
|
-
log.debug "trying to get @{uri}"
|
136
|
+
full_path = File.join(@url,build_path)
|
138
137
|
begin
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
end
|
149
|
-
rescue
|
150
|
-
raise "could not get #{build_path} from #{@url}"
|
138
|
+
log.debug "trying to download #{full_path}"
|
139
|
+
log.debug "full_path.inspect is #{full_path.inspect}"
|
140
|
+
log.debug "full_path.class is #{full_path.class}"
|
141
|
+
body = URI.parse(full_path).read
|
142
|
+
log.debug "writing file to #{path}"
|
143
|
+
File.open(path, 'w') {|f| f.write(body) }
|
144
|
+
rescue Object => e
|
145
|
+
log.error "could not get #{build_path} from #{@url} because #{e.inspect}"
|
146
|
+
raise e
|
151
147
|
end
|
152
|
-
log.info "downloaded #{
|
148
|
+
log.info "downloaded #{full_path} to #{path}"
|
153
149
|
end
|
154
150
|
|
155
151
|
private
|
data/lib/titanic/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: titanic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|