Sha256: f7e8a8d93bdc6711af4f17f3efaaf5760317e1331ccb2df02f1fc08b0c0957a3

Contents?: true

Size: 258 Bytes

Versions: 16

Compression:

Stored size: 258 Bytes

Contents

module Refile
  # A file hasher which ignores the file contents and always returns a random string.
  class RandomHasher
    # Generate a random string
    #
    # @return [String]
    def hash(_uploadable = nil)
      SecureRandom.hex(30)
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
leifcr-refile-0.7.3 lib/refile/random_hasher.rb
leifcr-refile-0.7.1 lib/refile/random_hasher.rb
leifcr-refile-0.7.0 lib/refile/random_hasher.rb
leifcr-refile-0.6.3 lib/refile/random_hasher.rb
refile-0.6.2 lib/refile/random_hasher.rb
refile-0.6.1 lib/refile/random_hasher.rb
refile-0.6.0 lib/refile/random_hasher.rb
refile-0.5.5 lib/refile/random_hasher.rb
refile-0.5.4 lib/refile/random_hasher.rb
refile-0.5.3 lib/refile/random_hasher.rb
refile-0.5.2 lib/refile/random_hasher.rb
refile-0.5.1 lib/refile/random_hasher.rb
refile-0.5.0 lib/refile/random_hasher.rb
refile-0.4.2 lib/refile/random_hasher.rb
refile-0.4.1 lib/refile/random_hasher.rb
refile-0.4.0 lib/refile/random_hasher.rb