phantom_jasmine 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,6 @@
1
+ require 'facter'
1
2
  require 'tempfile'
3
+ require 'phantomjs-mac' if RUBY_PLATFORM.downcase.include?('darwin')
2
4
 
3
5
  class Jasmine::Runners::Phantom
4
6
  attr_accessor :suites
@@ -55,7 +57,7 @@ class Jasmine::Runners::Phantom
55
57
 
56
58
  def processor_count
57
59
  @processor_count ||= begin
58
- ENV['JASMINE_PARALLEL_COUNT'] || [(`sysctl -n hw.ncpu` || 4).to_i, 4].min # 8 processes seems to use too much memory (500mb each!)
60
+ ENV['JASMINE_PARALLEL_COUNT'] || [Facter.sp_number_processors.to_i, 4].min
59
61
  end.to_i
60
62
  end
61
63
  end
@@ -8,7 +8,6 @@ else
8
8
  require 'spec'
9
9
  end
10
10
  require 'jasmine/runners/phantom'
11
- require 'phantomjs-mac' if RUBY_PLATFORM.downcase.include?('darwin')
12
11
 
13
12
  jasmine_yml = File.join(Dir.pwd, 'spec', 'javascripts', 'support', 'jasmine.yml')
14
13
  if File.exist?(jasmine_yml)
@@ -1,3 +1,3 @@
1
1
  module PhantomJasmine
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -20,5 +20,6 @@ Gem::Specification.new do |gem|
20
20
  gem.extensions = ['ext/mkrf_conf.rb']
21
21
 
22
22
  gem.add_dependency %q{jasmine}, '>= 1.2'
23
+ gem.add_dependency %q{facter}, '>= 1.6.17'
23
24
  gem.add_dependency %q{phantomjs-mac}, '>= 0.0.3'
24
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phantom_jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '1.2'
30
+ - !ruby/object:Gem::Dependency
31
+ name: facter
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 1.6.17
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.6.17
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: phantomjs-mac
32
48
  requirement: !ruby/object:Gem::Requirement