
This adds /repo/{repository.id}/settings endpoints for reading and updating repo settings. Main points: 1. Sets up Settings as a first class resource instead of as an attribute of Repository 2. Adds new meta-programmed method to Query for accessing all prefixed params as a hash.
19 lines
309 B
Ruby
19 lines
309 B
Ruby
module Travis::API::V3
|
|
module Renderer::Settings
|
|
extend self
|
|
|
|
AVAILABLE_ATTRIBUTES = [:settings]
|
|
|
|
def available_attributes
|
|
AVAILABLE_ATTRIBUTES
|
|
end
|
|
|
|
def render(settings, **)
|
|
{
|
|
:@type => 'settings'.freeze,
|
|
:settings => settings.to_h
|
|
}
|
|
end
|
|
end
|
|
end
|