jasmine-rails 0.10.5 → 0.10.6
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 +13 -0
- data/lib/jasmine-rails.rb +5 -0
- data/lib/jasmine_rails/runner.rb +3 -2
- 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: 379cc6c1cc1307c4875ca1772008b75f4e37e668
|
4
|
+
data.tar.gz: d32d427c74cabf24bd342c0a9350d90c81186f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d8555f9e0f3eabd033d8c4ecd19952e6b33b47ea80e1d3645d8cb1450f1e9cfb01291bcf3d5143213c9235293d5a6604e2353770190b762da5f81282749d324
|
7
|
+
data.tar.gz: 54cc1b4c3fd1f3b6b778e4d7b1aa87b60075be16b07253ebfbdac1c2deba4e6ebf45d9bc006ab8f6f34151196c54d18b0d2f48f19dd8318bf5f51866b9c1d190
|
data/README.md
CHANGED
@@ -237,3 +237,16 @@ default, and you can explicitly use it by the name `console`.
|
|
237
237
|
See [jasmine-junitreporter][j-junit] for an example with JUnit output.
|
238
238
|
|
239
239
|
[j-junit]: https://github.com/shepmaster/jasmine-junitreporter-gem
|
240
|
+
|
241
|
+
## PhantomJS binary
|
242
|
+
|
243
|
+
By default the [PhantomJS gem](https://github.com/colszowka/phantomjs-gem) will
|
244
|
+
be responsible for finding and using an appropriate version of PhantomJS. If
|
245
|
+
however, you wish to manage your own phantom executable you can set:
|
246
|
+
|
247
|
+
```yml
|
248
|
+
use_phantom_gem: false
|
249
|
+
```
|
250
|
+
|
251
|
+
This will then try and use the `phantom` executable on the current `PATH`.
|
252
|
+
|
data/lib/jasmine-rails.rb
CHANGED
@@ -91,6 +91,11 @@ module JasmineRails
|
|
91
91
|
jasmine_config['force_ssl'] || false
|
92
92
|
end
|
93
93
|
|
94
|
+
# use the phantom command from the phantom gem. Set to false if you want to manage your own phantom executable
|
95
|
+
def use_phantom_gem?
|
96
|
+
jasmine_config['use_phantom_gem'].nil? || jasmine_config['use_phantom_gem'] == true
|
97
|
+
end
|
98
|
+
|
94
99
|
private
|
95
100
|
|
96
101
|
def css_dir
|
data/lib/jasmine_rails/runner.rb
CHANGED
@@ -7,7 +7,7 @@ module JasmineRails
|
|
7
7
|
# raises an exception if any errors are encountered while running the testsuite
|
8
8
|
def run(spec_filter = nil, reporters = 'console')
|
9
9
|
override_rails_config do
|
10
|
-
require 'phantomjs'
|
10
|
+
require 'phantomjs' if JasmineRails.use_phantom_gem?
|
11
11
|
require 'fileutils'
|
12
12
|
|
13
13
|
include_offline_asset_paths_helper
|
@@ -18,7 +18,8 @@ module JasmineRails
|
|
18
18
|
File.open(runner_path, 'w') {|f| f << html.gsub("/#{asset_prefix}", "./#{asset_prefix}")}
|
19
19
|
|
20
20
|
phantomjs_runner_path = File.join(File.dirname(__FILE__), '..', 'assets', 'javascripts', 'jasmine-runner.js')
|
21
|
-
|
21
|
+
phantomjs_cmd = JasmineRails.use_phantom_gem? ? Phantomjs.path : 'phantomjs'
|
22
|
+
run_cmd %{"#{phantomjs_cmd}" "#{phantomjs_runner_path}" "#{runner_path.to_s}?spec=#{spec_filter}"}
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
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.10.
|
4
|
+
version: 0.10.6
|
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:
|
13
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|