-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsample.html.slim
More file actions
185 lines (160 loc) · 8.31 KB
/
Copy pathsample.html.slim
File metadata and controls
185 lines (160 loc) · 8.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
---
layout: default
priority: 0.9
change_frequency: monthly
---
- page.title = "JavaEE Sample::#{page.showcase.category.nil? ? "" : page.showcase.category.id}::#{page.showcase.name}"
- page.twitter_card = "summary"
- page.twitter_title = page.showcase.name
- page.twitter_description = page.showcase.description
header
.row
.large-10.columns
h2=page.showcase.name
.large-2.columns
.action.right
a.button.radius.round.success data-reveal-id="run"
|Run
i.fi-play
#run.hide.reveal-modal data-reveal=""
a.close-reveal-modal href='./'
|How to run the sample
i.fi-x
hr.clear
|The source code for this sample can be found in the
a href=="#{page.showcase.repository.html_url}/tree/master/#{page.showcase.module_path}"=>page.showcase.repository.path
i.fi-social-github>
| GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
pre.highlight
code="git clone #{page.showcase.repository.clone_url}<br/>cd #{page.showcase.repository.path}/#{page.showcase.module_path}"
- if !page.showcase.tests.nil?
| Now we are ready to start testing. You can run all the tests in this sample by executing:
pre.highlight
code mvn test
|Or you can run individual tests by executing one of the following:
pre.highlight
code
- for test in page.showcase.tests
|mvn test -Dtest=#{test.name}
- if !page.showcase.profiles.nil? and !page.showcase.tests.nil?
|This sample support multiple different containers. You choose which container to use by activating one of the Maven profiles defined. Adding -P "profile-name" to one of the command lines above will do the trick, e.g.:
pre.highlight
code "mvn test -Dtest=#{page.showcase.tests.first.name} -P #{page.showcase.profiles.first}"
|The available profiles are: #{page.showcase.profiles.join(', ')}
.row
.large-10.columns
h3=page.showcase.description
.sub
.row
.large-10.columns.specifications
- unless page.showcase.api_usage.nil?
ul.inline-list
li Specifications in use:
li
ul.inline-list
- for tech in page.showcase.api_usage.each_key.sort
li
a href="#{site.base_url}/##{tech}" title="#{site.categories.find{|x|x.id.eql? tech}.name}" =tech
.large-2.columns.contributors
- unless page.showcase.contributors.nil?
ul.inline-list
-for c in site.identities.unique_by_emails(page.showcase.contributors)
li itemscope="" itemtype="http://data-vocabulary.org/Person"
meta itemprop="role" content="author"
meta itemprop="name" content="#{c.name}"
meta itemprop="affiliation" content="#{c.company}"
img.photo title="#{c.name}" src="#{c.avatar_url(25)}" itemprop="photo"
javascript:
//$(function() { activateGuideMenuControl() })
.row
.large-12.columns
- if page.showcase.tests.empty?
.improve
|Missing a story. Add a test case.
a.right.button.round data-reveal-id="improve"
|Show me how!
i.fi-page-edit
- for test in page.showcase.tests
#test
.row
.large-7.columns
h4=test.name
.large-3.columns
- results = site.results.summary_by_testclass(test.qualified_name, test)
- unless results.empty?
ul.inline-list style="margin-left:0em;"
- for name, status in results.each
- icon = status ? 'fi-like' : 'fi-dislike'
- color = status ? 'green' : 'red'
- title = status ? "All tests pass on #{name}" : "Not all tests pass on #{name}"
li style="margin-left: 0.3em"
i class="#{icon}" title="#{title}" style="color: #{color}"
.large-2.columns
a.right href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java"
i.fi-page-edit
- if test.description.nil? or test.description.empty?
.improve
|Missing a description for the story. Add some javadoc to the TestClass.
a.right.button.tiny.round href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java"
|Show me how!
i.fi-page-edit
=asciidocify(test.description, page.showcase)
- for deployment in test.children.select{|x| x.is_deployment}
- if deployment.description.nil? or deployment.description.empty?
.improve
|Missing a description for the deployment. Add some javadoc to the @Deployment method.
a.right.button.tiny.round href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java"
|Show me how!
i.fi-page-edit
=asciidocify(deployment.description, page.showcase)
=sourcify(deployment.content)
- for scenario in test.children.select{|x| x.is_test}
- if scenario.description.nil? or scenario.description.empty?
.improve
|Missing a description for the test scenario. Add some javadoc to the @Test method.
a.right.button.tiny.round href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java"
|Show me how!
i.fi-page-edit
=asciidocify(scenario.description, page.showcase)
=sourcify(scenario.content)
javascript:
$(function() {
hljs.initHighlightingOnLoad();
})
.row
.large-12.columns
.large-6.columns
h3 Share the Knowledge
|Find this sample useful?
a href="http://twitter.com/home/?status=#{URI.escape("Just read the #JavaEE-Sample \"#{page.showcase.category.nil? ? '' : page.showcase.category.id + '::'}#{page.showcase.name}\" and learned something new! #{site.base_url}#{page.url}")}"
|Share on
i.fi-social-twitter
p There's a lot more about JavaEE to cover. If you're ready to learn more, check out the <a href="#{site.base_url}/">other available samples</a>.
.large-6.columns
h3 Help Improve
- has_single_test = (!page.showcase.tests.nil? and page.showcase.tests.size == 1)
- puts page.showcase if page.showcase.tests[0].nil? and has_single_test
- href = "#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{page.showcase.tests[0].qualified_name.gsub('.', '/')}.java" if has_single_test
- href = "#{page.showcase.repository.html_url}/tree/master/#{page.showcase.module_path}/src/test/java" unless has_single_test
|Find a bug in the sample? Something missing? You can fix it by <a href="#{href}">editing the source</a>, making the correction and sending a pull request. Or report the problem to the <a href="#{site.issue_tracker}">issue tracker</a>
- if page.showcase.changes
.row
.large-12.columns.changes
h4 Recent Changelog
ul
- for change in page.showcase.changes
li
|#{change.date.strftime('%b %d, %Y')}: #{change.message} <em>by #{change.author}</em>
#improve.hide.reveal-modal data-reveal=""
a.close-reveal-modal href='./'
|How to help improve this sample
i.fi-x
hr.clear
|The source code for this sample can be found in the
a href=="#{page.showcase.repository.html_url}/tree/master/#{page.showcase.module_path}"=>page.showcase.repository.path
i.fi-social-github
| GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
pre.highlight
code="git clone #{page.showcase.repository.clone_url}<br/>cd #{page.showcase.repository.path}/#{page.showcase.module_path}"
p Do the changes as you see fit and send a pull request!
p Good Luck!