jasmine-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +39 -0
- data/app/assets/javascripts/jasmine_rails/application.js +9 -0
- data/app/assets/stylesheets/jasmine_rails/application.css +7 -0
- data/app/controllers/jasmine_rails/application_controller.rb +4 -0
- data/app/controllers/jasmine_rails/spec_runner_controller.rb +4 -0
- data/app/views/jasmine_rails/spec_runner/index.html.erb +0 -0
- data/app/views/layouts/jasmine_rails/spec_runner.html.erb +77 -0
- data/config/routes.rb +3 -0
- data/lib/jasmine-rails.rb +4 -0
- data/lib/jasmine_rails/engine.rb +5 -0
- data/lib/jasmine_rails/version.rb +3 -0
- metadata +125 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2011 Justin Searls & Mark Van Holstyn
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'JasmineRails'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
Bundler::GemHelper.install_tasks
|
28
|
+
|
29
|
+
require 'rake/testtask'
|
30
|
+
|
31
|
+
Rake::TestTask.new(:test) do |t|
|
32
|
+
t.libs << 'lib'
|
33
|
+
t.libs << 'test'
|
34
|
+
t.pattern = 'test/**/*_test.rb'
|
35
|
+
t.verbose = false
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
task :default => :test
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
File without changes
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<%
|
2
|
+
#This file is a controlled mess to provide a page you can load with your browser when
|
3
|
+
# JHW doesn't provide sufficient console feedback.
|
4
|
+
# at some point the jasmine-gem will support Rails 3.1 / assets / Coffee.
|
5
|
+
# see this thread on the jasmine group: http://groups.google.com/group/jasmine-js/browse_thread/thread/c9c30854ecfd915d
|
6
|
+
require 'jasmine-core'
|
7
|
+
require 'jasmine'
|
8
|
+
|
9
|
+
jasmine_path = Jasmine::Core.path
|
10
|
+
jasmine_files = Jasmine::Core.js_files.map {|f| "/#{jasmine_path}/#{f}"}
|
11
|
+
css_files = Jasmine::Core.css_files.map {|f| "/#{jasmine_path}/#{f}"}
|
12
|
+
%>
|
13
|
+
<!DOCTYPE html>
|
14
|
+
<html>
|
15
|
+
<head>
|
16
|
+
<!-- jasmine -->
|
17
|
+
<% css_files.each do |css_file| %>
|
18
|
+
<style type="text/css" media="screen" data-path="<%=css_file%>">
|
19
|
+
<%= raw File.read(css_file) %>
|
20
|
+
</style>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<% jasmine_files.each do |jasmine_file| %>
|
24
|
+
<script type="text/javascript" data-path="<%=jasmine_file%>">
|
25
|
+
<%= raw File.read(jasmine_file) %>
|
26
|
+
</script>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<!-- css -->
|
30
|
+
<%= stylesheet_link_tag "application" %>
|
31
|
+
|
32
|
+
<!-- sources -->
|
33
|
+
<%= javascript_include_tag "application" %>
|
34
|
+
|
35
|
+
<% Jasmine::Config.new.spec_files_full_paths.each do |path| %>
|
36
|
+
<script type="text/javascript" data-path="<%=path%>">
|
37
|
+
<%= raw(path.end_with?('.coffee') ? CoffeeScript.compile(File.read(path)) : File.read(path)) %>
|
38
|
+
</script>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<!-- executing runner -->
|
42
|
+
<script type="text/javascript">
|
43
|
+
var jsApiReporter;
|
44
|
+
(function() {
|
45
|
+
var jasmineEnv = jasmine.getEnv();
|
46
|
+
|
47
|
+
jsApiReporter = new jasmine.JsApiReporter();
|
48
|
+
var trivialReporter = new jasmine.TrivialReporter();
|
49
|
+
|
50
|
+
jasmineEnv.addReporter(jsApiReporter);
|
51
|
+
jasmineEnv.addReporter(trivialReporter);
|
52
|
+
|
53
|
+
jasmineEnv.specFilter = function(spec) {
|
54
|
+
return trivialReporter.specFilter(spec);
|
55
|
+
};
|
56
|
+
|
57
|
+
var currentWindowOnload = window.onload;
|
58
|
+
|
59
|
+
window.onload = function() {
|
60
|
+
if (currentWindowOnload) {
|
61
|
+
currentWindowOnload();
|
62
|
+
}
|
63
|
+
execJasmine();
|
64
|
+
};
|
65
|
+
|
66
|
+
function execJasmine() {
|
67
|
+
jasmineEnv.execute();
|
68
|
+
}
|
69
|
+
|
70
|
+
})();
|
71
|
+
</script>
|
72
|
+
</head>
|
73
|
+
<body>
|
74
|
+
<div id="jasmine_content"></div>
|
75
|
+
<%= yield %>
|
76
|
+
<body>
|
77
|
+
</html>
|
data/config/routes.rb
ADDED
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jasmine-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Justin Searls
|
14
|
+
- Mark Van Holstyn
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2011-08-27 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rails
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 15424105
|
30
|
+
segments:
|
31
|
+
- 3
|
32
|
+
- 1
|
33
|
+
- 0
|
34
|
+
- rc
|
35
|
+
- 6
|
36
|
+
version: 3.1.0.rc6
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id001
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: jasmine
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 3
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
version: "0"
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: jasmine-headless-webkit
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
type: :runtime
|
66
|
+
version_requirements: *id003
|
67
|
+
description: Provides a Jasmine Spec Runner that plays nicely with Rails 3.1 assets and jasmine-headless-webkit
|
68
|
+
email:
|
69
|
+
- searls@gmail.com
|
70
|
+
- mvanholstyn@gmail.com
|
71
|
+
executables: []
|
72
|
+
|
73
|
+
extensions: []
|
74
|
+
|
75
|
+
extra_rdoc_files: []
|
76
|
+
|
77
|
+
files:
|
78
|
+
- app/assets/javascripts/jasmine_rails/application.js
|
79
|
+
- app/assets/stylesheets/jasmine_rails/application.css
|
80
|
+
- app/controllers/jasmine_rails/application_controller.rb
|
81
|
+
- app/controllers/jasmine_rails/spec_runner_controller.rb
|
82
|
+
- app/views/jasmine_rails/spec_runner/index.html.erb
|
83
|
+
- app/views/layouts/jasmine_rails/spec_runner.html.erb
|
84
|
+
- config/routes.rb
|
85
|
+
- lib/jasmine-rails.rb
|
86
|
+
- lib/jasmine_rails/engine.rb
|
87
|
+
- lib/jasmine_rails/version.rb
|
88
|
+
- MIT-LICENSE
|
89
|
+
- Rakefile
|
90
|
+
- README.rdoc
|
91
|
+
homepage: http://github.com/searls/jasmine-rails
|
92
|
+
licenses: []
|
93
|
+
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options: []
|
96
|
+
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
version: "0"
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
requirements: []
|
118
|
+
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 1.8.6
|
121
|
+
signing_key:
|
122
|
+
specification_version: 3
|
123
|
+
summary: Provides a Jasmine Spec Runner that plays nicely with Rails 3.1 assets and jasmine-headless-webkit
|
124
|
+
test_files: []
|
125
|
+
|