cucumberhtml 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -0
- data/app/concepts/cucumber_to_html/cell/gherkin.rb +2 -2
- data/app/concepts/cucumber_to_html/cell/scenario.rb +1 -2
- data/app/controllers/cucumberhtml/application_controller.rb +2 -0
- data/config/routes.rb +2 -0
- data/lib/cucumberhtml/cell.rb +3 -2
- data/lib/cucumberhtml/engine.rb +2 -0
- data/lib/cucumberhtml/railtie.rb +14 -0
- data/lib/cucumberhtml/version.rb +3 -1
- data/lib/cucumberhtml.rb +3 -3
- data/lib/tasks/cucumberhtml.rake +23 -0
- metadata +8 -7
- data/lib/tasks/cucumberhtml_tasks.rake +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8f8f7166be7d9443887da870ba68b92979df7ca102c6c9b9deeb4af4491983e
|
4
|
+
data.tar.gz: 83ab32b1a86ca47c87baedc00592037b1f49e7e262e64646da6acab7ffa7fd25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b040b3aac6e075840cf777428709eac652b1e404c022fbece36c626d032577175ccfebb9154fc9e30d1457dabadd86f781580da41284b7e77765100c45d0b9a3
|
7
|
+
data.tar.gz: e482b269cac18ef4cb7052efa562a46b5ed7dca2988dbfdc195832cfa77a992ce3334682c55cebb0d0b6b221710735a574089d3335465f95d26bf7c48f8c013b
|
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ module CucumberToHtml::Cell
|
|
5
5
|
def feature_menu_list
|
6
6
|
res = '<div class="list-group" id="list-tab" role="tablist">'
|
7
7
|
model.each_with_index do |feature, index|
|
8
|
-
res += Feature.call(feature, active: index
|
8
|
+
res += Feature.call(feature, active: index.zero?).call(:feature_menu_item)
|
9
9
|
end
|
10
10
|
res + '</div>'
|
11
11
|
end
|
@@ -13,7 +13,7 @@ module CucumberToHtml::Cell
|
|
13
13
|
def feature_list
|
14
14
|
res = '<div class="tab-content" id="nav-tabContent">'
|
15
15
|
model.each_with_index do |feature, index|
|
16
|
-
res += Feature.call(feature, active: index
|
16
|
+
res += Feature.call(feature, active: index.zero?).call
|
17
17
|
end
|
18
18
|
res + '</div>'
|
19
19
|
end
|
data/config/routes.rb
CHANGED
data/lib/cucumberhtml/cell.rb
CHANGED
data/lib/cucumberhtml/engine.rb
CHANGED
data/lib/cucumberhtml/version.rb
CHANGED
data/lib/cucumberhtml.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cucumberhtml/engine'
|
2
4
|
require 'cucumberhtml/cell'
|
3
|
-
|
4
|
-
# require 'app/concepts/cucumber_to_html/cell/gherkin'
|
5
|
+
require 'cucumberhtml/railtie' if defined?(Rails)
|
5
6
|
|
6
7
|
module Cucumberhtml
|
7
|
-
# Your code goes here...
|
8
8
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CucumberToHtml
|
4
|
+
end
|
5
|
+
|
6
|
+
require 'cells-rails'
|
7
|
+
|
8
|
+
require_relative '../../app/concepts/cucumber_to_html/cell/gherkin'
|
9
|
+
|
10
|
+
namespace :cucumberhtml do
|
11
|
+
desc 'Exporting cucumber html'
|
12
|
+
task :export, %i[filename outfile] => :environment do |_t, args|
|
13
|
+
filename = args[:filename] || 'tmp/cucumber_result.json'
|
14
|
+
outfile = args[:outfile] || 'tmp/cucumber_result.html'
|
15
|
+
|
16
|
+
file = File.read(filename)
|
17
|
+
json = JSON.parse(file)
|
18
|
+
html = CucumberToHtml::Cell::Gherkin.call(json)
|
19
|
+
open(outfile, 'w') do |f|
|
20
|
+
f << html
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumberhtml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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-
|
11
|
+
date: 2018-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
type: :
|
20
|
+
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: cells-
|
28
|
+
name: cells-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: cells-slim
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -93,8 +93,9 @@ files:
|
|
93
93
|
- lib/cucumberhtml.rb
|
94
94
|
- lib/cucumberhtml/cell.rb
|
95
95
|
- lib/cucumberhtml/engine.rb
|
96
|
+
- lib/cucumberhtml/railtie.rb
|
96
97
|
- lib/cucumberhtml/version.rb
|
97
|
-
- lib/tasks/
|
98
|
+
- lib/tasks/cucumberhtml.rake
|
98
99
|
homepage: https://www.github.com/lucalabs/cucumberhtml
|
99
100
|
licenses:
|
100
101
|
- MIT
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module CucumberToHtml
|
2
|
-
end
|
3
|
-
|
4
|
-
require 'cells-rails'
|
5
|
-
|
6
|
-
require_relative '../../app/concepts/cucumber_to_html/cell/gherkin'
|
7
|
-
|
8
|
-
|
9
|
-
namespace :cucumberhtml do
|
10
|
-
task :export, [:filename, :outfile] => :environment do |_t, args|
|
11
|
-
desc 'Exporting cucumber html'
|
12
|
-
filename = args[:filename] || 'tmp/cucumber_result.json'
|
13
|
-
outfile = args[:outfile] || 'tmp/cucumber_result.html'
|
14
|
-
|
15
|
-
file = File.read(filename)
|
16
|
-
json = JSON.parse(file)
|
17
|
-
html = CucumberToHtml::Cell::Gherkin.call(json)
|
18
|
-
open(outfile, 'w') do |f|
|
19
|
-
f << html
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# task export3: :environment, :filename do |_t, args|
|
24
|
-
# desc 'Exporting cucumber html'
|
25
|
-
# filename ='tmp/cucumber_result.json'
|
26
|
-
# outfile = 'tmp/cucumber_result.html'
|
27
|
-
#
|
28
|
-
# file = File.read(filename)
|
29
|
-
# json = JSON.parse(file)
|
30
|
-
# html = CucumberToHtml::Cell::Gherkin.call(json)
|
31
|
-
# open(outfile, 'w') do |f|
|
32
|
-
# f << html
|
33
|
-
# end
|
34
|
-
# end
|
35
|
-
end
|