jasmine-rails 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/jasmine-rails.rb +10 -0
- data/lib/jasmine_rails/offline_asset_paths.rb +1 -1
- data/lib/jasmine_rails/runner.rb +1 -1
- data/lib/jasmine_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6b63ced5a6870dffb4f378a4220a816180e18b
|
4
|
+
data.tar.gz: 59ae4feb8178a6bc3b4a224ecfaaf47cab6802a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d665f29c9d7009f328fb928efc925bf3106f59eb5be64761223efb987d3812d0dd3d2d60be83a0a1e071711ca5646f1a35373df10679fd2ade6da6a33292dced
|
7
|
+
data.tar.gz: 4127e9dddfe68d1eb6deb8ba2d11885c24a1b4e072df144afb52130b5e0d7c358f898dfe75e1b0aa2ff1f7819f1e2f126a075497d30e4ea40b54ea4a7fd9a5f7
|
data/README.md
CHANGED
@@ -64,6 +64,11 @@ helpers:
|
|
64
64
|
# relative path from spec_dir
|
65
65
|
spec_files:
|
66
66
|
- "**/*[Ss]pec.{js,coffee}"
|
67
|
+
|
68
|
+
# path to directory of temporary files
|
69
|
+
# (spec runner and asset cache)
|
70
|
+
# defaults to spec/tmp
|
71
|
+
tmp_dir: "spec/tmp"
|
67
72
|
```
|
68
73
|
|
69
74
|
## Asset Pipeline Support
|
data/lib/jasmine-rails.rb
CHANGED
@@ -23,6 +23,11 @@ module JasmineRails
|
|
23
23
|
Rails.root.join(path)
|
24
24
|
end
|
25
25
|
|
26
|
+
def tmp_dir
|
27
|
+
path = jasmine_config['tmp_dir'] || 'spec/tmp'
|
28
|
+
Rails.root.join(path)
|
29
|
+
end
|
30
|
+
|
26
31
|
# returns list of all files to be included into the jasmine testsuite
|
27
32
|
# includes:
|
28
33
|
# * application src_files
|
@@ -115,6 +120,11 @@ module JasmineRails
|
|
115
120
|
# relative path from spec_dir
|
116
121
|
spec_files:
|
117
122
|
- "**/*[Ss]pec.{js,coffee}"
|
123
|
+
|
124
|
+
# path to directory of temporary files
|
125
|
+
# (spec runner and asset cache)
|
126
|
+
# defaults to spec/tmp
|
127
|
+
tmp_dir: "spec/tmp"
|
118
128
|
YAML
|
119
129
|
end
|
120
130
|
|
@@ -21,7 +21,7 @@ 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 =
|
24
|
+
source_path = JasmineRails.tmp_dir.join('assets').join(source)
|
25
25
|
|
26
26
|
FileUtils.mkdir_p File.dirname(source_path)
|
27
27
|
Rails.logger.debug "Compiling #{source} to #{source_path}"
|
data/lib/jasmine_rails/runner.rb
CHANGED
@@ -9,7 +9,7 @@ module JasmineRails
|
|
9
9
|
override_rails_config do
|
10
10
|
include_offline_asset_paths_helper
|
11
11
|
html = get_spec_runner(spec_filter)
|
12
|
-
runner_path =
|
12
|
+
runner_path = JasmineRails.tmp_dir.join('runner.html')
|
13
13
|
File.open(runner_path, 'w') {|f| f << html.gsub('/assets', './assets')}
|
14
14
|
|
15
15
|
phantomjs_runner_path = File.join(File.dirname(__FILE__), '..', 'assets', 'javascripts', 'jasmine-runner.js')
|
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.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-12-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|