cucumber_monitor 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/cucumber_monitor_controller.rb +3 -1
- data/app/views/cucumber_monitor/_search_form.html.erb +2 -2
- data/app/views/cucumber_monitor/features.html.erb +5 -5
- data/app/views/cucumber_monitor/search.html.erb +27 -8
- data/app/views/cucumber_monitor/show_feature.html.erb +5 -5
- data/config/locales/cucumber_monitor_views.yml +53 -0
- data/lib/cucumber_monitor/array.rb +1 -1
- data/lib/cucumber_monitor/version.rb +1 -1
- metadata +4 -3
@@ -11,7 +11,9 @@ class CucumberMonitorController < ApplicationController
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def search
|
14
|
-
|
14
|
+
features = CucumberMonitor.new.features.where(name: params[:criteria])
|
15
|
+
@features_search_results = features.kind_of?(Array) ? features : [features]
|
16
|
+
@steps_search_results = CucumberMonitor.new.search(params[:criteria])
|
15
17
|
end
|
16
18
|
|
17
19
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<h1
|
1
|
+
<h1><%= t(".title") %></h1>
|
2
2
|
|
3
3
|
<p>
|
4
|
-
|
4
|
+
<%= t(".total_features_note", total: @features.size) %>
|
5
5
|
</p>
|
6
6
|
|
7
7
|
<%= render 'search_form' %>
|
@@ -9,9 +9,9 @@ Você tem <%= @features.size %> features do Cucumber.
|
|
9
9
|
<table class='table table-bordered table-striped'>
|
10
10
|
<tr>
|
11
11
|
<th class="col3">#</th>
|
12
|
-
<th
|
13
|
-
<th
|
14
|
-
<th class="col25"
|
12
|
+
<th><%= t(".table.th.name") %></th>
|
13
|
+
<th><%= t(".table.th.description") %></th>
|
14
|
+
<th class="col25"><%= t(".table.th.file") %></th>
|
15
15
|
</tr>
|
16
16
|
<% @features.each_with_index do |feature, i|%>
|
17
17
|
<tr class="<%= cycle('even','odd') %>">
|
@@ -1,22 +1,41 @@
|
|
1
|
-
<h1
|
1
|
+
<h1><%= t(".title") %></h1>
|
2
2
|
|
3
3
|
<%= render 'search_form' %>
|
4
4
|
|
5
5
|
<p>
|
6
|
-
<%= link_to "
|
6
|
+
<%= link_to t("links.back_to_features_link"), features_cucumber_monitor_path %>
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<div class="feature_container">
|
10
|
-
<h4
|
10
|
+
<h4><%= t(".features_search_results") %></h4>
|
11
11
|
<div class="steps">
|
12
|
-
<% @
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
<% if @features_search_results.any? %>
|
13
|
+
<% @features_search_results.each do |feature| %>
|
14
|
+
<strong><%= feature.description %></strong><br />
|
15
|
+
<em>(<%= feature.name %>. <%= feature.description %>. <%= t(".file") %>: <%= link_to feature.file, show_feature_cucumber_monitor_path(feature.name) %>)</em>
|
16
|
+
<hr />
|
17
|
+
<% end %>
|
18
|
+
<% else %>
|
19
|
+
<%= t(".results_not_found_for", criteria: params[:criteria]).html_safe %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="feature_container">
|
25
|
+
<h4><%= t(".steps_search_results") %></h4>
|
26
|
+
<div class="steps">
|
27
|
+
<% if @steps_search_results.any? %>
|
28
|
+
<% @steps_search_results.each do |step| %>
|
29
|
+
<strong><%= step.description %></strong><br />
|
30
|
+
<em>(<%= "#{t(".scope")}: #{step.parent.name}" %>. <%= t(".file") %>: <%= link_to step.parent.feature.file, show_feature_cucumber_monitor_path(step.parent.feature.name) %>)</em>
|
31
|
+
<hr />
|
32
|
+
<% end %>
|
33
|
+
<% else %>
|
34
|
+
<%= t(".results_not_found_for", criteria: params[:criteria]).html_safe %>
|
16
35
|
<% end %>
|
17
36
|
</div>
|
18
37
|
</div>
|
19
38
|
|
20
39
|
<p>
|
21
|
-
<%= link_to "
|
40
|
+
<%= link_to t("links.back_to_features_link"), features_cucumber_monitor_path %>
|
22
41
|
</p>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<%= stylesheet_link_tag 'cucumber_monitor' %>
|
2
2
|
|
3
|
-
<h1
|
3
|
+
<h1><%= "#{t(".feature")} #{@feature.name}" %></h1>
|
4
4
|
|
5
5
|
<h3><%= @feature.description %></h3>
|
6
6
|
|
7
7
|
<p>
|
8
|
-
<%= link_to "
|
8
|
+
<%= link_to t("links.back_to_features_link"), features_cucumber_monitor_path %>
|
9
9
|
</p>
|
10
10
|
|
11
11
|
<% if @feature.contexts.any? %>
|
12
12
|
<div class="feature_container context">
|
13
13
|
<% @feature.contexts.each do |context|%>
|
14
|
-
<h4
|
14
|
+
<h4><%= t(".background") %></h4>
|
15
15
|
<div class="steps">
|
16
16
|
<% context.steps.each do |step| %>
|
17
17
|
<%= step.formatted.html_safe %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
<div class="feature_container">
|
28
28
|
<% @feature.scenarios.each_with_index do |scenario, i|%>
|
29
|
-
<h4
|
29
|
+
<h4><%= "#{t(".scenario")} #{scenario.name}" %></h4>
|
30
30
|
<div class="steps">
|
31
31
|
<% scenario.steps.each do |step| %>
|
32
32
|
<%= step.formatted.html_safe %>
|
@@ -38,4 +38,4 @@
|
|
38
38
|
<% end %>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<%= link_to "
|
41
|
+
<%= link_to t("links.back_to_features_link"), features_cucumber_monitor_path %>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
"pt-BR":
|
2
|
+
buttons:
|
3
|
+
search: Buscar
|
4
|
+
links:
|
5
|
+
back_to_features_link: Voltar para lista de funcionalidades
|
6
|
+
cucumber_monitor:
|
7
|
+
features:
|
8
|
+
title: Funcionalidades do Cucumber
|
9
|
+
total_features_note: "Você tem %{total} funcionalidades"
|
10
|
+
table:
|
11
|
+
th:
|
12
|
+
name: Nome
|
13
|
+
description: Descrição
|
14
|
+
file: Arquivo
|
15
|
+
show_feature:
|
16
|
+
feature: Funcionalidade
|
17
|
+
background: Contexto
|
18
|
+
scenario: Cenário
|
19
|
+
search:
|
20
|
+
title: Busca
|
21
|
+
search_results: Resultados da busca
|
22
|
+
features_search_results: Resultado da busca por funcionalidades
|
23
|
+
steps_search_results: Resultado da busca por passos
|
24
|
+
scope: Escopo
|
25
|
+
file: Arquivo
|
26
|
+
results_not_found_for: "Nenhum resultado encontrado para '<strong>%{criteria}</strong>'"
|
27
|
+
|
28
|
+
"en":
|
29
|
+
buttons:
|
30
|
+
search: Search
|
31
|
+
links:
|
32
|
+
back_to_features_link: Back to features list
|
33
|
+
cucumber_monitor:
|
34
|
+
features:
|
35
|
+
title: Cucumber Features
|
36
|
+
total_features_note: "You have %{total} features"
|
37
|
+
table:
|
38
|
+
th:
|
39
|
+
name: name
|
40
|
+
description: Description
|
41
|
+
file: File
|
42
|
+
show_feature:
|
43
|
+
feature: Feature
|
44
|
+
background: Background
|
45
|
+
scenario: Scenario
|
46
|
+
search:
|
47
|
+
title: Search
|
48
|
+
search_results: Search results
|
49
|
+
features_search_results: Features search results
|
50
|
+
steps_search_results: Steps search results
|
51
|
+
scope: Scope
|
52
|
+
file: File
|
53
|
+
results_not_found_for: "Results not found for '<strong>%{criteria}</strong>'"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- app/views/cucumber_monitor/show_feature.html.erb
|
59
59
|
- app/views/layouts/cucumber_monitor.html.erb
|
60
60
|
- config/locales/cucumber_monitor.yml
|
61
|
+
- config/locales/cucumber_monitor_views.yml
|
61
62
|
- config/routes.rb
|
62
63
|
- lib/cucumber_monitor/array.rb
|
63
64
|
- lib/cucumber_monitor/base.rb
|
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
version: '0'
|
125
126
|
requirements: []
|
126
127
|
rubyforge_project:
|
127
|
-
rubygems_version: 1.8.
|
128
|
+
rubygems_version: 1.8.22
|
128
129
|
signing_key:
|
129
130
|
specification_version: 3
|
130
131
|
summary: Puts your features in a highlighted position. Adds a dashboard for viewing,
|