lib/github_api/repos/keys.rb in github_api-0.8.1 vs lib/github_api/repos/keys.rb in github_api-0.8.2

- old
+ new

@@ -1,11 +1,11 @@ # encoding: utf-8 module Github class Repos::Keys < API - VALID_KEY_PARAM_NAMES = %w[ title key ].freeze + VALID_KEY_OPTIONS = %w[ title key ].freeze # List deploy keys # # = Examples # github = Github.new @@ -52,12 +52,12 @@ # def create(user_name, repo_name, params={}) set :user => user_name, :repo => repo_name assert_presence_of user, repo normalize! params - filter! VALID_KEY_PARAM_NAMES, params - assert_required_keys(VALID_KEY_PARAM_NAMES, params) + filter! VALID_KEY_OPTIONS, params + assert_required_keys(VALID_KEY_OPTIONS, params) post_request("/repos/#{user}/#{repo}/keys", params) end # Edit a key @@ -75,10 +75,10 @@ def edit(user_name, repo_name, key_id, params={}) set :user => user_name, :repo => repo_name assert_presence_of user, repo, key_id normalize! params - filter! VALID_KEY_PARAM_NAMES, params + filter! VALID_KEY_OPTIONS, params patch_request("/repos/#{user}/#{repo}/keys/#{key_id}", params) end # Delete key