0.0
No release in over 3 years
Low commit activity in last 3 years
In-line sanity checks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

mini_sanity

In-line sanity checks, written as extensions to core Ruby objects. See API listing below, or browse the full documentation.

Example

require "json"
require "pathname"

path = Pathname.new("hosted_files.json").assert!(&:exist?)

hosted_files = JSON.parse(path.read).assert!(Array)

urls = hosted_files.flat_map do |file_info|
  file_info.fetch("mirror_urls").refute!(&:empty?)
end

domains = urls.map do |url|
  url.assert!(%r"^https?://").split("/")[2]
end.uniq

API

Installation

Install the mini_sanity gem.

Contributing

Run rake test to run the tests.

License

MIT License