pivotal-screw-unit 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/core/lib/screw.builder.js +4 -3
- data/spec/functional/functional_spec_helper.rb +5 -3
- data/vendor/js-test-core/lib/js_test_core/representations/spec.html.rb +1 -0
- data/vendor/js-test-core/lib/js_test_core/resources/specs/spec.rb +1 -1
- data/vendor/js-test-core/spec/unit/unit_spec_helper.rb +1 -0
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/internal_error.html.rb +2 -1
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/page.html.rb +1 -1
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/resource_not_found.html.rb +2 -1
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/internal_error.rb +1 -1
- data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource_not_found.rb +1 -1
- data/vendor/js-test-core/vendor/thin-rest/spec/thin_rest_spec_helper.rb +1 -0
- metadata +7 -7
data/VERSION.yml
CHANGED
data/core/lib/screw.builder.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
var Screw = (function($) {
|
2
2
|
var screw = {
|
3
3
|
Unit: function(fn) {
|
4
|
-
var contents = fn.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1];
|
5
4
|
var wrappedFn;
|
6
5
|
if(fn.length == 0) {
|
6
|
+
var contents = fn.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1];
|
7
7
|
wrappedFn = new Function("matchers", "specifications",
|
8
8
|
"with (specifications) { with (matchers) { " + contents + " } }"
|
9
9
|
);
|
@@ -79,16 +79,17 @@ var Screw = (function($) {
|
|
79
79
|
};
|
80
80
|
|
81
81
|
$(screw).queue(function() { $(screw).trigger('loading') });
|
82
|
-
$(function()
|
82
|
+
$(window).load(function(){
|
83
83
|
$('<div class="describe">')
|
84
84
|
.append('<h3 class="status" />')
|
85
85
|
.append('<ol class="befores">')
|
86
86
|
.append('<ul class="describes">')
|
87
87
|
.append('<ol class="afters">')
|
88
88
|
.appendTo('body');
|
89
|
-
|
89
|
+
|
90
90
|
$(screw).dequeue();
|
91
91
|
$(screw).trigger('loaded');
|
92
92
|
});
|
93
|
+
|
93
94
|
return screw;
|
94
95
|
})(jQuery);
|
@@ -20,9 +20,11 @@ class Spec::ExampleGroup
|
|
20
20
|
@spec_root_path = FunctionalSpecServerStarter.spec_root_path
|
21
21
|
@public_path = FunctionalSpecServerStarter.public_path
|
22
22
|
@implementation_root_path = FunctionalSpecServerStarter.implementation_root_path
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
unless SeleniumRC::Server.service_is_running?
|
24
|
+
Thread.start do
|
25
|
+
SeleniumRC::Server.boot
|
26
|
+
end
|
27
|
+
end
|
26
28
|
FunctionalSpecServerStarter.call
|
27
29
|
TCPSocket.wait_for_service :host => "0.0.0.0", :port => "4444"
|
28
30
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module ThinRest
|
2
2
|
module Representations
|
3
3
|
class Page < Erector::Widget
|
4
|
-
def
|
4
|
+
def content(&block)
|
5
5
|
rawtext %Q{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">}
|
6
6
|
html :xmlns => "http://www.w3.org/1999/xhtml", :"xml:lang" => "en" do
|
7
7
|
head do
|
data/vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/resource_not_found.html.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module ThinRest
|
2
2
|
module Representations
|
3
3
|
class ResourceNotFound < Page
|
4
|
+
needs :path_info
|
4
5
|
protected
|
5
6
|
def body_content
|
6
7
|
h1 message
|
@@ -11,7 +12,7 @@ module ThinRest
|
|
11
12
|
end
|
12
13
|
|
13
14
|
def message
|
14
|
-
"File #{
|
15
|
+
"File #{path_info} not found"
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
@@ -10,7 +10,7 @@ module ThinRest
|
|
10
10
|
property :name
|
11
11
|
def get
|
12
12
|
connection.send_head(404)
|
13
|
-
connection.send_body(Representations::ResourceNotFound.new(
|
13
|
+
connection.send_body(Representations::ResourceNotFound.new(:path_info => connection.rack_request.path_info).to_s) do
|
14
14
|
raise RoutingError, "Invalid route: #{connection.rack_request.path_info} ; name: #{name}"
|
15
15
|
end
|
16
16
|
end
|
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.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal Labs
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-06-04 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -145,7 +145,7 @@ files:
|
|
145
145
|
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/resource_spec.rb
|
146
146
|
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest/resources/root_spec.rb
|
147
147
|
- vendor/js-test-core/vendor/thin-rest/spec/thin_rest_spec_helper.rb
|
148
|
-
has_rdoc:
|
148
|
+
has_rdoc: false
|
149
149
|
homepage: http://github.com/pivotal/screw-unit-server
|
150
150
|
post_install_message:
|
151
151
|
rdoc_options:
|
@@ -170,15 +170,15 @@ requirements: []
|
|
170
170
|
rubyforge_project:
|
171
171
|
rubygems_version: 1.2.0
|
172
172
|
signing_key:
|
173
|
-
specification_version:
|
173
|
+
specification_version: 3
|
174
174
|
summary: Server and helpers for your Screw Unit tests.
|
175
175
|
test_files:
|
176
|
-
- spec/unit_suite.rb
|
177
|
-
- spec/functional/functional_spec_server_starter.rb
|
178
176
|
- spec/functional/functional_spec.rb
|
179
177
|
- spec/functional/functional_spec_helper.rb
|
178
|
+
- spec/functional/functional_spec_server_starter.rb
|
179
|
+
- spec/functional_suite.rb
|
180
180
|
- spec/spec_suite.rb
|
181
181
|
- spec/unit/js_test_core/specs/spec_dir_spec.rb
|
182
182
|
- spec/unit/js_test_core/specs/spec_file_spec.rb
|
183
183
|
- spec/unit/unit_spec_helper.rb
|
184
|
-
- spec/
|
184
|
+
- spec/unit_suite.rb
|