Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add jQuery version 1.6.3 to tests, and use it by default

  • Loading branch information...
commit 840ab6ac76b2d5ab931841bc3d8567e5b57f183e 1 parent ee275d1
@akzhan akzhan authored
Showing with 13 additions and 5 deletions.
  1. +7 −1 test/server.rb
  2. +6 −4 test/views/index.erb
View
8 test/server.rb
@@ -1,6 +1,8 @@
require 'sinatra'
require 'json'
+JQUERY_VERSIONS = %w[ 1.6 1.6.1 1.6.2 1.6.3 ].freeze
+
use Rack::Static, :urls => ["/src"], :root => File.expand_path('..', settings.root)
helpers do
@@ -39,10 +41,14 @@ def script_tag src
src = "/test/#{src}.js" unless src.index('/')
%(<script src="#{src}" type="text/javascript"></script>)
end
+
+ def jquery_versions
+ JQUERY_VERSIONS
+ end
end
get '/' do
- params[:version] ||= '1.6.2'
+ params[:version] ||= JQUERY_VERSIONS.last
params[:cdn] ||= 'jquery'
erb :index
end
View
10 test/views/index.erb
@@ -10,10 +10,12 @@
</div>
<div id="jquery-version">
jQuery version:
- <%= jquery_link '1.6' %>
- <%= jquery_link '1.6.1' %>
- <%= jquery_link '1.6.2' %>
- <%= jquery_link 'edge' if File.exist?(settings.root + '/public/vendor/jquery.js') %>
+
+ <% jquery_versions.each do |v| %>
+ <%= '' if v != jquery_versions.first %>
+ <%= jquery_link v %>
+ <% end %>
+ <%= ('' + jquery_link('edge')) if File.exist?(settings.root + '/public/vendor/jquery.js') %>
</div>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
Please sign in to comment.
Something went wrong with that request. Please try again.