Skip to content

Commit

Permalink
Merge pull request twingly#153 from twingly/issue/152/remove-blogstre…
Browse files Browse the repository at this point in the history
…am-hash

Since blogbox have been decomissioned and blogstream is on its way out,
the code removed in this commit would have been dead code if left behind.

See issue: twingly#152
See Trello: https://trello.com/c/x2KWY2Mo/3686-sprint108-avveckla-blog-box

close twingly#152
  • Loading branch information
Chrizpy committed Feb 1, 2022
2 parents 32c5c2d + d4619d6 commit d9eb885
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 @@ -8,7 +8,6 @@ Twingly URL tools.
* `Twingly::URL.parse` - Returns one or more `Twingly::URL` instance
* `twingly/url/hasher` - Generate URL hashes suitable for primary keys
* `Twingly::URL::Hasher.taskdb_hash(url)` - MD5 hexdigest
* `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/utilities` - Utilities to work with URLs
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 @@ -19,10 +19,6 @@ def taskdb_hash(url)
MD5_DIGEST.hexdigest(url)[0..29].upcase
end

def blogstream_hash(url)
MD5_DIGEST.hexdigest(url)[0..29].upcase
end

def documentdb_hash(url)
SHA256_DIGEST.digest(url).unpack("L!")[0]
end
Expand Down
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 @@ -11,12 +11,6 @@
end
end

describe ".blogstream_hash" do
it "returns a MD5 hexdigest" do
expect(Twingly::URL::Hasher.blogstream_hash("http://blog.twingly.com/")).to eq "B1E2D5AECF6649C2E44D17AEA3E0F4"
end
end

describe ".documentdb_hash" do
it "returns a SHA256 unsigned long, native endian digest" do
expect(Twingly::URL::Hasher.documentdb_hash("http://blog.twingly.com/")).to eq 15340752212397415993
Expand Down

0 comments on commit d9eb885

Please sign in to comment.