Foundation classes for Aptible resource server gems.
To build a new resource server gem on top of aptible-resource
, create a top-level class for your resource server. For example:
module Example
module Api
class Resource < Aptible::Resource::Base
def namespace
'Example::Api'
end
def root_url
'https://api.example.com'
end
end
end
end
Then add the gem to your gemspec:
spec.add_dependency 'aptible-resource'
This gem depends on a vendored version of HyperResource, which can be updated from a local checkout of HyperResource as follows:
cp -rp /path/to/hyperresource/lib/hyper_resource* lib/
- Fork the project.
- Commit your changes, with specs.
- Ensure that your code passes specs (
rake spec
) and meets Aptible's Ruby style guide (rake rubocop
). - Create a new pull request on GitHub.
MIT License, see LICENSE for details.
Copyright (c) 2019 Aptible and contributors.