Robust HTTP client, tailored by Twingly.
Install the gem:
gem install twingly-http
Example "one-liner" usage:
ruby -rlogger -rtwingly/http -e '\ logger = Logger.new($stdout); logger.level = :INFO; \ puts Twingly::HTTP::Client.new(logger: logger, \ base_user_agent: "").get("http://example.org").status'
irb -rlogger -rtwingly/http
logger = Logger.new($stdout); logger.level = :INFO client = Twingly::HTTP::Client.new(logger: logger, base_user_agent: "") client.get("http://example.org").status
The tests require Toxiproxy
Run tests with
bundle exec rake
Bump the version in
lib/twingly/version.rbin a commit, no need to push (the release task does that).
Ensure you are signed in to RubyGems.org as twingly with
Build and publish the gem. This will create the proper tag in git, push the commit and tag and upload to RubyGems.
bundle exec rake release
Update the changelog with GitHub Changelog Generator (
gem install github_changelog_generatorif you don't have it, set
CHANGELOG_GITHUB_TOKENto a personal access token to avoid rate limiting by GitHub). This command will update
CHANGELOG.md. You need to commit and push manually.