jasmine 0.10.3.4 → 0.10.3.5

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.
@@ -1,4 +1,15 @@
1
- # Return an array of filepaths relative to src_dir to include before jasmine specs.
1
+ # src_files
2
+ #
3
+ # Return an array of filepaths relative to src_dir to include before jasmine specs.
4
+ # Default: []
5
+ #
6
+ # EXAMPLE:
7
+ #
8
+ # src_files:
9
+ # - lib/source1.js
10
+ # - lib/source2.js
11
+ # - dist/**/*.js
12
+ #
2
13
  src_files:
3
14
  - public/javascripts/prototype.js
4
15
  - public/javascripts/effects.js
@@ -6,20 +17,64 @@ src_files:
6
17
  - public/javascripts/dragdrop.js
7
18
  - public/javascripts/application.js
8
19
 
9
- # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
20
+ # stylesheets
21
+ #
22
+ # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
23
+ # Default: []
24
+ #
25
+ # EXAMPLE:
26
+ #
27
+ # stylesheets:
28
+ # - css/style.css
29
+ # - stylesheets/*.css
30
+ #
10
31
  stylesheets:
11
32
  - stylesheets/**/*.css
12
33
 
13
- # Return an array of filepaths relative to spec_dir to include before jasmine specs.
34
+ # helpers
35
+ #
36
+ # Return an array of filepaths relative to spec_dir to include before jasmine specs.
37
+ # Default: ["helpers/**/*.js"]
38
+ #
39
+ # EXAMPLE:
40
+ #
41
+ # helpers:
42
+ # - helpers/**/*.js
43
+ #
14
44
  helpers:
15
45
  - helpers/**/*.js
16
46
 
17
- # Return an array of filepaths relative to spec_dir to include
47
+ # spec_files
48
+ #
49
+ # Return an array of filepaths relative to spec_dir to include.
50
+ # Default: ["**/*[sS]pec.js"]
51
+ #
52
+ # EXAMPLE:
53
+ #
54
+ # spec_files:
55
+ # - **/*[sS]pec.js
56
+ #
18
57
  spec_files:
19
58
  - **/*[sS]pec.js
20
59
 
21
- # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
60
+ # src_dir
61
+ #
62
+ # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
63
+ # Default: project root
64
+ #
65
+ # EXAMPLE:
66
+ #
67
+ # src_dir: public
68
+ #
22
69
  src_dir:
23
70
 
24
- # Spec directory path. Your spec_files must be returned relative to this path.
71
+ # spec_dir
72
+ #
73
+ # Spec directory path. Your spec_files must be returned relative to this path.
74
+ # Default: spec/javascripts
75
+ #
76
+ # EXAMPLE:
77
+ #
78
+ # spec_dir: spec/javascripts
79
+ #
25
80
  spec_dir: spec/javascripts
@@ -1,24 +1,72 @@
1
- # Return an array of filepaths relative to src_dir to include before jasmine specs.
2
- #src_files:
3
- # - lib/source1.js
4
- # - lib/source2.js
5
- # - dist/**/*.js
1
+ # src_files
2
+ #
3
+ # Return an array of filepaths relative to src_dir to include before jasmine specs.
4
+ # Default: []
5
+ #
6
+ # EXAMPLE:
7
+ #
8
+ # src_files:
9
+ # - lib/source1.js
10
+ # - lib/source2.js
11
+ # - dist/**/*.js
12
+ #
13
+ src_files:
6
14
 
7
- # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
8
- #stylesheets:
9
- # - css/style.css
10
- # - stylesheets/*.css
15
+ # stylesheets
16
+ #
17
+ # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
18
+ # Default: []
19
+ #
20
+ # EXAMPLE:
21
+ #
22
+ # stylesheets:
23
+ # - css/style.css
24
+ # - stylesheets/*.css
25
+ #
26
+ stylesheets:
11
27
 
12
- # Return an array of filepaths relative to spec_dir to include before jasmine specs.
13
- #helpers:
14
- # - helpers/**/*.js
28
+ # helpers
29
+ #
30
+ # Return an array of filepaths relative to spec_dir to include before jasmine specs.
31
+ # Default: ["helpers/**/*.js"]
32
+ #
33
+ # EXAMPLE:
34
+ #
35
+ # helpers:
36
+ # - helpers/**/*.js
37
+ #
38
+ helpers:
15
39
 
40
+ # spec_files
41
+ #
16
42
  # Return an array of filepaths relative to spec_dir to include.
17
- #spec_files:
18
- # - **/*[sS]pec.js
43
+ # Default: ["**/*[sS]pec.js"]
44
+ #
45
+ # EXAMPLE:
46
+ #
47
+ # spec_files:
48
+ # - **/*[sS]pec.js
49
+ #
50
+ spec_files:
19
51
 
20
- # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
21
- #src_dir:
52
+ # src_dir
53
+ #
54
+ # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
55
+ # Default: project root
56
+ #
57
+ # EXAMPLE:
58
+ #
59
+ # src_dir: public
60
+ #
61
+ src_dir:
22
62
 
23
- # Spec directory path. Your spec_files must be returned relative to this path.
24
- #spec_dir: spec/javascripts
63
+ # spec_dir
64
+ #
65
+ # Spec directory path. Your spec_files must be returned relative to this path.
66
+ # Default: spec/javascripts
67
+ #
68
+ # EXAMPLE:
69
+ #
70
+ # spec_dir: spec/javascripts
71
+ #
72
+ spec_dir:
@@ -14,7 +14,7 @@ module Jasmine
14
14
 
15
15
  def start_server(port = 8888)
16
16
  handler = Rack::Handler.default
17
- handler.run Jasmine.app(self), :Port => port
17
+ handler.run Jasmine.app(self), :Port => port, :AccessLog => []
18
18
  end
19
19
 
20
20
  def start
@@ -68,7 +68,13 @@ module Jasmine
68
68
  def stop_servers
69
69
  puts "shutting down the servers..."
70
70
  Jasmine::kill_process_group(@selenium_pid) if @selenium_pid
71
- Jasmine::kill_process_group(@jasmine_server_pid) if @jasmine_server_pid
71
+ if @jasmine_server_pid
72
+ if Rack::Handler.default == Rack::Handler::WEBrick
73
+ Jasmine::kill_process_group(@jasmine_server_pid, "INT")
74
+ else
75
+ Jasmine::kill_process_group(@jasmine_server_pid)
76
+ end
77
+ end
72
78
  end
73
79
 
74
80
  def run
@@ -238,5 +238,23 @@ describe Jasmine::Config do
238
238
  end
239
239
  end
240
240
 
241
-
241
+ describe "#stop_servers" do
242
+ it "should kill Selenium and Rack servers" do
243
+ Rack::Handler.stub!(:default).and_return("Not WEBrick")
244
+ config = Jasmine::Config.new
245
+ config.instance_variable_set(:@selenium_pid, 100)
246
+ config.instance_variable_set(:@jasmine_server_pid, 200)
247
+ Jasmine.should_receive(:kill_process_group).with(100)
248
+ Jasmine.should_receive(:kill_process_group).with(200)
249
+ config.stop_servers
250
+ end
251
+
252
+ it "should send kill with SIGINT to WEBrick" do
253
+ Rack::Handler.stub!(:default).and_return(Rack::Handler::WEBrick)
254
+ config = Jasmine::Config.new
255
+ config.instance_variable_set(:@jasmine_server_pid, 100)
256
+ Jasmine.should_receive(:kill_process_group).with(100, "INT")
257
+ config.stop_servers
258
+ end
259
+ end
242
260
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 10
8
8
  - 3
9
- - 4
10
- version: 0.10.3.4
9
+ - 5
10
+ version: 0.10.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rajan Agaskar
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-04-21 00:00:00 -07:00
19
+ date: 2010-04-27 00:00:00 -07:00
20
20
  default_executable: jasmine
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency