jasmine-blanket 0.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a11a7a8182bd12b7aeb28a9a80647a44bd44b4ed
4
- data.tar.gz: 34d10ea5d672e2601777341c288f289fac9ebfac
3
+ metadata.gz: 231978e6d3c32dae2b78049c9d96cecf5f2fccb2
4
+ data.tar.gz: 7048d16beb81e2747312a07daba2955623dfb4e7
5
5
  SHA512:
6
- metadata.gz: f032feb3b7dac4918ee1ff05fea923a8fccda484a9113bffac271cfd663902db2005b2abeccfab95bcb6232501c2dc19ea138439d6c9cef9a623655b9376e1b3
7
- data.tar.gz: 1735ca314524d75129de2e85ccf0e1d127f8fc4d166539cb42a60672c68b9a91acb4e1b05a21a3952684e54cc0e9211dcfb47e044ab9a13cfdd96a18bef17896
6
+ metadata.gz: a100f16433101cd70dd2d4fbc212cf96c5142fbf61b8cc07daaec034ae2d5f8b0c93b300f1f69137d76a6f9f4537c3bfacfeba899c80a3f444ba8ce8593092f6
7
+ data.tar.gz: 451abf097b31d7bda7d74d59fca71a9cb8c56e0aa5827165f530cc8a2924a53d3b62c6d822ddf74cb9958a17fc83550424e182b3c29dbdb35a55ff9ea1677818
data/README.md CHANGED
@@ -29,6 +29,10 @@ Or directly include it in your test runner with `/assets/blanket.js` and `/asset
29
29
 
30
30
  [Blanket JS Usage](http://blanketjs.org/)
31
31
 
32
+ ## Version
33
+
34
+ Matches Jasmine version
35
+
32
36
  ## Contributing
33
37
 
34
38
  1. Fork it ( https://github.com/ScotterC/jasmine-blanket/fork )
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'jasmine/blanket/version'
4
+ require 'jasmine-blanket/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "jasmine-blanket"
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["scott@artsicle.com"]
11
11
  spec.summary = %q{Incorporate Blanket.js with Jasmine}
12
12
  spec.description = %q{Make it easy to work with Blanket.js and Jasmine 2.0}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/ScotterC/jasmine-blanket"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -0,0 +1,9 @@
1
+ require 'rails'
2
+ require 'blanket/rails'
3
+ require "jasmine-blanket/engine"
4
+ require "jasmine-blanket/version"
5
+
6
+ module Jasmine
7
+ module Blanket
8
+ end
9
+ end
@@ -1,8 +1,7 @@
1
- require "jasmine/blanket/version"
2
1
 
3
2
  module Jasmine
4
3
  module Blanket
5
4
  class Engine < ::Rails::Engine
6
5
  end
7
6
  end
8
- end
7
+ end
@@ -1,5 +1,5 @@
1
1
  module Jasmine
2
2
  module Blanket
3
- VERSION = "0.0.1"
3
+ VERSION = "2.0.2"
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
1
  // version 1.1.5
2
- // https://raw.githubusercontent.com/alex-seville/blanket/master/src/adapters/jasmine-blanket.js
2
+ // https://raw.githubusercontent.com/alex-seville/blanket/master/src/adapters/jasmine-2.x-blanket.js
3
3
 
4
4
  (function() {
5
5
 
6
- if (typeof jasmine === "undefined") {
6
+ if (! jasmine) {
7
7
  throw new Exception("jasmine library does not exist in global namespace!");
8
8
  }
9
9
 
@@ -44,17 +44,16 @@
44
44
  BlanketReporter.finished_at = null; // will be updated after all files have been written
45
45
 
46
46
  BlanketReporter.prototype = {
47
- reportSpecStarting: function(spec) {
47
+ specStarted: function(spec) {
48
48
  blanket.onTestStart();
49
49
  },
50
50
 
51
- reportSpecResults: function(suite) {
52
- var results = suite.results();
53
-
54
- blanket.onTestDone(results.totalCount,results.passed());
51
+ specDone: function(result) {
52
+ var passed = result.status === "passed" ? 1 : 0;
53
+ blanket.onTestDone(1,passed);
55
54
  },
56
55
 
57
- reportRunnerResults: function(runner) {
56
+ jasmineDone: function() {
58
57
  blanket.onTestsDone();
59
58
  },
60
59
 
@@ -67,27 +66,20 @@
67
66
  }
68
67
  };
69
68
 
70
-
71
69
  // export public
72
70
  jasmine.BlanketReporter = BlanketReporter;
73
71
 
74
72
  //override existing jasmine execute
73
+ var originalJasmineExecute = jasmine.getEnv().execute;
75
74
  jasmine.getEnv().execute = function(){ console.log("waiting for blanket..."); };
76
75
 
77
- //check to make sure requirejs is completed before we start the test runner
78
- var allLoaded = function() {
79
- return window.jasmine.getEnv().currentRunner().specs().length > 0 && blanket.requireFilesLoaded();
80
- };
81
76
 
82
77
  blanket.beforeStartTestRunner({
83
78
  checkRequirejs:true,
84
- condition: allLoaded,
85
79
  callback:function(){
86
80
  jasmine.getEnv().addReporter(new jasmine.BlanketReporter());
87
- window.jasmine.getEnv().currentRunner().execute();
88
- jasmine.getEnv().execute = function () {
89
- jasmine.getEnv().currentRunner().execute();
90
- };
81
+ jasmine.getEnv().execute = originalJasmineExecute;
82
+ jasmine.getEnv().execute();
91
83
  }
92
84
  });
93
85
  })();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine-blanket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Carleton
@@ -65,10 +65,11 @@ files:
65
65
  - README.md
66
66
  - Rakefile
67
67
  - jasmine-blanket.gemspec
68
- - lib/jasmine/blanket.rb
69
- - lib/jasmine/blanket/version.rb
70
- - lib/vendor/assets/javascripts/jasmine-blanket.js
71
- homepage: ''
68
+ - lib/jasmine-blanket.rb
69
+ - lib/jasmine-blanket/engine.rb
70
+ - lib/jasmine-blanket/version.rb
71
+ - vendor/assets/javascripts/jasmine-blanket.js
72
+ homepage: https://github.com/ScotterC/jasmine-blanket
72
73
  licenses:
73
74
  - MIT
74
75
  metadata: {}