jasmine-rails 0.10.5 → 0.10.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51c01585e228cf041c994942883a3aca24edc12d
4
- data.tar.gz: bce2ef04774ed788dc7cc33303d4881bf111c754
3
+ metadata.gz: 379cc6c1cc1307c4875ca1772008b75f4e37e668
4
+ data.tar.gz: d32d427c74cabf24bd342c0a9350d90c81186f62
5
5
  SHA512:
6
- metadata.gz: da4d89dbb47926b4ab19b6a0351820d3fcb029cc3c5a3aed8402f57b3a8a4653b7d58178f43458823cc9248fc4ff548b785bfe555505b62481807aede5809608
7
- data.tar.gz: f69cc3335a776e693577126f9893332aade157c4c58cd360143bc62643f6635bd5f7cc1f40e7973efe2a6afd4e59db1454fa5202f2cb2f417fb7fc608b5b560a
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
@@ -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
- run_cmd %{"#{Phantomjs.path}" "#{phantomjs_runner_path}" "#{runner_path.to_s}?spec=#{spec_filter}"}
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
 
@@ -1,3 +1,3 @@
1
1
  module JasmineRails
2
- VERSION = "0.10.5"
2
+ VERSION = "0.10.6"
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.10.5
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: 2014-12-18 00:00:00.000000000 Z
13
+ date: 2015-01-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties