Ronan
ronan is a lightweight REST API client for conan servers. It is not intended to be a full replacement of conan itself. Instead this client will only implement simple queries to get information about packages stored in a conan repository (e.g. artifactory). Most common use case at our's has been to get download URLs from an artifactory instance in order to allow users not willing to use conan to download and integrate packages manually.
As there is not much documentation about how conan communicatates with servers, the conan server implentation's routes have been reverse engineered from https://github.com/conan-io/conan/blob/597f14668b3e1b5f0a7a3a0e9d1b0ee1cdfe2666/conans/model/rest_routes.py, so that requests behave like conan itself.
[[TOC]]
Installation
Add this line to your application's Gemfile:
gem 'ronan'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install ronan
Usage
require "ronan"
Ronan.configure do |config|
# set remote repository (dw-developer-sdk is open to everyone)
config.remote = "https://artifactory.digitalwerk.net/artifactory/api/conan/dw-developer-sdk/"
end
# search for recipes and take first off the result
recipe = Ronan::Recipe.search("ddl").first
# get a list of package information for a recipe and take first one
package = recipe.packages.first
# get all downloads for the package
downloads = package.downloads
# print out a single download URL for an artifact
puts downloads.url("conaninfo.txt")
Contributing
Bug reports are welcome on Gitlab.