0.0
There's a lot of open issues
A long-lived project that still receives updates
Robust HTTP client tailored by Twingly
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1, >= 1.0.1
 Project Readme

Twingly::HTTP

GitHub Build Status

Robust HTTP client, tailored by Twingly.

Getting Started

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'

Example irb usage:

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

Tests

The tests require Toxiproxy

docker-compose up

Run tests with

bundle exec rake

Release workflow

  • Bump the version in lib/twingly/version.rb in a commit, no need to push (the release task does that).

  • Ensure you are signed in to RubyGems.org as twingly with gem signin.

  • 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_generator if you don't have it, set CHANGELOG_GITHUB_TOKEN to a personal access token to avoid rate limiting by GitHub). This command will update CHANGELOG.md. You need to commit and push manually.

      github_changelog_generator