Skip to content

Commit

Permalink
Merge pull request #124 from twingly/remove-pingloggerdb_hash
Browse files Browse the repository at this point in the history
Remove Twingly::URL::Hasher.pingloggerdb_hash
  • Loading branch information
walro authored May 9, 2018
2 parents 1455bb0 + 2325623 commit 5d5f722
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Twingly URL tools.
* `Twingly::URL::Hasher.blogstream_hash(url)` - MD5 hexdigest
* `Twingly::URL::Hasher.documentdb_hash(url)` - SHA256 unsigned long, native endian digest
* `Twingly::URL::Hasher.autopingdb_hash(url)` - SHA256 64-bit signed, native endian digest
* `Twingly::URL::Hasher.pingloggerdb_hash(url)` - SHA256 64-bit unsigned, native endian digest
* `twingly/url/utilities` - Utilities to work with URLs
* `Twingly::URL::Utilities.extract_valid_urls` - Returns Array of valid `Twingly::URL`

Expand Down
4 changes: 0 additions & 4 deletions lib/twingly/url/hasher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ def documentdb_hash(url)
def autopingdb_hash(url)
SHA256_DIGEST.digest(url).unpack("q")[0]
end

def pingloggerdb_hash(url)
SHA256_DIGEST.digest(url).unpack("Q")[0]
end
end
end
end
6 changes: 0 additions & 6 deletions spec/lib/twingly/url/hasher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,4 @@
expect(Twingly::URL::Hasher.autopingdb_hash("http://blog.twingly.com/")).to eq expected
end
end

describe ".pingloggerdb_hash" do
it "returns a SHA256 64-bit unsigned, native endian digest" do
expect(Twingly::URL::Hasher.pingloggerdb_hash("http://blog.twingly.com/")).to eq 15340752212397415993
end
end
end

0 comments on commit 5d5f722

Please sign in to comment.