discourse-qunit-rails 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,291 @@
1
+ /*!
2
+ * QUnit 1.18.0
3
+ * http://qunitjs.com/
4
+ *
5
+ * Copyright jQuery Foundation and other contributors
6
+ * Released under the MIT license
7
+ * http://jquery.org/license
8
+ *
9
+ * Date: 2015-04-03T10:23Z
10
+ */
11
+
12
+ /** Font Family and Sizes */
13
+
14
+ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
15
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
16
+ }
17
+
18
+ #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
19
+ #qunit-tests { font-size: smaller; }
20
+
21
+
22
+ /** Resets */
23
+
24
+ #qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
25
+ margin: 0;
26
+ padding: 0;
27
+ }
28
+
29
+
30
+ /** Header */
31
+
32
+ #qunit-header {
33
+ padding: 0.5em 0 0.5em 1em;
34
+
35
+ color: #8699A4;
36
+ background-color: #0D3349;
37
+
38
+ font-size: 1.5em;
39
+ line-height: 1em;
40
+ font-weight: 400;
41
+
42
+ border-radius: 5px 5px 0 0;
43
+ }
44
+
45
+ #qunit-header a {
46
+ text-decoration: none;
47
+ color: #C2CCD1;
48
+ }
49
+
50
+ #qunit-header a:hover,
51
+ #qunit-header a:focus {
52
+ color: #FFF;
53
+ }
54
+
55
+ #qunit-testrunner-toolbar label {
56
+ display: inline-block;
57
+ padding: 0 0.5em 0 0.1em;
58
+ }
59
+
60
+ #qunit-banner {
61
+ height: 5px;
62
+ }
63
+
64
+ #qunit-testrunner-toolbar {
65
+ padding: 0.5em 1em 0.5em 1em;
66
+ color: #5E740B;
67
+ background-color: #EEE;
68
+ overflow: hidden;
69
+ }
70
+
71
+ #qunit-userAgent {
72
+ padding: 0.5em 1em 0.5em 1em;
73
+ background-color: #2B81AF;
74
+ color: #FFF;
75
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
76
+ }
77
+
78
+ #qunit-modulefilter-container {
79
+ float: right;
80
+ padding: 0.2em;
81
+ }
82
+
83
+ .qunit-url-config {
84
+ display: inline-block;
85
+ padding: 0.1em;
86
+ }
87
+
88
+ .qunit-filter {
89
+ display: block;
90
+ float: right;
91
+ margin-left: 1em;
92
+ }
93
+
94
+ /** Tests: Pass/Fail */
95
+
96
+ #qunit-tests {
97
+ list-style-position: inside;
98
+ }
99
+
100
+ #qunit-tests li {
101
+ padding: 0.4em 1em 0.4em 1em;
102
+ border-bottom: 1px solid #FFF;
103
+ list-style-position: inside;
104
+ }
105
+
106
+ #qunit-tests > li {
107
+ display: none;
108
+ }
109
+
110
+ #qunit-tests li.running,
111
+ #qunit-tests li.pass,
112
+ #qunit-tests li.fail,
113
+ #qunit-tests li.skipped {
114
+ display: list-item;
115
+ }
116
+
117
+ #qunit-tests.hidepass li.running,
118
+ #qunit-tests.hidepass li.pass {
119
+ visibility: hidden;
120
+ position: absolute;
121
+ width: 0px;
122
+ height: 0px;
123
+ padding: 0;
124
+ border: 0;
125
+ margin: 0;
126
+ }
127
+
128
+ #qunit-tests li strong {
129
+ cursor: pointer;
130
+ }
131
+
132
+ #qunit-tests li.skipped strong {
133
+ cursor: default;
134
+ }
135
+
136
+ #qunit-tests li a {
137
+ padding: 0.5em;
138
+ color: #C2CCD1;
139
+ text-decoration: none;
140
+ }
141
+
142
+ #qunit-tests li p a {
143
+ padding: 0.25em;
144
+ color: #6B6464;
145
+ }
146
+ #qunit-tests li a:hover,
147
+ #qunit-tests li a:focus {
148
+ color: #000;
149
+ }
150
+
151
+ #qunit-tests li .runtime {
152
+ float: right;
153
+ font-size: smaller;
154
+ }
155
+
156
+ .qunit-assert-list {
157
+ margin-top: 0.5em;
158
+ padding: 0.5em;
159
+
160
+ background-color: #FFF;
161
+
162
+ border-radius: 5px;
163
+ }
164
+
165
+ .qunit-collapsed {
166
+ display: none;
167
+ }
168
+
169
+ #qunit-tests table {
170
+ border-collapse: collapse;
171
+ margin-top: 0.2em;
172
+ }
173
+
174
+ #qunit-tests th {
175
+ text-align: right;
176
+ vertical-align: top;
177
+ padding: 0 0.5em 0 0;
178
+ }
179
+
180
+ #qunit-tests td {
181
+ vertical-align: top;
182
+ }
183
+
184
+ #qunit-tests pre {
185
+ margin: 0;
186
+ white-space: pre-wrap;
187
+ word-wrap: break-word;
188
+ }
189
+
190
+ #qunit-tests del {
191
+ background-color: #E0F2BE;
192
+ color: #374E0C;
193
+ text-decoration: none;
194
+ }
195
+
196
+ #qunit-tests ins {
197
+ background-color: #FFCACA;
198
+ color: #500;
199
+ text-decoration: none;
200
+ }
201
+
202
+ /*** Test Counts */
203
+
204
+ #qunit-tests b.counts { color: #000; }
205
+ #qunit-tests b.passed { color: #5E740B; }
206
+ #qunit-tests b.failed { color: #710909; }
207
+
208
+ #qunit-tests li li {
209
+ padding: 5px;
210
+ background-color: #FFF;
211
+ border-bottom: none;
212
+ list-style-position: inside;
213
+ }
214
+
215
+ /*** Passing Styles */
216
+
217
+ #qunit-tests li li.pass {
218
+ color: #3C510C;
219
+ background-color: #FFF;
220
+ border-left: 10px solid #C6E746;
221
+ }
222
+
223
+ #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
224
+ #qunit-tests .pass .test-name { color: #366097; }
225
+
226
+ #qunit-tests .pass .test-actual,
227
+ #qunit-tests .pass .test-expected { color: #999; }
228
+
229
+ #qunit-banner.qunit-pass { background-color: #C6E746; }
230
+
231
+ /*** Failing Styles */
232
+
233
+ #qunit-tests li li.fail {
234
+ color: #710909;
235
+ background-color: #FFF;
236
+ border-left: 10px solid #EE5757;
237
+ white-space: pre;
238
+ }
239
+
240
+ #qunit-tests > li:last-child {
241
+ border-radius: 0 0 5px 5px;
242
+ }
243
+
244
+ #qunit-tests .fail { color: #000; background-color: #EE5757; }
245
+ #qunit-tests .fail .test-name,
246
+ #qunit-tests .fail .module-name { color: #000; }
247
+
248
+ #qunit-tests .fail .test-actual { color: #EE5757; }
249
+ #qunit-tests .fail .test-expected { color: #008000; }
250
+
251
+ #qunit-banner.qunit-fail { background-color: #EE5757; }
252
+
253
+ /*** Skipped tests */
254
+
255
+ #qunit-tests .skipped {
256
+ background-color: #EBECE9;
257
+ }
258
+
259
+ #qunit-tests .qunit-skipped-label {
260
+ background-color: #F4FF77;
261
+ display: inline-block;
262
+ font-style: normal;
263
+ color: #366097;
264
+ line-height: 1.8em;
265
+ padding: 0 0.5em;
266
+ margin: -0.4em 0.4em -0.4em 0;
267
+ }
268
+
269
+ /** Result */
270
+
271
+ #qunit-testresult {
272
+ padding: 0.5em 1em 0.5em 1em;
273
+
274
+ color: #2B81AF;
275
+ background-color: #D2E0E6;
276
+
277
+ border-bottom: 1px solid #FFF;
278
+ }
279
+ #qunit-testresult .module-name {
280
+ font-weight: 700;
281
+ }
282
+
283
+ /** Fixture */
284
+
285
+ #qunit-fixture {
286
+ position: absolute;
287
+ top: -10000px;
288
+ left: -10000px;
289
+ width: 1000px;
290
+ height: 1000px;
291
+ }
@@ -0,0 +1,43 @@
1
+ module QUnit
2
+ module Generators
3
+ class InstallGenerator < ::Rails::Generators::Base
4
+ source_root File.expand_path("../../templates", __FILE__)
5
+
6
+ desc "QUnit setup."
7
+ namespace "qunit:install"
8
+
9
+ class_option :javascripts_extension, type: :string, aliases: "-j", default: "js"
10
+ class_option :stylesheets_extension, type: :string, aliases: "-s", default: "css"
11
+
12
+ attr_accessor :javascripts_path, :stylesheets_path
13
+
14
+ def initialize_config
15
+ qunit = ::Rails.application.config.qunit
16
+ self.javascripts_path = File.join(qunit.tests_path, qunit.javascripts_path)
17
+ self.stylesheets_path = File.join(qunit.tests_path, qunit.stylesheets_path)
18
+ end
19
+
20
+ def create_javascript_test_helper
21
+ create_test_helper("javascripts_extension", javascripts_path)
22
+ end
23
+
24
+ def create_stylesheet_test_helper
25
+ create_test_helper("stylesheets_extension", stylesheets_path)
26
+ end
27
+
28
+ private
29
+
30
+ def create_test_helper(extension, path)
31
+ name = test_helper(extension)
32
+
33
+ empty_directory(path)
34
+
35
+ template(name, File.join(path, name))
36
+ end
37
+
38
+ def test_helper(extension)
39
+ "test_helper.#{ options.fetch(extension) }"
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,3 @@
1
+ #= require application
2
+ #= require_tree .
3
+ #= require_self
@@ -0,0 +1,4 @@
1
+ /*
2
+ *= require application
3
+ *= require_tree .
4
+ */
@@ -0,0 +1,3 @@
1
+ //= require application
2
+ //= require_tree .
3
+ //= require_self
@@ -0,0 +1 @@
1
+ require "qunit/rails/engine"
@@ -0,0 +1,12 @@
1
+ module QUnit
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace QUnit::Rails
5
+
6
+ config.qunit = ActiveSupport::OrderedOptions.new
7
+ config.qunit.tests_path = "test"
8
+ config.qunit.javascripts_path = "javascripts"
9
+ config.qunit.stylesheets_path = "stylesheets"
10
+ end
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: discourse-qunit-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
5
+ platform: ruby
6
+ authors:
7
+ - Francesco Rodriguez
8
+ - Robin Ward
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-05-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: railties
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ description: QUnit for Rails
29
+ email:
30
+ - robin.ward@gmail.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".gems"
36
+ - ".gitignore"
37
+ - CHANGELOG.md
38
+ - README.md
39
+ - UNLICENSE
40
+ - app/controllers/q_unit/rails/test_controller.rb
41
+ - app/views/q_unit/rails/test/index.html.erb
42
+ - config/initializers/qunit-rails.rb
43
+ - config/routes.rb
44
+ - discourse-qunit-rails.gemspec
45
+ - lib/assets/javascripts/qunit.js
46
+ - lib/assets/stylesheets/qunit.css
47
+ - lib/generators/qunit/install_generator.rb
48
+ - lib/generators/templates/test_helper.coffee
49
+ - lib/generators/templates/test_helper.css
50
+ - lib/generators/templates/test_helper.js
51
+ - lib/qunit-rails.rb
52
+ - lib/qunit/rails/engine.rb
53
+ homepage: https://github.com/discourse/discourse-qunit-rails
54
+ licenses:
55
+ - Unlicense
56
+ metadata: {}
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubyforge_project:
73
+ rubygems_version: 2.4.6
74
+ signing_key:
75
+ specification_version: 4
76
+ summary: QUnit for Rails
77
+ test_files: []