octokit 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/octokit/client/labels.rb +9 -9
- data/lib/octokit/client/search.rb +4 -4
- data/lib/octokit/client/users.rb +4 -4
- data/lib/octokit/configurable.rb +4 -4
- data/lib/octokit/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c93fb54eadaba45488569de4fc7160ba8194bf9a
         | 
| 4 | 
            +
              data.tar.gz: 992710f4fe8a85fbcc7e7e394fe58a8cb7cf4346
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 58d8dd778c6424ec1555e6ea289f9686af318666d13a8d879f2493cd66d740e16329fb02e6ca6bb2083673c21ca42a5d0c869c01bd783bf58a1cd9e02ce65cc5
         | 
| 7 | 
            +
              data.tar.gz: 2804410d31065bba88f8ece234e34e41eb3da6ab5935f7312196502bf4304b0e8cf22006e8f2494a448d5f66f7096006c86466d197fce7d0a9dbe7c4f25076ba
         | 
    
        data/README.md
    CHANGED
    
    | @@ -331,7 +331,7 @@ repo.rels[:issues].get(:uri => {:number => 2}).data | |
| 331 331 | 
             
            ### The Full Hypermedia Experience™
         | 
| 332 332 |  | 
| 333 333 | 
             
            If you want to use Octokit as a pure hypermedia API client, you can start at
         | 
| 334 | 
            -
            the API root and  | 
| 334 | 
            +
            the API root and follow link relations from there:
         | 
| 335 335 |  | 
| 336 336 | 
             
            ```ruby
         | 
| 337 337 | 
             
            root = Octokit.root
         | 
| @@ -26,7 +26,7 @@ module Octokit | |
| 26 26 | 
             
                  # @return [Sawyer::Resource] A single label from the repository
         | 
| 27 27 | 
             
                  # @see http://developer.github.com/v3/issues/labels/#get-a-single-label
         | 
| 28 28 | 
             
                  # @example Get the "V3 Addition" label from octokit/octokit.rb
         | 
| 29 | 
            -
                  #   Octokit.labels("octokit/octokit.rb")
         | 
| 29 | 
            +
                  #   Octokit.labels("octokit/octokit.rb", "V3 Addition")
         | 
| 30 30 | 
             
                  def label(repo, name, options = {})
         | 
| 31 31 | 
             
                    get "repos/#{Repository.new(repo)}/labels/#{CGI.escape(name)}", options
         | 
| 32 32 | 
             
                  end
         | 
| @@ -78,7 +78,7 @@ module Octokit | |
| 78 78 | 
             
                  # This removes the label from the Issue
         | 
| 79 79 | 
             
                  #
         | 
| 80 80 | 
             
                  # @param repo [String, Repository, Hash] A GitHub repository
         | 
| 81 | 
            -
                  # @param number [ | 
| 81 | 
            +
                  # @param number [Fixnum] Number ID of the issue
         | 
| 82 82 | 
             
                  # @param label [String] String name of the label
         | 
| 83 83 | 
             
                  # @return [Array<Sawyer::Resource>] A list of the labels currently on the issue
         | 
| 84 84 | 
             
                  # @see http://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
         | 
| @@ -93,7 +93,7 @@ module Octokit | |
| 93 93 | 
             
                  # This removes the label from the Issue
         | 
| 94 94 | 
             
                  #
         | 
| 95 95 | 
             
                  # @param repo [String, Repository, Hash] A GitHub repository
         | 
| 96 | 
            -
                  # @param number [ | 
| 96 | 
            +
                  # @param number [Fixnum] Number ID of the issue
         | 
| 97 97 | 
             
                  # @return [Boolean] Success of operation
         | 
| 98 98 | 
             
                  # @see http://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue
         | 
| 99 99 | 
             
                  # @example Remove all labels from Issue #23
         | 
| @@ -105,11 +105,11 @@ module Octokit | |
| 105 105 | 
             
                  # List labels for a given issue
         | 
| 106 106 | 
             
                  #
         | 
| 107 107 | 
             
                  # @param repo [String, Repository, Hash] A GitHub repository
         | 
| 108 | 
            -
                  # @param number [ | 
| 108 | 
            +
                  # @param number [Fixnum] Number ID of the issue
         | 
| 109 109 | 
             
                  # @return [Array<Sawyer::Resource>] A list of the labels currently on the issue
         | 
| 110 110 | 
             
                  # @see http://developer.github.com/v3/issues/labels/#list-labels-on-an-issue
         | 
| 111 | 
            -
                  # @example List labels for octokit/octokit.rb
         | 
| 112 | 
            -
                  #   Octokit. | 
| 111 | 
            +
                  # @example List labels for octokit/octokit.rb, issue # 1
         | 
| 112 | 
            +
                  #   Octokit.labels_for_issue("octokit/octokit.rb", 1)
         | 
| 113 113 | 
             
                  def labels_for_issue(repo, number, options = {})
         | 
| 114 114 | 
             
                    get "repos/#{Repository.new(repo)}/issues/#{number}/labels", options
         | 
| 115 115 | 
             
                  end
         | 
| @@ -117,7 +117,7 @@ module Octokit | |
| 117 117 | 
             
                  # Add label(s) to an Issue
         | 
| 118 118 | 
             
                  #
         | 
| 119 119 | 
             
                  # @param repo [String, Repository, Hash] A Github repository
         | 
| 120 | 
            -
                  # @param number [ | 
| 120 | 
            +
                  # @param number [Fixnum] Number ID of the issue
         | 
| 121 121 | 
             
                  # @param labels [Array] An array of labels to apply to this Issue
         | 
| 122 122 | 
             
                  # @return [Array<Sawyer::Resource>] A list of the labels currently on the issue
         | 
| 123 123 | 
             
                  # @see http://developer.github.com/v3/issues/labels/#add-labels-to-an-issue
         | 
| @@ -130,7 +130,7 @@ module Octokit | |
| 130 130 | 
             
                  # Replace all labels on an Issue
         | 
| 131 131 | 
             
                  #
         | 
| 132 132 | 
             
                  # @param repo [String, Repository, Hash] A Github repository
         | 
| 133 | 
            -
                  # @param number [ | 
| 133 | 
            +
                  # @param number [Fixnum] Number ID of the issue
         | 
| 134 134 | 
             
                  # @param labels [Array] An array of labels to use as replacement
         | 
| 135 135 | 
             
                  # @return [Array<Sawyer::Resource>] A list of the labels currently on the issue
         | 
| 136 136 | 
             
                  # @see http://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
         | 
| @@ -143,7 +143,7 @@ module Octokit | |
| 143 143 | 
             
                  # Get labels for every issue in a milestone
         | 
| 144 144 | 
             
                  #
         | 
| 145 145 | 
             
                  # @param repo [String, Repository, Hash] A GitHub repository
         | 
| 146 | 
            -
                  # @param number [ | 
| 146 | 
            +
                  # @param number [Fixnum] Number ID of the milestone
         | 
| 147 147 | 
             
                  # @return [Array<Sawyer::Resource>] A list of the labels across the milestone
         | 
| 148 148 | 
             
                  # @see  http://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone
         | 
| 149 149 | 
             
                  # @example List all labels for milestone #2 on octokit/octokit.rb
         | 
| @@ -17,7 +17,7 @@ module Octokit | |
| 17 17 | 
             
                  # @return [Sawyer::Resource] Search results object
         | 
| 18 18 | 
             
                  # @see http://developer.github.com/v3/search/#search-code
         | 
| 19 19 | 
             
                  def search_code(query, options = {})
         | 
| 20 | 
            -
                    search " | 
| 20 | 
            +
                    search "search/code", query, options
         | 
| 21 21 | 
             
                  end
         | 
| 22 22 |  | 
| 23 23 | 
             
                  # Search issues
         | 
| @@ -31,7 +31,7 @@ module Octokit | |
| 31 31 | 
             
                  # @return [Sawyer::Resource] Search results object
         | 
| 32 32 | 
             
                  # @see http://developer.github.com/v3/search/#search-issues
         | 
| 33 33 | 
             
                  def search_issues(query, options = {})
         | 
| 34 | 
            -
                    search " | 
| 34 | 
            +
                    search "search/issues", query, options
         | 
| 35 35 | 
             
                  end
         | 
| 36 36 |  | 
| 37 37 | 
             
                  # Search repositories
         | 
| @@ -45,7 +45,7 @@ module Octokit | |
| 45 45 | 
             
                  # @return [Sawyer::Resource] Search results object
         | 
| 46 46 | 
             
                  # @see http://developer.github.com/v3/search/#search-repositories
         | 
| 47 47 | 
             
                  def search_repositories(query, options = {})
         | 
| 48 | 
            -
                    search " | 
| 48 | 
            +
                    search "search/repositories", query, options
         | 
| 49 49 | 
             
                  end
         | 
| 50 50 | 
             
                  alias :search_repos :search_repositories
         | 
| 51 51 |  | 
| @@ -60,7 +60,7 @@ module Octokit | |
| 60 60 | 
             
                  # @return [Sawyer::Resource] Search results object
         | 
| 61 61 | 
             
                  # @see http://developer.github.com/v3/search/#search-users
         | 
| 62 62 | 
             
                  def search_users(query, options = {})
         | 
| 63 | 
            -
                    search " | 
| 63 | 
            +
                    search "search/users", query, options
         | 
| 64 64 | 
             
                  end
         | 
| 65 65 |  | 
| 66 66 | 
             
                  private
         | 
    
        data/lib/octokit/client/users.rb
    CHANGED
    
    | @@ -19,7 +19,7 @@ module Octokit | |
| 19 19 | 
             
                  #
         | 
| 20 20 | 
             
                  # @return [Array<Sawyer::Resource>] List of GitHub users.
         | 
| 21 21 | 
             
                  def all_users(options = {})
         | 
| 22 | 
            -
                     | 
| 22 | 
            +
                    paginate "users", options
         | 
| 23 23 | 
             
                  end
         | 
| 24 24 |  | 
| 25 25 | 
             
                  # Get a single user
         | 
| @@ -45,7 +45,7 @@ module Octokit | |
| 45 45 | 
             
                  # @return [Sawyer::Resource] Hash holding the access token.
         | 
| 46 46 | 
             
                  # @see http://developer.github.com/v3/oauth/#web-application-flow
         | 
| 47 47 | 
             
                  # @example
         | 
| 48 | 
            -
                  #    | 
| 48 | 
            +
                  #   Octokit.exchange_code_for_token('aaaa', 'xxxx', 'yyyy', {:accept => 'application/json'})
         | 
| 49 49 | 
             
                  def exchange_code_for_token(code, app_id = client_id, app_secret = client_secret, options = {})
         | 
| 50 50 | 
             
                    options.merge!({
         | 
| 51 51 | 
             
                      :code => code,
         | 
| @@ -96,7 +96,7 @@ module Octokit | |
| 96 96 | 
             
                  # @example
         | 
| 97 97 | 
             
                  #   Octokit.followers('pengwynn')
         | 
| 98 98 | 
             
                  def followers(user=login, options = {})
         | 
| 99 | 
            -
                     | 
| 99 | 
            +
                    paginate "users/#{user}/followers", options
         | 
| 100 100 | 
             
                  end
         | 
| 101 101 |  | 
| 102 102 | 
             
                  # Get list of users a user is following.
         | 
| @@ -107,7 +107,7 @@ module Octokit | |
| 107 107 | 
             
                  # @example
         | 
| 108 108 | 
             
                  #   Octokit.following('pengwynn')
         | 
| 109 109 | 
             
                  def following(user=login, options = {})
         | 
| 110 | 
            -
                     | 
| 110 | 
            +
                    paginate "users/#{user}/following", options
         | 
| 111 111 | 
             
                  end
         | 
| 112 112 |  | 
| 113 113 | 
             
                  # Check if you are following a user. Alternatively, check if a given user
         | 
    
        data/lib/octokit/configurable.rb
    CHANGED
    
    | @@ -43,11 +43,11 @@ module Octokit | |
| 43 43 | 
             
                # @!attribute web_endpoint
         | 
| 44 44 | 
             
                #   @return [String] Base URL for web URLs. default: https://github.com/
         | 
| 45 45 |  | 
| 46 | 
            -
                attr_accessor :access_token, : | 
| 46 | 
            +
                attr_accessor :access_token, :auto_paginate, :client_id,
         | 
| 47 47 | 
             
                              :client_secret, :default_media_type, :connection_options,
         | 
| 48 | 
            -
                              : | 
| 49 | 
            -
                              :per_page, :proxy, :user_agent | 
| 50 | 
            -
                attr_writer :password
         | 
| 48 | 
            +
                              :middleware, :netrc, :netrc_file,
         | 
| 49 | 
            +
                              :per_page, :proxy, :user_agent
         | 
| 50 | 
            +
                attr_writer :password, :web_endpoint, :api_endpoint, :login
         | 
| 51 51 |  | 
| 52 52 | 
             
                class << self
         | 
| 53 53 |  | 
    
        data/lib/octokit/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: octokit
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.6. | 
| 4 | 
            +
              version: 2.6.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Wynn Netherland
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire: 
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2013-12- | 
| 13 | 
            +
            date: 2013-12-07 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: bundler
         |