miga-base 0.7.13.0 → 0.7.13.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 964b803e09887476153335589fad3d5aee2861ea
4
- data.tar.gz: ee0d34a4a7c8569d39bea4855a6054c57de78c81
2
+ SHA256:
3
+ metadata.gz: 3065d52418e9cc788496eddd1ae050c91645bfe1c1cf55c18950cf764046d8fc
4
+ data.tar.gz: c4b5b51569ab2b213dcdc4e956f36adf455074aeae372eab90115d1c0fa1d3f7
5
5
  SHA512:
6
- metadata.gz: b84efbc94fbfc848b85ae7c3cca7e26f2baea74c5f066a63cf1ede7fb26ed6c634f4c2e2cbe1c2752e54624cf48d6597b933474d4b4d6083cb505a3b17063cf5
7
- data.tar.gz: 0c7cfc6a149cab5fa1cfc5e386de789f84c132d227ad8ebbbc42dee2b076010bfe06b6697e69efe00a6639283c472f9ca3793a1e113506e691e50a182cfee2c6
6
+ metadata.gz: 25fa750649f05083834a71d84efa8fd036cd3590f0f311cb158da748f6d78ad387eba6351af24a7c2f485f7d97f4af9cc7fc2eca615ae483f8ee052c8a001806
7
+ data.tar.gz: bbe8c5e2bc8630e44fb195704a91b7d7a95401e2fee7933982a775d1c6e1a28868f773a60369c4ca087fe427349ffcc780515f528bff522fbb0cbf008c51f4ae
@@ -46,8 +46,9 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
46
46
 
47
47
  # Summaries
48
48
  summaries = Dir["#{p.path}/*.tsv"].map do |i|
49
- b = File.basename(i)
50
- "<li><a href='../#{b}'>#{b}</a></li>"
49
+ b = File.basename(i, '.tsv')
50
+ generate_summary_page(i, p)
51
+ "<li><a href='s-#{b}.html'>#{format_name(b)}</a></li>"
51
52
  end.join('')
52
53
 
53
54
  # Project index page
@@ -60,6 +61,32 @@ class MiGA::Cli::Action::Browse < MiGA::Cli::Action
60
61
  write_file(p, 'index.html') { build_from_template('index.html', data) }
61
62
  end
62
63
 
64
+ ##
65
+ # Create page for the summary +path+ in project +p+
66
+ def generate_summary_page(path, p)
67
+ b = File.basename(path, '.tsv')
68
+ table = '<table class="table table-hover table-responsive">'
69
+ File.open(path, 'r') do |fh|
70
+ fh.each do |ln|
71
+ r = ln.chomp.split("\t")
72
+ if $. == 1
73
+ table += '<thead><tr>' +
74
+ r.map { |i| "<th scope=col>#{format_name(i)}</th>" }.join(' ') +
75
+ '</tr></thead><tbody>'
76
+ else
77
+ table += "<tr><th scope=row>#{r.shift}</th>" +
78
+ r.map { |i| "<td>#{i}</td>" }.join(' ') + "</tr>"
79
+ end
80
+ end
81
+ end
82
+ table += '</tbody></table>'
83
+ write_file(p, "s-#{b}.html") do
84
+ build_from_template(
85
+ 'summary.html', file: "#{b}.tsv", name: format_name(b), table: table
86
+ )
87
+ end
88
+ end
89
+
63
90
  ##
64
91
  # Create page for dataset +d+ within project +p+
65
92
  def generate_dataset_page(p, d)
@@ -0,0 +1,5 @@
1
+ <h1 class="h2 border-bottom pt-3 pb-2 mb-3">Summary: {{name}}</h1>
2
+ <p class='m-2 mb-3'>
3
+ Based on <a href='../{{file}}'>{{file}}</a>
4
+ </p>
5
+ {{table}}
@@ -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, 13, 0]
11
+ VERSION = [0.7, 13, 1]
12
12
 
13
13
  ##
14
14
  # Nickname for the current major.minor version.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miga-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.13.0
4
+ version: 0.7.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis M. Rodriguez-R
@@ -128,6 +128,7 @@ files:
128
128
  - lib/miga/cli/action/browse/layout.html
129
129
  - lib/miga/cli/action/browse/redirect.html
130
130
  - lib/miga/cli/action/browse/style.css
131
+ - lib/miga/cli/action/browse/summary.html
131
132
  - lib/miga/cli/action/classify_wf.rb
132
133
  - lib/miga/cli/action/console.rb
133
134
  - lib/miga/cli/action/daemon.rb
@@ -560,8 +561,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
560
561
  - !ruby/object:Gem::Version
561
562
  version: '0'
562
563
  requirements: []
563
- rubyforge_project:
564
- rubygems_version: 2.5.2.3
564
+ rubygems_version: 3.1.2
565
565
  signing_key:
566
566
  specification_version: 4
567
567
  summary: MiGA