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 CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 4
3
- :patch: 1
2
+ :patch: 2
4
3
  :major: 0
4
+ :minor: 4
@@ -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
- # Thread.start do
24
- # SeleniumRC::Server.boot
25
- # end
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,6 +1,7 @@
1
1
  module JsTestCore
2
2
  module Representations
3
3
  class Spec < Page
4
+ needs :spec_files
4
5
  protected
5
6
  def title_text
6
7
  "Js Test Core Suite"
@@ -24,7 +24,7 @@ module JsTestCore
24
24
  end
25
25
 
26
26
  def render_spec
27
- Spec.spec_representation_class.new(self, :spec_files => spec_files).to_s
27
+ Spec.spec_representation_class.new(:spec_files => spec_files).to_s
28
28
  end
29
29
  end
30
30
  end
@@ -1,5 +1,6 @@
1
1
  require "rubygems"
2
2
  require "spec"
3
+ require "spec/autorun"
3
4
 
4
5
  dir = File.dirname(__FILE__)
5
6
  $LOAD_PATH.unshift File.expand_path("#{dir}/../../lib")
@@ -1,11 +1,12 @@
1
1
  module ThinRest
2
2
  module Representations
3
3
  class InternalError < Page
4
+ needs :error
4
5
  protected
5
6
  def body_content
6
7
  h1 error.message
7
8
  ul do
8
- error.backtrace.split("\n").each do |line|
9
+ error.backtrace.each do |line|
9
10
  li line
10
11
  end
11
12
  end
@@ -1,7 +1,7 @@
1
1
  module ThinRest
2
2
  module Representations
3
3
  class Page < Erector::Widget
4
- def render(&block)
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
@@ -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 #{path} not found"
15
+ "File #{path_info} not found"
15
16
  end
16
17
  end
17
18
  end
@@ -4,7 +4,7 @@ module ThinRest
4
4
  property :error
5
5
  def get
6
6
  connection.send_head(500)
7
- connection.send_body(Representations::InternalError.new(self, :error => error).to_s)
7
+ connection.send_body(Representations::InternalError.new(:error => error).to_s)
8
8
  end
9
9
  end
10
10
  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(self).to_s) do
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
@@ -2,6 +2,7 @@ dir = File.dirname(__FILE__)
2
2
  $LOAD_PATH.unshift(File.expand_path("#{dir}/../lib"))
3
3
  require "thin_rest"
4
4
  require "spec"
5
+ require "spec/autorun"
5
6
  require "guid"
6
7
 
7
8
  Spec::Runner.configure do |config|
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.1
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-05-11 00:00:00 -07:00
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: true
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: 2
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/functional_suite.rb
184
+ - spec/unit_suite.rb