cucumberhtml 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8f8f7166be7d9443887da870ba68b92979df7ca102c6c9b9deeb4af4491983e
4
- data.tar.gz: 83ab32b1a86ca47c87baedc00592037b1f49e7e262e64646da6acab7ffa7fd25
3
+ metadata.gz: c938beb36ef059aa255e098f578514b5146725cfec48d122aaabe1ab999041c5
4
+ data.tar.gz: 6f5a1a6424c4f0184ddce685c9abab5b887565fb5585558eea7ce65f7f30e5e7
5
5
  SHA512:
6
- metadata.gz: b040b3aac6e075840cf777428709eac652b1e404c022fbece36c626d032577175ccfebb9154fc9e30d1457dabadd86f781580da41284b7e77765100c45d0b9a3
7
- data.tar.gz: e482b269cac18ef4cb7052efa562a46b5ed7dca2988dbfdc195832cfa77a992ce3334682c55cebb0d0b6b221710735a574089d3335465f95d26bf7c48f8c013b
6
+ metadata.gz: 5a70cd2ec4755e015f75909de140f0efe4f01b1111311d37c86379f5ccab26795931017f6170798aea05f08286686454028c842122b79d87e321b2fa6f8319b3
7
+ data.tar.gz: 047b15f68ca736f4a41a07d713f5db8a3c59a1dc5706b76e3eafaa7ee4c96ccdd31ae2c8e473faef706556eb60283ffc86fb28341b2a24e87d5c8832476a9a7c
@@ -4,7 +4,7 @@ module CucumberToHtml::Cell
4
4
  class Gherkin < Cucumberhtml::Cell
5
5
  def feature_menu_list
6
6
  res = '<div class="list-group" id="list-tab" role="tablist">'
7
- model.each_with_index do |feature, index|
7
+ sorted_feature_list.each_with_index do |feature, index|
8
8
  res += Feature.call(feature, active: index.zero?).call(:feature_menu_item)
9
9
  end
10
10
  res + '</div>'
@@ -12,10 +12,16 @@ module CucumberToHtml::Cell
12
12
 
13
13
  def feature_list
14
14
  res = '<div class="tab-content" id="nav-tabContent">'
15
- model.each_with_index do |feature, index|
15
+ sorted_feature_list.each_with_index do |feature, index|
16
16
  res += Feature.call(feature, active: index.zero?).call
17
17
  end
18
18
  res + '</div>'
19
19
  end
20
+
21
+ private
22
+
23
+ def sorted_feature_list
24
+ model.sort_by { |a| a[:name] }
25
+ end
20
26
  end
21
27
  end
@@ -5,7 +5,7 @@ html
5
5
  link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous"
6
6
  script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"
7
7
  script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"
8
- script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"
8
+ script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"
9
9
  title Stories
10
10
  body
11
11
  .container
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cucumberhtml
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumberhtml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Axel Nielsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-03 00:00:00.000000000 Z
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop