marmottawrapper 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/marmottawrapper.rb +4 -4
- data/lib/marmottawrapper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc334acf5ee7fa1d50ccfacd44499e4d2b99e9b2
|
4
|
+
data.tar.gz: bac6fb1a7e94fd32d81c594798405f2a4f9facf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbef11c29017578ba091caf1ba6e8d7424862e75c87e53dca9b2afb30ce7de5591b7cea380c8f87cb51f806d5b44890c930ee65814954e40ca4feea78088b61b
|
7
|
+
data.tar.gz: b1759e9a858be07c0d6adf022c8060f09609ed497e5082504992e9ecaf9e8d64e98092c7ca5bbfced52c2ada1509eb7f753c87f810aac18e54bbafc8de21e8ef
|
data/lib/marmottawrapper.rb
CHANGED
@@ -16,7 +16,7 @@ class Marmottawrapper
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def url
|
19
|
-
@url ||= defined?(
|
19
|
+
@url ||= defined?(MARMOTTA_TARBALL_URL) ? MARMOTTA_TARBALL_URL : "https://github.com/dpla/marmottawrapper/releases/download/v0.0.5/tomcat-marmotta.tgz"
|
20
20
|
end
|
21
21
|
|
22
22
|
def marmotta_dir
|
@@ -36,7 +36,7 @@ class Marmottawrapper
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def clean
|
39
|
-
File.delete(tarball)
|
39
|
+
File.delete(tarball) if File.exists?(tarball)
|
40
40
|
FileUtils.rm_rf(tomcat_dir) if File.directory?(tomcat_dir)
|
41
41
|
FileUtils.rm_rf(marmotta_dir) if File.directory?(marmotta_dir)
|
42
42
|
end
|
@@ -44,7 +44,7 @@ class Marmottawrapper
|
|
44
44
|
##
|
45
45
|
# Fetch the Tomcat/Marmotta distribution
|
46
46
|
def fetch
|
47
|
-
File.delete(tarball)
|
47
|
+
File.delete(tarball) if File.exists?(tarball)
|
48
48
|
FileUtils.makedirs(tmp_dir) unless File.directory?(tmp_dir)
|
49
49
|
open(tarball, 'wb') do |tm|
|
50
50
|
tm.write(open(url).read)
|
@@ -55,7 +55,7 @@ class Marmottawrapper
|
|
55
55
|
fetch unless File.exists?(tarball)
|
56
56
|
FileUtils.makedirs(marmotta_dir) unless File.directory?(marmotta_dir)
|
57
57
|
tb = Zlib::GzipReader.new(File.open(tarball, 'rb'))
|
58
|
-
Archive::Tar::Minitar.unpack(tb, app_root.
|
58
|
+
Archive::Tar::Minitar.unpack(tb, app_root.to_s)
|
59
59
|
end
|
60
60
|
|
61
61
|
##
|