From 7955e7ca4134cec477cd170cf4181862e1e9050c Mon Sep 17 00:00:00 2001 From: Jeremy Nicklas Date: Mon, 2 Apr 2018 09:22:10 -0400 Subject: [PATCH] replace fixnum w/ integer Fixes #67 --- CHANGELOG.md | 4 ++++ lib/ood_core/job/adapters/lsf/helper.rb | 2 +- lib/ood_core/job/info.rb | 10 +++++----- lib/ood_core/job/node_info.rb | 4 ++-- lib/ood_core/job/script.rb | 6 +++--- lib/ood_core/job/status.rb | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 097109b58..415112f7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Basic multi-cluster support for LSF by specifying name of cluster for -m argument. [#24](https://github.com/OSC/ood_core/issues/24) +### Fixed +- Replaced `Fixnum` code comments with `Integer`. + [#67](https://github.com/OSC/ood_core/issues/67) + ## [0.2.1] - 2018-01-26 ### Changed - Updated the date in the `LICENSE.txt` file. diff --git a/lib/ood_core/job/adapters/lsf/helper.rb b/lib/ood_core/job/adapters/lsf/helper.rb index f6d302ee9..824a11fa5 100644 --- a/lib/ood_core/job/adapters/lsf/helper.rb +++ b/lib/ood_core/job/adapters/lsf/helper.rb @@ -68,7 +68,7 @@ def estimate_runtime(current_time:, start_time:, finish_time:) # # my guess is: hours:minutes:seconds.???? # - # @return [Fixnum, nil] cpu used as seconds + # @return [Integer, nil] cpu used as seconds def parse_cpu_used(cpu_used) if cpu_used =~ /^(\d+):(\d+):(\d+)\..*$/ $1.to_i*3600 + $2.to_i*60 + $3.to_i diff --git a/lib/ood_core/job/info.rb b/lib/ood_core/job/info.rb index 8834c1967..3ac3dca13 100644 --- a/lib/ood_core/job/info.rb +++ b/lib/ood_core/job/info.rb @@ -33,7 +33,7 @@ class Info attr_reader :accounting_id # Number of procs allocated for job - # @return [Fixnum, nil] allocated total number of procs + # @return [Integer, nil] allocated total number of procs attr_reader :procs # Name of the queue in which the job was queued or started @@ -41,15 +41,15 @@ class Info attr_reader :queue_name # The accumulated wall clock time in seconds - # @return [Fixnum, nil] wallclock time + # @return [Integer, nil] wallclock time attr_reader :wallclock_time # The total wall clock time limit in seconds - # @return [Fixnum, nil] wallclock time limit + # @return [Integer, nil] wallclock time limit attr_reader :wallclock_limit # The accumulated CPU time in seconds - # @return [Fixnum, nil] cpu time + # @return [Integer, nil] cpu time attr_reader :cpu_time # The time at which the job was submitted @@ -139,7 +139,7 @@ def eql?(other) end # Generate a hash value for this object - # @return [Fixnum] hash value of object + # @return [Integer] hash value of object def hash [self.class, to_h].hash end diff --git a/lib/ood_core/job/node_info.rb b/lib/ood_core/job/node_info.rb index a3e54c158..3a03615f9 100644 --- a/lib/ood_core/job/node_info.rb +++ b/lib/ood_core/job/node_info.rb @@ -7,7 +7,7 @@ class NodeInfo attr_reader :name # The number of procs reserved on the given machine - # @return [Fixnum, nil] number of procs + # @return [Integer, nil] number of procs attr_reader :procs # @param name [#to_s] node name @@ -38,7 +38,7 @@ def eql?(other) end # Generate a hash value for this object - # @return [Fixnum] hash value of object + # @return [Integer] hash value of object def hash [self.class, to_h].hash end diff --git a/lib/ood_core/job/script.rb b/lib/ood_core/job/script.rb index be8b0f113..e7e78271d 100644 --- a/lib/ood_core/job/script.rb +++ b/lib/ood_core/job/script.rb @@ -75,7 +75,7 @@ class Script attr_reader :queue_name # The scheduling priority for the job - # @return [Fixnum, nil] scheduling priority + # @return [Integer, nil] scheduling priority attr_reader :priority # The earliest time when the job may be eligible to run @@ -84,7 +84,7 @@ class Script # The maximum amount of real time during which the job can be running in # seconds - # @return [Fixnum, nil] max real time + # @return [Integer, nil] max real time attr_reader :wall_time # The attribute used for job accounting purposes @@ -189,7 +189,7 @@ def eql?(other) end # Generate a hash value for this object - # @return [Fixnum] hash value of object + # @return [Integer] hash value of object def hash [self.class, to_h].hash end diff --git a/lib/ood_core/job/status.rb b/lib/ood_core/job/status.rb index d17249b9c..b97e21e2c 100644 --- a/lib/ood_core/job/status.rb +++ b/lib/ood_core/job/status.rb @@ -72,7 +72,7 @@ def eql?(other) end # Generate a hash value for this object - # @return [Fixnum] hash value of object + # @return [Integer] hash value of object def hash [self.class, to_sym].hash end