wally 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/example-features/has-lots-of-tags.feature +5 -0
- data/features/search_features.feature +14 -0
- data/features/step_definitions/search_features_steps.rb +6 -0
- data/lib/wally/version.rb +1 -1
- data/lib/wally/views/feature.haml +1 -3
- data/lib/wally/views/feature_link.haml +6 -0
- data/lib/wally/views/layout.haml +1 -7
- data/lib/wally/views/scenario.haml +2 -10
- data/lib/wally/views/search.haml +4 -0
- data/lib/wally/views/tag_links.haml +4 -0
- metadata +22 -19
@@ -61,3 +61,17 @@ Feature: Search features
|
|
61
61
|
When I search for "btman"
|
62
62
|
Then I should see "Did you mean"
|
63
63
|
And I should see a search result link to "Batman" with the url "/search?q=Batman"
|
64
|
+
|
65
|
+
Scenario: Search displays tags
|
66
|
+
Given a feature file named "sample.feature" with the contents:
|
67
|
+
"""
|
68
|
+
@feature_tag
|
69
|
+
Feature: Batman
|
70
|
+
|
71
|
+
@scenario_tag
|
72
|
+
Scenario: Batman?
|
73
|
+
"""
|
74
|
+
And I am on the search page
|
75
|
+
When I search for "Batman"
|
76
|
+
Then I should see "feature_tag" in the search results
|
77
|
+
And I should see "scenario_tag" in the search results
|
@@ -12,3 +12,9 @@ Then /^I should see a search result link to "([^"]*)" with the url "([^"]*)"$/ d
|
|
12
12
|
page.should have_link text, :href => url
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
Then /^I should see "([^"]*)" in the search results$/ do |text|
|
17
|
+
within ".content" do
|
18
|
+
page.should have_content text
|
19
|
+
end
|
20
|
+
end
|
data/lib/wally/version.rb
CHANGED
data/lib/wally/views/layout.haml
CHANGED
@@ -21,12 +21,6 @@
|
|
21
21
|
Features
|
22
22
|
%ul
|
23
23
|
- @features.each do |feature|
|
24
|
-
|
25
|
-
%a{:href => "/features/#{feature["id"]}"}
|
26
|
-
= feature["name"]
|
27
|
-
- if feature["tags"]
|
28
|
-
- feature["tags"].each do |tag|
|
29
|
-
%span.label.notice
|
30
|
-
= tag["name"]
|
24
|
+
= haml :feature_link, {:locals => {:feature => feature}, :layout => false}
|
31
25
|
%div.content
|
32
26
|
= yield
|
@@ -1,18 +1,10 @@
|
|
1
1
|
%h2
|
2
2
|
= @scenario["keyword"] + ": " + @scenario["name"]
|
3
|
-
|
4
|
-
|
5
|
-
- @scenario["tags"].each do |tag|
|
6
|
-
%a{:href => "/search?q=#{tag["name"]}"}
|
7
|
-
= tag["name"]
|
3
|
+
- if @scenario["tags"]
|
4
|
+
= haml :tag_links, {:locals => {:tags => @scenario["tags"]}, :layout => false}
|
8
5
|
- if @background
|
9
6
|
%h3
|
10
7
|
= @background["keyword"] + ":"
|
11
|
-
- if @scenario["tags"]
|
12
|
-
- @scenario["tags"].each do |tag|
|
13
|
-
%span.label.notice
|
14
|
-
%a{:href => "/search?q=#{tag["name"]}"}
|
15
|
-
= tag["name"]
|
16
8
|
- @background["steps"].each do |step|
|
17
9
|
%p
|
18
10
|
%span.step-keyword
|
data/lib/wally/views/search.haml
CHANGED
@@ -11,10 +11,14 @@
|
|
11
11
|
%li
|
12
12
|
%a{:href => "/features/#{search_result.feature["id"]}"}
|
13
13
|
= search_result.feature["name"]
|
14
|
+
- if search_result.feature["tags"]
|
15
|
+
= haml :tag_links, {:locals => {:tags => search_result.feature["tags"]}, :layout => false}
|
14
16
|
%ul
|
15
17
|
- if search_result.scenario && search_result.scenario["id"]
|
16
18
|
%li
|
17
19
|
%a{:href => "/features/#{search_result.scenario["id"].gsub(";", "/scenario/")}"}
|
18
20
|
= search_result.scenario["name"]
|
21
|
+
- if search_result.scenario["tags"]
|
22
|
+
= haml :tag_links, {:locals => {:tags => search_result.scenario["tags"]}, :layout => false}
|
19
23
|
- else
|
20
24
|
%p Where's Wally? This search returned no results.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wally
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-23 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &70325799865360 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70325799865360
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: haml
|
27
|
-
requirement: &
|
27
|
+
requirement: &70325799864940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70325799864940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rdiscount
|
38
|
-
requirement: &
|
38
|
+
requirement: &70325799864520 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70325799864520
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: gherkin
|
49
|
-
requirement: &
|
49
|
+
requirement: &70325799860000 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70325799860000
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: komainu
|
60
|
-
requirement: &
|
60
|
+
requirement: &70325799859560 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70325799859560
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cucumber
|
71
|
-
requirement: &
|
71
|
+
requirement: &70325799859120 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70325799859120
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: capybara
|
82
|
-
requirement: &
|
82
|
+
requirement: &70325799858600 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70325799858600
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec
|
93
|
-
requirement: &
|
93
|
+
requirement: &70325799858140 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70325799858140
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: fakefs
|
104
|
-
requirement: &
|
104
|
+
requirement: &70325799857520 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70325799857520
|
113
113
|
description: ''
|
114
114
|
email:
|
115
115
|
- andrew.vos@gmail.com
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- config.ru
|
128
128
|
- example-features/example-with-background.feature
|
129
129
|
- example-features/example_with_tags.feature
|
130
|
+
- example-features/has-lots-of-tags.feature
|
130
131
|
- features/browse_features.feature
|
131
132
|
- features/search_features.feature
|
132
133
|
- features/step_definitions/browse_features_steps.rb
|
@@ -142,10 +143,12 @@ files:
|
|
142
143
|
- lib/wally/search_features.rb
|
143
144
|
- lib/wally/version.rb
|
144
145
|
- lib/wally/views/feature.haml
|
146
|
+
- lib/wally/views/feature_link.haml
|
145
147
|
- lib/wally/views/index.haml
|
146
148
|
- lib/wally/views/layout.haml
|
147
149
|
- lib/wally/views/scenario.haml
|
148
150
|
- lib/wally/views/search.haml
|
151
|
+
- lib/wally/views/tag_links.haml
|
149
152
|
- spec/spec_helper.rb
|
150
153
|
- spec/wally/lists_features_spec.rb
|
151
154
|
- spec/wally/search_features_spec.rb
|