Skip to content

Commit

Permalink
No need to rely on active_support here.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Mar 22, 2023
1 parent c888510 commit 0aebbc0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/gems/pending/util/miq_file_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# implementation where necessary. Connection will be handled separately by the
# subclasses, but they must conform to the top level interface.
#
require 'active_support/core_ext/numeric'

class MiqFileStorage
class InvalidSchemeError < ArgumentError
Expand Down Expand Up @@ -62,9 +61,9 @@ def self.storage_interface_classes
class Interface
BYTE_HASH_MATCH = /^(?<BYTE_NUM>\d+(\.\d+)?)\s*(?<BYTE_QUALIFIER>K|M|G)?$/i
BYTE_HASH = {
"k" => 1.kilobyte,
"m" => 1.megabyte,
"g" => 1.gigabyte
"k" => 1_024,
"m" => 1_048_576,
"g" => 1_073_741_824
}.freeze

attr_reader :remote_file_path, :byte_count, :source_input, :input_writer
Expand Down

0 comments on commit 0aebbc0

Please sign in to comment.