miga-base 0.7.12.1 → 0.7.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/browse.rb +3 -2
- data/lib/miga/result.rb +9 -7
- data/lib/miga/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: c57b841cc84841ebfd868af862204179e443d37eb4ec5550ea9ef7df63b9d933
|
4
|
+
data.tar.gz: 5512fe8305c2b6193f5d1a5c99e663ef480be32db2e8bdc7087826bdeeae5b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e095dded680c2a6d1519d8fc8788d4d44cf523fc84b9e67ee453dffb9f05c75e2acafc283b511f6b27638e678d53f7362b056f35d18d5b08893419c7d24302
|
7
|
+
data.tar.gz: efac7f7c3d65640b64dc6d9b32e3bd520faebda05a72f1b88a2ee4c11546b5366db1ac42ea296ba73fe1f7873244a9f64791a180c9094a374a7ebbf1c589d491
|
@@ -46,7 +46,8 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
|
|
46
46
|
|
47
47
|
# Summaries
|
48
48
|
summaries = Dir["#{p.path}/*.tsv"].map do |i|
|
49
|
-
|
49
|
+
b = File.basename(i)
|
50
|
+
"<li><a href='../#{b}'>#{b}</a></li>"
|
50
51
|
end.join('')
|
51
52
|
|
52
53
|
# Project index page
|
@@ -162,7 +163,7 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
|
|
162
163
|
links = []
|
163
164
|
res.each_file do |key, _|
|
164
165
|
name = format_name(key)
|
165
|
-
links << "<a href='
|
166
|
+
links << "<a href='../#{res.file_path(key, true)}'>#{name}</a><br/>"
|
166
167
|
end
|
167
168
|
links.empty? ? nil : links.join('')
|
168
169
|
end
|
data/lib/miga/result.rb
CHANGED
@@ -81,20 +81,22 @@ class MiGA::Result < MiGA::MiGA
|
|
81
81
|
end
|
82
82
|
|
83
83
|
##
|
84
|
-
# Directory containing the result
|
85
|
-
|
86
|
-
|
84
|
+
# Directory containing the result; by default an absolute path, if
|
85
|
+
# +relative+ is true returns the path relative to the parent project
|
86
|
+
def dir(relative = false)
|
87
|
+
relative ? relative_dir : File.dirname(path)
|
87
88
|
end
|
88
89
|
|
89
90
|
##
|
90
|
-
# Absolute path to the file(s) defined by symbol +k
|
91
|
-
|
91
|
+
# Absolute path to the file(s) defined by symbol +k+, or relative
|
92
|
+
# path if +relative+ is true
|
93
|
+
def file_path(k, relative = false)
|
92
94
|
k = k.to_sym
|
93
95
|
f = self[:files].nil? ? nil : self[:files][k]
|
94
96
|
return nil if f.nil?
|
95
|
-
return File.
|
97
|
+
return File.join(dir(relative), f) unless f.is_a? Array
|
96
98
|
|
97
|
-
f.map { |fi| File.
|
99
|
+
f.map { |fi| File.join(dir(relative), fi) }
|
98
100
|
end
|
99
101
|
|
100
102
|
##
|
data/lib/miga/version.rb
CHANGED
@@ -8,7 +8,7 @@ module MiGA
|
|
8
8
|
# - Float representing the major.minor version.
|
9
9
|
# - Integer representing gem releases of the current version.
|
10
10
|
# - Integer representing minor changes that require new version number.
|
11
|
-
VERSION = [0.7, 12,
|
11
|
+
VERSION = [0.7, 12, 2]
|
12
12
|
|
13
13
|
##
|
14
14
|
# Nickname for the current major.minor version.
|