lib/github_api/repos/watching.rb in github_api-0.7.0 vs lib/github_api/repos/watching.rb in github_api-0.7.1

- old
+ new

@@ -12,11 +12,11 @@ # github.repos.watching.list # github.repos.watching.list { |watcher| ... } # def list(user_name, repo_name, params={}) _update_user_repo_params(user_name, repo_name) - _validate_user_repo_params(user, repo) unless user? && repo? + assert_presence_of user, repo normalize! params response = get_request("/repos/#{user}/#{repo}/subscribers", params) return response unless block_given? response.each { |el| yield el } @@ -54,11 +54,11 @@ # = Examples # github = Github.new # github.repos.watching.watching? 'user-name', 'repo-name' # def watching?(user_name, repo_name, params={}) - _validate_presence_of user_name, repo_name + assert_presence_of user_name, repo_name normalize! params get_request("/user/subscriptions/#{user_name}/#{repo_name}", params) true rescue Github::Error::NotFound false @@ -71,11 +71,11 @@ # = Examples # github = Github.new # github.repos.watching.watch 'user-name', 'repo-name' # def watch(user_name, repo_name, params={}) - _validate_presence_of user_name, repo_name + assert_presence_of user_name, repo_name normalize! params put_request("/user/subscriptions/#{user_name}/#{repo_name}", params) end # Stop watching a repository @@ -84,10 +84,10 @@ # = Examples # github = Github.new # github.repos.watching.unwatch 'user-name', 'repo-name' # def unwatch(user_name, repo_name, params={}) - _validate_presence_of user_name, repo_name + assert_presence_of user_name, repo_name normalize! params delete_request("/user/subscriptions/#{user_name}/#{repo_name}", params) end end # Repos::Watching