pivotal-screw-unit 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/Rakefile +4 -1
- data/VERSION.yml +2 -2
- data/bin/screw_unit_server +14 -4
- data/lib/screw_unit/representations/spec.html.rb +1 -1
- data/lib/screw_unit/resources/core_file.rb +7 -0
- data/lib/screw_unit.rb +12 -8
- data/spec/functional/functional_spec_helper.rb +11 -4
- data/spec/functional/functional_spec_server_starter.rb +13 -8
- data/spec/unit/js_test_core/specs/spec_file_spec.rb +51 -18
- data/spec/unit/unit_spec_helper.rb +22 -90
- data/vendor/js-test-core/CHANGES +3 -0
- data/vendor/js-test-core/lib/js_test_core/app.rb +12 -0
- data/vendor/js-test-core/lib/js_test_core/client.rb +5 -5
- data/vendor/js-test-core/lib/js_test_core/configuration.rb +35 -0
- data/vendor/js-test-core/lib/js_test_core/{selenium → extensions/selenium}/client/driver.rb +0 -0
- data/vendor/js-test-core/lib/js_test_core/extensions.rb +1 -1
- data/vendor/js-test-core/lib/js_test_core/models/selenium_session.rb +80 -0
- data/vendor/js-test-core/lib/js_test_core/models.rb +8 -0
- data/vendor/js-test-core/lib/js_test_core/representations/dir.html.rb +24 -0
- data/vendor/js-test-core/{vendor/thin-rest/lib/thin_rest/representations/resource_not_found.html.rb → lib/js_test_core/representations/not_found.html.rb} +3 -7
- data/vendor/js-test-core/{vendor/thin-rest/lib/thin_rest → lib/js_test_core}/representations/page.html.rb +1 -1
- data/vendor/js-test-core/lib/js_test_core/representations/spec.html.rb +1 -1
- data/vendor/js-test-core/lib/js_test_core/representations.rb +4 -2
- data/vendor/js-test-core/lib/js_test_core/resources/core_file.rb +19 -0
- data/vendor/js-test-core/lib/js_test_core/resources/file.rb +38 -18
- data/vendor/js-test-core/lib/js_test_core/resources/implementations_deprecation.rb +12 -0
- data/vendor/js-test-core/lib/js_test_core/resources/not_found.rb +35 -0
- data/vendor/js-test-core/lib/js_test_core/resources/resource.rb +16 -0
- data/vendor/js-test-core/lib/js_test_core/resources/selenium_session.rb +104 -0
- data/vendor/js-test-core/lib/js_test_core/resources/spec_file.rb +63 -0
- data/vendor/js-test-core/lib/js_test_core/resources/web_root.rb +5 -60
- data/vendor/js-test-core/lib/js_test_core/resources.rb +7 -8
- data/vendor/js-test-core/lib/js_test_core.rb +18 -13
- data/vendor/js-test-core/{vendor/thin-rest/README → spec/example_core/subdir/SubDirFile.js} +0 -0
- data/vendor/js-test-core/spec/example_specs/custom_dir_and_suite/passing_spec.js +1 -1
- data/vendor/js-test-core/spec/example_specs/foo/failing_spec.js +1 -1
- data/vendor/js-test-core/spec/example_specs/foo/passing_spec.js +1 -1
- data/vendor/js-test-core/spec/spec_helpers/be_http.rb +32 -0
- data/vendor/js-test-core/spec/spec_helpers/example_group.rb +36 -0
- data/vendor/js-test-core/spec/spec_helpers/fake_selenium_driver.rb +27 -0
- data/vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb +22 -0
- data/vendor/js-test-core/spec/unit/js_test_core/client_spec.rb +6 -6
- data/vendor/js-test-core/spec/unit/js_test_core/configuration_spec.rb +44 -0
- data/vendor/js-test-core/spec/unit/js_test_core/models/selenium_session_spec.rb +85 -0
- data/vendor/js-test-core/spec/unit/js_test_core/resources/core_file_spec.rb +60 -0
- data/vendor/js-test-core/spec/unit/js_test_core/resources/file_spec.rb +54 -63
- data/vendor/js-test-core/spec/unit/js_test_core/resources/implementations_deprecation_spec.rb +18 -0
- data/vendor/js-test-core/spec/unit/js_test_core/resources/not_found_spec.rb +51 -0
- data/vendor/js-test-core/spec/unit/js_test_core/resources/selenium_session_spec.rb +362 -0
- data/vendor/js-test-core/spec/unit/js_test_core/resources/spec_file_spec.rb +120 -0
- data/vendor/js-test-core/spec/unit/js_test_core/resources/web_root_spec.rb +15 -19
- data/vendor/js-test-core/spec/unit/unit_spec_helper.rb +14 -148
- data/vendor/js-test-core/vendor/lucky-luciano/README.markdown +7 -0
- data/vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano/resource.rb +135 -0
- data/vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano/rspec/be_http.rb +32 -0
- data/vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano/rspec.rb +4 -0
- data/vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano.rb +4 -0
- data/vendor/js-test-core/vendor/lucky-luciano/spec/lucky_luciano/resource_spec.rb +231 -0
- data/vendor/js-test-core/vendor/lucky-luciano/spec/spec_helper.rb +48 -0
- data/vendor/js-test-core/vendor/{thin-rest → lucky-luciano}/spec/spec_suite.rb +1 -2
- metadata +74 -59
- data/spec/unit/js_test_core/specs/spec_dir_spec.rb +0 -39
- data/vendor/js-test-core/lib/js_test_core/rack/commonlogger.rb +0 -5
- data/vendor/js-test-core/lib/js_test_core/rack.rb +0 -2
- data/vendor/js-test-core/lib/js_test_core/rails_server.rb +0 -22
- data/vendor/js-test-core/lib/js_test_core/resources/dir.rb +0 -67
- data/vendor/js-test-core/lib/js_test_core/resources/runner.rb +0 -107
- data/vendor/js-test-core/lib/js_test_core/resources/session.rb +0 -44
- data/vendor/js-test-core/lib/js_test_core/resources/session_finish.rb +0 -17
- data/vendor/js-test-core/lib/js_test_core/resources/specs/spec.rb +0 -32
- data/vendor/js-test-core/lib/js_test_core/resources/specs/spec_dir.rb +0 -50
- data/vendor/js-test-core/lib/js_test_core/resources/specs/spec_file.rb +0 -21
- data/vendor/js-test-core/lib/js_test_core/selenium.rb +0 -2
- data/vendor/js-test-core/lib/js_test_core/server.rb +0 -50
- data/vendor/js-test-core/lib/js_test_core/thin/backends/js_test_core_server.rb +0 -9
- data/vendor/js-test-core/lib/js_test_core/thin/js_test_core_connection.rb +0 -8
- data/vendor/js-test-core/lib/js_test_core/thin.rb +0 -3
- data/vendor/js-test-core/spec/example_specs/custom_dir_and_suite.html +0 -9
- data/vendor/js-test-core/spec/unit/js_test_core/rails_server_spec.rb +0 -45
- data/vendor/js-test-core/spec/unit/js_test_core/resources/dir_spec.rb +0 -53
- data/vendor/js-test-core/spec/unit/js_test_core/resources/file_not_found_spec.rb +0 -16
- data/vendor/js-test-core/spec/unit/js_test_core/resources/runners/runner_spec.rb +0 -303
- data/vendor/js-test-core/spec/unit/js_test_core/resources/session_finish_spec.rb +0 -79
- data/vendor/js-test-core/spec/unit/js_test_core/resources/session_spec.rb +0 -82
- data/vendor/js-test-core/spec/unit/js_test_core/resources/specs/spec_dir_spec.rb +0 -104
- data/vendor/js-test-core/spec/unit/js_test_core/resources/specs/spec_file_spec.rb +0 -41
- data/vendor/js-test-core/spec/unit/js_test_core/server_spec.rb +0 -117
- data/vendor/js-test-core/spec/unit/thin/js_test_core_connection_spec.rb +0 -6
- data/vendor/js-test-core/vendor/thin-rest/CHANGES +0 -2
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/connection.rb +0 -117
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/extensions/object.rb +0 -21
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/extensions.rb +0 -3
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/internal_error.html.rb +0 -20
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations.rb +0 -4
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/internal_error.rb +0 -11
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource.rb +0 -105
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource_not_found.rb +0 -19
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources.rb +0 -4
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/routing_error.rb +0 -5
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest.rb +0 -10
- data/vendor/js-test-core/vendor/thin-rest/spec/thin_rest/connection_spec.rb +0 -205
- data/vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/resource_not_found_spec.rb +0 -16
- data/vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/resource_spec.rb +0 -135
- data/vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/root_spec.rb +0 -16
- data/vendor/js-test-core/vendor/thin-rest/spec/thin_rest_spec_helper.rb +0 -134
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotal-screw-unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal Labs
|
@@ -10,11 +10,40 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-06-
|
13
|
+
date: 2009-06-08 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
|
-
dependencies:
|
16
|
-
|
17
|
-
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: thin
|
18
|
+
type: :runtime
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.2.1
|
25
|
+
version:
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: erector
|
28
|
+
type: :runtime
|
29
|
+
version_requirement:
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.6.6
|
35
|
+
version:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: selenium_client
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
version:
|
46
|
+
description: The Screw Unit server conveniently serves your Screw Unit specs and javascript files and css stylesheets.
|
18
47
|
email: pivotallabsopensource@googlegroups.com
|
19
48
|
executables:
|
20
49
|
- screw_unit
|
@@ -60,6 +89,7 @@ files:
|
|
60
89
|
- lib/screw_unit.rb
|
61
90
|
- lib/screw_unit/representations.rb
|
62
91
|
- lib/screw_unit/representations/spec.html.rb
|
92
|
+
- lib/screw_unit/resources/core_file.rb
|
63
93
|
- spec/functional_suite.rb
|
64
94
|
- spec/spec_suite.rb
|
65
95
|
- spec/unit_suite.rb
|
@@ -67,85 +97,71 @@ files:
|
|
67
97
|
- vendor/js-test-core/README
|
68
98
|
- vendor/js-test-core/Rakefile
|
69
99
|
- vendor/js-test-core/lib/js_test_core.rb
|
100
|
+
- vendor/js-test-core/lib/js_test_core/app.rb
|
70
101
|
- vendor/js-test-core/lib/js_test_core/client.rb
|
102
|
+
- vendor/js-test-core/lib/js_test_core/configuration.rb
|
71
103
|
- vendor/js-test-core/lib/js_test_core/extensions.rb
|
104
|
+
- vendor/js-test-core/lib/js_test_core/extensions/selenium/client/driver.rb
|
72
105
|
- vendor/js-test-core/lib/js_test_core/extensions/time.rb
|
73
|
-
- vendor/js-test-core/lib/js_test_core/
|
74
|
-
- vendor/js-test-core/lib/js_test_core/
|
75
|
-
- vendor/js-test-core/lib/js_test_core/rails_server.rb
|
106
|
+
- vendor/js-test-core/lib/js_test_core/models.rb
|
107
|
+
- vendor/js-test-core/lib/js_test_core/models/selenium_session.rb
|
76
108
|
- vendor/js-test-core/lib/js_test_core/representations.rb
|
109
|
+
- vendor/js-test-core/lib/js_test_core/representations/dir.html.rb
|
110
|
+
- vendor/js-test-core/lib/js_test_core/representations/not_found.html.rb
|
111
|
+
- vendor/js-test-core/lib/js_test_core/representations/page.html.rb
|
77
112
|
- vendor/js-test-core/lib/js_test_core/representations/spec.html.rb
|
78
113
|
- vendor/js-test-core/lib/js_test_core/resources.rb
|
79
|
-
- vendor/js-test-core/lib/js_test_core/resources/
|
114
|
+
- vendor/js-test-core/lib/js_test_core/resources/core_file.rb
|
80
115
|
- vendor/js-test-core/lib/js_test_core/resources/file.rb
|
81
|
-
- vendor/js-test-core/lib/js_test_core/resources/
|
82
|
-
- vendor/js-test-core/lib/js_test_core/resources/
|
83
|
-
- vendor/js-test-core/lib/js_test_core/resources/
|
84
|
-
- vendor/js-test-core/lib/js_test_core/resources/
|
85
|
-
- vendor/js-test-core/lib/js_test_core/resources/
|
86
|
-
- vendor/js-test-core/lib/js_test_core/resources/specs/spec_file.rb
|
116
|
+
- vendor/js-test-core/lib/js_test_core/resources/implementations_deprecation.rb
|
117
|
+
- vendor/js-test-core/lib/js_test_core/resources/not_found.rb
|
118
|
+
- vendor/js-test-core/lib/js_test_core/resources/resource.rb
|
119
|
+
- vendor/js-test-core/lib/js_test_core/resources/selenium_session.rb
|
120
|
+
- vendor/js-test-core/lib/js_test_core/resources/spec_file.rb
|
87
121
|
- vendor/js-test-core/lib/js_test_core/resources/web_root.rb
|
88
|
-
- vendor/js-test-core/lib/js_test_core/selenium.rb
|
89
|
-
- vendor/js-test-core/lib/js_test_core/selenium/client/driver.rb
|
90
122
|
- vendor/js-test-core/lib/js_test_core/selenium_server_configuration.rb
|
91
|
-
- vendor/js-test-core/lib/js_test_core/server.rb
|
92
|
-
- vendor/js-test-core/lib/js_test_core/thin.rb
|
93
|
-
- vendor/js-test-core/lib/js_test_core/thin/backends/js_test_core_server.rb
|
94
|
-
- vendor/js-test-core/lib/js_test_core/thin/js_test_core_connection.rb
|
95
123
|
- vendor/js-test-core/spec/example_core/JsTestCore.css
|
96
124
|
- vendor/js-test-core/spec/example_core/JsTestCore.js
|
125
|
+
- vendor/js-test-core/spec/example_core/subdir/SubDirFile.js
|
97
126
|
- vendor/js-test-core/spec/example_public/favicon.ico
|
98
127
|
- vendor/js-test-core/spec/example_public/javascripts/foo.js
|
99
128
|
- vendor/js-test-core/spec/example_public/javascripts/large_file.js
|
100
129
|
- vendor/js-test-core/spec/example_public/javascripts/subdir/bar.js
|
101
130
|
- vendor/js-test-core/spec/example_public/robots.txt
|
102
131
|
- vendor/js-test-core/spec/example_public/stylesheets/example.css
|
103
|
-
- vendor/js-test-core/spec/example_specs/custom_dir_and_suite.html
|
104
132
|
- vendor/js-test-core/spec/example_specs/custom_dir_and_suite/passing_spec.js
|
105
133
|
- vendor/js-test-core/spec/example_specs/custom_suite.html
|
106
134
|
- vendor/js-test-core/spec/example_specs/failing_spec.js
|
107
135
|
- vendor/js-test-core/spec/example_specs/foo/failing_spec.js
|
108
136
|
- vendor/js-test-core/spec/example_specs/foo/passing_spec.js
|
137
|
+
- vendor/js-test-core/spec/spec_helpers/be_http.rb
|
138
|
+
- vendor/js-test-core/spec/spec_helpers/example_group.rb
|
139
|
+
- vendor/js-test-core/spec/spec_helpers/fake_selenium_driver.rb
|
140
|
+
- vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
|
109
141
|
- vendor/js-test-core/spec/spec_suite.rb
|
110
142
|
- vendor/js-test-core/spec/specs/failing_spec.js
|
111
143
|
- vendor/js-test-core/spec/unit/js_test_core/client_spec.rb
|
112
|
-
- vendor/js-test-core/spec/unit/js_test_core/
|
113
|
-
- vendor/js-test-core/spec/unit/js_test_core/
|
114
|
-
- vendor/js-test-core/spec/unit/js_test_core/resources/
|
144
|
+
- vendor/js-test-core/spec/unit/js_test_core/configuration_spec.rb
|
145
|
+
- vendor/js-test-core/spec/unit/js_test_core/models/selenium_session_spec.rb
|
146
|
+
- vendor/js-test-core/spec/unit/js_test_core/resources/core_file_spec.rb
|
115
147
|
- vendor/js-test-core/spec/unit/js_test_core/resources/file_spec.rb
|
116
|
-
- vendor/js-test-core/spec/unit/js_test_core/resources/
|
117
|
-
- vendor/js-test-core/spec/unit/js_test_core/resources/
|
118
|
-
- vendor/js-test-core/spec/unit/js_test_core/resources/
|
119
|
-
- vendor/js-test-core/spec/unit/js_test_core/resources/
|
120
|
-
- vendor/js-test-core/spec/unit/js_test_core/resources/specs/spec_file_spec.rb
|
148
|
+
- vendor/js-test-core/spec/unit/js_test_core/resources/implementations_deprecation_spec.rb
|
149
|
+
- vendor/js-test-core/spec/unit/js_test_core/resources/not_found_spec.rb
|
150
|
+
- vendor/js-test-core/spec/unit/js_test_core/resources/selenium_session_spec.rb
|
151
|
+
- vendor/js-test-core/spec/unit/js_test_core/resources/spec_file_spec.rb
|
121
152
|
- vendor/js-test-core/spec/unit/js_test_core/resources/web_root_spec.rb
|
122
153
|
- vendor/js-test-core/spec/unit/js_test_core/selenium_server_configuration_spec.rb
|
123
|
-
- vendor/js-test-core/spec/unit/js_test_core/server_spec.rb
|
124
|
-
- vendor/js-test-core/spec/unit/thin/js_test_core_connection_spec.rb
|
125
154
|
- vendor/js-test-core/spec/unit/unit_spec_helper.rb
|
126
155
|
- vendor/js-test-core/spec/unit_suite.rb
|
127
|
-
- vendor/js-test-core/vendor/
|
128
|
-
- vendor/js-test-core/vendor/
|
129
|
-
- vendor/js-test-core/vendor/
|
130
|
-
- vendor/js-test-core/vendor/
|
131
|
-
- vendor/js-test-core/vendor/
|
132
|
-
- vendor/js-test-core/vendor/
|
133
|
-
- vendor/js-test-core/vendor/
|
134
|
-
- vendor/js-test-core/vendor/
|
135
|
-
|
136
|
-
- vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/resource_not_found.html.rb
|
137
|
-
- vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources.rb
|
138
|
-
- vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/internal_error.rb
|
139
|
-
- vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource.rb
|
140
|
-
- vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource_not_found.rb
|
141
|
-
- vendor/js-test-core/vendor/thin-rest/lib/thin_rest/routing_error.rb
|
142
|
-
- vendor/js-test-core/vendor/thin-rest/spec/spec_suite.rb
|
143
|
-
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest/connection_spec.rb
|
144
|
-
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/resource_not_found_spec.rb
|
145
|
-
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/resource_spec.rb
|
146
|
-
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/root_spec.rb
|
147
|
-
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest_spec_helper.rb
|
148
|
-
has_rdoc: false
|
156
|
+
- vendor/js-test-core/vendor/lucky-luciano/README.markdown
|
157
|
+
- vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano.rb
|
158
|
+
- vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano/resource.rb
|
159
|
+
- vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano/rspec.rb
|
160
|
+
- vendor/js-test-core/vendor/lucky-luciano/lib/lucky_luciano/rspec/be_http.rb
|
161
|
+
- vendor/js-test-core/vendor/lucky-luciano/spec/lucky_luciano/resource_spec.rb
|
162
|
+
- vendor/js-test-core/vendor/lucky-luciano/spec/spec_helper.rb
|
163
|
+
- vendor/js-test-core/vendor/lucky-luciano/spec/spec_suite.rb
|
164
|
+
has_rdoc: true
|
149
165
|
homepage: http://github.com/pivotal/screw-unit-server
|
150
166
|
post_install_message:
|
151
167
|
rdoc_options:
|
@@ -170,15 +186,14 @@ requirements: []
|
|
170
186
|
rubyforge_project:
|
171
187
|
rubygems_version: 1.2.0
|
172
188
|
signing_key:
|
173
|
-
specification_version:
|
189
|
+
specification_version: 2
|
174
190
|
summary: Server and helpers for your Screw Unit tests.
|
175
191
|
test_files:
|
192
|
+
- spec/unit_suite.rb
|
193
|
+
- spec/functional/functional_spec_server_starter.rb
|
176
194
|
- spec/functional/functional_spec.rb
|
177
195
|
- spec/functional/functional_spec_helper.rb
|
178
|
-
- spec/functional/functional_spec_server_starter.rb
|
179
|
-
- spec/functional_suite.rb
|
180
196
|
- spec/spec_suite.rb
|
181
|
-
- spec/unit/js_test_core/specs/spec_dir_spec.rb
|
182
197
|
- spec/unit/js_test_core/specs/spec_file_spec.rb
|
183
198
|
- spec/unit/unit_spec_helper.rb
|
184
|
-
- spec/
|
199
|
+
- spec/functional_suite.rb
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require File.expand_path("#{File.dirname(__FILE__)}/../../unit_spec_helper")
|
2
|
-
|
3
|
-
module JsTestCore
|
4
|
-
module Resources
|
5
|
-
module Specs
|
6
|
-
describe SpecDir do
|
7
|
-
|
8
|
-
describe "GET /specs" do
|
9
|
-
attr_reader :dir, :html, :doc
|
10
|
-
|
11
|
-
before do
|
12
|
-
mock(connection).send_head(200, is_a(Hash))
|
13
|
-
mock(connection).send_data(/Content-Length:/)
|
14
|
-
mock(connection).send_data(anything) do |@html|
|
15
|
-
# do nothing
|
16
|
-
end
|
17
|
-
|
18
|
-
connection.receive_data("GET /specs HTTP/1.1\r\nHost: _\r\n\r\n")
|
19
|
-
@doc = Nokogiri::HTML(html)
|
20
|
-
end
|
21
|
-
|
22
|
-
it "returns script tags for each test javascript file" do
|
23
|
-
doc.at("script[@src='/specs/failing_spec.js']").should_not be_nil
|
24
|
-
doc.at("script[@src='/specs/foo/failing_spec.js']").should_not be_nil
|
25
|
-
doc.at("script[@src='/specs/foo/passing_spec.js']").should_not be_nil
|
26
|
-
end
|
27
|
-
|
28
|
-
it "returns the screw unit template" do
|
29
|
-
doc.at("link[@href='/core/screw.css']").should_not be_nil
|
30
|
-
doc.at("script[@src='/core/screw.builder.js']").should_not be_nil
|
31
|
-
doc.at("script[@src='/core/screw.events.js']").should_not be_nil
|
32
|
-
doc.at("script[@src='/core/screw.behaviors.js']").should_not be_nil
|
33
|
-
doc.at("body/#screw_unit_content").should_not be_nil
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
class RailsServer < Server
|
3
|
-
class << self
|
4
|
-
def run(rails_root, server_options = {})
|
5
|
-
server_options[:Host] ||= DEFAULT_HOST
|
6
|
-
server_options[:Port] ||= DEFAULT_PORT
|
7
|
-
Server.instance = new(rails_root, server_options[:Host], server_options[:Port])
|
8
|
-
Server.instance.run server_options
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def initialize(rails_root, host=DEFAULT_HOST, port=DEFAULT_PORT)
|
13
|
-
super(
|
14
|
-
"#{rails_root}/spec/javascripts",
|
15
|
-
"#{rails_root}/public/javascripts",
|
16
|
-
"#{rails_root}/public",
|
17
|
-
host,
|
18
|
-
port
|
19
|
-
)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,67 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
class Dir < File
|
4
|
-
route ANY do |env, name|
|
5
|
-
if file = file(name)
|
6
|
-
file
|
7
|
-
elsif subdir = subdir(name)
|
8
|
-
subdir
|
9
|
-
else
|
10
|
-
Resources::ResourceNotFound.new(env.merge(:name => name))
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def get
|
15
|
-
connection.send_head
|
16
|
-
connection.send_body(::Dir.glob("#{absolute_path}/*").inject("") do |html, file|
|
17
|
-
file_basename = ::File.basename(file)
|
18
|
-
html << %Q|<a href="#{file_basename}">#{file_basename}</a>\n|
|
19
|
-
end)
|
20
|
-
end
|
21
|
-
|
22
|
-
def glob(pattern)
|
23
|
-
expanded_pattern = absolute_path + pattern
|
24
|
-
::Dir.glob(expanded_pattern).map do |absolute_globbed_path|
|
25
|
-
relative_globbed_path = absolute_globbed_path.gsub(absolute_path, relative_path)
|
26
|
-
File.new(env.merge(
|
27
|
-
:absolute_path => absolute_globbed_path,
|
28
|
-
:relative_path => relative_globbed_path
|
29
|
-
))
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
protected
|
34
|
-
def determine_child_paths(name)
|
35
|
-
absolute_child_path = "#{absolute_path}/#{name}"
|
36
|
-
relative_child_path = "#{relative_path}/#{name}"
|
37
|
-
[absolute_child_path, relative_child_path]
|
38
|
-
end
|
39
|
-
|
40
|
-
def file(name)
|
41
|
-
# N.B. Absolute_path and relative_path are methods. Do not shadow.
|
42
|
-
absolute_file_path, relative_file_path = determine_child_paths(name)
|
43
|
-
if ::File.exists?(absolute_file_path) && !::File.directory?(absolute_file_path)
|
44
|
-
Resources::File.new(env.merge(
|
45
|
-
:absolute_path => absolute_file_path,
|
46
|
-
:relative_path => relative_file_path
|
47
|
-
))
|
48
|
-
else
|
49
|
-
nil
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def subdir(name)
|
54
|
-
# N.B. Absolute_path and relative_path are methods. Do not shadow.
|
55
|
-
absolute_dir_path, relative_dir_path = determine_child_paths(name)
|
56
|
-
if ::File.directory?(absolute_dir_path)
|
57
|
-
Resources::Dir.new(env.merge(
|
58
|
-
:absolute_path => absolute_dir_path,
|
59
|
-
:relative_path => relative_dir_path
|
60
|
-
))
|
61
|
-
else
|
62
|
-
nil
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
@@ -1,107 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
class Runner < Resources::Resource
|
4
|
-
class Collection < Resources::Resource
|
5
|
-
property :selenium_browser_start_command
|
6
|
-
route 'firefox' do |env, name|
|
7
|
-
self.selenium_browser_start_command = "*firefox"
|
8
|
-
self
|
9
|
-
end
|
10
|
-
route 'iexplore' do |env, name|
|
11
|
-
self.selenium_browser_start_command = "*iexplore"
|
12
|
-
self
|
13
|
-
end
|
14
|
-
|
15
|
-
def after_initialize
|
16
|
-
super
|
17
|
-
self.selenium_browser_start_command = rack_request['selenium_browser_start_command']
|
18
|
-
end
|
19
|
-
|
20
|
-
def post
|
21
|
-
spec_url = rack_request['spec_url'].to_s == "" ? full_spec_suite_url : rack_request['spec_url']
|
22
|
-
parsed_spec_url = URI.parse(spec_url)
|
23
|
-
selenium_host = rack_request['selenium_host'].to_s == "" ? 'localhost' : rack_request['selenium_host'].to_s
|
24
|
-
selenium_port = rack_request['selenium_port'].to_s == "" ? 4444 : Integer(rack_request['selenium_port'])
|
25
|
-
http_address = "#{parsed_spec_url.scheme}://#{parsed_spec_url.host}:#{parsed_spec_url.port}"
|
26
|
-
driver = Selenium::Client::Driver.new(
|
27
|
-
selenium_host,
|
28
|
-
selenium_port,
|
29
|
-
selenium_browser_start_command,
|
30
|
-
http_address
|
31
|
-
)
|
32
|
-
begin
|
33
|
-
driver.start
|
34
|
-
rescue Errno::ECONNREFUSED => e
|
35
|
-
raise Errno::ECONNREFUSED, "Cannot connect to Selenium Server at #{http_address}. To start the selenium server, run `selenium`."
|
36
|
-
end
|
37
|
-
runner = Runner.new(:driver => driver)
|
38
|
-
Runner.register(runner)
|
39
|
-
Thread.start do
|
40
|
-
driver.open("/")
|
41
|
-
driver.create_cookie("session_id=#{runner.session_id}")
|
42
|
-
driver.open(parsed_spec_url.path)
|
43
|
-
end
|
44
|
-
connection.send_head
|
45
|
-
connection.send_body("session_id=#{runner.session_id}")
|
46
|
-
end
|
47
|
-
|
48
|
-
protected
|
49
|
-
def full_spec_suite_url
|
50
|
-
"#{Server.root_url}/specs"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
class << self
|
55
|
-
def find(id)
|
56
|
-
instances[id.to_s]
|
57
|
-
end
|
58
|
-
|
59
|
-
def finalize(session_id, text)
|
60
|
-
if runner = find(session_id)
|
61
|
-
runner.finalize(text)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def register(runner)
|
66
|
-
instances[runner.session_id] = runner
|
67
|
-
end
|
68
|
-
|
69
|
-
protected
|
70
|
-
def instances
|
71
|
-
@instances ||= {}
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
include FileUtils
|
76
|
-
property :driver
|
77
|
-
attr_reader :profile_dir, :session_run_result
|
78
|
-
|
79
|
-
def after_initialize
|
80
|
-
profile_base = "#{::Dir.tmpdir}/js_test_core/#{self.class.name}"
|
81
|
-
mkdir_p profile_base
|
82
|
-
@profile_dir = "#{profile_base}/#{Time.now.to_i}"
|
83
|
-
end
|
84
|
-
|
85
|
-
def finalize(session_run_result)
|
86
|
-
driver.stop
|
87
|
-
@session_run_result = session_run_result.to_s
|
88
|
-
end
|
89
|
-
|
90
|
-
def running?
|
91
|
-
driver.session_started?
|
92
|
-
end
|
93
|
-
|
94
|
-
def successful?
|
95
|
-
!running? && session_run_result.empty?
|
96
|
-
end
|
97
|
-
|
98
|
-
def failed?
|
99
|
-
!running? && !successful?
|
100
|
-
end
|
101
|
-
|
102
|
-
def session_id
|
103
|
-
driver.session_id
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
class Session < Resources::Resource
|
4
|
-
class Collection < Resources::Resource
|
5
|
-
route ANY do |env, id|
|
6
|
-
Session.new(env.merge(:id => id))
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
RUNNING = 'running'
|
11
|
-
SUCCESSFUL_COMPLETION = 'success'
|
12
|
-
FAILURE_COMPLETION = 'failure'
|
13
|
-
|
14
|
-
property :id
|
15
|
-
|
16
|
-
def get
|
17
|
-
runner = Runner.find(id)
|
18
|
-
if runner
|
19
|
-
connection.send_head
|
20
|
-
if runner.running?
|
21
|
-
connection.send_body("status=#{RUNNING}")
|
22
|
-
else
|
23
|
-
if runner.successful?
|
24
|
-
connection.send_body("status=#{SUCCESSFUL_COMPLETION}")
|
25
|
-
else
|
26
|
-
connection.send_body("status=#{FAILURE_COMPLETION}&reason=#{runner.session_run_result}")
|
27
|
-
end
|
28
|
-
end
|
29
|
-
else
|
30
|
-
connection.send_head(404)
|
31
|
-
connection.send_body("")
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
route 'finish' do |env, name|
|
36
|
-
SessionFinish.new(env.merge(:session => self))
|
37
|
-
end
|
38
|
-
|
39
|
-
def associated_with_a_runner?
|
40
|
-
id.to_s != ""
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
class SessionFinish < Resources::Resource
|
4
|
-
property :session
|
5
|
-
|
6
|
-
def post
|
7
|
-
if session.associated_with_a_runner?
|
8
|
-
Runner.finalize(session.id, rack_request['text'])
|
9
|
-
else
|
10
|
-
STDOUT.puts rack_request['text']
|
11
|
-
end
|
12
|
-
connection.send_head
|
13
|
-
connection.send_body("")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
module Specs
|
4
|
-
module Spec
|
5
|
-
class << self
|
6
|
-
def spec_representation_class
|
7
|
-
@spec_representation_class ||= JsTestCore::Representations::Spec
|
8
|
-
end
|
9
|
-
attr_writer :spec_representation_class
|
10
|
-
end
|
11
|
-
|
12
|
-
def get_generated_spec
|
13
|
-
connection.terminate_after_sending do
|
14
|
-
connection.send_head(
|
15
|
-
200,
|
16
|
-
'Content-Type' => "text/html",
|
17
|
-
'Last-Modified' => ::File.mtime(absolute_path).rfc822
|
18
|
-
)
|
19
|
-
|
20
|
-
body = render_spec
|
21
|
-
connection.send_data("Content-Length: #{body.length}\r\n\r\n")
|
22
|
-
connection.send_data(body)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def render_spec
|
27
|
-
Spec.spec_representation_class.new(:spec_files => spec_files).to_s
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
module Specs
|
4
|
-
class SpecDir < ::JsTestCore::Resources::Dir
|
5
|
-
include Spec
|
6
|
-
|
7
|
-
def get
|
8
|
-
if ::File.file?(absolute_path)
|
9
|
-
super
|
10
|
-
else
|
11
|
-
get_generated_spec
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def spec_files
|
16
|
-
glob("/**/*_spec.js")
|
17
|
-
end
|
18
|
-
|
19
|
-
route ANY do |env, name|
|
20
|
-
if result = (file(name) || subdir(name) || spec_file(name))
|
21
|
-
result
|
22
|
-
else
|
23
|
-
base_path = "#{relative_path}/#{name}"
|
24
|
-
raise "No file or directory found at #{base_path} or spec found at #{base_path}.js."
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
protected
|
29
|
-
|
30
|
-
def subdir(name)
|
31
|
-
absolute_path, relative_path = determine_child_paths(name)
|
32
|
-
if ::File.directory?(absolute_path)
|
33
|
-
SpecDir.new(env.merge(:absolute_path => absolute_path, :relative_path => relative_path))
|
34
|
-
else
|
35
|
-
nil
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def spec_file(name)
|
40
|
-
absolute_path, relative_path = determine_child_paths("#{name}.js")
|
41
|
-
if ::File.exists?(absolute_path) && !::File.directory?(absolute_path)
|
42
|
-
SpecFile.new(env.merge(:absolute_path => absolute_path, :relative_path => relative_path))
|
43
|
-
else
|
44
|
-
nil
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
module Resources
|
3
|
-
module Specs
|
4
|
-
class SpecFile < ::JsTestCore::Resources::File
|
5
|
-
include Spec
|
6
|
-
|
7
|
-
def get
|
8
|
-
if ::File.exists?(absolute_path) && ::File.extname(absolute_path) != ".js"
|
9
|
-
super
|
10
|
-
else
|
11
|
-
get_generated_spec
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def spec_files
|
16
|
-
[self]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
module JsTestCore
|
2
|
-
class Server
|
3
|
-
class << self
|
4
|
-
attr_accessor :instance
|
5
|
-
|
6
|
-
def run(spec_root_path, implementation_root_path, public_path, server_options = {})
|
7
|
-
server_options[:Host] ||= DEFAULT_HOST
|
8
|
-
server_options[:Port] ||= DEFAULT_PORT
|
9
|
-
@instance = new(spec_root_path, implementation_root_path, public_path, server_options[:Host], server_options[:Port])
|
10
|
-
instance.run server_options
|
11
|
-
end
|
12
|
-
|
13
|
-
def spec_root_path; instance.spec_root_path; end
|
14
|
-
def implementation_root_path; instance.implementation_root_path; end
|
15
|
-
def public_path; instance.public_path; end
|
16
|
-
def core_path; instance.core_path; end
|
17
|
-
def request; instance.request; end
|
18
|
-
def response; instance.response; end
|
19
|
-
def root_url; instance.root_url; end
|
20
|
-
end
|
21
|
-
|
22
|
-
attr_reader :host, :port, :spec_root_path, :implementation_root_path, :public_path
|
23
|
-
|
24
|
-
def initialize(spec_root_path, implementation_root_path, public_path, host=DEFAULT_HOST, port=DEFAULT_PORT)
|
25
|
-
dir = ::File.dirname(__FILE__)
|
26
|
-
@spec_root_path = ::File.expand_path(spec_root_path)
|
27
|
-
@implementation_root_path = ::File.expand_path(implementation_root_path)
|
28
|
-
@public_path = ::File.expand_path(public_path)
|
29
|
-
@host = host
|
30
|
-
@port = port
|
31
|
-
end
|
32
|
-
|
33
|
-
def run(options)
|
34
|
-
server = ::Thin::Server.new(options[:Host], options[:Port]) do
|
35
|
-
use Rack::CommonLogger
|
36
|
-
end
|
37
|
-
server.backend = ::Thin::Backends::JsTestCoreServer.new(options[:Host], options[:Port])
|
38
|
-
server.backend.server = server
|
39
|
-
server.start!
|
40
|
-
end
|
41
|
-
|
42
|
-
def root_url
|
43
|
-
"http://#{host}:#{port}"
|
44
|
-
end
|
45
|
-
|
46
|
-
def core_path
|
47
|
-
JsTestCore.core_path
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|