Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Twingly::URL::Hasher.pingloggerdb_hash #124

Merged
merged 1 commit into from
May 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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