jasmine 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +13 -10
- data/Gemfile +6 -1
- data/jasmine.gemspec +21 -3
- data/lib/jasmine/run.html.erb +1 -1
- data/lib/jasmine/server.rb +3 -1
- data/lib/jasmine/tasks/jasmine.rake +1 -1
- data/lib/jasmine/version.rb +1 -1
- data/release_notes/v2.5.2.md +22 -0
- data/spec/jasmine_rails_spec.rb +8 -2
- data/spec/server_spec.rb +19 -16
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a345bec91c05543c3a67ee58bd7c88e01094e215
|
4
|
+
data.tar.gz: 36fdc31e1a296f8cc826808d33396043adc47588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e59c0458d5fc45d9a72f9e70721862d285667043eff6d249fdd645d9dfe732c4f9f0cbdba743a0febc3a8292d3661ab46fac455f78a661e9ac82de06ccd45601
|
7
|
+
data.tar.gz: 155046c8f8674c0035f51416a5505ea317025f6db80777a69e96bcdd2ed9e59a119d3472f5fe0f1c5e79e3cb4e02a5e5f9a4a85125f4b389eda65301acb80f98
|
data/.travis.yml
CHANGED
@@ -3,9 +3,7 @@ language: ruby
|
|
3
3
|
rvm:
|
4
4
|
- "1.9.3"
|
5
5
|
- "2.0.0"
|
6
|
-
- "2.
|
7
|
-
- "jruby"
|
8
|
-
- "rbx-2"
|
6
|
+
- "2.3.0"
|
9
7
|
|
10
8
|
env:
|
11
9
|
- "RAILS_VERSION=rails3"
|
@@ -20,14 +18,19 @@ install:
|
|
20
18
|
- bundle install --retry=3
|
21
19
|
|
22
20
|
matrix:
|
21
|
+
fast_finish: true
|
23
22
|
include:
|
24
|
-
- rvm: "2.
|
25
|
-
env:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
23
|
+
- rvm: "2.3.0"
|
24
|
+
env:
|
25
|
+
- "PERFORMANCE_SPECS=true"
|
26
|
+
- "RAILS_VERSION=rails5"
|
27
|
+
- rvm: "2.3.0"
|
28
|
+
env: "RAILS_VERSION=rails5"
|
29
|
+
allow_failures:
|
30
|
+
- rvm: "jruby-9.1.5.0"
|
31
|
+
env:
|
32
|
+
- "RAILS_VERSION=rails4"
|
33
|
+
- "JRUBY_OPTS=''"
|
31
34
|
|
32
35
|
before_install:
|
33
36
|
- gem install bundler -v "= 1.5.1"
|
data/Gemfile
CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
gem 'anchorman', :platform => :mri
|
6
|
+
gem 'octokit', '< 4.4', :platform => :mri
|
6
7
|
# during development, do not release
|
7
8
|
if ENV['TRAVIS']
|
8
9
|
gem 'jasmine-core', :git => 'http://github.com/jasmine/jasmine.git'
|
@@ -12,8 +13,12 @@ end
|
|
12
13
|
|
13
14
|
if ENV['RAILS_VERSION'] == "rails3"
|
14
15
|
gem 'rack', '1.4.5'
|
15
|
-
|
16
|
+
elsif ENV['RAILS_VERSION'] == "rails4"
|
16
17
|
gem 'rack', '1.5.2'
|
18
|
+
elsif ENV['RAILS_VERSION'] == "pojs"
|
19
|
+
gem 'rack', '< 2.0'
|
20
|
+
else
|
21
|
+
gem 'rack', '>= 2.0'
|
17
22
|
end
|
18
23
|
|
19
24
|
gem 'mime-types', '< 3.0', platform: [:mri_19, :jruby]
|
data/jasmine.gemspec
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
3
|
require "jasmine/version"
|
4
4
|
|
5
|
+
def ruby_version_less_than(target_version)
|
6
|
+
version_parts = RUBY_VERSION.split('.').map(&:to_i).zip(target_version)
|
7
|
+
|
8
|
+
version_parts.each do |(current_part, target_part)|
|
9
|
+
if current_part < target_part
|
10
|
+
return true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
5
16
|
Gem::Specification.new do |s|
|
6
17
|
s.name = %q{jasmine}
|
7
18
|
s.version = Jasmine::VERSION
|
@@ -24,14 +35,21 @@ Gem::Specification.new do |s|
|
|
24
35
|
when 'rails3'
|
25
36
|
s.add_development_dependency 'rails', '>= 3.0.0', '< 4.0.0'
|
26
37
|
when 'pojs'
|
27
|
-
|
28
|
-
s.add_development_dependency 'rails', '>= 4'
|
38
|
+
when 'rails4'
|
39
|
+
s.add_development_dependency 'rails', '>= 4', '< 5.0.0'
|
40
|
+
else #default to rails 5
|
41
|
+
s.add_development_dependency 'rails', '>= 5'
|
29
42
|
end
|
30
43
|
|
31
44
|
s.add_development_dependency 'rack-test'
|
32
45
|
s.add_development_dependency 'multi_json'
|
33
46
|
s.add_development_dependency 'rspec', '>= 2.5.0'
|
34
|
-
|
47
|
+
|
48
|
+
if ruby_version_less_than([2,1,0])
|
49
|
+
s.add_development_dependency 'nokogiri', '< 1.7.0'
|
50
|
+
else
|
51
|
+
s.add_development_dependency 'nokogiri'
|
52
|
+
end
|
35
53
|
|
36
54
|
s.add_dependency 'jasmine-core', '>= 2.5.1', '< 3.0.0'
|
37
55
|
s.add_dependency 'rack', '>= 1.2.1'
|
data/lib/jasmine/run.html.erb
CHANGED
data/lib/jasmine/server.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
module Jasmine
|
2
2
|
class Server
|
3
|
-
def initialize(port = 8888, application = nil, rack_options = nil)
|
3
|
+
def initialize(port = 8888, application = nil, rack_options = nil, env = ENV)
|
4
4
|
@port = port
|
5
5
|
@application = application
|
6
6
|
@rack_options = rack_options || {}
|
7
|
+
@env = env
|
7
8
|
end
|
8
9
|
|
9
10
|
def start
|
11
|
+
@env['PORT'] = @port.to_s
|
10
12
|
if Jasmine::Dependencies.legacy_rack?
|
11
13
|
handler = Rack::Handler.get('webrick')
|
12
14
|
handler.run(@application, :Port => @port, :AccessLog => [])
|
@@ -46,7 +46,7 @@ namespace :jasmine do
|
|
46
46
|
if ENV['spec']
|
47
47
|
spec_path = ENV['spec'].dup
|
48
48
|
if spec_path.include? "spec/javascripts/" # crappy hack to allow for bash tab completion
|
49
|
-
spec_path.
|
49
|
+
spec_path = spec_path.split("spec/javascripts/").last
|
50
50
|
end
|
51
51
|
Jasmine.load_spec(spec_path)
|
52
52
|
end
|
data/lib/jasmine/version.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Jasmine Gem 2.5.2 Release Notes
|
2
|
+
|
3
|
+
## Summary
|
4
|
+
|
5
|
+
## Issues & Pull Request
|
6
|
+
|
7
|
+
* Explicitly set the `PORT` environment variable since Puma overrides the rack setting
|
8
|
+
- Fixes [#279](https://github.com/jasmine/jasmine-gem/issues/279)
|
9
|
+
|
10
|
+
* Disable Turbolinks 5
|
11
|
+
- Merge [#276](https://github.com/jasmine/jasmine-gem/issues/276) from @adimichele
|
12
|
+
|
13
|
+
* Include Rails 5 in the travis matrix and fix specs for it
|
14
|
+
- Fixes [#274](https://github.com/jasmine/jasmine-gem/issues/274)
|
15
|
+
|
16
|
+
* Fixed issue where spec path was incorrect when using an absolute path which contains spec/javascripts/
|
17
|
+
- Merges [#273](https://github.com/jasmine/jasmine-gem/issues/273) from @thoiberg
|
18
|
+
|
19
|
+
|
20
|
+
------
|
21
|
+
|
22
|
+
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
data/spec/jasmine_rails_spec.rb
CHANGED
@@ -32,7 +32,9 @@ if rails_available?
|
|
32
32
|
open('Gemfile', 'a') { |f|
|
33
33
|
f.puts "gem 'jasmine', :path => '#{base}'"
|
34
34
|
f.puts "gem 'jasmine-core', :github => 'pivotal/jasmine'"
|
35
|
-
|
35
|
+
if RUBY_PLATFORM != 'java' && ENV['RAILS_VERSION'] != 'rails5'
|
36
|
+
f.puts "gem 'thin'"
|
37
|
+
end
|
36
38
|
f.puts "gem 'angularjs-rails'"
|
37
39
|
f.puts "gem 'execjs', '2.0.2'"
|
38
40
|
f.flush
|
@@ -172,7 +174,11 @@ if rails_available?
|
|
172
174
|
|
173
175
|
Bundler.with_clean_env do
|
174
176
|
default_output = `bundle exec rake jasmine:ci`
|
175
|
-
|
177
|
+
if ENV['RAILS_VERSION'] == 'rails5' || ENV['RAILS_VERSION'].nil?
|
178
|
+
default_output.should include('Puma starting')
|
179
|
+
else
|
180
|
+
default_output.should include('Thin web server')
|
181
|
+
end
|
176
182
|
|
177
183
|
custom_output = `bundle exec rake jasmine:ci JASMINE_CONFIG_PATH=#{rack_yaml} 2>&1`
|
178
184
|
custom_output.should include("WEBrick")
|
data/spec/server_spec.rb
CHANGED
@@ -3,53 +3,56 @@ require 'spec_helper'
|
|
3
3
|
describe Jasmine::Server do
|
4
4
|
describe "rack ~> 1.0" do
|
5
5
|
before do
|
6
|
-
Jasmine::Dependencies.
|
6
|
+
allow(Jasmine::Dependencies).to receive(:legacy_rack?).and_return(true)
|
7
7
|
end
|
8
8
|
|
9
9
|
it "should run the handler with the application" do
|
10
10
|
server = double(:server)
|
11
11
|
port = 1234
|
12
|
+
fake_env = {}
|
12
13
|
application = double(:application)
|
13
|
-
Rack::Handler.
|
14
|
-
server.
|
15
|
-
Jasmine::Server.new(port, application).start
|
14
|
+
expect(Rack::Handler).to receive(:get).with("webrick").and_return(server)
|
15
|
+
expect(server).to receive(:run).with(application, hash_including(:Port => port))
|
16
|
+
Jasmine::Server.new(port, application, nil, fake_env).start
|
17
|
+
expect(fake_env['PORT']).to eq('1234')
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
19
21
|
describe "rack >= 1.1" do
|
20
22
|
before do
|
21
|
-
Jasmine::Dependencies.
|
23
|
+
allow(Jasmine::Dependencies).to receive(:legacy_rack?).and_return(false)
|
22
24
|
if !Rack.constants.include?(:Server)
|
23
25
|
Rack::Server = double("Rack::Server")
|
24
26
|
end
|
27
|
+
@fake_env = {}
|
25
28
|
end
|
26
29
|
|
27
30
|
it "should create a Rack::Server with the correct port when passed" do
|
28
31
|
port = 1234
|
29
|
-
Rack::Server.
|
30
|
-
Jasmine::Server.new(port, double(:app)).start
|
32
|
+
expect(Rack::Server).to receive(:new).with(hash_including(:Port => port)).and_return(double(:server).as_null_object)
|
33
|
+
Jasmine::Server.new(port, double(:app), nil, @fake_env).start
|
31
34
|
end
|
32
35
|
|
33
36
|
it "should start the server" do
|
34
37
|
server = double(:server)
|
35
|
-
Rack::Server.
|
36
|
-
server.
|
37
|
-
Jasmine::Server.new('8888', double(:app)).start
|
38
|
+
expect(Rack::Server).to receive(:new) { server.as_null_object }
|
39
|
+
expect(server).to receive(:start)
|
40
|
+
Jasmine::Server.new('8888', double(:app), nil, @fake_env).start
|
38
41
|
end
|
39
42
|
|
40
43
|
it "should set the app as the instance variable on the rack server" do
|
41
44
|
app = double('application')
|
42
45
|
server = double(:server)
|
43
|
-
Rack::Server.
|
44
|
-
Jasmine::Server.new(1234, app).start
|
45
|
-
server.instance_variable_get(:@app).
|
46
|
+
expect(Rack::Server).to receive(:new) { server.as_null_object }
|
47
|
+
Jasmine::Server.new(1234, app, nil, @fake_env).start
|
48
|
+
expect(server.instance_variable_get(:@app)).to eq app
|
46
49
|
end
|
47
50
|
|
48
51
|
it "should pass rack options when starting the server" do
|
49
52
|
app = double('application')
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
+
expect(Rack::Server).to receive(:new).with(hash_including(:Port => 1234, :foo => 'bar')).and_return(double(:server).as_null_object)
|
54
|
+
Jasmine::Server.new(1234, app, {:foo => 'bar', :Port => 4321}, @fake_env).start
|
55
|
+
expect(@fake_env['PORT']).to eq('1234')
|
53
56
|
end
|
54
57
|
end
|
55
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jasmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajan Agaskar
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-02-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '5'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '5'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rack-test
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- release_notes/v2.4.0.md
|
220
220
|
- release_notes/v2.5.0.md
|
221
221
|
- release_notes/v2.5.1.md
|
222
|
+
- release_notes/v2.5.2.md
|
222
223
|
- spec/application_integration_spec.rb
|
223
224
|
- spec/application_spec.rb
|
224
225
|
- spec/base_spec.rb
|