Twingly::URL
Twingly URL tools.
twingly/url- Parse and validate URLsTwingly::URL.parse- Returns one or moreTwingly::URLinstance
twingly/url/hasher- Generate URL hashes suitable for primary keysTwingly::URL::Hasher.taskdb_hash(url)- MD5 hexdigestTwingly::URL::Hasher.blogstream_hash(url)- MD5 hexdigestTwingly::URL::Hasher.documentdb_hash(url)- SHA256 unsigned long, native endian digestTwingly::URL::Hasher.autopingdb_hash(url)- SHA256 64-bit signed, native endian digestTwingly::URL::Hasher.pingloggerdb_hash(url)- SHA256 64-bit unsigned, native endian digest
twingly/url/utilities- Utilities to work with URLsTwingly::URL::Utilities.extract_valid_urls- Returns Array of validTwingly::URL
Installation
gem install twingly-url
Tests
Run tests with
bundle exec rake
Profiling
You can get some profiling by running
bundle exec rake test:profile
Note that this isn't a benchmark, we're using ruby-prof which will slow things down.
Release workflow
Build the gem.
gem build twingly-url.gemspec
Publish the gem.
gem push twingly-url-x.y.z.gem