jasmine-rails 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -45,7 +45,7 @@ writing specs!
45
45
 
46
46
  ## Configuration
47
47
 
48
- Configuring the Jasmine test runner is done in `spec/javascripts/support/jasmine.yml`. [Here's an example](https://github.com/searls/jasmine-rails/tree/master/spec/javascripts/support) from this repo's [dummy project](https://github.com/searls/jasmine-rails/tree/master/spec/dummy).
48
+ Configuring the Jasmine test runner is done in `spec/javascripts/support/jasmine.yml`.
49
49
 
50
50
  ## Asset Pipeline Support
51
51
 
@@ -72,8 +72,8 @@ spec_files:
72
72
  You can write a spec to test Foo in `spec/javascripts/foo_spec.js`:
73
73
 
74
74
  ```javascript
75
- // include spec/javascripts/helpers/spec_helper.js and app/assets/javascripts/foo.js
76
- //= require helpers/spec_helper
75
+ // include spec/javascripts/helpers/some_helper_file.js and app/assets/javascripts/foo.js
76
+ //= require helpers/some_helper_file
77
77
  //= require foo
78
78
  describe('Foo', function() {
79
79
  it("does something", function() {
@@ -21,7 +21,8 @@ module JasmineRails
21
21
  source = source.to_s
22
22
  return source if source.starts_with?('/')
23
23
  content = Rails.application.assets[source].to_s
24
- source_path = JasmineRails.tmp_dir.join('assets').join(source)
24
+ asset_prefix = Rails.configuration.assets.prefix.gsub(/\A\//,'')
25
+ source_path = JasmineRails.tmp_dir.join(asset_prefix).join(source)
25
26
 
26
27
  FileUtils.mkdir_p File.dirname(source_path)
27
28
  Rails.logger.debug "Compiling #{source} to #{source_path}"
@@ -32,7 +33,7 @@ module JasmineRails
32
33
  f << content
33
34
  end
34
35
  end
35
- "/assets/#{source}"
36
+ "/#{asset_prefix}/#{source}"
36
37
  end
37
38
 
38
39
  end
@@ -10,7 +10,8 @@ module JasmineRails
10
10
  include_offline_asset_paths_helper
11
11
  html = get_spec_runner(spec_filter)
12
12
  runner_path = JasmineRails.tmp_dir.join('runner.html')
13
- File.open(runner_path, 'w') {|f| f << html.gsub('/assets', './assets')}
13
+ asset_prefix = Rails.configuration.assets.prefix.gsub(/\A\//,'')
14
+ File.open(runner_path, 'w') {|f| f << html.gsub("/#{asset_prefix}", "./#{asset_prefix}")}
14
15
 
15
16
  phantomjs_runner_path = File.join(File.dirname(__FILE__), '..', 'assets', 'javascripts', 'jasmine-runner.js')
16
17
  run_cmd %{phantomjs "#{phantomjs_runner_path}" "#{runner_path.to_s}?spec=#{spec_filter}"}
@@ -1,3 +1,3 @@
1
1
  module JasmineRails
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: 4536583753513077706
129
+ hash: 2322879395894389428
130
130
  required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  none: false
132
132
  requirements:
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  segments:
137
137
  - 0
138
- hash: 4536583753513077706
138
+ hash: 2322879395894389428
139
139
  requirements: []
140
140
  rubyforge_project:
141
141
  rubygems_version: 1.8.23