loris 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/js-test-driver/JsTestDriver-1.3.2.jar +0 -0
- data/lib/js-test-driver/plugins/{coverage-1.2.jar → coverage-1.3.2.jar} +0 -0
- data/lib/loris.rb +4 -1
- data/lib/tasks/jasmine_ci/jasmine_ci_parser.rb +26 -0
- data/lib/tasks/jasmine_ci/jasmine_ci_runner.rb +24 -0
- data/lib/tasks/js_test_driver/js_test_driver_runner.rb +7 -7
- data/loris.gemspec +111 -110
- data/loris.tmproj +1 -24
- metadata +11 -9
- data/.gitignore +0 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
Binary file
|
Binary file
|
data/lib/loris.rb
CHANGED
@@ -51,6 +51,8 @@ require 'tasks/jasmine_node_coverage/jasmine_node_coverage_runner'
|
|
51
51
|
require 'tasks/jasmine_node_coverage/js_coverage'
|
52
52
|
require 'tasks/rspec/rspec_runner'
|
53
53
|
require 'tasks/rspec/rspec_parser'
|
54
|
+
require 'tasks/jasmine_ci/jasmine_ci_runner'
|
55
|
+
require 'tasks/jasmine_ci/jasmine_ci_parser'
|
54
56
|
require 'tasks/closure_compiler/closure_compiler_config'
|
55
57
|
require 'tasks/closure_compiler/closure_compiler_runner'
|
56
58
|
require 'tasks/closure_compiler/closure_compiler_parser'
|
@@ -123,6 +125,7 @@ module Loris
|
|
123
125
|
tm.add(CommandLineTask.new(JSpecRunner.new(dir, ExtensionFilter.new(File, 'js')), JSpecParser.new)) unless is_windows
|
124
126
|
tm.add(jsTestDriverTask(dir))
|
125
127
|
tm.add(CommandLineTask.new(RSpecRunner.new(dir, ExtensionFilter.new(File, 'rb'), EndsWithFilter.new('_spec.rb')), RSpecParser.new))
|
128
|
+
tm.add(CommandLineTask.new(JasmineCIRunner.new(dir, ExtensionFilter.new(File, 'js')), JasmineCIParser.new))
|
126
129
|
tm.add(closure_compiler_task(dir))
|
127
130
|
|
128
131
|
a = FileActioner.new(ff, tm)
|
@@ -245,7 +248,7 @@ module Loris
|
|
245
248
|
require 'tasks/js_test_driver/js_test_driver_config'
|
246
249
|
require 'tasks/js_test_driver/js_test_driver_server'
|
247
250
|
|
248
|
-
jar = File.join(LIBDIR, 'js-test-driver/JsTestDriver-1.2.jar')
|
251
|
+
jar = File.join(LIBDIR, 'js-test-driver/JsTestDriver-1.3.2.jar')
|
249
252
|
is_windows = RUBY_PLATFORM =~ /mswin32/
|
250
253
|
|
251
254
|
if is_windows
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class JasmineCIParser
|
2
|
+
|
3
|
+
def parse_result(detail)
|
4
|
+
summary_line = detail.grep( /\d+ examples?, \d+ failures?/ )[0]
|
5
|
+
|
6
|
+
if summary_line.nil?
|
7
|
+
# error
|
8
|
+
error_info = (detail + "\nUnknown Error!").to_a[0].strip
|
9
|
+
return :error, 'Error', error_info
|
10
|
+
end
|
11
|
+
|
12
|
+
if summary_line =~ /([1-9]+) failures?/
|
13
|
+
num_errors = $1
|
14
|
+
|
15
|
+
error_info = 'Unknown error'
|
16
|
+
if detail =~ /1\) (.*?)[\n]{2}/m
|
17
|
+
error_info = $1
|
18
|
+
end
|
19
|
+
return :failure, num_errors + ' Errors', error_info
|
20
|
+
end
|
21
|
+
|
22
|
+
return :success, 'All specs pass', ''
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class JasmineCIRunner
|
2
|
+
|
3
|
+
def initialize(dir, js_filter)
|
4
|
+
@dir = dir
|
5
|
+
@js_filter = js_filter
|
6
|
+
end
|
7
|
+
|
8
|
+
def name
|
9
|
+
return 'Jasmine CI'
|
10
|
+
end
|
11
|
+
|
12
|
+
def execute
|
13
|
+
return `rake jasmine:ci 2>&1`
|
14
|
+
end
|
15
|
+
|
16
|
+
def is_configured?(all_files)
|
17
|
+
return all_files.include?(@dir + '/spec/javascripts/support/jasmine.yml')
|
18
|
+
end
|
19
|
+
|
20
|
+
def should_run?(modified_files)
|
21
|
+
return !(modified_files.detect { |file| @js_filter.filter(file) }).nil?
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class JsTestDriverRunner
|
2
|
-
|
2
|
+
|
3
3
|
def initialize(dir, jar, filter, server)
|
4
4
|
@config = dir + '/jsTestDriver.conf'
|
5
5
|
@dir = dir
|
@@ -7,22 +7,22 @@ class JsTestDriverRunner
|
|
7
7
|
@filter = filter
|
8
8
|
@server = server
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def name
|
12
12
|
return 'JS Test Driver'
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def execute
|
16
16
|
@server.start_if_required
|
17
|
-
return `java -jar "#{@jar}" --config "#{@config}" --reset --tests all 2>&1`
|
17
|
+
return `java -jar "#{@jar}" --config "#{@config}" --captureConsole --reset --tests all 2>&1`
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
def is_configured?(all_files)
|
21
21
|
return all_files.include?(@dir + '/jsTestDriver.conf')
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def should_run?(modified_files)
|
25
25
|
return !(modified_files.detect { |file| @filter.filter(file) }).nil? || modified_files.include?(@config)
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
end
|
data/loris.gemspec
CHANGED
@@ -1,137 +1,138 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{loris}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Karl O'Keeffe"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-06-15}
|
13
13
|
s.default_executable = %q{loris}
|
14
14
|
s.description = %q{Automatically run javascript unit tests}
|
15
15
|
s.email = %q{loris@monket.net}
|
16
16
|
s.executables = ["loris"]
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"README.rdoc",
|
19
|
-
|
19
|
+
"TODO"
|
20
20
|
]
|
21
21
|
s.files = [
|
22
|
-
".
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"TODO",
|
25
|
+
"VERSION",
|
26
|
+
"bin/loris",
|
27
|
+
"cucumber.yml",
|
28
|
+
"examples/self_test/jsl.conf",
|
29
|
+
"examples/self_test/spec/spec.rhino.js",
|
30
|
+
"features/javascript_lint.feature",
|
31
|
+
"features/run.feature",
|
32
|
+
"features/step_definitons/all.rb",
|
33
|
+
"features/support/env.rb",
|
34
|
+
"lib/always_continuer.rb",
|
35
|
+
"lib/browser_finder.rb",
|
36
|
+
"lib/closure-compiler/closure-compiler.jar",
|
37
|
+
"lib/directory_finder.rb",
|
38
|
+
"lib/file_actioner.rb",
|
39
|
+
"lib/file_finder.rb",
|
40
|
+
"lib/filters/ends_with_filter.rb",
|
41
|
+
"lib/filters/extension_filter.rb",
|
42
|
+
"lib/filters/file_filter.rb",
|
43
|
+
"lib/filters/modified_filter.rb",
|
44
|
+
"lib/filters/starts_with_filter.rb",
|
45
|
+
"lib/google-lint/fixjsstyle",
|
46
|
+
"lib/google-lint/gjslint",
|
47
|
+
"lib/icons/error.png",
|
48
|
+
"lib/icons/failure.png",
|
49
|
+
"lib/icons/info.png",
|
50
|
+
"lib/icons/success.png",
|
51
|
+
"lib/icons/warning.png",
|
52
|
+
"lib/jasmine-node/LICENSE",
|
53
|
+
"lib/jasmine-node/lib/jasmine/index.js",
|
54
|
+
"lib/jasmine-node/lib/jasmine/jasmine-0.10.2.js",
|
55
|
+
"lib/jasmine-node/specs.js",
|
56
|
+
"lib/javascript-lint/jsl",
|
57
|
+
"lib/javascript-lint/jsl.exe",
|
58
|
+
"lib/js-test-driver/JsTestDriver-1.2.jar",
|
59
|
+
"lib/js-test-driver/JsTestDriver-1.3.2.jar",
|
60
|
+
"lib/js-test-driver/plugins/coverage-1.3.2.jar",
|
61
|
+
"lib/loris.rb",
|
62
|
+
"lib/outputs/growl_output.rb",
|
63
|
+
"lib/outputs/output_collection.rb",
|
64
|
+
"lib/outputs/shell_output.rb",
|
65
|
+
"lib/outputs/unix_console_clearing_output.rb",
|
66
|
+
"lib/outputs/windows_console_clearing_output.rb",
|
67
|
+
"lib/pinger.rb",
|
68
|
+
"lib/poller.rb",
|
69
|
+
"lib/sleep_waiter.rb",
|
70
|
+
"lib/task_manager.rb",
|
71
|
+
"lib/tasks/closure_compiler/closure_compiler_config.rb",
|
72
|
+
"lib/tasks/closure_compiler/closure_compiler_parser.rb",
|
73
|
+
"lib/tasks/closure_compiler/closure_compiler_runner.rb",
|
74
|
+
"lib/tasks/coffeescript/coffeescript_parser.rb",
|
75
|
+
"lib/tasks/coffeescript/coffeescript_runner.rb",
|
76
|
+
"lib/tasks/command_line_task.rb",
|
77
|
+
"lib/tasks/google_lint/google_lint_config.rb",
|
78
|
+
"lib/tasks/google_lint/google_lint_parser.rb",
|
79
|
+
"lib/tasks/google_lint/google_lint_runner.rb",
|
80
|
+
"lib/tasks/jasmine_ci/jasmine_ci_parser.rb",
|
81
|
+
"lib/tasks/jasmine_ci/jasmine_ci_runner.rb",
|
82
|
+
"lib/tasks/jasmine_node/jasmine_node_config.rb",
|
83
|
+
"lib/tasks/jasmine_node/jasmine_node_parser.rb",
|
84
|
+
"lib/tasks/jasmine_node/jasmine_node_runner.rb",
|
85
|
+
"lib/tasks/jasmine_node_coverage/jasmine_node_coverage_runner.rb",
|
86
|
+
"lib/tasks/jasmine_node_coverage/js_coverage.rb",
|
87
|
+
"lib/tasks/javascript_lint/javascript_lint_parser.rb",
|
88
|
+
"lib/tasks/javascript_lint/javascript_lint_runner.rb",
|
89
|
+
"lib/tasks/js_test_driver/js_test_driver_config.rb",
|
90
|
+
"lib/tasks/js_test_driver/js_test_driver_parser.rb",
|
91
|
+
"lib/tasks/js_test_driver/js_test_driver_runner.rb",
|
92
|
+
"lib/tasks/js_test_driver/js_test_driver_server.rb",
|
93
|
+
"lib/tasks/jspec/jspec_parser.rb",
|
94
|
+
"lib/tasks/jspec/jspec_runner.rb",
|
95
|
+
"lib/tasks/list_task.rb",
|
96
|
+
"lib/tasks/rspec/rspec_parser.rb",
|
97
|
+
"lib/tasks/rspec/rspec_runner.rb",
|
98
|
+
"lib/unix_process.rb",
|
99
|
+
"lib/windows_process.rb",
|
100
|
+
"loris.gemspec",
|
101
|
+
"loris.tmproj",
|
102
|
+
"spec/file_actioner_spec.rb",
|
103
|
+
"spec/file_finder_spec.rb",
|
104
|
+
"spec/filters/ends_with_filter_spec.rb",
|
105
|
+
"spec/filters/file_filter_spec.rb",
|
106
|
+
"spec/filters/modified_filter_spec.rb",
|
107
|
+
"spec/growl_output_spec.rb",
|
108
|
+
"spec/list_task_spec.rb",
|
109
|
+
"spec/poller_spec.rb",
|
110
|
+
"spec/shell_output_spec.rb",
|
111
|
+
"spec/task_manager_spec.rb",
|
112
|
+
"spec/tasks/javascript_lint/javascript_lint_runner_spec.rb",
|
113
|
+
"spec/tasks/js_test_driver/js_test_driver_runner_spec.rb",
|
114
|
+
"spec/tasks/jspec/jspec_parser_spec.rb",
|
115
|
+
"spec/tasks/jspec/jspec_runner_spec.rb"
|
114
116
|
]
|
115
117
|
s.homepage = %q{http://github.com/karl/loris}
|
116
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
117
118
|
s.require_paths = ["lib"]
|
118
119
|
s.rubygems_version = %q{1.3.7}
|
119
120
|
s.summary = %q{Automatically run javascript unit tests}
|
120
121
|
s.test_files = [
|
121
122
|
"spec/file_actioner_spec.rb",
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
123
|
+
"spec/file_finder_spec.rb",
|
124
|
+
"spec/filters/ends_with_filter_spec.rb",
|
125
|
+
"spec/filters/file_filter_spec.rb",
|
126
|
+
"spec/filters/modified_filter_spec.rb",
|
127
|
+
"spec/growl_output_spec.rb",
|
128
|
+
"spec/list_task_spec.rb",
|
129
|
+
"spec/poller_spec.rb",
|
130
|
+
"spec/shell_output_spec.rb",
|
131
|
+
"spec/task_manager_spec.rb",
|
132
|
+
"spec/tasks/javascript_lint/javascript_lint_runner_spec.rb",
|
133
|
+
"spec/tasks/js_test_driver/js_test_driver_runner_spec.rb",
|
134
|
+
"spec/tasks/jspec/jspec_parser_spec.rb",
|
135
|
+
"spec/tasks/jspec/jspec_runner_spec.rb"
|
135
136
|
]
|
136
137
|
|
137
138
|
if s.respond_to? :specification_version then
|
data/loris.tmproj
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<plist version="1.0">
|
4
4
|
<dict>
|
5
5
|
<key>currentDocument</key>
|
6
|
-
<string>lib/
|
6
|
+
<string>lib/jasmine-node/specs.js</string>
|
7
7
|
<key>documents</key>
|
8
8
|
<array>
|
9
9
|
<dict>
|
@@ -193,20 +193,6 @@
|
|
193
193
|
<key>firstVisibleLine</key>
|
194
194
|
<integer>0</integer>
|
195
195
|
</dict>
|
196
|
-
<key>lib/tasks/google_lint/google_lint_runner.rb</key>
|
197
|
-
<dict>
|
198
|
-
<key>caret</key>
|
199
|
-
<dict>
|
200
|
-
<key>column</key>
|
201
|
-
<integer>26</integer>
|
202
|
-
<key>line</key>
|
203
|
-
<integer>24</integer>
|
204
|
-
</dict>
|
205
|
-
<key>firstVisibleColumn</key>
|
206
|
-
<integer>0</integer>
|
207
|
-
<key>firstVisibleLine</key>
|
208
|
-
<integer>0</integer>
|
209
|
-
</dict>
|
210
196
|
<key>lib/tasks/jasmine_node/jasmine_node_config.rb</key>
|
211
197
|
<dict>
|
212
198
|
<key>caret</key>
|
@@ -329,15 +315,6 @@
|
|
329
315
|
<string>lib/jasmine-node/specs.js</string>
|
330
316
|
<string>lib/tasks/jasmine_node/jasmine_node_parser.rb</string>
|
331
317
|
<string>lib/tasks/jasmine_node/jasmine_node_runner.rb</string>
|
332
|
-
<string>loris.gemspec</string>
|
333
|
-
<string>lib/tasks/google_lint/google_lint_runner.rb</string>
|
334
|
-
<string>Rakefile</string>
|
335
|
-
<string>lib/tasks/google_lint/google_lint_parser.rb</string>
|
336
|
-
<string>lib/tasks/closure_compiler/closure_compiler_config.rb</string>
|
337
|
-
<string>lib/tasks/google_lint/google_lint_config.rb</string>
|
338
|
-
<string>lib/tasks/closure_compiler/closure_compiler_runner.rb</string>
|
339
|
-
<string>lib/tasks/coffeescript/coffeescript_runner.rb</string>
|
340
|
-
<string>lib/tasks/javascript_lint/javascript_lint_runner.rb</string>
|
341
318
|
</array>
|
342
319
|
<key>showFileHierarchyDrawer</key>
|
343
320
|
<false/>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karl O'Keeffe
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-15 00:00:00 +01:00
|
19
19
|
default_executable: loris
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -92,7 +92,6 @@ extra_rdoc_files:
|
|
92
92
|
- README.rdoc
|
93
93
|
- TODO
|
94
94
|
files:
|
95
|
-
- .gitignore
|
96
95
|
- README.rdoc
|
97
96
|
- Rakefile
|
98
97
|
- TODO
|
@@ -130,7 +129,8 @@ files:
|
|
130
129
|
- lib/javascript-lint/jsl
|
131
130
|
- lib/javascript-lint/jsl.exe
|
132
131
|
- lib/js-test-driver/JsTestDriver-1.2.jar
|
133
|
-
- lib/js-test-driver/
|
132
|
+
- lib/js-test-driver/JsTestDriver-1.3.2.jar
|
133
|
+
- lib/js-test-driver/plugins/coverage-1.3.2.jar
|
134
134
|
- lib/loris.rb
|
135
135
|
- lib/outputs/growl_output.rb
|
136
136
|
- lib/outputs/output_collection.rb
|
@@ -150,6 +150,8 @@ files:
|
|
150
150
|
- lib/tasks/google_lint/google_lint_config.rb
|
151
151
|
- lib/tasks/google_lint/google_lint_parser.rb
|
152
152
|
- lib/tasks/google_lint/google_lint_runner.rb
|
153
|
+
- lib/tasks/jasmine_ci/jasmine_ci_parser.rb
|
154
|
+
- lib/tasks/jasmine_ci/jasmine_ci_runner.rb
|
153
155
|
- lib/tasks/jasmine_node/jasmine_node_config.rb
|
154
156
|
- lib/tasks/jasmine_node/jasmine_node_parser.rb
|
155
157
|
- lib/tasks/jasmine_node/jasmine_node_runner.rb
|
@@ -189,8 +191,8 @@ homepage: http://github.com/karl/loris
|
|
189
191
|
licenses: []
|
190
192
|
|
191
193
|
post_install_message:
|
192
|
-
rdoc_options:
|
193
|
-
|
194
|
+
rdoc_options: []
|
195
|
+
|
194
196
|
require_paths:
|
195
197
|
- lib
|
196
198
|
required_ruby_version: !ruby/object:Gem::Requirement
|
data/.gitignore
DELETED