js-test-driver-rails 0.5.0.pre2 → 0.5.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- js-test-driver-rails (0.5.0.pre1)
4
+ js-test-driver-rails (0.5.0.pre3)
5
5
  commander
6
- json
6
+ multi_json
7
7
  rake
8
8
  selenium-webdriver
9
9
 
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- childprocess (0.1.9)
13
+ childprocess (0.2.1)
14
14
  ffi (~> 1.0.6)
15
- commander (4.0.4)
15
+ commander (4.0.5)
16
16
  highline (>= 1.5.0)
17
17
  ffi (1.0.9)
18
18
  highline (1.6.2)
19
- json (1.5.1)
20
- json_pure (1.5.1)
19
+ json_pure (1.5.3)
21
20
  mocha (0.9.9)
22
21
  rake
22
+ multi_json (1.0.3)
23
23
  rake (0.8.7)
24
24
  rubyzip (0.9.4)
25
- selenium-webdriver (0.2.1)
26
- childprocess (>= 0.1.7)
25
+ selenium-webdriver (2.4.0)
26
+ childprocess (>= 0.2.1)
27
27
  ffi (>= 1.0.7)
28
28
  json_pure
29
29
  rubyzip
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "js-test-driver-rails"
16
16
 
17
- s.add_dependency 'json'
17
+ s.add_dependency 'multi_json'
18
18
  s.add_dependency 'rake'
19
19
  s.add_dependency 'commander'
20
20
  s.add_dependency 'selenium-webdriver'
@@ -11,7 +11,7 @@ module JsTestDriver
11
11
  end
12
12
 
13
13
  def run(opts = {})
14
- jstd_jar_command.with_config.run_tests(opts[:tests])
14
+ jstd_jar_command.with_config.run_tests(opts[:tests]).reset_runner
15
15
 
16
16
  runner.run(jstd_jar_command.to_s)
17
17
  end
@@ -3,7 +3,7 @@ module JsTestDriver
3
3
 
4
4
  class BaseCommand
5
5
  def initialize(executable)
6
- @command = "#{executable}"
6
+ @command = executable.to_s
7
7
  ensure_installed!
8
8
 
9
9
  @options = []
@@ -25,12 +25,20 @@ module JsTestDriver
25
25
  return ([@command] + @options + @args).compact.join(' ')
26
26
  end
27
27
 
28
+ protected
29
+
30
+ def executable_not_found!
31
+ raise JsTestDriver::MissingDependencyError.new("Could not find executable: #{@command}")
32
+ end
33
+
28
34
  private
29
35
 
36
+ def installed?
37
+ !%x[which #{@command}].strip.empty?
38
+ end
39
+
30
40
  def ensure_installed!
31
- if %x[which #{@command}].strip.empty?
32
- raise JsTestDriver::MissingDependencyError.new("Could not find executable: #{@command}")
33
- end
41
+ executable_not_found! unless installed?
34
42
  end
35
43
 
36
44
  def escape(value)
@@ -11,6 +11,12 @@ module JsTestDriver
11
11
  arg(runtime_config.coverage_data_file)
12
12
  end
13
13
 
14
+ protected
15
+
16
+ def executable_not_found!
17
+ warn("Could not find executable: #{@command}")
18
+ end
19
+
14
20
  end
15
21
 
16
22
  end
@@ -52,6 +52,10 @@ module JsTestDriver
52
52
  return option('--runnerMode', mode)
53
53
  end
54
54
 
55
+ def reset_runner
56
+ return option('--reset')
57
+ end
58
+
55
59
  def browser_timeout(timeout)
56
60
  return option('--browserTimeout', timeout)
57
61
  end
@@ -20,7 +20,7 @@ module JsTestDriver
20
20
  def to_s
21
21
  <<JS
22
22
  if (typeof(#{namespace}) === 'undefined') { #{namespace} = {}; }
23
- #{namespace}.#{name} = #{self.to_h.to_json};
23
+ #{namespace}.#{name} = #{MultiJson.encode(self.to_h)};
24
24
  JS
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module JsTestDriver
2
- VERSION = "0.5.0.pre2"
2
+ VERSION = "0.5.0.pre3"
3
3
  end
@@ -1,4 +1,4 @@
1
- require 'json'
1
+ require 'multi_json'
2
2
  require 'yaml'
3
3
  require 'fileutils'
4
4
 
@@ -6,13 +6,13 @@ module JsTestDriver
6
6
  def test_should_run_all_tests_by_default
7
7
  application.run_tests
8
8
 
9
- assert_run("java -jar #{runtime_config.jar_path} --serverHandlerPrefix jstd --config #{runtime_config.config_yml_path} --tests all")
9
+ assert_run("java -jar #{runtime_config.jar_path} --serverHandlerPrefix jstd --config #{runtime_config.config_yml_path} --tests all --reset")
10
10
  end
11
11
 
12
12
  def test_should_run_selected_tests
13
13
  application.run_tests(:tests => 'MyTestCase.some_test')
14
14
 
15
- assert_run("java -jar #{runtime_config.jar_path} --serverHandlerPrefix jstd --config #{runtime_config.config_yml_path} --tests MyTestCase.some_test")
15
+ assert_run("java -jar #{runtime_config.jar_path} --serverHandlerPrefix jstd --config #{runtime_config.config_yml_path} --tests MyTestCase.some_test --reset")
16
16
  end
17
17
 
18
18
  end
data/vendor/coverage.jar CHANGED
Binary file
data/vendor/jasmine.js CHANGED
@@ -735,12 +735,17 @@ jasmine.Env.prototype.version = function () {
735
735
  * @returns string containing jasmine version build info, if set.
736
736
  */
737
737
  jasmine.Env.prototype.versionString = function() {
738
- if (jasmine.version_) {
739
- var version = this.version();
740
- return version.major + "." + version.minor + "." + version.build + " revision " + version.revision;
741
- } else {
738
+ if (!jasmine.version_) {
742
739
  return "version unknown";
743
740
  }
741
+
742
+ var version = this.version();
743
+ var versionString = version.major + "." + version.minor + "." + version.build;
744
+ if (version.release_candidate) {
745
+ versionString += ".rc" + version.release_candidate;
746
+ }
747
+ versionString += " revision " + version.revision;
748
+ return versionString;
744
749
  };
745
750
 
746
751
  /**
@@ -2463,10 +2468,10 @@ jasmine.getGlobal().clearInterval = function(timeoutKey) {
2463
2468
  }
2464
2469
  };
2465
2470
 
2466
-
2467
2471
  jasmine.version_= {
2468
2472
  "major": 1,
2469
2473
  "minor": 1,
2470
2474
  "build": 0,
2471
- "revision": 1307546962
2475
+ "revision": 1310556152,
2476
+ "release_candidate": 3
2472
2477
  };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js-test-driver-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre2
4
+ version: 0.5.0.pre3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-07 00:00:00.000000000 +02:00
12
+ date: 2011-08-23 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: json
17
- requirement: &79918640 !ruby/object:Gem::Requirement
16
+ name: multi_json
17
+ requirement: &79185930 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *79918640
25
+ version_requirements: *79185930
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
- requirement: &79918430 !ruby/object:Gem::Requirement
28
+ requirement: &79185720 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *79918430
36
+ version_requirements: *79185720
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: commander
39
- requirement: &79918220 !ruby/object:Gem::Requirement
39
+ requirement: &79185510 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *79918220
47
+ version_requirements: *79185510
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: selenium-webdriver
50
- requirement: &79918010 !ruby/object:Gem::Requirement
50
+ requirement: &79185300 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *79918010
58
+ version_requirements: *79185300
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: mocha
61
- requirement: &79917800 !ruby/object:Gem::Requirement
61
+ requirement: &79185090 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *79917800
69
+ version_requirements: *79185090
70
70
  description: Use ruby to configure JsTestDriver, capture browsers and run tests.
71
71
  email:
72
72
  - adam@pohorecki.pl