jasmine 1.3.2 → 2.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +3 -37
  3. data/Gemfile +11 -2
  4. data/HOW_TO_TEST.markdown +1 -1
  5. data/README.markdown +10 -10
  6. data/Rakefile +18 -29
  7. data/generators/jasmine/templates/jasmine-example/spec/PlayerSpec.js +2 -2
  8. data/generators/jasmine/templates/jasmine-example/spec/SpecHelper.js +14 -8
  9. data/generators/jasmine/templates/spec/javascripts/support/jasmine.yml +3 -3
  10. data/generators/jasmine/templates/spec/javascripts/support/jasmine_helper.rb +1 -0
  11. data/jasmine.gemspec +11 -41
  12. data/lib/generators/jasmine/examples/templates/spec/javascripts/helpers/SpecHelper.js +15 -9
  13. data/lib/generators/jasmine/examples/templates/spec/javascripts/jasmine_examples/PlayerSpec.js +1 -1
  14. data/lib/jasmine.rb +10 -7
  15. data/lib/jasmine/asset_bundle.rb +69 -0
  16. data/lib/jasmine/asset_expander.rb +7 -7
  17. data/lib/jasmine/command_line_tool.rb +18 -0
  18. data/lib/jasmine/config.rb +23 -15
  19. data/lib/jasmine/configuration.rb +14 -8
  20. data/lib/jasmine/core_configuration.rb +7 -4
  21. data/lib/jasmine/dependencies.rb +14 -18
  22. data/lib/jasmine/formatters/base.rb +9 -0
  23. data/lib/jasmine/formatters/console.rb +45 -0
  24. data/lib/jasmine/formatters/junit_xml.rb +47 -0
  25. data/lib/jasmine/path_expander.rb +1 -1
  26. data/lib/jasmine/railtie.rb +7 -6
  27. data/lib/jasmine/reporters/api_reporter.rb +38 -0
  28. data/lib/jasmine/results.rb +28 -9
  29. data/lib/jasmine/results_processor.rb +1 -1
  30. data/lib/jasmine/run.html.erb +1 -1
  31. data/lib/jasmine/run_specs.rb +12 -15
  32. data/lib/jasmine/runners/http.rb +11 -49
  33. data/lib/jasmine/selenium_driver.rb +17 -14
  34. data/lib/jasmine/tasks/jasmine.rake +21 -30
  35. data/lib/jasmine/tasks/{jasmine_rails3.rake → jasmine_rails.rake} +0 -0
  36. data/lib/jasmine/version.rb +1 -1
  37. data/lib/jasmine/yaml_config_parser.rb +9 -0
  38. data/release_notes/v2.0.0.rc2.md +44 -0
  39. data/spec/application_spec.rb +33 -38
  40. data/spec/asset_expander_spec.rb +4 -32
  41. data/spec/configuration_spec.rb +95 -35
  42. data/spec/jasmine_command_line_tool_spec.rb +63 -11
  43. data/spec/jasmine_rails_spec.rb +94 -0
  44. data/spec/lib/jasmine/formatters/base_spec.rb +9 -0
  45. data/spec/lib/jasmine/formatters/console_spec.rb +92 -0
  46. data/spec/lib/jasmine/formatters/junit_xml_spec.rb +55 -0
  47. data/spec/lib/jasmine/reporters/api_reporter_spec.rb +53 -0
  48. data/spec/lib/jasmine/runners/http_spec.rb +21 -0
  49. data/spec/path_expander_spec.rb +25 -0
  50. data/spec/results_spec.rb +59 -17
  51. data/spec/spec_helper.rb +36 -18
  52. data/spec/support/fake_selenium_driver.rb +35 -0
  53. data/spec/yaml_config_parser_spec.rb +37 -0
  54. metadata +65 -103
  55. data/generators/jasmine/templates/jasmine-example/SpecRunner.html +0 -54
  56. data/lib/jasmine/asset_pipeline_utility.rb +0 -19
  57. data/lib/jasmine/javascripts/boot.js +0 -28
  58. data/lib/jasmine/rspec_formatter.rb +0 -92
  59. data/spec/dependencies_spec.rb +0 -315
  60. data/spec/jasmine_rails2_spec.rb +0 -89
  61. data/spec/jasmine_rails3_spec.rb +0 -69
  62. data/spec/jasmine_self_test_spec.rb +0 -29
  63. data/spec/rspec_formatter_spec.rb +0 -88
@@ -61,6 +61,26 @@ describe Jasmine::YamlConfigParser do
61
61
  parser.spec_helper.should == 'some_project_root/some_spec_helper.rb'
62
62
  end
63
63
 
64
+ it "boot_dir returns nil when boot dir is blank" do
65
+ yaml_loader = lambda do |path|
66
+ if path == "some_path"
67
+ {"boot_dir" => nil}
68
+ end
69
+ end
70
+ parser = Jasmine::YamlConfigParser.new('some_path', 'some_project_root', nil, yaml_loader)
71
+ parser.boot_dir.should be_nil
72
+ end
73
+
74
+ it "boot_dir returns boot_dir if set" do
75
+ yaml_loader = lambda do |path|
76
+ if path == "some_path"
77
+ {"boot_dir" => 'some_boot_dir'}
78
+ end
79
+ end
80
+ parser = Jasmine::YamlConfigParser.new('some_path', 'some_project_root', nil, yaml_loader)
81
+ parser.boot_dir.should == File.join('some_project_root', 'some_boot_dir')
82
+ end
83
+
64
84
  it "spec_dir uses default path when spec dir is blank" do
65
85
  yaml_loader = lambda do |path|
66
86
  if path == "some_path"
@@ -149,6 +169,23 @@ describe Jasmine::YamlConfigParser do
149
169
  parser.jasmine_files.should == ['expected_results']
150
170
  end
151
171
 
172
+ it "expands boot_file paths" do
173
+ expander = lambda do |dir, patterns|
174
+ if (dir == File.join('some_project_root', 'some_boot') && patterns == ['some_patterns'])
175
+ ['expected_results']
176
+ end
177
+ end
178
+ yaml_loader = lambda do |path|
179
+ if path == "some_path"
180
+ { 'boot_dir' => 'some_boot', 'boot_files' => ['some_patterns'] }
181
+ end
182
+ end
183
+
184
+ parser = Jasmine::YamlConfigParser.new('some_path', 'some_project_root', expander, yaml_loader)
185
+
186
+ parser.boot_files.should == ['expected_results']
187
+ end
188
+
152
189
  it "expands jasmine css file paths" do
153
190
  expander = lambda do |dir, patterns|
154
191
  if (dir == File.join('some_project_root', 'some_jasmine') && patterns == ['some_patterns'])
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
5
- prerelease:
4
+ version: 2.0.0.rc2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Rajan Agaskar
@@ -11,184 +10,148 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-03-11 00:00:00.000000000 Z
13
+ date: 2013-07-29 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rspec
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: 2.5.0
24
22
  type: :development
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: 2.5.0
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: rails
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
- - - ! '>='
33
+ - - '>='
38
34
  - !ruby/object:Gem::Version
39
- version: 3.0.0
35
+ version: '4'
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - '>='
46
41
  - !ruby/object:Gem::Version
47
- version: 3.0.0
48
- - !ruby/object:Gem::Dependency
49
- name: rack
50
- requirement: !ruby/object:Gem::Requirement
51
- none: false
52
- requirements:
53
- - - ! '>='
54
- - !ruby/object:Gem::Version
55
- version: 1.2.1
56
- type: :development
57
- prerelease: false
58
- version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
- requirements:
61
- - - ! '>='
62
- - !ruby/object:Gem::Version
63
- version: 1.2.1
42
+ version: '4'
64
43
  - !ruby/object:Gem::Dependency
65
44
  name: rack-test
66
45
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
46
  requirements:
69
- - - ! '>='
47
+ - - '>='
70
48
  - !ruby/object:Gem::Version
71
49
  version: '0'
72
50
  type: :development
73
51
  prerelease: false
74
52
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
53
  requirements:
77
- - - ! '>='
54
+ - - '>='
78
55
  - !ruby/object:Gem::Version
79
56
  version: '0'
80
57
  - !ruby/object:Gem::Dependency
81
58
  name: json_pure
82
59
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
60
  requirements:
85
- - - ! '>='
61
+ - - '>='
86
62
  - !ruby/object:Gem::Version
87
63
  version: '0'
88
64
  type: :development
89
65
  prerelease: false
90
66
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
67
  requirements:
93
- - - ! '>='
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- - !ruby/object:Gem::Dependency
97
- name: nokogiri
98
- requirement: !ruby/object:Gem::Requirement
99
- none: false
100
- requirements:
101
- - - ! '>='
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- none: false
108
- requirements:
109
- - - ! '>='
68
+ - - '>='
110
69
  - !ruby/object:Gem::Version
111
70
  version: '0'
112
71
  - !ruby/object:Gem::Dependency
113
72
  name: anchorman
114
73
  requirement: !ruby/object:Gem::Requirement
115
- none: false
116
74
  requirements:
117
- - - ! '>='
75
+ - - '>='
118
76
  - !ruby/object:Gem::Version
119
77
  version: '0'
120
78
  type: :development
121
79
  prerelease: false
122
80
  version_requirements: !ruby/object:Gem::Requirement
123
- none: false
124
81
  requirements:
125
- - - ! '>='
82
+ - - '>='
126
83
  - !ruby/object:Gem::Version
127
84
  version: '0'
128
85
  - !ruby/object:Gem::Dependency
129
86
  name: jasmine-core
130
87
  requirement: !ruby/object:Gem::Requirement
131
- none: false
132
88
  requirements:
133
89
  - - ~>
134
90
  - !ruby/object:Gem::Version
135
- version: 1.3.1
91
+ version: 2.0.0.alpha
136
92
  type: :runtime
137
93
  prerelease: false
138
94
  version_requirements: !ruby/object:Gem::Requirement
139
- none: false
140
95
  requirements:
141
96
  - - ~>
142
97
  - !ruby/object:Gem::Version
143
- version: 1.3.1
98
+ version: 2.0.0.alpha
144
99
  - !ruby/object:Gem::Dependency
145
100
  name: rack
146
101
  requirement: !ruby/object:Gem::Requirement
147
- none: false
148
102
  requirements:
149
- - - ~>
103
+ - - '>='
150
104
  - !ruby/object:Gem::Version
151
- version: '1.0'
105
+ version: '0'
152
106
  type: :runtime
153
107
  prerelease: false
154
108
  version_requirements: !ruby/object:Gem::Requirement
155
- none: false
156
109
  requirements:
157
- - - ~>
110
+ - - '>='
158
111
  - !ruby/object:Gem::Version
159
- version: '1.0'
112
+ version: '0'
160
113
  - !ruby/object:Gem::Dependency
161
114
  name: rspec
162
115
  requirement: !ruby/object:Gem::Requirement
163
- none: false
164
116
  requirements:
165
- - - ! '>='
117
+ - - '>='
166
118
  - !ruby/object:Gem::Version
167
119
  version: 1.3.1
168
120
  type: :runtime
169
121
  prerelease: false
170
122
  version_requirements: !ruby/object:Gem::Requirement
171
- none: false
172
123
  requirements:
173
- - - ! '>='
124
+ - - '>='
174
125
  - !ruby/object:Gem::Version
175
126
  version: 1.3.1
176
127
  - !ruby/object:Gem::Dependency
177
128
  name: selenium-webdriver
178
129
  requirement: !ruby/object:Gem::Requirement
179
- none: false
180
130
  requirements:
181
- - - ! '>='
131
+ - - '>='
182
132
  - !ruby/object:Gem::Version
183
133
  version: 0.1.3
184
134
  type: :runtime
185
135
  prerelease: false
186
136
  version_requirements: !ruby/object:Gem::Requirement
187
- none: false
188
137
  requirements:
189
- - - ! '>='
138
+ - - '>='
190
139
  - !ruby/object:Gem::Version
191
140
  version: 0.1.3
141
+ - !ruby/object:Gem::Dependency
142
+ name: nokogiri
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ type: :runtime
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
192
155
  description: Test your JavaScript without any framework dependencies, in any environment,
193
156
  and with a nice descriptive syntax.
194
157
  email: jasmine-js@googlegroups.com
@@ -209,7 +172,6 @@ files:
209
172
  - bin/jasmine
210
173
  - generators/jasmine/jasmine_generator.rb
211
174
  - generators/jasmine/templates/INSTALL
212
- - generators/jasmine/templates/jasmine-example/SpecRunner.html
213
175
  - generators/jasmine/templates/jasmine-example/spec/PlayerSpec.js
214
176
  - generators/jasmine/templates/jasmine-example/spec/SpecHelper.js
215
177
  - generators/jasmine/templates/jasmine-example/src/Player.js
@@ -232,9 +194,9 @@ files:
232
194
  - lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine_helper.rb
233
195
  - lib/jasmine.rb
234
196
  - lib/jasmine/application.rb
197
+ - lib/jasmine/asset_bundle.rb
235
198
  - lib/jasmine/asset_expander.rb
236
199
  - lib/jasmine/asset_pipeline_mapper.rb
237
- - lib/jasmine/asset_pipeline_utility.rb
238
200
  - lib/jasmine/base.rb
239
201
  - lib/jasmine/command_line_tool.rb
240
202
  - lib/jasmine/config.rb
@@ -245,21 +207,23 @@ files:
245
207
  - lib/jasmine/firebug/firebug-1.7.0.xpi
246
208
  - lib/jasmine/firebug/firebug-license.txt
247
209
  - lib/jasmine/firebug/firebug.rb
248
- - lib/jasmine/javascripts/boot.js
210
+ - lib/jasmine/formatters/base.rb
211
+ - lib/jasmine/formatters/console.rb
212
+ - lib/jasmine/formatters/junit_xml.rb
249
213
  - lib/jasmine/page.rb
250
214
  - lib/jasmine/path_expander.rb
251
215
  - lib/jasmine/path_mapper.rb
252
216
  - lib/jasmine/railtie.rb
217
+ - lib/jasmine/reporters/api_reporter.rb
253
218
  - lib/jasmine/results.rb
254
219
  - lib/jasmine/results_processor.rb
255
- - lib/jasmine/rspec_formatter.rb
256
220
  - lib/jasmine/run.html.erb
257
221
  - lib/jasmine/run_specs.rb
258
222
  - lib/jasmine/runners/http.rb
259
223
  - lib/jasmine/selenium_driver.rb
260
224
  - lib/jasmine/server.rb
261
225
  - lib/jasmine/tasks/jasmine.rake
262
- - lib/jasmine/tasks/jasmine_rails3.rake
226
+ - lib/jasmine/tasks/jasmine_rails.rake
263
227
  - lib/jasmine/version.rb
264
228
  - lib/jasmine/yaml_config_parser.rb
265
229
  - lib/rack/jasmine/cache_control.rb
@@ -267,61 +231,57 @@ files:
267
231
  - lib/rack/jasmine/runner.rb
268
232
  - release_notes/v1.2.1.md
269
233
  - release_notes/v1.3.2.md
234
+ - release_notes/v2.0.0.rc2.md
270
235
  - spec/application_integration_spec.rb
271
236
  - spec/application_spec.rb
272
237
  - spec/asset_expander_spec.rb
273
238
  - spec/asset_pipeline_mapper_spec.rb
274
239
  - spec/base_spec.rb
275
240
  - spec/configuration_spec.rb
276
- - spec/dependencies_spec.rb
277
241
  - spec/fixture/Rakefile
278
242
  - spec/jasmine_command_line_tool_rakeless_spec.rb
279
243
  - spec/jasmine_command_line_tool_spec.rb
280
244
  - spec/jasmine_pojs_spec.rb
281
- - spec/jasmine_rails2_spec.rb
282
- - spec/jasmine_rails3_spec.rb
283
- - spec/jasmine_self_test_spec.rb
245
+ - spec/jasmine_rails_spec.rb
246
+ - spec/lib/jasmine/formatters/base_spec.rb
247
+ - spec/lib/jasmine/formatters/console_spec.rb
248
+ - spec/lib/jasmine/formatters/junit_xml_spec.rb
249
+ - spec/lib/jasmine/reporters/api_reporter_spec.rb
250
+ - spec/lib/jasmine/runners/http_spec.rb
284
251
  - spec/page_spec.rb
285
252
  - spec/path_expander_spec.rb
286
253
  - spec/path_mapper_spec.rb
287
254
  - spec/rack/jasmine/runner_spec.rb
288
255
  - spec/results_processor_spec.rb
289
256
  - spec/results_spec.rb
290
- - spec/rspec_formatter_spec.rb
291
257
  - spec/server_spec.rb
292
258
  - spec/spec_helper.rb
259
+ - spec/support/fake_selenium_driver.rb
293
260
  - spec/yaml_config_parser_spec.rb
294
261
  homepage: http://pivotal.github.com/jasmine/
295
262
  licenses:
296
263
  - MIT
264
+ metadata: {}
297
265
  post_install_message:
298
266
  rdoc_options:
299
267
  - --charset=UTF-8
300
268
  require_paths:
301
269
  - lib
302
270
  required_ruby_version: !ruby/object:Gem::Requirement
303
- none: false
304
271
  requirements:
305
- - - ! '>='
272
+ - - '>='
306
273
  - !ruby/object:Gem::Version
307
274
  version: '0'
308
- segments:
309
- - 0
310
- hash: -4429629343753385454
311
275
  required_rubygems_version: !ruby/object:Gem::Requirement
312
- none: false
313
276
  requirements:
314
- - - ! '>='
277
+ - - '>'
315
278
  - !ruby/object:Gem::Version
316
- version: '0'
317
- segments:
318
- - 0
319
- hash: -4429629343753385454
279
+ version: 1.3.1
320
280
  requirements: []
321
281
  rubyforge_project:
322
- rubygems_version: 1.8.25
282
+ rubygems_version: 2.0.6
323
283
  signing_key:
324
- specification_version: 3
284
+ specification_version: 4
325
285
  summary: JavaScript BDD framework
326
286
  test_files:
327
287
  - spec/application_integration_spec.rb
@@ -330,21 +290,23 @@ test_files:
330
290
  - spec/asset_pipeline_mapper_spec.rb
331
291
  - spec/base_spec.rb
332
292
  - spec/configuration_spec.rb
333
- - spec/dependencies_spec.rb
334
293
  - spec/fixture/Rakefile
335
294
  - spec/jasmine_command_line_tool_rakeless_spec.rb
336
295
  - spec/jasmine_command_line_tool_spec.rb
337
296
  - spec/jasmine_pojs_spec.rb
338
- - spec/jasmine_rails2_spec.rb
339
- - spec/jasmine_rails3_spec.rb
340
- - spec/jasmine_self_test_spec.rb
297
+ - spec/jasmine_rails_spec.rb
298
+ - spec/lib/jasmine/formatters/base_spec.rb
299
+ - spec/lib/jasmine/formatters/console_spec.rb
300
+ - spec/lib/jasmine/formatters/junit_xml_spec.rb
301
+ - spec/lib/jasmine/reporters/api_reporter_spec.rb
302
+ - spec/lib/jasmine/runners/http_spec.rb
341
303
  - spec/page_spec.rb
342
304
  - spec/path_expander_spec.rb
343
305
  - spec/path_mapper_spec.rb
344
306
  - spec/rack/jasmine/runner_spec.rb
345
307
  - spec/results_processor_spec.rb
346
308
  - spec/results_spec.rb
347
- - spec/rspec_formatter_spec.rb
348
309
  - spec/server_spec.rb
349
310
  - spec/spec_helper.rb
311
+ - spec/support/fake_selenium_driver.rb
350
312
  - spec/yaml_config_parser_spec.rb
@@ -1,54 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
- "http://www.w3.org/TR/html4/loose.dtd">
3
- <html>
4
- <head>
5
- <title>Jasmine Spec Runner</title>
6
-
7
- <link rel="shortcut icon" type="image/png" href="lib/jasmine-1.1.0.rc1/jasmine_favicon.png">
8
-
9
- <link rel="stylesheet" type="text/css" href="lib/jasmine-1.1.0.rc1/jasmine.css">
10
- <script type="text/javascript" src="lib/jasmine-1.1.0.rc1/jasmine.js"></script>
11
- <script type="text/javascript" src="lib/jasmine-1.1.0.rc1/jasmine-html.js"></script>
12
-
13
- <!-- include spec files here... -->
14
- <script type="text/javascript" src="spec/SpecHelper.js"></script>
15
- <script type="text/javascript" src="spec/PlayerSpec.js"></script>
16
-
17
- <!-- include source files here... -->
18
- <script type="text/javascript" src="src/Player.js"></script>
19
- <script type="text/javascript" src="src/Song.js"></script>
20
-
21
- <script type="text/javascript">
22
- (function() {
23
- var jasmineEnv = jasmine.getEnv();
24
- jasmineEnv.updateInterval = 1000;
25
-
26
- var trivialReporter = new jasmine.TrivialReporter();
27
-
28
- jasmineEnv.addReporter(trivialReporter);
29
-
30
- jasmineEnv.specFilter = function(spec) {
31
- return trivialReporter.specFilter(spec);
32
- };
33
-
34
- var currentWindowOnload = window.onload;
35
-
36
- window.onload = function() {
37
- if (currentWindowOnload) {
38
- currentWindowOnload();
39
- }
40
- execJasmine();
41
- };
42
-
43
- function execJasmine() {
44
- jasmineEnv.execute();
45
- }
46
-
47
- })();
48
- </script>
49
-
50
- </head>
51
-
52
- <body>
53
- </body>
54
- </html>