Sha256: 5cb99cad4d37c194839e967f759cd353921e804abf0e2c0f667d0a460c7e7c6b

Contents?: true

Size: 1.32 KB

Versions: 85

Compression:

Stored size: 1.32 KB

Contents

module Octokit
  class Client

    # Methods for the Gitignore API
    #
    # @see https://developer.github.com/v3/gitignore/
    module Gitignore

      # Listing available gitignore templates.
      #
      # These templates can be passed option when creating a repository.
      #
      # @see https://developer.github.com/v3/gitignore/#listing-available-templates
      #
      # @return [Array<String>] List of templates.
      #
      # @example Git all the gitignore templates
      #   @client.gitignore_templates
      def gitignore_templates(options = {})
        get "gitignore/templates", options
      end

      # Get a gitignore template.
      #
      # Use the raw {http://developer.github.com/v3/media/ media type} to get
      # the raw contents.
      #
      # @param template_name [String] Name of the template. Template names are
      #   case sensitive, make sure to use a valid name from the
      #   .gitignore_templates list.
      #
      # @see https://developer.github.com/v3/gitignore/#get-a-single-template
      #
      # @return [Sawyer::Resource] Gitignore template
      #
      # @example Get the Ruby gitignore template
      #   @client.gitignore_template('Ruby')
      def gitignore_template(template_name, options = {})
        get "gitignore/templates/#{template_name}", options
      end
    end
  end
end

Version data entries

85 entries across 66 versions & 3 rubygems

Version Path
octokit-4.24.0 lib/octokit/client/gitignore.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/octokit-4.23.0/lib/octokit/client/gitignore.rb
octokit-4.23.0 lib/octokit/client/gitignore.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/octokit-4.22.0/lib/octokit/client/gitignore.rb
octokit-4.22.0 lib/octokit/client/gitignore.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/octokit-4.21.0/lib/octokit/client/gitignore.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/octokit-4.21.0/lib/octokit/client/gitignore.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/octokit-4.21.0/lib/octokit/client/gitignore.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/octokit-4.21.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/octokit-4.19.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/octokit-4.20.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/octokit-4.19.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/octokit-4.21.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/octokit-4.20.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/octokit-4.20.0/lib/octokit/client/gitignore.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/octokit-4.21.0/lib/octokit/client/gitignore.rb
octokit-4.21.0 lib/octokit/client/gitignore.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/octokit-4.20.0/lib/octokit/client/gitignore.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/octokit-4.19.0/lib/octokit/client/gitignore.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/octokit-4.19.0/lib/octokit/client/gitignore.rb