evergreen 1.0.0.rc → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/README.rdoc +10 -2
  2. data/config/routes.rb +1 -1
  3. data/lib/evergreen.rb +2 -6
  4. data/lib/evergreen/application.rb +38 -59
  5. data/lib/evergreen/cli.rb +2 -2
  6. data/lib/evergreen/runner.rb +6 -3
  7. data/lib/evergreen/server.rb +1 -5
  8. data/lib/evergreen/suite.rb +1 -13
  9. data/lib/evergreen/tasks.rb +1 -1
  10. data/lib/evergreen/version.rb +1 -1
  11. data/lib/jasmine/Contribute.markdown +44 -0
  12. data/lib/jasmine/Gemfile +4 -6
  13. data/lib/jasmine/MIT.LICENSE +1 -1
  14. data/lib/jasmine/README.markdown +17 -14
  15. data/lib/jasmine/Rakefile +21 -170
  16. data/lib/jasmine/Release.markdown +40 -0
  17. data/lib/jasmine/images/jasmine_favicon.png +0 -0
  18. data/lib/jasmine/jasmine-core.gemspec +22 -0
  19. data/lib/jasmine/jshint/jshint.js +5919 -0
  20. data/lib/jasmine/jshint/run.js +99 -0
  21. data/lib/jasmine/lib/jasmine-core.rb +36 -0
  22. data/lib/jasmine/lib/jasmine-core/example/SpecRunner.html +54 -0
  23. data/lib/jasmine/{example → lib/jasmine-core/example}/spec/PlayerSpec.js +0 -0
  24. data/lib/jasmine/{example → lib/jasmine-core/example}/spec/SpecHelper.js +3 -3
  25. data/lib/jasmine/{example → lib/jasmine-core/example}/src/Player.js +0 -0
  26. data/lib/jasmine/{example → lib/jasmine-core/example}/src/Song.js +0 -0
  27. data/lib/jasmine/lib/{jasmine-html.js → jasmine-core/jasmine-html.js} +6 -4
  28. data/lib/jasmine/lib/{jasmine.css → jasmine-core/jasmine.css} +0 -0
  29. data/lib/jasmine/lib/{jasmine.js → jasmine-core/jasmine.js} +103 -48
  30. data/lib/jasmine/lib/{json2.js → jasmine-core/json2.js} +0 -0
  31. data/lib/jasmine/lib/jasmine-core/version.rb +6 -0
  32. data/lib/jasmine/spec/console/ConsoleReporterSpec.js +451 -0
  33. data/lib/jasmine/spec/{suites → core}/BaseSpec.js +0 -0
  34. data/lib/jasmine/spec/{suites → core}/CustomMatchersSpec.js +0 -0
  35. data/lib/jasmine/spec/{suites → core}/EnvSpec.js +3 -2
  36. data/lib/jasmine/spec/{suites → core}/ExceptionsSpec.js +46 -4
  37. data/lib/jasmine/spec/{suites → core}/JsApiReporterSpec.js +1 -1
  38. data/lib/jasmine/spec/{suites → core}/MatchersSpec.js +87 -44
  39. data/lib/jasmine/spec/{suites → core}/MockClockSpec.js +0 -0
  40. data/lib/jasmine/spec/{suites → core}/MultiReporterSpec.js +3 -3
  41. data/lib/jasmine/spec/{suites → core}/NestedResultsSpec.js +0 -0
  42. data/lib/jasmine/spec/{suites → core}/PrettyPrintSpec.js +0 -6
  43. data/lib/jasmine/spec/{suites → core}/QueueSpec.js +0 -0
  44. data/lib/jasmine/spec/{suites → core}/ReporterSpec.js +0 -0
  45. data/lib/jasmine/spec/{suites → core}/RunnerSpec.js +0 -0
  46. data/lib/jasmine/spec/{suites → core}/SpecRunningSpec.js +14 -9
  47. data/lib/jasmine/spec/{suites → core}/SpecSpec.js +1 -1
  48. data/lib/jasmine/spec/{suites → core}/SpySpec.js +0 -0
  49. data/lib/jasmine/spec/{suites → core}/SuiteSpec.js +0 -0
  50. data/lib/jasmine/spec/{suites → core}/UtilSpec.js +0 -1
  51. data/lib/jasmine/spec/{suites → core}/WaitsForBlockSpec.js +32 -1
  52. data/lib/jasmine/spec/html/MatchersHtmlSpec.js +38 -0
  53. data/lib/jasmine/spec/html/PrettyPrintHtmlSpec.js +8 -0
  54. data/lib/jasmine/spec/{suites → html}/TrivialReporterSpec.js +3 -2
  55. data/lib/jasmine/spec/node_suite.js +127 -0
  56. data/lib/jasmine/spec/runner.html +44 -45
  57. data/lib/jasmine/spec/templates/runner.html.erb +49 -0
  58. data/lib/jasmine/spec/templates/script_tag.html.erb +1 -0
  59. data/lib/jasmine/src/SourcesList.json +7 -0
  60. data/lib/jasmine/src/console/ConsoleReporter.js +177 -0
  61. data/lib/jasmine/src/{Block.js → core/Block.js} +1 -1
  62. data/lib/jasmine/src/{Env.js → core/Env.js} +13 -8
  63. data/lib/jasmine/src/{JsApiReporter.js → core/JsApiReporter.js} +0 -0
  64. data/lib/jasmine/src/{Matchers.js → core/Matchers.js} +24 -7
  65. data/lib/jasmine/src/{MultiReporter.js → core/MultiReporter.js} +0 -0
  66. data/lib/jasmine/src/{NestedResults.js → core/NestedResults.js} +0 -0
  67. data/lib/jasmine/src/{PrettyPrinter.js → core/PrettyPrinter.js} +2 -1
  68. data/lib/jasmine/src/{Queue.js → core/Queue.js} +0 -0
  69. data/lib/jasmine/src/{Reporter.js → core/Reporter.js} +0 -0
  70. data/lib/jasmine/src/{Runner.js → core/Runner.js} +1 -1
  71. data/lib/jasmine/src/{Spec.js → core/Spec.js} +2 -1
  72. data/lib/jasmine/src/{Suite.js → core/Suite.js} +1 -1
  73. data/lib/jasmine/src/{WaitsBlock.js → core/WaitsBlock.js} +3 -1
  74. data/lib/jasmine/src/{WaitsForBlock.js → core/WaitsForBlock.js} +4 -2
  75. data/lib/jasmine/src/{base.js → core/base.js} +52 -24
  76. data/lib/jasmine/src/{mock-timeout.js → core/mock-timeout.js} +0 -0
  77. data/lib/jasmine/src/{util.js → core/util.js} +1 -1
  78. data/lib/jasmine/src/html/TrivialReporter.js +6 -4
  79. data/lib/jasmine/src/templates/example_project_jasmine_tags.html.erb +3 -0
  80. data/lib/jasmine/src/templates/version.js.erb +6 -0
  81. data/lib/jasmine/src/templates/version.rb.erb +6 -0
  82. data/lib/jasmine/src/version.js +6 -0
  83. data/lib/jasmine/src/version.json +2 -2
  84. data/lib/jasmine/tasks/build_dist.rb +48 -0
  85. data/lib/jasmine/tasks/build_specs.rb +50 -0
  86. data/lib/jasmine/tasks/docs.rb +17 -0
  87. data/lib/jasmine/tasks/helpers.rb +50 -0
  88. data/lib/jasmine/tasks/pages.rb +13 -0
  89. data/lib/jasmine/tasks/spec.rb +37 -0
  90. data/lib/jasmine/tasks/standalone.rb +91 -0
  91. data/lib/jasmine/tasks/version.rb +5 -0
  92. data/lib/tasks/evergreen.rake +1 -1
  93. data/spec/evergreen_spec.rb +6 -7
  94. data/spec/runner_spec.rb +1 -1
  95. data/spec/spec_helper.rb +5 -8
  96. metadata +95 -77
  97. data/lib/jasmine/cruise_config.rb +0 -21
  98. data/lib/jasmine/example/SpecRunner.html +0 -27
  99. data/lib/jasmine/images/fail-16.png +0 -0
  100. data/lib/jasmine/images/fail.png +0 -0
  101. data/lib/jasmine/images/go-16.png +0 -0
  102. data/lib/jasmine/images/go.png +0 -0
  103. data/lib/jasmine/images/pending-16.png +0 -0
  104. data/lib/jasmine/images/pending.png +0 -0
  105. data/lib/jasmine/images/question-bk.png +0 -0
  106. data/lib/jasmine/images/questionbk-16.png +0 -0
  107. data/lib/jasmine/images/spinner.gif +0 -0
@@ -0,0 +1,3 @@
1
+ <link rel="stylesheet" type="text/css" href="lib/jasmine-<%= jasmine_version %>/jasmine.css">
2
+ <script type="text/javascript" src="lib/jasmine-<%= jasmine_version %>/jasmine.js"></script>
3
+ <script type="text/javascript" src="lib/jasmine-<%= jasmine_version %>/jasmine-html.js"></script>
@@ -0,0 +1,6 @@
1
+ jasmine.version_= {
2
+ "major": <%= major %>,
3
+ "minor": <%= minor %>,
4
+ "build": <%= build %>,
5
+ "revision": <%= revision %><%= %Q{,\n "release_candidate": #{release_candidate}} if release_candidate %>
6
+ };
@@ -0,0 +1,6 @@
1
+ module Jasmine
2
+ module Core
3
+ VERSION = "<%= "#{major}.#{minor}.#{build}" %><%= ".rc#{release_candidate}" if release_candidate %>"
4
+ end
5
+ end
6
+
@@ -0,0 +1,6 @@
1
+ jasmine.version_= {
2
+ "major": 1,
3
+ "minor": 1,
4
+ "build": 0,
5
+ "revision": 1315677058
6
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "major": 1,
3
- "minor": 0,
4
- "build": 1
3
+ "minor": 1,
4
+ "build": 0
5
5
  }
@@ -0,0 +1,48 @@
1
+ desc "Build core jasmine.js"
2
+ task :build_dist => [:lint, :write_version_files] do
3
+ puts 'Building Jasmine distribution from source'.cyan
4
+
5
+ concat_into('./lib/jasmine-core/jasmine.js') { core_sources + version_source_file }
6
+ concat_into('./lib/jasmine-core/jasmine-html.js') { html_sources }
7
+
8
+ FileUtils.cp('./src/html/jasmine.css', './lib/jasmine-core/jasmine.css')
9
+ end
10
+
11
+ def concat_into(output_file, &block)
12
+ files = yield
13
+ File.open(output_file, 'w') do |out|
14
+ files.each do |f|
15
+ out << File.read(f)
16
+ end
17
+ end
18
+ end
19
+
20
+ desc 'Check jasmine sources for coding problems'
21
+ task :lint => :require_node do
22
+ puts "Running JSHint via Node.js".cyan
23
+ system("node jshint/run.js") || exit(1)
24
+ end
25
+
26
+ task :hint => :lint
27
+
28
+ task :write_version_files do
29
+ scope = OpenStruct.new(:major => version_hash["major"],
30
+ :minor => version_hash["minor"],
31
+ :build => version_hash["build"],
32
+ :release_candidate => version_hash["release_candidate"],
33
+ :revision => Time.now.to_i)
34
+
35
+ js_template = Tilt.new('./src/templates/version.js.erb')
36
+ File.open('./src/version.js', 'w+') do |f|
37
+ f << js_template.render(scope)
38
+ end
39
+
40
+ rb_template = Tilt.new('./src/templates/version.rb.erb')
41
+ File.open('./lib/jasmine-core/version.rb', 'w+') do |f|
42
+ f << rb_template.render(scope)
43
+ end
44
+ end
45
+
46
+ def version_source_file
47
+ Dir.glob('src/version.js')
48
+ end
@@ -0,0 +1,50 @@
1
+ require 'ostruct'
2
+
3
+ #build the browser spec for Jasmine core based on current tree
4
+ task :build_runner_html do
5
+ template = Tilt.new('spec/templates/runner.html.erb')
6
+
7
+ File.open('spec/runner.html', 'w+') do |f|
8
+ scope = OpenStruct.new(:title => "Jasmine Spec Runner: Jasmine Core",
9
+ :favicon => favicon,
10
+ :jasmine_tags => jasmine_tags,
11
+ :source_tags => source_tags,
12
+ :spec_file_tags => spec_file_tags)
13
+ f << template.render(scope)
14
+ end
15
+ end
16
+
17
+ def favicon
18
+ <<HTML
19
+ <link rel="shortcut icon" type="image/png" href="../images/jasmine_favicon.png">
20
+ HTML
21
+ end
22
+
23
+ def jasmine_tags
24
+ tags = %Q{<link href="../lib/jasmine-core/jasmine.css" rel="stylesheet"/>}
25
+ tags << "\n "
26
+ tags << script_tags_for("../lib/jasmine-core/jasmine.js")
27
+ tags << "\n "
28
+ tags << undefined_catch
29
+ tags
30
+ end
31
+
32
+ def undefined_catch
33
+ <<HTML
34
+ <script type="text/javascript">
35
+ // yes, really keep this here to keep us honest, but only for jasmine's own runner! [xw]
36
+ undefined = "diz be undefined yo";
37
+ </script>
38
+ HTML
39
+ end
40
+
41
+ def source_tags
42
+ other_files = html_sources + console_sources
43
+ script_tags_for other_files.collect { |f| "../#{f}" }
44
+ end
45
+
46
+ def spec_file_tags
47
+ spec_files = core_specfiles + html_specfiles + console_specfiles
48
+ script_tags_for spec_files.collect { |f| "../#{f}" }
49
+ end
50
+
@@ -0,0 +1,17 @@
1
+ desc "Build jasmine documentation"
2
+ task :doc => :require_pages_submodule do
3
+ puts 'Creating Jasmine Documentation'
4
+ require 'rubygems'
5
+ require 'jsdoc_helper'
6
+
7
+ FileUtils.rm_r "pages/jsdoc", :force => true
8
+
9
+ JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t|
10
+ t[:files] = core_sources + html_sources + console_sources
11
+ t[:options] = "-a"
12
+ t[:out] = "pages/jsdoc"
13
+ # JsdocHelper bug: template must be relative to the JsdocHelper gem, ick
14
+ t[:template] = File.join("../".*(100), Dir::getwd, "jsdoc-template")
15
+ end
16
+ Rake::Task[:lambda_jsdoc].invoke
17
+ end
@@ -0,0 +1,50 @@
1
+ require 'json'
2
+
3
+ def core_sources
4
+ first_sources = JSON.parse(File.read('./src/SourcesList.json')).collect { |f| "./src/core/#{f}" }
5
+
6
+ remaining_sources = Dir.glob('./src/core/*.js').reject { |f| first_sources.include?(f) }.sort
7
+
8
+ first_sources + remaining_sources
9
+ end
10
+
11
+ def html_sources
12
+ Dir.glob('./src/html/*.js')
13
+ end
14
+
15
+ def console_sources
16
+ Dir.glob('./src/console/*.js')
17
+ end
18
+
19
+ def core_specfiles
20
+ Dir.glob('./spec/core/*.js')
21
+ end
22
+
23
+ def html_specfiles
24
+ Dir.glob('./spec/html/*.js')
25
+ end
26
+
27
+ def console_specfiles
28
+ Dir.glob('./spec/console/*.js')
29
+ end
30
+
31
+ def version_string
32
+ version = "#{version_hash['major']}.#{version_hash['minor']}.#{version_hash['build']}"
33
+ version += ".rc#{version_hash['release_candidate']}" if version_hash['release_candidate']
34
+ version
35
+ end
36
+
37
+ def version_hash
38
+ @version ||= JSON.parse(File.new("./src/version.json").read);
39
+ end
40
+
41
+ def script_tags_for(files)
42
+ script_tag = Tilt::new('./spec/templates/script_tag.html.erb')
43
+
44
+ srcs = (files.is_a?(String) ? [files] : files)
45
+ srcs.inject([]) do |tags, f|
46
+ scope = OpenStruct.new :file => f
47
+ tags << script_tag.render(scope)
48
+ tags
49
+ end.join("\n ")
50
+ end
@@ -0,0 +1,13 @@
1
+ desc "Build the Github pages HTML"
2
+ task :build_pages => :require_pages_submodule do
3
+ Dir.chdir("pages") do
4
+ FileUtils.rm_r('pages_output') if File.exist?('pages_output')
5
+ Dir.chdir('pages_source') do
6
+ system("frank export ../pages_output")
7
+ end
8
+ puts "\n"
9
+ puts "Copying built website to the root of the gh-pages branch".cyan
10
+ puts "\n\n"
11
+ system("cp -r pages_output/* .")
12
+ end
13
+ end
@@ -0,0 +1,37 @@
1
+ desc "Run spec suite: Browser, Node, JSHint"
2
+ task :spec => ["build_dist", "count_specs", "spec:node", "spec:browser"]
3
+
4
+ desc 'Run specs in Node.js'
5
+ task "spec:node" => [:count_specs, :require_node] do
6
+ puts "Running all appropriate specs via Node.js".cyan
7
+
8
+ color = Term::ANSIColor.coloring? ? "--color" : "--noColor"
9
+ system("node spec/node_suite.js #{color}")
10
+ end
11
+
12
+ desc "Run specs in the default browser (MacOS only)"
13
+ task "spec:browser" => [:count_specs, :build_runner_html] do
14
+ puts "Running all appropriate specs via the default web browser".cyan
15
+ system("open spec/runner.html")
16
+ end
17
+
18
+ #Count number of specs in Jasmine core
19
+ task :count_specs do
20
+ core_specs_count = count_specs_in(Dir.glob('spec/core/*.js'))
21
+ console_spec_count = count_specs_in(Dir.glob('spec/console/*.js'))
22
+ html_spec_count = count_specs_in(Dir.glob('spec/html/*.js'))
23
+
24
+ puts "\n"
25
+ puts "#{(core_specs_count + console_spec_count).to_s.yellow.bold} specs for Node.js runner (exclude DOM-related specs)"
26
+ puts "#{(core_specs_count + console_spec_count + html_spec_count).to_s.yellow.bold} specs for Browser runner (all specs)"
27
+ puts "\n"
28
+ puts "Please verify that these numbers match the runner output."
29
+ puts "\n"
30
+ end
31
+
32
+ def count_specs_in(files)
33
+ files.inject(0) do |count, file|
34
+ File.read(file).scan(/\sit\(/) {|s| count += 1}
35
+ count
36
+ end
37
+ end
@@ -0,0 +1,91 @@
1
+ require 'ostruct'
2
+
3
+ desc "Build standalone distribution"
4
+ task :standalone => [:require_pages_submodule, :protect_current_dist_zip, :build_spec_runner_html] do
5
+ require 'tmpdir'
6
+
7
+ zip_root = File.join(Dir.tmpdir, "zip_root")
8
+ temp_dir = File.join(zip_root, "jasmine-standalone-#{version_string}")
9
+ puts "Building Example Project in #{temp_dir}"
10
+ FileUtils.rm_r temp_dir if File.exist?(temp_dir)
11
+ FileUtils.mkdir_p(temp_dir)
12
+
13
+ root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
14
+ FileUtils.mkdir_p(File.join(root, "example"))
15
+ FileUtils.cp_r(File.join(root, 'example/.'), File.join(temp_dir))
16
+
17
+ lib_dir = File.join(temp_dir, "lib/jasmine-#{version_string}")
18
+ FileUtils.mkdir_p(lib_dir)
19
+ {
20
+ "images/jasmine_favicon.png" => "jasmine_favicon.png",
21
+ "lib/jasmine-core/jasmine.js" => "jasmine.js",
22
+ "lib/jasmine-core/jasmine-html.js" => "jasmine-html.js",
23
+ "lib/jasmine-core/jasmine.css" => "jasmine.css",
24
+ "MIT.LICENSE" => "MIT.LICENSE"
25
+ }.each_pair do |src, dest|
26
+ FileUtils.cp(File.join(root, src), File.join(lib_dir, dest))
27
+ end
28
+
29
+ dist_dir = File.join(root, 'pages/downloads')
30
+ zip_file_name = File.join(dist_dir, "jasmine-standalone-#{version_string}.zip")
31
+
32
+ puts "Zipping Example Project and moving to #{zip_file_name}"
33
+ exec "cd #{zip_root} && zip #{zip_file_name} -r . -x .[a-zA-Z0-9]*"
34
+ end
35
+
36
+ #Build SpecRunner.html for standalone dist example project
37
+ task :build_spec_runner_html do
38
+ template = Tilt.new('spec/templates/runner.html.erb')
39
+
40
+ File.open('lib/jasmine-core/example/SpecRunner.html', 'w+') do |f|
41
+ scope = OpenStruct.new(:title => "Jasmine Spec Runner",
42
+ :favicon => example_favicon,
43
+ :jasmine_tags => example_jasmine_tags,
44
+ :source_tags => example_source_tags,
45
+ :spec_file_tags => example_spec_tags)
46
+ f << template.render(scope)
47
+ end
48
+ end
49
+
50
+ def example_path
51
+ "lib/jasmine-#{version_string}"
52
+ end
53
+
54
+ def example_favicon
55
+ <<HTML
56
+ <link rel="shortcut icon" type="image/png" href="#{example_path}/jasmine_favicon.png">
57
+ HTML
58
+ end
59
+
60
+ def example_jasmine_tags
61
+ tags = %Q{<link rel="stylesheet" type="text/css" href="#{example_path}/jasmine.css">}
62
+ tags << "\n "
63
+ tags << script_tags_for(["#{example_path}/jasmine.js", "#{example_path}/jasmine-html.js"])
64
+ tags
65
+ end
66
+
67
+ def example_source_tags
68
+ script_tags_for ['spec/SpecHelper.js', 'spec/PlayerSpec.js']
69
+ end
70
+
71
+ def example_spec_tags
72
+ script_tags_for ['src/Player.js', 'src/Song.js']
73
+ end
74
+
75
+
76
+ task :protect_current_dist_zip do
77
+ root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
78
+ dist_dir = File.join(root, 'pages/downloads')
79
+ zip_file_name = File.join(dist_dir, "jasmine-standalone-#{version_string}.zip")
80
+
81
+ zip_present_message = "\n\n"
82
+ zip_present_message << "==> STOPPED <==".red
83
+ zip_present_message << "\n\n"
84
+ zip_present_message << "The file ".red + "#{zip_file_name}" + " already exists.".red + "\n"
85
+ zip_present_message << "If you should be building the next version, update src/version.json"
86
+ zip_present_message << "\n"
87
+ zip_present_message << "If the version is correct, you must be trying to re-build the standalone ZIP. Delete the ZIP and rebuild."
88
+ zip_present_message << "\n"
89
+
90
+ raise zip_present_message if File.exist?(zip_file_name)
91
+ end
@@ -0,0 +1,5 @@
1
+ task :version do
2
+ require 'pp'
3
+ pp version_hash
4
+ pp version_string
5
+ end
@@ -2,7 +2,7 @@
2
2
  namespace :spec do
3
3
  desc "Run JavaScript specs via Evergreen"
4
4
  task :javascripts => :environment do
5
- result = Evergreen::Suite.new.run
5
+ result = Evergreen::Runner.new.run
6
6
  Kernel.exit(1) unless result
7
7
  end
8
8
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Evergreen, ".application" do
3
+ describe Evergreen::Application do
4
4
  include Capybara::DSL
5
5
 
6
6
  it "should show a successful test run" do
@@ -41,12 +41,11 @@ describe Evergreen, ".application" do
41
41
  visit("/")
42
42
  within('li', :text => 'failing_spec.js') do
43
43
  click_link("Run")
44
- page.should have_content('Fail')
44
+ begin
45
+ page.should have_content('Fail')
46
+ rescue # why you make me sad, Capybara webkit???
47
+ page.should have_content('Fail')
48
+ end
45
49
  end
46
50
  end
47
-
48
- it "should add extensions to Evergreen" do
49
- visit('/awesome')
50
- page.should have_content('Totally awesome')
51
- end
52
51
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Evergreen::Runner do
4
4
  let(:suite) { Evergreen::Suite.new }
5
- let(:runner) { Evergreen::Runner.new(suite, buffer) }
5
+ let(:runner) { Evergreen::Runner.new(buffer) }
6
6
  let(:buffer) { StringIO.new }
7
7
 
8
8
  describe '#run' do
@@ -7,23 +7,20 @@ require 'rspec'
7
7
  require 'capybara/dsl'
8
8
  require 'capybara-webkit'
9
9
 
10
+ require 'pry'
11
+
10
12
  TEST_DRIVER = :webkit
11
13
 
12
14
  Evergreen.root = File.expand_path('suite1', File.dirname(__FILE__))
13
- Evergreen.extensions do
14
- map "/awesome" do
15
- run lambda { |env| [200, {'Content-Type' => 'text/html'}, ["<html><body>Totally awesome</body></html>"]]}
16
- end
17
- end
18
15
 
19
- Capybara.app = Evergreen.application
16
+ Capybara.app = Evergreen::Application
20
17
  Capybara.default_driver = TEST_DRIVER
21
18
 
22
19
  module EvergreenMatchers
23
20
  class PassSpec # :nodoc:
24
21
  def matches?(actual)
25
22
  @actual = actual
26
- @runner = Evergreen::Runner.new(actual.suite, StringIO.new).spec_runner(@actual)
23
+ @runner = Evergreen::Runner.new(StringIO.new).spec_runner(@actual)
27
24
  @runner.passed?
28
25
  end
29
26
 
@@ -44,9 +41,9 @@ end
44
41
  RSpec.configure do |config|
45
42
  config.include EvergreenMatchers
46
43
  config.before do
44
+ Capybara.reset_sessions!
47
45
  Evergreen.use_defaults!
48
46
  Evergreen.root = File.expand_path('suite1', File.dirname(__FILE__))
49
47
  Evergreen.driver = TEST_DRIVER
50
- Evergreen.application = Evergreen.build_application
51
48
  end
52
49
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evergreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc
5
- prerelease: 6
4
+ version: 1.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jonas Nicklas
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-05 00:00:00.000000000Z
12
+ date: 2011-11-02 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara
16
- requirement: &2161118080 !ruby/object:Gem::Requirement
16
+ requirement: &2181151940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2161118080
24
+ version_requirements: *2181151940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: launchy
27
- requirement: &2161117500 !ruby/object:Gem::Requirement
27
+ requirement: &2181151500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2161117500
35
+ version_requirements: *2181151500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &2161116880 !ruby/object:Gem::Requirement
38
+ requirement: &2181150920 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2161116880
46
+ version_requirements: *2181150920
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: json_pure
49
- requirement: &2161116440 !ruby/object:Gem::Requirement
49
+ requirement: &2181150480 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2161116440
57
+ version_requirements: *2181150480
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: coffee-script
60
- requirement: &2161115940 !ruby/object:Gem::Requirement
60
+ requirement: &2181150020 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2161115940
68
+ version_requirements: *2181150020
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &2161115360 !ruby/object:Gem::Requirement
71
+ requirement: &2181149500 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '2.0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2161115360
79
+ version_requirements: *2181149500
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: capybara-webkit
82
- requirement: &2161114740 !ruby/object:Gem::Requirement
82
+ requirement: &2181148940 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.0.0.beta4
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2161114740
90
+ version_requirements: *2181148940
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: therubyracer
93
- requirement: &2161114260 !ruby/object:Gem::Requirement
93
+ requirement: &2181148460 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0.9'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2161114260
101
+ version_requirements: *2181148460
102
102
  description: Run Jasmine JavaScript unit tests, integrate them into Ruby applications.
103
103
  email:
104
104
  - jonas.nicklas@gmail.com
@@ -130,22 +130,10 @@ files:
130
130
  - lib/evergreen/views/list.erb
131
131
  - lib/evergreen/views/run.erb
132
132
  - lib/evergreen.rb
133
- - lib/jasmine/cruise_config.rb
134
- - lib/jasmine/example/spec/PlayerSpec.js
135
- - lib/jasmine/example/spec/SpecHelper.js
136
- - lib/jasmine/example/SpecRunner.html
137
- - lib/jasmine/example/src/Player.js
138
- - lib/jasmine/example/src/Song.js
133
+ - lib/jasmine/Contribute.markdown
139
134
  - lib/jasmine/Gemfile
140
- - lib/jasmine/images/fail-16.png
141
- - lib/jasmine/images/fail.png
142
- - lib/jasmine/images/go-16.png
143
- - lib/jasmine/images/go.png
144
- - lib/jasmine/images/pending-16.png
145
- - lib/jasmine/images/pending.png
146
- - lib/jasmine/images/question-bk.png
147
- - lib/jasmine/images/questionbk-16.png
148
- - lib/jasmine/images/spinner.gif
135
+ - lib/jasmine/images/jasmine_favicon.png
136
+ - lib/jasmine/jasmine-core.gemspec
149
137
  - lib/jasmine/jsdoc-template/allclasses.tmpl
150
138
  - lib/jasmine/jsdoc-template/allfiles.tmpl
151
139
  - lib/jasmine/jsdoc-template/class.tmpl
@@ -155,54 +143,84 @@ files:
155
143
  - lib/jasmine/jsdoc-template/static/header.html
156
144
  - lib/jasmine/jsdoc-template/static/index.html
157
145
  - lib/jasmine/jsdoc-template/symbol.tmpl
158
- - lib/jasmine/lib/jasmine-html.js
159
- - lib/jasmine/lib/jasmine.css
160
- - lib/jasmine/lib/jasmine.js
161
- - lib/jasmine/lib/json2.js
146
+ - lib/jasmine/jshint/jshint.js
147
+ - lib/jasmine/jshint/run.js
148
+ - lib/jasmine/lib/jasmine-core/example/spec/PlayerSpec.js
149
+ - lib/jasmine/lib/jasmine-core/example/spec/SpecHelper.js
150
+ - lib/jasmine/lib/jasmine-core/example/SpecRunner.html
151
+ - lib/jasmine/lib/jasmine-core/example/src/Player.js
152
+ - lib/jasmine/lib/jasmine-core/example/src/Song.js
153
+ - lib/jasmine/lib/jasmine-core/jasmine-html.js
154
+ - lib/jasmine/lib/jasmine-core/jasmine.css
155
+ - lib/jasmine/lib/jasmine-core/jasmine.js
156
+ - lib/jasmine/lib/jasmine-core/json2.js
157
+ - lib/jasmine/lib/jasmine-core/version.rb
158
+ - lib/jasmine/lib/jasmine-core.rb
162
159
  - lib/jasmine/MIT.LICENSE
163
160
  - lib/jasmine/Rakefile
164
161
  - lib/jasmine/README.markdown
162
+ - lib/jasmine/Release.markdown
163
+ - lib/jasmine/spec/console/ConsoleReporterSpec.js
164
+ - lib/jasmine/spec/core/BaseSpec.js
165
+ - lib/jasmine/spec/core/CustomMatchersSpec.js
166
+ - lib/jasmine/spec/core/EnvSpec.js
167
+ - lib/jasmine/spec/core/ExceptionsSpec.js
168
+ - lib/jasmine/spec/core/JsApiReporterSpec.js
169
+ - lib/jasmine/spec/core/MatchersSpec.js
170
+ - lib/jasmine/spec/core/MockClockSpec.js
171
+ - lib/jasmine/spec/core/MultiReporterSpec.js
172
+ - lib/jasmine/spec/core/NestedResultsSpec.js
173
+ - lib/jasmine/spec/core/PrettyPrintSpec.js
174
+ - lib/jasmine/spec/core/QueueSpec.js
175
+ - lib/jasmine/spec/core/ReporterSpec.js
176
+ - lib/jasmine/spec/core/RunnerSpec.js
177
+ - lib/jasmine/spec/core/SpecRunningSpec.js
178
+ - lib/jasmine/spec/core/SpecSpec.js
179
+ - lib/jasmine/spec/core/SpySpec.js
180
+ - lib/jasmine/spec/core/SuiteSpec.js
181
+ - lib/jasmine/spec/core/UtilSpec.js
182
+ - lib/jasmine/spec/core/WaitsForBlockSpec.js
183
+ - lib/jasmine/spec/html/MatchersHtmlSpec.js
184
+ - lib/jasmine/spec/html/PrettyPrintHtmlSpec.js
185
+ - lib/jasmine/spec/html/TrivialReporterSpec.js
186
+ - lib/jasmine/spec/node_suite.js
165
187
  - lib/jasmine/spec/runner.html
166
- - lib/jasmine/spec/suites/BaseSpec.js
167
- - lib/jasmine/spec/suites/CustomMatchersSpec.js
168
- - lib/jasmine/spec/suites/EnvSpec.js
169
- - lib/jasmine/spec/suites/ExceptionsSpec.js
170
- - lib/jasmine/spec/suites/JsApiReporterSpec.js
171
- - lib/jasmine/spec/suites/MatchersSpec.js
172
- - lib/jasmine/spec/suites/MockClockSpec.js
173
- - lib/jasmine/spec/suites/MultiReporterSpec.js
174
- - lib/jasmine/spec/suites/NestedResultsSpec.js
175
- - lib/jasmine/spec/suites/PrettyPrintSpec.js
176
- - lib/jasmine/spec/suites/QueueSpec.js
177
- - lib/jasmine/spec/suites/ReporterSpec.js
178
- - lib/jasmine/spec/suites/RunnerSpec.js
179
- - lib/jasmine/spec/suites/SpecRunningSpec.js
180
- - lib/jasmine/spec/suites/SpecSpec.js
181
- - lib/jasmine/spec/suites/SpySpec.js
182
- - lib/jasmine/spec/suites/SuiteSpec.js
183
- - lib/jasmine/spec/suites/TrivialReporterSpec.js
184
- - lib/jasmine/spec/suites/UtilSpec.js
185
- - lib/jasmine/spec/suites/WaitsForBlockSpec.js
186
- - lib/jasmine/src/base.js
187
- - lib/jasmine/src/Block.js
188
- - lib/jasmine/src/Env.js
188
+ - lib/jasmine/spec/templates/runner.html.erb
189
+ - lib/jasmine/spec/templates/script_tag.html.erb
190
+ - lib/jasmine/src/console/ConsoleReporter.js
191
+ - lib/jasmine/src/core/base.js
192
+ - lib/jasmine/src/core/Block.js
193
+ - lib/jasmine/src/core/Env.js
194
+ - lib/jasmine/src/core/JsApiReporter.js
195
+ - lib/jasmine/src/core/Matchers.js
196
+ - lib/jasmine/src/core/mock-timeout.js
197
+ - lib/jasmine/src/core/MultiReporter.js
198
+ - lib/jasmine/src/core/NestedResults.js
199
+ - lib/jasmine/src/core/PrettyPrinter.js
200
+ - lib/jasmine/src/core/Queue.js
201
+ - lib/jasmine/src/core/Reporter.js
202
+ - lib/jasmine/src/core/Runner.js
203
+ - lib/jasmine/src/core/Spec.js
204
+ - lib/jasmine/src/core/Suite.js
205
+ - lib/jasmine/src/core/util.js
206
+ - lib/jasmine/src/core/WaitsBlock.js
207
+ - lib/jasmine/src/core/WaitsForBlock.js
189
208
  - lib/jasmine/src/html/jasmine.css
190
209
  - lib/jasmine/src/html/TrivialReporter.js
191
- - lib/jasmine/src/JsApiReporter.js
192
- - lib/jasmine/src/Matchers.js
193
- - lib/jasmine/src/mock-timeout.js
194
- - lib/jasmine/src/MultiReporter.js
195
- - lib/jasmine/src/NestedResults.js
196
- - lib/jasmine/src/PrettyPrinter.js
197
- - lib/jasmine/src/Queue.js
198
- - lib/jasmine/src/Reporter.js
199
- - lib/jasmine/src/Runner.js
200
- - lib/jasmine/src/Spec.js
201
- - lib/jasmine/src/Suite.js
202
- - lib/jasmine/src/util.js
210
+ - lib/jasmine/src/SourcesList.json
211
+ - lib/jasmine/src/templates/example_project_jasmine_tags.html.erb
212
+ - lib/jasmine/src/templates/version.js.erb
213
+ - lib/jasmine/src/templates/version.rb.erb
214
+ - lib/jasmine/src/version.js
203
215
  - lib/jasmine/src/version.json
204
- - lib/jasmine/src/WaitsBlock.js
205
- - lib/jasmine/src/WaitsForBlock.js
216
+ - lib/jasmine/tasks/build_dist.rb
217
+ - lib/jasmine/tasks/build_specs.rb
218
+ - lib/jasmine/tasks/docs.rb
219
+ - lib/jasmine/tasks/helpers.rb
220
+ - lib/jasmine/tasks/pages.rb
221
+ - lib/jasmine/tasks/spec.rb
222
+ - lib/jasmine/tasks/standalone.rb
223
+ - lib/jasmine/tasks/version.rb
206
224
  - lib/tasks/evergreen.rake
207
225
  - spec/evergreen_spec.rb
208
226
  - spec/meta_spec.rb
@@ -255,9 +273,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
273
  required_rubygems_version: !ruby/object:Gem::Requirement
256
274
  none: false
257
275
  requirements:
258
- - - ! '>'
276
+ - - ! '>='
259
277
  - !ruby/object:Gem::Version
260
- version: 1.3.1
278
+ version: '0'
261
279
  requirements: []
262
280
  rubyforge_project: evergreen
263
281
  rubygems_version: 1.8.6