
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Api Client for Typhoeus
.json
method that returns parsed JSON or nil
if parsing fails.Add gem "ac"
to your Gemfile or install it yourself with gem install ac
.
Subclass Ac::Base and define BASE_URL, then you can use get(path, options)
(or put/patch/delete).
class HttpbinClient < Ac::Base
BASE_URL = "https://httpbin.org"
def my_ip_address
get("/ip").json["origin"]
end
end
client = HttpbinClient.new
puts client.my_ip_address
# => 177.62.72.86
Implement retries by passing a block that blows up or retruns false if the resquest should be retried.
class JsonPlaceholderClient < Ac::Base
BASE_URL = "https://jsonplaceholder.typicode.com"
def find_post id
res = get("posts/#{id}") do |response|
Integer(response.json["id"])
end
res.json
end
end
client = JsonPlaceholderClient.new
puts client.find_post 2
# => {"userId"=>1, "id"=>2, "title"=>"qui est esse", "body"=>"est rerum tempore vi...
Bug reports and pull requests are welcome on GitHub at https://github.com/felipedmesquita/ac.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ac demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.