Fingertips-headless-squirrel 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ task :default => :test
2
+
3
+ desc "Run the tests"
4
+ task :test do
5
+ sh "ruby #{Dir['test/unit/*_test.rb'].join(' ')}"
6
+ end
7
+
8
+ # HeadlessSquirrel::Rake::Runner.new :regression do |t|
9
+ # t.files = Dir['test/regression/prototype/unit/*.html']
10
+ # end
11
+
12
+ desc "Run all the regression tests"
13
+ task :ci do
14
+ sh "./bin/jstest #{Dir['test/regression/**/unit/*_test.html'].join(' ')}"
15
+ end
16
+
17
+ namespace :ci do
18
+ desc "Run the prototype regression tests"
19
+ task :prototype do
20
+ sh "./bin/jstest #{Dir['test/regression/prototype/unit/*_test.html'].join(' ')}"
21
+ end
22
+
23
+ desc "Run the scriptaculous regression tests"
24
+ task :scriptaculous do
25
+ sh "./bin/jstest #{Dir['test/regression/scriptaculous/unit/*_test.html'].join(' ')}"
26
+ end
27
+ end
28
+
29
+ begin
30
+ require 'jeweler'
31
+ Jeweler::Tasks.new do |gemspec|
32
+ gemspec.name = "headless-squirrel"
33
+ gemspec.summary = "A command-line JavaScript test runner for the Mac."
34
+ gemspec.description = "A OS X command line tool to run JavaScript (Prototype) unit tests from the comfort of your terminal."
35
+ gemspec.homepage = "http://github.com/Fingertips/headless-squirrel/tree/master"
36
+
37
+ gemspec.email = "eloy.de.enige@gmail.com"
38
+ gemspec.authors = ["Eloy Duran"]
39
+ end
40
+ rescue LoadError
41
+ end
42
+
43
+ begin
44
+ require 'jewelry_portfolio/tasks'
45
+ JewelryPortfolio::Tasks.new do |p|
46
+ p.account = 'Fingertips'
47
+ end
48
+ rescue LoadError
49
+ end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 3
3
- :patch: 0
4
2
  :major: 0
3
+ :minor: 4
4
+ :patch: 0
@@ -0,0 +1,24 @@
1
+ # TODO: Needs converage.
2
+ module HeadlessSquirrel
3
+ class Console < OSX::NSObject
4
+ objc_class_method 'isSelectorExcludedFromWebScript:', [:BOOL, :sel]
5
+ def self.isSelectorExcludedFromWebScript(selector)
6
+ selector != 'log:'
7
+ end
8
+
9
+ objc_class_method 'webScriptNameForSelector:', [:id, :sel]
10
+ def self.webScriptNameForSelector(selector)
11
+ 'log' if selector == 'log:'
12
+ end
13
+
14
+ objc_method 'log:', [:void, :id]
15
+ def log(object)
16
+ puts object.description
17
+ end
18
+ end
19
+ end
20
+
21
+ # For some reason RC looks for the Console class in the OSX namespace.
22
+ before, $VERBOSE = $VERBOSE, nil
23
+ OSX::Console = HeadlessSquirrel::Console
24
+ $VERBOSE = before
@@ -2,6 +2,7 @@ require "osx/cocoa"
2
2
  OSX.require_framework 'WebKit'
3
3
 
4
4
  require 'headless_squirrel/test'
5
+ require 'headless_squirrel/console'
5
6
 
6
7
  module HeadlessSquirrel
7
8
  class TestCase < OSX::NSObject
@@ -63,6 +64,10 @@ module HeadlessSquirrel
63
64
  end
64
65
  end
65
66
 
67
+ def webView_didClearWindowObject_forFrame(_, scriptObject, __)
68
+ scriptObject.setValue_forKey(HeadlessSquirrel::Console.alloc.init, 'console')
69
+ end
70
+
66
71
  # Catches resource load errors:
67
72
  #
68
73
  # webView.resourceLoadDelegate = self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Fingertips-headless-squirrel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-03 00:00:00 -07:00
12
+ date: 2009-06-17 00:00:00 -07:00
13
13
  default_executable: jstest
14
14
  dependencies: []
15
15
 
@@ -23,22 +23,18 @@ extra_rdoc_files:
23
23
  - README.rdoc
24
24
  files:
25
25
  - README.rdoc
26
+ - Rakefile
26
27
  - VERSION.yml
27
28
  - bin/jstest
28
- - lib/headless_squirrel
29
+ - lib/headless_squirrel.rb
30
+ - lib/headless_squirrel/console.rb
29
31
  - lib/headless_squirrel/runner.rb
30
32
  - lib/headless_squirrel/test.rb
31
33
  - lib/headless_squirrel/test_case.rb
32
- - lib/headless_squirrel.rb
33
- - test/fixtures
34
34
  - test/fixtures/a_unit_test.html
35
35
  - test/fixtures/a_unit_test.js
36
- - test/regression
37
- - test/regression/prototype
38
- - test/regression/prototype/unit
39
36
  - test/regression/prototype/unit/ajax_test.html
40
37
  - test/regression/prototype/unit/array_test.html
41
- - test/regression/prototype/unit/assets
42
38
  - test/regression/prototype/unit/assets/prototype.js
43
39
  - test/regression/prototype/unit/assets/unittest.css
44
40
  - test/regression/prototype/unit/assets/unittest.js
@@ -50,7 +46,6 @@ files:
50
46
  - test/regression/prototype/unit/element_mixins_test.html
51
47
  - test/regression/prototype/unit/enumerable_test.html
52
48
  - test/regression/prototype/unit/event_test.html
53
- - test/regression/prototype/unit/fixtures
54
49
  - test/regression/prototype/unit/fixtures/ajax.html
55
50
  - test/regression/prototype/unit/fixtures/ajax.js
56
51
  - test/regression/prototype/unit/fixtures/array.html
@@ -90,7 +85,6 @@ files:
90
85
  - test/regression/prototype/unit/regexp_test.html
91
86
  - test/regression/prototype/unit/selector_test.html
92
87
  - test/regression/prototype/unit/string_test.html
93
- - test/regression/prototype/unit/tests
94
88
  - test/regression/prototype/unit/tests/ajax_test.js
95
89
  - test/regression/prototype/unit/tests/array_test.js
96
90
  - test/regression/prototype/unit/tests/base_test.js
@@ -115,8 +109,6 @@ files:
115
109
  - test/regression/prototype/unit/tests/unittest_test.js
116
110
  - test/regression/prototype/unit/unittest_test.html
117
111
  - test/regression/prototype/upstream
118
- - test/regression/scriptaculous
119
- - test/regression/scriptaculous/unit
120
112
  - test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_alt_text.html
121
113
  - test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_collection.js
122
114
  - test/regression/scriptaculous/unit/_ajax_inplaceeditor_result.html
@@ -128,7 +120,6 @@ files:
128
120
  - test/regression/scriptaculous/unit/_autocomplete_result_nobr.html
129
121
  - test/regression/scriptaculous/unit/ajax_autocompleter_test.html
130
122
  - test/regression/scriptaculous/unit/ajax_inplaceeditor_test.html
131
- - test/regression/scriptaculous/unit/assets
132
123
  - test/regression/scriptaculous/unit/assets/builder.js
133
124
  - test/regression/scriptaculous/unit/assets/controls.js
134
125
  - test/regression/scriptaculous/unit/assets/dragdrop.js
@@ -154,7 +145,6 @@ files:
154
145
  - test/regression/scriptaculous/unit/unittest_test.html
155
146
  - test/regression/scriptaculous/upstream
156
147
  - test/test_helper.rb
157
- - test/unit
158
148
  - test/unit/runner_test.rb
159
149
  - test/unit/test_case_test.rb
160
150
  - test/unit/test_test.rb
@@ -162,7 +152,6 @@ has_rdoc: true
162
152
  homepage: http://github.com/Fingertips/headless-squirrel/tree/master
163
153
  post_install_message:
164
154
  rdoc_options:
165
- - --inline-source
166
155
  - --charset=UTF-8
167
156
  require_paths:
168
157
  - lib
@@ -185,5 +174,9 @@ rubygems_version: 1.2.0
185
174
  signing_key:
186
175
  specification_version: 2
187
176
  summary: A command-line JavaScript test runner for the Mac.
188
- test_files: []
189
-
177
+ test_files:
178
+ - test/regression/scriptaculous/unit/assets/javascripttest.rb
179
+ - test/test_helper.rb
180
+ - test/unit/runner_test.rb
181
+ - test/unit/test_case_test.rb
182
+ - test/unit/test_test.rb