From c75e144452f5e8e95bf3e29da044c4aa7ea38203 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 4 Apr 2013 12:34:24 -0500 Subject: Rename checksums.rb to match class name --- Library/Homebrew/checksum.rb | 22 ++++++++++++++++++++++ Library/Homebrew/checksums.rb | 22 ---------------------- Library/Homebrew/formula_support.rb | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 Library/Homebrew/checksum.rb delete mode 100644 Library/Homebrew/checksums.rb (limited to 'Library') diff --git a/Library/Homebrew/checksum.rb b/Library/Homebrew/checksum.rb new file mode 100644 index 000000000..28ca023fe --- /dev/null +++ b/Library/Homebrew/checksum.rb @@ -0,0 +1,22 @@ +class Checksum + attr_reader :hash_type, :hexdigest + + TYPES = [:sha1, :sha256] + + def initialize type=:sha1, val=nil + @hash_type = type + @hexdigest = val.to_s + end + + def empty? + @hexdigest.empty? + end + + def to_s + @hexdigest + end + + def == other + @hash_type == other.hash_type and @hexdigest == other.hexdigest + end +end diff --git a/Library/Homebrew/checksums.rb b/Library/Homebrew/checksums.rb deleted file mode 100644 index 28ca023fe..000000000 --- a/Library/Homebrew/checksums.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Checksum - attr_reader :hash_type, :hexdigest - - TYPES = [:sha1, :sha256] - - def initialize type=:sha1, val=nil - @hash_type = type - @hexdigest = val.to_s - end - - def empty? - @hexdigest.empty? - end - - def to_s - @hexdigest - end - - def == other - @hash_type == other.hash_type and @hexdigest == other.hexdigest - end -end diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index bbc82396d..9aa635808 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -1,5 +1,5 @@ require 'download_strategy' -require 'checksums' +require 'checksum' require 'version' class SoftwareSpec -- cgit v1.2.3