testlab 1.15.0 → 1.15.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.
Files changed (3) hide show
  1. data/lib/testlab/version.rb +1 -1
  2. data/lib/testlab.rb +13 -4
  3. metadata +4 -4
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "1.15.0"
4
+ VERSION = "1.15.1"
5
5
  end
6
6
  end
data/lib/testlab.rb CHANGED
@@ -161,10 +161,19 @@ class TestLab
161
161
  def boot
162
162
 
163
163
  # Raise how many files we can have open to the hard limit.
164
- rlimit_nofile = Process.getrlimit(Process::RLIMIT_NOFILE)
165
- if rlimit_nofile[0] != rlimit_nofile[1]
166
- self.ui.logger.info { "Changing maximum open file descriptors from #{rlimit_nofile[0].inspect} to #{rlimit_nofile[1].inspect}" }
167
- Process.setrlimit(Process::RLIMIT_NOFILE, rlimit_nofile[1])
164
+ nofile_cur, nofile_max = Process.getrlimit(Process::RLIMIT_NOFILE)
165
+ if nofile_cur != nofile_max
166
+
167
+ # OSX likes to indicate we can set the infinity value here; do so causes
168
+ # an the following exception to throw:
169
+ # Errno::EINVAL: Invalid argument - setrlimit
170
+ # In the event this happens, use 4096 as the max value.
171
+ if (nofile_max == Process::RLIM_INFINITY)
172
+ nofile_max = 4096
173
+ end
174
+
175
+ self.ui.logger.info { "Changing maximum open file descriptors from #{nofile_cur.inspect} to #{nofile_max.inspect}" }
176
+ Process.setrlimit(Process::RLIMIT_NOFILE, nofile_max)
168
177
  end
169
178
 
170
179
  @labfile = TestLab::Labfile.load(labfile_path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.15.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-15 00:00:00.000000000 Z
12
+ date: 2013-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
@@ -351,7 +351,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
351
  version: '0'
352
352
  segments:
353
353
  - 0
354
- hash: 2276873764292884095
354
+ hash: -3524242101058471505
355
355
  required_rubygems_version: !ruby/object:Gem::Requirement
356
356
  none: false
357
357
  requirements:
@@ -360,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  version: '0'
361
361
  segments:
362
362
  - 0
363
- hash: 2276873764292884095
363
+ hash: -3524242101058471505
364
364
  requirements: []
365
365
  rubyforge_project:
366
366
  rubygems_version: 1.8.25