lib/runcible/resources/repository_group.rb in runcible-0.4.12 vs lib/runcible/resources/repository_group.rb in runcible-1.0.0
- old
+ new
@@ -40,52 +40,52 @@
# Creates a Repository Group
#
# @param [String] id the ID of the group
# @param [Hash] optional container for all optional parameters
# @return [RestClient::Response]
- def self.create(id, optional={})
+ def create(id, optional={})
required = required_params(binding.send(:local_variables), binding)
call(:post, path, :payload => { :required => required, :optional => optional })
end
# Retrieves a Repository Group
#
# @param [String] id the ID of the Repository group
# @return [RestClient::Response]
- def self.retrieve(id)
+ def retrieve(id)
call(:get, path(id))
end
# Retrieves all Repository Group
#
# @return [RestClient::Response]
- def self.retrieve_all
+ def retrieve_all
call(:get, path)
end
# Deletes a Repository Group
#
# @param [String] id the ID of the Repository group
# @return [RestClient::Response]
- def self.delete(id)
+ def delete(id)
call(:delete, path(id))
end
# Associates Repositories with a Repository Group
#
# @param [String] id the ID of the Repository group
# @param [Hash] criteria criteria based on Mongo syntax representing repos to associate
# @return [RestClient::Response]
- def self.associate(id, criteria)
+ def associate(id, criteria)
call(:post, path(id) + "actions/associate/", :payload => {:required => criteria})
end
# Unassociates Repositories with a Repository Group
#
# @param [String] id the ID of the Repository group
# @param [Hash] criteria criteria based on Mongo syntax representing repos ta unassociate
# @return [RestClient::Response]
- def self.unassociate(id, criteria)
+ def unassociate(id, criteria)
call(:post, path(id) + "actions/unassociate/", :payload => {:required => criteria})
end
end
end