lib/magellan/cli/resources/client_version.rb in magellan-cli-0.2.17 vs lib/magellan/cli/resources/client_version.rb in magellan-cli-0.2.18
- old
+ new
@@ -4,27 +4,27 @@
module Magellan
module Cli
module Resources
class ClientVersion < Base
- self.resource_name = "client_version"
+ self.resource_key = "client_version"
self.resource_dependency = {"project" => "project"}
self.hidden_fields = %w[project_id created_at updated_at].map(&:freeze).freeze
self.field_associations = {
"stage_title_id" => {name: "stage", class: "Stage"},
}
- desc "create VERSION", "create New Client Version"
+ desc "create VERSION", "Create a new #{resource_name}"
def create(version)
stage = load_selection("stage")
params = {
parameter_name => {
"stage_title_id" => stage["id"],
"version" => version,
}
}
- post_json("/admin/#{resource_name}/new.json", params)
+ post_json("/admin/#{resource_key}/new.json", params)
# TODO implement select method
# select(version)
end
end