jasnode 0.4.1.0 → 0.4.2.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/README.md CHANGED
@@ -42,7 +42,7 @@ You can also use common rake tasks
42
42
 
43
43
  All of these map to
44
44
 
45
- $ jasnoda spec
45
+ $ jasnode spec
46
46
 
47
47
  The exit value is the number of failures, so 0 in the success case, so this should play nicely with CI and other tools.
48
48
 
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :build: 0
5
5
  :minor: 4
data/jasnode.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{jasnode}
8
- s.version = "0.4.1.0"
8
+ s.version = "0.4.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Cory Ondrejka"]
@@ -131,7 +131,6 @@ Gem::Specification.new do |s|
131
131
  "jasmine/src/util.js",
132
132
  "jasmine/src/version.json",
133
133
  "jasnode.gemspec",
134
- "lib/jasnode.js",
135
134
  "lib/jasnode.rb",
136
135
  "lib/jasnode/core.rb",
137
136
  "spec/jasnode/jasnode_spec.rb",
data/templates/Rakefile CHANGED
@@ -7,8 +7,10 @@ task :examples do
7
7
  sh 'jasnode spec'
8
8
  end
9
9
 
10
- task :test do
11
- sh 'jasnode spec'
10
+ namespace :test do
11
+ task :units do
12
+ sh 'jasnode spec'
13
+ end
12
14
  end
13
15
 
14
16
  task :cruise do
@@ -21,7 +21,7 @@ This will create the following hierarchy
21
21
  | `-- server.js <- your libraries go here
22
22
  |-- Rakefile
23
23
  `-- spec
24
- |-- README.md <- this file
24
+ |-- README.md
25
25
  |-- runner.js <- you'll need to add your libraries here
26
26
  |-- server
27
27
  | |-- server_spec.js <- test specs, replace with your own
@@ -42,7 +42,7 @@ You can also use common rake tasks
42
42
 
43
43
  All of these map to
44
44
 
45
- $ jasnoda spec
45
+ $ jasnode spec
46
46
 
47
47
  The exit value is the number of failures, so 0 in the success case, so this should play nicely with CI and other tools.
48
48
 
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.4.1.0
10
+ version: 0.4.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cory Ondrejka
@@ -154,7 +154,6 @@ files:
154
154
  - jasmine/src/util.js
155
155
  - jasmine/src/version.json
156
156
  - jasnode.gemspec
157
- - lib/jasnode.js
158
157
  - lib/jasnode.rb
159
158
  - lib/jasnode/core.rb
160
159
  - spec/jasnode/jasnode_spec.rb
data/lib/jasnode.js DELETED
@@ -1,135 +0,0 @@
1
- // This file is autogenerated by jasnode
2
- // It was inspired by node-jasmine (c) 2010 Adam Abrons and Misko Hevery http://getangular.com
3
- // Copyright (c) 2010 Cory Ondrejka. All rights reserved.
4
- // See MIT.LICENSE for licensing details.
5
-
6
- var fs = require('fs');
7
- var sys = require('sys');
8
-
9
- var filename = '/Users/cory/src/jasnode/lib/jasnode/../../jasmine/lib/jasmine-0.10.2.js';
10
- var src = fs.readFileSync(filename);
11
-
12
- // give jasmine values to bind
13
- global.window = {
14
- setTimeout: setTimeout,
15
- clearTimeout: clearTimeout,
16
- setInterval: setInterval,
17
- clearInterval: clearInterval
18
- };
19
-
20
- var jasmine = process.compile(src + '\njasmine;', filename);
21
-
22
- delete global.window;
23
-
24
- jasmine.run_specs = function() {
25
- var log = [];
26
- var columnCounter = 0;
27
- var verbose = true;
28
-
29
- // process in specs collected by jasnode
30
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/jasmine/examples/ruby/spec/example/example_spec.js'), '/Users/cory/src/jasnode/jasmine/examples/ruby/spec/example/example_spec.js');
31
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/spec/jasnode/spectest/spec/server/server_spec.js'), '/Users/cory/src/jasnode/spec/jasnode/spectest/spec/server/server_spec.js');
32
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/templates/spec/server/server_spec.js'), '/Users/cory/src/jasnode/templates/spec/server/server_spec.js');
33
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/spec/jasnode/spectest/spec/spec.js'), '/Users/cory/src/jasnode/spec/jasnode/spectest/spec/spec.js');
34
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/templates/spec/spec.js'), '/Users/cory/src/jasnode/templates/spec/spec.js');
35
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/spec/jasnode/spectest/spec/server/spec_server.js'), '/Users/cory/src/jasnode/spec/jasnode/spectest/spec/server/spec_server.js');
36
- process.compile(fs.readFileSync('/Users/cory/src/jasnode/templates/spec/server/spec_server.js'), '/Users/cory/src/jasnode/templates/spec/server/spec_server.js');
37
-
38
-
39
- // override jasmine reporter base class
40
- var jasmineEnv = jasmine.getEnv();
41
- jasmineEnv.reporter = {
42
- log: function(str){
43
- },
44
-
45
- reportRunnerStarting: function(runner) {
46
- date = new Date();
47
- sys.puts('Starting spec run at ' + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds());
48
- start = date.getTime();
49
- },
50
-
51
- reportSuiteResults: function(suite) {
52
- var spec_results = suite.results();
53
- var path = [];
54
- while(suite) {
55
- path.unshift(suite.description);
56
- suite = suite.parentSuite;
57
- }
58
- var description = path.join(' -> ');
59
-
60
- spec_results.items_.forEach(function(spec){
61
- if (spec.failedCount > 0 && spec.description) {
62
- log.push(description + '\n');
63
- log.push(' it ' + spec.description + '\n');
64
- spec.items_.forEach(function(result){
65
- log.push(' ' + result.trace.stack + '\n');
66
- });
67
- }
68
- });
69
- },
70
-
71
- reportSpecResults: function(spec) {
72
- sys.print(spec.results().failedCount ? "F" : ".");
73
- if (columnCounter++ < 50) return;
74
- columnCounter = 0;
75
- sys.print('\n');
76
- },
77
-
78
- reportRunnerResults: function(runner) {
79
- elapsed = (Number(new Date) - start) / 1000;
80
- sys.puts('\n');
81
- if (verbose)
82
- log.forEach(function(log){ sys.puts(log); });
83
-
84
- sys.puts('\n');
85
- sys.puts('Finished in ' + elapsed + ' seconds');
86
- sys.puts(jasmine.results(runner));
87
- process.exit(runner.results().failedCount);
88
- }
89
- };
90
- jasmineEnv.execute();
91
- };
92
-
93
- // print out the results
94
- jasmine.results = function(runner){
95
- var results = runner.results();
96
- var suites = runner.suites();
97
- var msg = '';
98
- msg += "\033[1m" + results.totalCount + ' example' + ((results.totalCount === 1) ? '' : 's') + '\033[22m, ';
99
- if (0 == results.failedCount)
100
- msg += "\033[32m" + results.failedCount + ' failure' + ((results.failedCount === 1) ? '' : 's') + '\033[39m\n';
101
- else
102
- msg += "\033[31m" + results.failedCount + ' failure' + ((results.failedCount === 1) ? '' : 's') + '\033[39m\n';
103
- return msg;
104
- };
105
-
106
- // create a busy wait to allow for async testing
107
- jasmine.async_spec_wait = function() {
108
- var wait = jasmine.async_spec_wait;
109
- wait.start = new Date().getTime();
110
- wait.done = false;
111
- (function inner_wait(){
112
- waits(10);
113
- runs(function() {
114
- if (wait.start + wait.timeout < new Date().getTime()) {
115
- expect('timeout waiting for spec').toBeNull();
116
- } else if (wait.done) {
117
- wait.done = false;
118
- } else {
119
- inner_wait();
120
- }
121
- });
122
- })();
123
- };
124
-
125
- // timeout after 10 seconds of waiting
126
- jasmine.async_spec_wait.timeout = 10 * 1000;
127
-
128
- jasmine.async_spec_done = function() {
129
- jasmine.async_spec_wait.done = true;
130
- };
131
-
132
- // make sure all the jasmine methods are available
133
- for ( var key in jasmine) {
134
- exports[key] = jasmine[key];
135
- }