jasmine 1.1.0.rc3 → 1.1.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
data/jasmine.gemspec CHANGED
@@ -50,7 +50,6 @@ Gem::Specification.new do |s|
50
50
  end
51
51
 
52
52
  s.add_development_dependency 'rack-test'
53
- s.add_development_dependency 'gem-release', ">= 0.0.16"
54
53
  s.add_development_dependency 'ci_reporter'
55
54
  s.add_development_dependency 'json_pure'
56
55
 
data/lib/jasmine/base.rb CHANGED
@@ -39,19 +39,6 @@ module Jasmine
39
39
  end
40
40
  end
41
41
 
42
- def self.cachebust(files, root_dir="", replace=nil, replace_with=nil)
43
- require 'digest/md5'
44
- files.collect do |file_name|
45
- real_file_name = replace && replace_with ? file_name.sub(replace, replace_with) : file_name
46
- begin
47
- digest = Digest::MD5.hexdigest(File.read("#{root_dir}#{real_file_name}"))
48
- rescue
49
- digest = "MISSING-FILE"
50
- end
51
- "#{file_name}?cachebust=#{digest}"
52
- end
53
- end
54
-
55
42
  def self.rspec2?
56
43
  Gem::Specification::find_by_name "rspec", ">= 2.0"
57
44
  rescue
@@ -45,7 +45,7 @@ module Jasmine
45
45
 
46
46
  def eval_js(script)
47
47
  result = @driver.execute_script(script)
48
- JSON.parse("{\"result\":#{result}}")["result"]
48
+ JSON.parse("{\"result\":#{result}}", :max_nesting => false)["result"]
49
49
  end
50
50
 
51
51
  def json_generate(obj)
@@ -30,7 +30,7 @@ module Jasmine
30
30
  body = ERB.new(File.read(File.join(File.dirname(__FILE__), "run.html.erb"))).result(binding)
31
31
  [
32
32
  200,
33
- { 'Content-Type' => 'text/html' },
33
+ { 'Content-Type' => 'text/html', 'Cache-Control' => 'no-cache', 'Pragma' => 'no-cache' },
34
34
  [body]
35
35
  ]
36
36
  end
@@ -39,7 +39,7 @@ namespace :jasmine do
39
39
  end
40
40
 
41
41
  task :server => "jasmine:require" do
42
- jasmine_config_overrides = './spec/javascripts/support/jasmine_config.rb'
42
+ jasmine_config_overrides = File.join(Jasmine::Config.new.project_root, 'spec', 'javascripts' ,'support' ,'jasmine_config.rb')
43
43
  require jasmine_config_overrides if File.exist?(jasmine_config_overrides)
44
44
 
45
45
  port = ENV['JASMINE_PORT'] || 8888
@@ -1,3 +1,3 @@
1
1
  module Jasmine
2
- VERSION = "1.1.0.rc3"
2
+ VERSION = "1.1.0.rc4"
3
3
  end
data/spec/server_spec.rb CHANGED
@@ -74,8 +74,15 @@ describe "Jasmine.app" do
74
74
  it "should return an empty 200 for HEAD requests to /" do
75
75
  head "/"
76
76
  last_response.status.should == 200
77
- last_response.headers.should == { 'Content-Type' => 'text/html' }
77
+ last_response.headers['Content-Type'].should == 'text/html'
78
78
  last_response.body.should == ''
79
79
  end
80
+
81
+ it "should tell the browser not to cache any assets" do
82
+ head "/"
83
+ ['Cache-Control', 'Pragma'].each do |key|
84
+ last_response.headers[key].should == 'no-cache'
85
+ end
86
+ end
80
87
  end
81
88
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jasmine
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 1.1.0.rc3
5
+ version: 1.1.0.rc4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rajan Agaskar
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-07-13 00:00:00 -04:00
15
+ date: 2011-09-01 00:00:00 -04:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -60,18 +60,18 @@ dependencies:
60
60
  prerelease: false
61
61
  version_requirements: *id004
62
62
  - !ruby/object:Gem::Dependency
63
- name: gem-release
63
+ name: ci_reporter
64
64
  requirement: &id005 !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 0.0.16
69
+ version: "0"
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: *id005
73
73
  - !ruby/object:Gem::Dependency
74
- name: ci_reporter
74
+ name: json_pure
75
75
  requirement: &id006 !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements:
@@ -81,20 +81,9 @@ dependencies:
81
81
  type: :development
82
82
  prerelease: false
83
83
  version_requirements: *id006
84
- - !ruby/object:Gem::Dependency
85
- name: json_pure
86
- requirement: &id007 !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: "0"
92
- type: :development
93
- prerelease: false
94
- version_requirements: *id007
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: jasmine-core
97
- requirement: &id008 !ruby/object:Gem::Requirement
86
+ requirement: &id007 !ruby/object:Gem::Requirement
98
87
  none: false
99
88
  requirements:
100
89
  - - ">="
@@ -102,10 +91,10 @@ dependencies:
102
91
  version: 1.1.0.rc2
103
92
  type: :runtime
104
93
  prerelease: false
105
- version_requirements: *id008
94
+ version_requirements: *id007
106
95
  - !ruby/object:Gem::Dependency
107
96
  name: rack
108
- requirement: &id009 !ruby/object:Gem::Requirement
97
+ requirement: &id008 !ruby/object:Gem::Requirement
109
98
  none: false
110
99
  requirements:
111
100
  - - ">="
@@ -113,10 +102,10 @@ dependencies:
113
102
  version: "1.1"
114
103
  type: :runtime
115
104
  prerelease: false
116
- version_requirements: *id009
105
+ version_requirements: *id008
117
106
  - !ruby/object:Gem::Dependency
118
107
  name: rspec
119
- requirement: &id010 !ruby/object:Gem::Requirement
108
+ requirement: &id009 !ruby/object:Gem::Requirement
120
109
  none: false
121
110
  requirements:
122
111
  - - ">="
@@ -124,10 +113,10 @@ dependencies:
124
113
  version: 1.3.1
125
114
  type: :runtime
126
115
  prerelease: false
127
- version_requirements: *id010
116
+ version_requirements: *id009
128
117
  - !ruby/object:Gem::Dependency
129
118
  name: selenium-webdriver
130
- requirement: &id011 !ruby/object:Gem::Requirement
119
+ requirement: &id010 !ruby/object:Gem::Requirement
131
120
  none: false
132
121
  requirements:
133
122
  - - ">="
@@ -135,7 +124,7 @@ dependencies:
135
124
  version: 0.1.3
136
125
  type: :runtime
137
126
  prerelease: false
138
- version_requirements: *id011
127
+ version_requirements: *id010
139
128
  description: Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.
140
129
  email: jasmine-js@googlegroups.com
141
130
  executables:
@@ -228,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
217
  requirements:
229
218
  - - ">="
230
219
  - !ruby/object:Gem::Version
231
- hash: 520847695
220
+ hash: 848058131
232
221
  segments:
233
222
  - 0
234
223
  version: "0"