repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/teams.rb
lib/bitbucket_rest_api/teams.rb
# encoding: utf-8 module BitBucket class Teams < API extend AutoloadHelper def initialize(options = { }) super(options) end # List teams for the authenticated user where the user has the provided role # Roles are :admin, :contributor, :member # # = Examples # bitbucket = Bit...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/connection.rb
lib/bitbucket_rest_api/connection.rb
# encoding: utf-8 require 'faraday' require 'faraday_middleware' require 'bitbucket_rest_api/response' require 'bitbucket_rest_api/response/mashify' require 'bitbucket_rest_api/response/jsonize' require 'bitbucket_rest_api/response/helpers' require 'bitbucket_rest_api/response/raise_error' require 'bitbucket_rest_api/...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos.rb
lib/bitbucket_rest_api/repos.rb
# encoding: utf-8 module BitBucket class Repos < API extend AutoloadHelper # Load all the modules after initializing Repos to avoid superclass mismatch autoload_all 'bitbucket_rest_api/repos', :Changesets => 'changesets', :Keys => 'keys', :Servi...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/invitations.rb
lib/bitbucket_rest_api/invitations.rb
# encoding: utf-8 module BitBucket class Invitations < API def invite(user_name, repo_name, emailaddress, perm) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? _validate_presence_of emailaddress perm ||= "write" post_reque...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/client.rb
lib/bitbucket_rest_api/client.rb
# encoding: utf-8 module BitBucket class Client < API # This is a read-only API to the BitBucket events. # These events power the various activity streams on the site. def events(options = {}) raise "Unimplemented" #@events ||= ApiFactory.new 'Events', options end def issues(options...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/request.rb
lib/bitbucket_rest_api/request.rb
# encoding: utf-8 module BitBucket # Defines HTTP verbs module Request METHODS = [:get, :post, :put, :delete, :patch] METHODS_WITH_BODIES = [ :post, :put, :patch ] def get_request(path, params={}, options={}) request(:get, path, params, options) end def patch_request(path, params={}, ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/authorization.rb
lib/bitbucket_rest_api/authorization.rb
# encoding: utf-8 module BitBucket module Authorization # Check whether authentication credentials are present def authenticated? basic_authed? || oauth_token? end # Check whether basic authentication credentials are present def basic_authed? basic_auth? || (login? && password?) ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error.rb
lib/bitbucket_rest_api/error.rb
# encoding: utf-8 module BitBucket module Error class BitBucketError < StandardError attr_reader :response_message, :response_headers def initialize(message) super message @response_message = message end # def inspect # %(#<#{self.class}>) # end end e...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/user.rb
lib/bitbucket_rest_api/user.rb
# encoding: utf-8 module BitBucket class User < API DEFAULT_USER_OPTIONS = { "first_name" => "", "last_name" => "", "avatar" => "" # TODO: can this filed be modified? # "resource_uri" => "" }.freeze # Creates new User API def initializ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/issues/comments.rb
lib/bitbucket_rest_api/issues/comments.rb
# encoding: utf-8 module BitBucket class Issues::Comments < API VALID_ISSUE_COMMENT_PARAM_NAME = %w[ content ].freeze # Creates new Issues::Comments API def initialize(options = {}) super(options) end # List comments on an issue # # = Examples # bitbucket = BitBuck...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/issues/milestones.rb
lib/bitbucket_rest_api/issues/milestones.rb
# encoding: utf-8 module BitBucket class Issues::Milestones < API VALID_MILESTONE_INPUTS = %w[ name ].freeze # :nodoc: # Creates new Issues::Milestones API def initialize(options = {}) super(options) end # List milestones for a repository # # = Examples # bitbucket...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/issues/components.rb
lib/bitbucket_rest_api/issues/components.rb
# encoding: utf-8 module BitBucket class Issues::Components < API VALID_COMPONENT_INPUTS = %w[ name ].freeze # Creates new Issues::Components API def initialize(options = {}) super(options) end # List all components for a repository # # = Examples # bitbucket = BitBucket.new ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/unauthorized.rb
lib/bitbucket_rest_api/error/unauthorized.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 401 module Error class Unauthorized < BitBucketError def initialize(env) super(env) end end end # Error end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/required_params.rb
lib/bitbucket_rest_api/error/required_params.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when invalid options are passed to a request body module Error class RequiredParams < ClientError def initialize(provided, required) super( generate_message( :problem => "Missing required parameters: #{provided.keys.join(',...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/bad_request.rb
lib/bitbucket_rest_api/error/bad_request.rb
# encoding: utf-8 module BitBucket module Error # Raised when BitBucket returns the HTTP status code 400 class BadRequest < ServiceError def initialize(env) super(env) end end end end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/invalid_options.rb
lib/bitbucket_rest_api/error/invalid_options.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when invalid options are passed to a request body module Error class InvalidOptions < ClientError def initialize(invalid, valid) super( generate_message( :problem => "Invalid option #{invalid.keys.join(', ')} provided for t...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/forbidden.rb
lib/bitbucket_rest_api/error/forbidden.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 403 module Error class Forbidden < BitBucketError def initialize(env) super(env) end end end # Error end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/service_unavailable.rb
lib/bitbucket_rest_api/error/service_unavailable.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 404 module Error class ServiceUnavailable < BitBucketError def initialize(env) super(env) end end end # Error end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/internal_server_error.rb
lib/bitbucket_rest_api/error/internal_server_error.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 500 module Error class InternalServerError < BitBucketError def initialize(env) super(env) end end end # Error end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/unprocessable_entity.rb
lib/bitbucket_rest_api/error/unprocessable_entity.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 422 module Error class UnprocessableEntity < BitBucketError def initialize(env) super(env) end end end # Error end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/not_found.rb
lib/bitbucket_rest_api/error/not_found.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 404 module Error class NotFound < ServiceError def initialize(env) super(env) end end end # Error end # BitBucket
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/validations.rb
lib/bitbucket_rest_api/error/validations.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when passed parameters are missing or contain wrong values. module Error class Validations < ClientError def initialize(errors) super( generate_message( :problem => '', :summary => '', :resolution =>...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/service_error.rb
lib/bitbucket_rest_api/error/service_error.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns any of the HTTP status codes module Error class ServiceError < BitBucketError attr_accessor :http_headers def initialize(env) super(generate_message(env)) @http_headers = env[:response_headers] end ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/unknown_value.rb
lib/bitbucket_rest_api/error/unknown_value.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when invalid options are passed to a request body module Error class UnknownValue < ClientError def initialize(key, value, permitted) super( generate_message( :problem => "Wrong value of '#{value}' for the parameter: #{key}...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/bad_events.rb
lib/bitbucket_rest_api/error/bad_events.rb
module BitBucket module Error class BadEvents < ClientError def initialize(event) super "The event: '#{event}', does not exist :(" end end end end
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/blank_value.rb
lib/bitbucket_rest_api/error/blank_value.rb
module BitBucket module Error class BlankValue < ClientError def initialize(required_key) super "The value for: '#{required_key}', cannot be blank :(" end end end end
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/no_events.rb
lib/bitbucket_rest_api/error/no_events.rb
module BitBucket module Error class NoEvents < ClientError def initialize super "At least one event is required, none given :(" end end end end
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/error/client_error.rb
lib/bitbucket_rest_api/error/client_error.rb
# encoding: utf-8 module BitBucket #:nodoc # Raised when BitBucket returns the HTTP status code 404 module Error class ClientError < BitBucketError attr_reader :problem, :summary, :resolution def initialize(message) super(message) end def generate_message(attributes) "...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/download.rb
lib/bitbucket_rest_api/repos/download.rb
# encoding: utf-8 module BitBucket class Repos::Download < API REQUIRED_KEY_PARAM_NAMES = %w[ commit_hash ].freeze def get(user_name, repo_name, params={}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? # normalize! pa...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/forks.rb
lib/bitbucket_rest_api/repos/forks.rb
# encoding: utf-8 module BitBucket class Repos::Forks < API REQUIRED_KEY_PARAM_NAMES = %w[ name ].freeze DEFAULT_REPO_OPTIONS = { "website" => "", "is_private" => false, "has_issues" => false, "has_wiki" => false, "scm" => "git", ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/sources.rb
lib/bitbucket_rest_api/repos/sources.rb
# encoding: utf-8 module BitBucket class Repos::Sources < API # Gets a list of the src in a repository. # # = Examples # @bitbucket = BitBucket.new # @bitbucket.repos.sources.list 'user-name', 'repo-name', '6dcb09b5b57875f334f61aebed6', 'app/contorllers/') # def list(user_name, repo_na...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/webhooks.rb
lib/bitbucket_rest_api/repos/webhooks.rb
module BitBucket class Repos::Webhooks < API EVENTS = [ 'repo:push', 'repo:fork', 'repo:commit_comment_created', 'repo:commit_status_created', 'repo:commit_status_updated', 'issue:created', 'issue:updated', 'issue:comment_created', 'pullrequest:created', ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/pull_request.rb
lib/bitbucket_rest_api/repos/pull_request.rb
# encoding: utf-8 module BitBucket class Repos::PullRequest < API # List pull requests # # = Examples # bitbucket = BitBucket.new # bitbucket.repos.pull_request.list 'user-name', 'repo-name' # bitbucket.repos.pull_request.list 'user-name', 'repo-name' { |status| ... } # def list(u...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/keys.rb
lib/bitbucket_rest_api/repos/keys.rb
# encoding: utf-8 module BitBucket class Repos::Keys < API VALID_KEY_PARAM_NAMES = %w[ label key ].freeze # List deploy keys # # = Examples # bitbucket = BitBucket.new # bitbucket.repos.keys.list 'user-name', 'repo-name' # bitbucket.repos.keys.list 'user-name', 'repo-name' { |key| .....
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/changesets.rb
lib/bitbucket_rest_api/repos/changesets.rb
# encoding: utf-8 module BitBucket class Repos::Changesets < API REQUIRED_COMMENT_PARAMS = %w[ body changeset_id line path position ].freeze # List changesets on a repository # # = Parameters # * <tt>:limit</tt> Optional integer. An integer represen...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/components.rb
lib/bitbucket_rest_api/repos/components.rb
# encoding: utf-8 module BitBucket class Repos::Components < API # List components # # = Examples # bitbucket = BitBucket.new # bitbucket.repos.components.list 'user-name', 'repo-name' # bitbucket.repos.components.list 'user-name', 'repo-name' { |component| ... } # def list(user_n...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/following.rb
lib/bitbucket_rest_api/repos/following.rb
# encoding: utf-8 module BitBucket class Repos::Following < API # List repo followers # # = Examples # bitbucket = BitBucket.new :user => 'user-name', :repo => 'repo-name' # bitbucket.repos.following.followers # bitbucket.repos.following.followers { |watcher| ... } # def followers...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/commits.rb
lib/bitbucket_rest_api/repos/commits.rb
# encoding: utf-8 module BitBucket class Repos::Commits < API VALID_KEY_PARAM_NAMES = %w(include exclude).freeze # Gets the commit information associated with a repository. By default, this # call returns all the commits across all branches, bookmarks, and tags. The # newest commit is first. # ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/services.rb
lib/bitbucket_rest_api/repos/services.rb
# encoding: utf-8 module BitBucket class Repos::Services < API REQUIRED_KEY_PARAM_NAMES = %w[ type ].freeze # List services # # = Examples # bitbucket = BitBucket.new # bitbucket.repos.services.list 'user-name', 'repo-name' # bitbucket.repos.services.list 'user-name', 'repo-name' { |...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/repos/default_reviewers.rb
lib/bitbucket_rest_api/repos/default_reviewers.rb
module BitBucket class Repos::DefaultReviewers < API # List default reviewers # # = Examples # bitbucket = BitBucket.new # bitbucket.repos.default_reviewers.list 'user-name', 'repo-name' # bitbucket.repos.default_reviewers.list 'user-name', 'repo-name' { |reviewer| ... } # def list...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/core_ext/array.rb
lib/bitbucket_rest_api/core_ext/array.rb
class Array # :nodoc: def extract_options! last.is_a?(::Hash) ? pop : {} end end # Array
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/core_ext/hash.rb
lib/bitbucket_rest_api/core_ext/hash.rb
class Hash # :nodoc: def symbolize_keys # :nodoc: inject({}) do |hash, (key, value)| hash[(key.to_sym rescue key) || key] = value hash end end unless method_defined?(:symbolize_keys) def symbolize_keys! # :nodoc: hash = symbolize_keys hash.each do |key, val| hash[key] = case v...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/utils/url.rb
lib/bitbucket_rest_api/utils/url.rb
require 'cgi' module BitBucket module Utils module Url extend self DEFAULT_QUERY_SEP = /[&;] */n KEY_VALUE_SEP = '='.freeze def escape(s) CGI.escape s.to_s end def unescape(s) CGI.unescape s.to_s end def build_query(params) params.map { |k, v| if v.class...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/api/actions.rb
lib/bitbucket_rest_api/api/actions.rb
# encoding: utf-8 module BitBucket class API # Returns all API public methods for a given class. def self.inherited(klass) klass.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 def self.actions self.new.api_methods_in(#{klass}) end def actions api_methods_in...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/users/account.rb
lib/bitbucket_rest_api/users/account.rb
# encoding: utf-8 module BitBucket class Users::Account < API # API about users/account , please refer to # https://confluence.atlassian.com/display/BITBUCKET/account+Resource # # GET the account profile # def profile(accountname) response = get_request("/1.0/users/#{accountname}...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/validations/format.rb
lib/bitbucket_rest_api/validations/format.rb
# encoding: utf-8 module BitBucket module Validations module Format # Ensures that value for a given key is of the correct form whether # matching regular expression or set of predefined values. # def assert_valid_values(permitted, params) params.each do |k, v| next unl...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/validations/required.rb
lib/bitbucket_rest_api/validations/required.rb
# encoding: utf-8 module BitBucket module Validations module Required # Validate all keys present in a provided hash against required set, # on mismatch raise BitBucket::Error::RequiredParams # Note that keys need to be in the same format i.e. symbols or strings, # otherwise the comparis...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/validations/presence.rb
lib/bitbucket_rest_api/validations/presence.rb
# encoding: utf-8 module BitBucket module Validations module Presence # Ensures that essential arguments are present before request is made # def _validate_presence_of(*params) params.each do |param| raise ArgumentError, "parameter cannot be nil" if param.nil? end ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/validations/token.rb
lib/bitbucket_rest_api/validations/token.rb
# encoding: utf-8 # TODO: Set token required calls module BitBucket module Validations module Token TOKEN_REQUIRED = [ 'get /user', 'get /user/emails', 'get /user/followers', 'get /user/following', 'get /user/keys', 'get /user/repos', ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/response/raise_error.rb
lib/bitbucket_rest_api/response/raise_error.rb
# encoding: utf-8 require 'faraday' require 'bitbucket_rest_api/error' module BitBucket class Response::RaiseError < Faraday::Response::Middleware def on_complete(env) case env[:status].to_i when 400 raise BitBucket::Error::BadRequest.new(env) when 401 raise BitBucket::Error::...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/response/jsonize.rb
lib/bitbucket_rest_api/response/jsonize.rb
# encoding: utf-8 require 'faraday' module BitBucket class Response::Jsonize < Response dependency 'multi_json' define_parser do |body| if MultiJson.respond_to?(:load) MultiJson.load body else MultiJson.decode body end end def parse(body) case body whe...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/response/xmlize.rb
lib/bitbucket_rest_api/response/xmlize.rb
# encoding: utf-8 require 'faraday' module BitBucket class Response::Xmlize < Response dependency 'nokogiri' define_parser do |body| ::Nokogiri::XML body end def parse(body) case body when '' nil when 'true' true when 'false' false else ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/response/helpers.rb
lib/bitbucket_rest_api/response/helpers.rb
# encoding: utf-8 require 'faraday' module BitBucket class Response::Helpers < Response def on_complete(env) env[:body].class.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 include BitBucket::Result def env @env end RUBY_EVAL env[:body].instance_eval { @en...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/response/mashify.rb
lib/bitbucket_rest_api/response/mashify.rb
# encoding: utf-8 require 'faraday' module BitBucket class Response::Mashify < Response dependency 'hashie/mash' define_parser do |body| ::Hashie::Mash.new body end def parse(body) case body when Hash self.class.parser.call body when Array body.map { |item| ...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/request/jsonize.rb
lib/bitbucket_rest_api/request/jsonize.rb
# encoding: utf-8 require 'faraday' module BitBucket class Request::Jsonize < Faraday::Middleware CONTENT_TYPE = 'Content-Type'.freeze MIME_TYPE = 'application/json'.freeze dependency 'multi_json' def call(env) if request_with_body?(env) env[:request_headers][CONTENT_TYPE] ||= MI...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/request/basic_auth.rb
lib/bitbucket_rest_api/request/basic_auth.rb
# encoding: utf-8 require 'faraday' require 'base64' module BitBucket module Request class BasicAuth < Faraday::Middleware dependency 'base64' def call(env) env[:request_headers].merge!('Authorization' => "Basic #{@auth}\"") @app.call env end def initialize(app, *args)...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bitbucket-rest-api/bitbucket
https://github.com/bitbucket-rest-api/bitbucket/blob/2fc8fa575ca3636ee8603a4b0efce95bbd79fab0/lib/bitbucket_rest_api/request/oauth.rb
lib/bitbucket_rest_api/request/oauth.rb
# encoding: utf-8 require 'faraday' module BitBucket module Request class OAuth < Faraday::Middleware include BitBucket::Utils::Url AUTH_HEADER = 'Authorization'.freeze dependency 'simple_oauth' def call(env) # Extract parameters from the query request = Rack::Request...
ruby
MIT
2fc8fa575ca3636ee8603a4b0efce95bbd79fab0
2026-01-04T17:36:37.933374Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/spec/models.rb
spec/models.rb
class TaggableModel < ActiveRecord::Base default_scope do preload{taggings}.preload{tags} end attr_taggable attr_taggable :languages attr_taggable :skills attr_taggable :needs, :offerings has_many :untaggable_models belongs_to :user end class User < ActiveRecord::Base has_many :taggable_models e...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/spec/schema.rb
spec/schema.rb
ActiveRecord::Schema.define :version => 0 do create_table "taggings", :force => true do |t| t.integer "tag_id", :limit => 11 t.integer "taggable_id", :limit => 11 t.string "taggable_type" t.string "context" t.datetime "created_at" t.integer "tagger_id", :limit => 11 t.s...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH << "." unless $LOAD_PATH.include?(".") require 'logger' begin require "rubygems" require "bundler" if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.5") raise RuntimeError, "Your bundler version is too old." + "Run `gem install bundler` to upgrade." end # Set up load paths ...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/spec/rocket_tag/configuration_spec.rb
spec/rocket_tag/configuration_spec.rb
require 'spec_helper' describe RocketTag::Configuration do before do RocketTag.configuration.reset end describe '.configure' do RocketTag::Configuration::VALID_CONFIG_KEYS.each do |key| it "sets the #{key}" do value = case key when :force_lowercase [true, false].sample ...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/spec/rocket_tag/taggable_spec.rb
spec/rocket_tag/taggable_spec.rb
require File.expand_path('../../spec_helper', __FILE__) describe TaggableModel do before :each do clean_database! @model = TaggableModel.create end describe "parsing" do it "converts strings to arrays using ruby core lib CSV" do m = TaggableModel.new :skills => %q%hello, is it me, you are look...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/spec/rocket_tag/tag_alias_spec.rb
spec/rocket_tag/tag_alias_spec.rb
require File.expand_path('../../spec_helper', __FILE__) describe "Tag" do before(:all) { clean_database! } describe "#alias methods" do before(:each) do @a = RocketTag::Tag.create(:name => 'rails') @b = RocketTag::Tag.create(:name => 'ror') @c = RocketTag::Tag.create(:name => 'ruby-on-r...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/rocket_tag.rb
lib/rocket_tag.rb
module RocketTag class << self def configure yield configuration end def configuration @configuration ||= Configuration.new end def clean_tags(tags) return tags unless tags.is_a?(Array) tags = tags.dup tags = tags.map(&:downcase) if RocketTag.configuration.force_lo...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/generators/rocket_tag/migration/migration_generator.rb
lib/generators/rocket_tag/migration/migration_generator.rb
require 'rails/generators' require 'rails/generators/migration' module RocketTag class MigrationGenerator < Rails::Generators::Base include Rails::Generators::Migration desc "Generates migration for Tag and Tagging models" def self.orm Rails::Generators.options[:rails][:orm] end def self...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/generators/rocket_tag/migration/templates/active_record/migration.rb
lib/generators/rocket_tag/migration/templates/active_record/migration.rb
class RocketTagMigration < ActiveRecord::Migration def self.up create_table :tags do |t| t.string :name end create_table :taggings do |t| t.references :tag # You should make sure that the column created is # long enough to store the required class names. t.references :tagg...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/rocket_tag/tag.rb
lib/rocket_tag/tag.rb
module RocketTag class Tag < ActiveRecord::Base has_many :taggings, :dependent => :destroy, :class_name => 'RocketTag::Tagging' attr_accessible :name validates_presence_of :name validates_uniqueness_of :name has_and_belongs_to_many :alias, :class_name => "RocketTag::Tag", :join_t...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/rocket_tag/configuration.rb
lib/rocket_tag/configuration.rb
module RocketTag class Configuration VALID_CONFIG_KEYS = [ :force_lowercase ] DEFAULT_FORCE_LOWERCASE = false attr_accessor *VALID_CONFIG_KEYS def initialize self.reset end def options VALID_CONFIG_KEYS.each_with_object({}) do |config_key, hash| hash[config_ke...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/rocket_tag/alias_tag.rb
lib/rocket_tag/alias_tag.rb
module RocketTag class AliasTag < ActiveRecord::Base end end
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/rocket_tag/taggable.rb
lib/rocket_tag/taggable.rb
require 'squeel' module Squeel module Adapters module ActiveRecord module RelationExtensions # We really only want to group on id for practical # purposes but POSTGRES requires that a group by outputs # all the column names not under an aggregate function. # # This l...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
bradphelan/rocket_tag
https://github.com/bradphelan/rocket_tag/blob/a47b3340621dc36afa5559458eec9512384a87ba/lib/rocket_tag/tagging.rb
lib/rocket_tag/tagging.rb
module RocketTag class Tagging < ::ActiveRecord::Base attr_accessible :tag, :tag_id, :context, :taggable, :taggable_type, :taggable_id, :tagger, :tagger_type, ...
ruby
MIT
a47b3340621dc36afa5559458eec9512384a87ba
2026-01-04T17:36:40.793433Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true require 'pry' require 'simplecov' SimpleCov.start $LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'rspec/graphql_matchers' # rubocop:disable Style/MixinUsage include RSpec::GraphqlMatchers::TypesHelper # rubocop:enable Style/MixinUsage module RSpec module Matchers de...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/have_an_input_field_matcher_spec.rb
spec/rspec/have_an_input_field_matcher_spec.rb
# frozen_string_literal: true require 'spec_helper' module RSpec module GraphqlMatchers describe 'expect(a_type).to have_an_input_field(field_name)' \ '.that_returns(a_type)' do subject(:a_type) do Class.new(GraphQL::Schema::RelayClassicMutation) do graphql_name 'TestObject...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/graphql_matchers_spec.rb
spec/rspec/graphql_matchers_spec.rb
# frozen_string_literal: true require 'spec_helper' describe Rspec::GraphqlMatchers do it 'has a version number' do expect(Rspec::GraphqlMatchers::VERSION).not_to be nil end end
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/have_a_return_field_spec.rb
spec/rspec/have_a_return_field_spec.rb
# frozen_string_literal: true require 'spec_helper' module RSpec module GraphqlMatchers describe 'expect(a_type).to have_a_return_field(field_name)' \ '.that_returns(a_type)' do subject(:a_type) do Class.new(GraphQL::Schema::RelayClassicMutation) do graphql_name 'TestObject'...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/accept_arguments_matcher_spec.rb
spec/rspec/accept_arguments_matcher_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'graphql' describe 'expect(a_field).to accept_arguments(arg_name: arg_type, ...)' do subject(:field) do Class.new(GraphQL::Schema::InputObject) do graphql_name 'SomeInputObject' argument :id, GraphQL::Types::ID, required: true argume...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/have_a_field_matcher_spec.rb
spec/rspec/have_a_field_matcher_spec.rb
# frozen_string_literal: true require 'spec_helper' module RSpec module GraphqlMatchers describe 'expect(a_type).to have_a_field(field_name)' do shared_examples 'have a field' do it { is_expected.to have_a_field(:id) } it 'passes when the type defines the field' do expect(a_type...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/be_of_type_matcher_spec.rb
spec/rspec/be_of_type_matcher_spec.rb
# frozen_string_literal: true require 'spec_helper' describe 'expect(a_field).to be_of_type(graphql_type)' do scalar_types = { "Boolean" => GraphQL::Types::Boolean, "Int" => GraphQL::Types::Int, "Float" => GraphQL::Types::Float, "String" => GraphQL::Types::String, "ID" => GraphQL::Types::ID } ...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/accept_argument_matcher_spec.rb
spec/rspec/accept_argument_matcher_spec.rb
# frozen_string_literal: true require 'spec_helper' module RSpec module GraphqlMatchers describe 'expect(a_type).to accept_argument(field_name)' do subject(:a_type) do Class.new(GraphQL::Schema::InputObject) do graphql_name 'TestObject' argument :id, GraphQL::Types::String, re...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/readme_spec.rb
spec/rspec/readme_spec.rb
# frozen_string_literal: true require 'spec_helper' describe 'The readme Examples' do ruby_code_regex = /```ruby(.*?)```/m readme_content = File.read( File.expand_path( '../../README.md', __dir__ ) ) # rubocop:disable Security/Eval readme_content.scan(ruby_code_regex) do |ruby_code| ...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/spec/rspec/implement_matcher_spec.rb
spec/rspec/implement_matcher_spec.rb
# frozen_string_literal: true require 'spec_helper' module RSpec module GraphqlMatchers describe 'expect(a_type).to implement(interface_names)' do AnInterface = Module.new do include GraphQL::Schema::Interface graphql_name 'AnInterface' end AnotherInterface = Module.new do ...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers.rb
lib/rspec/graphql_matchers.rb
# frozen_string_literal: true require 'rspec/graphql_matchers/version' require 'rspec/graphql_matchers/matchers' require 'rspec/graphql_matchers/types_helper'
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/base_matcher.rb
lib/rspec/graphql_matchers/base_matcher.rb
# frozen_string_literal: true module RSpec module GraphqlMatchers class BaseMatcher private def member_name(member) member.respond_to?(:graphql_name) && member.graphql_name || member.respond_to?(:name) && member.name || member.inspect end def types_match?(act...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/types_helper.rb
lib/rspec/graphql_matchers/types_helper.rb
# frozen_string_literal: true require 'graphql' module RSpec module GraphqlMatchers module TypesHelper class << self extend Gem::Deprecate GraphQL::Types.constants.each do |constant_name| klass = GraphQL::Types.const_get(constant_name) define_method(constant_name) { k...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/version.rb
lib/rspec/graphql_matchers/version.rb
# frozen_string_literal: true module Rspec module GraphqlMatchers VERSION = '2.0.0-rc.0'.freeze end end
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/matchers.rb
lib/rspec/graphql_matchers/matchers.rb
# frozen_string_literal: true require 'rspec/matchers' require 'rspec/graphql_matchers/be_of_type' require 'rspec/graphql_matchers/accept_arguments' require 'rspec/graphql_matchers/accept_argument' require 'rspec/graphql_matchers/have_a_field' require 'rspec/graphql_matchers/implement' module RSpec module Matchers ...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/accept_argument.rb
lib/rspec/graphql_matchers/accept_argument.rb
# frozen_string_literal: true require_relative 'base_matcher' require_relative './have_a_field_matchers/of_type' module RSpec module GraphqlMatchers class AcceptArgument < BaseMatcher def initialize(expected_arg_name) @expectations = [] if expected_arg_name.is_a?(Hash) (expected...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/accept_arguments.rb
lib/rspec/graphql_matchers/accept_arguments.rb
# frozen_string_literal: true require_relative 'base_matcher' module RSpec module GraphqlMatchers class AcceptArguments < BaseMatcher attr_reader :actual_field, :expected_args def initialize(expected_args) @expected_args = expected_args end def matches?(actual_field) @a...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/have_a_field.rb
lib/rspec/graphql_matchers/have_a_field.rb
# frozen_string_literal: true require_relative 'base_matcher' require_relative './have_a_field_matchers/of_type' require_relative './have_a_field_matchers/with_property' require_relative './have_a_field_matchers/with_metadata' require_relative './have_a_field_matchers/with_hash_key' require_relative './have_a_field_ma...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/implement.rb
lib/rspec/graphql_matchers/implement.rb
# frozen_string_literal: true require_relative 'base_matcher' module RSpec module GraphqlMatchers class Implement < BaseMatcher def initialize(interfaces) @expected = interfaces.map { |interface| interface_name(interface) } end def matches?(graph_object) @graph_object = graph_...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/be_of_type.rb
lib/rspec/graphql_matchers/be_of_type.rb
# frozen_string_literal: true require_relative 'base_matcher' module RSpec module GraphqlMatchers class BeOfType < BaseMatcher attr_reader :sample, :expected def initialize(expected) @expected = expected end def matches?(actual_sample) @sample = to_graphql(actual_sample...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/have_a_field_matchers/with_hash_key.rb
lib/rspec/graphql_matchers/have_a_field_matchers/with_hash_key.rb
# frozen_string_literal: true module RSpec module GraphqlMatchers module HaveAFieldMatchers class WithHashKey def initialize(expected_hash_key) @expected_hash_key = expected_hash_key end def description "with hash key `#{@expected_hash_key}`" end ...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/have_a_field_matchers/of_type.rb
lib/rspec/graphql_matchers/have_a_field_matchers/of_type.rb
# frozen_string_literal: true module RSpec module GraphqlMatchers module HaveAFieldMatchers class OfType < RSpec::GraphqlMatchers::BeOfType def description "of type `#{type_name(expected)}`" end def failure_message "#{description}, but it was `#{type_name(sample...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/have_a_field_matchers/with_deprecation_reason.rb
lib/rspec/graphql_matchers/have_a_field_matchers/with_deprecation_reason.rb
# frozen_string_literal: true module RSpec module GraphqlMatchers module HaveAFieldMatchers class WithDeprecationReason def initialize(expected_reason) @expected_reason = expected_reason end def matches?(actual_field) @actual_reason = actual_field.deprecation_re...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/have_a_field_matchers/with_metadata.rb
lib/rspec/graphql_matchers/have_a_field_matchers/with_metadata.rb
# frozen_string_literal: true module RSpec module GraphqlMatchers module HaveAFieldMatchers class WithMetadata def initialize(expected_metadata) @expected_metadata = expected_metadata end def description "with metadata `#{@expected_metadata}`" end ...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
khamusa/rspec-graphql_matchers
https://github.com/khamusa/rspec-graphql_matchers/blob/97324d257f280ec10fd9326a24b4a2209216e2a8/lib/rspec/graphql_matchers/have_a_field_matchers/with_property.rb
lib/rspec/graphql_matchers/have_a_field_matchers/with_property.rb
# frozen_string_literal: true module RSpec module GraphqlMatchers module HaveAFieldMatchers class WithProperty def initialize(expected_property_name) @expected_property_name = expected_property_name end def description "resolving with property `#{@expected_prope...
ruby
MIT
97324d257f280ec10fd9326a24b4a2209216e2a8
2026-01-04T17:36:44.207898Z
false
keolo/mixpanel_client
https://github.com/keolo/mixpanel_client/blob/c3c3a73c82d760e522233cf5be9abed1047995f2/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'mixpanel_client' require 'webmock/rspec' RSpec.configure do |config| config.include WebMock::API end
ruby
MIT
c3c3a73c82d760e522233cf5be9abed1047995f2
2026-01-04T17:36:45.142142Z
false
keolo/mixpanel_client
https://github.com/keolo/mixpanel_client/blob/c3c3a73c82d760e522233cf5be9abed1047995f2/spec/mixpanel_client/mixpanel_client_spec.rb
spec/mixpanel_client/mixpanel_client_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Mixpanel::Client do before :all do @client = Mixpanel::Client.new( api_secret: 'test_secret' ) @uri = Regexp.escape(Mixpanel::Client::BASE_URI) end context 'when initializing a new Mixpanel::Client' do it 'shoul...
ruby
MIT
c3c3a73c82d760e522233cf5be9abed1047995f2
2026-01-04T17:36:45.142142Z
false
keolo/mixpanel_client
https://github.com/keolo/mixpanel_client/blob/c3c3a73c82d760e522233cf5be9abed1047995f2/spec/mixpanel_client/properties_externalspec.rb
spec/mixpanel_client/properties_externalspec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') WebMock.allow_net_connect! describe 'External calls to mixpanel' do before :all do config = YAML.load_file(File.join( File.dirname(__FILE__), '..', '..',...
ruby
MIT
c3c3a73c82d760e522233cf5be9abed1047995f2
2026-01-04T17:36:45.142142Z
false
keolo/mixpanel_client
https://github.com/keolo/mixpanel_client/blob/c3c3a73c82d760e522233cf5be9abed1047995f2/spec/mixpanel_client/events_externalspec.rb
spec/mixpanel_client/events_externalspec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') WebMock.allow_net_connect! describe 'External calls to mixpanel' do before :all do config = YAML.load_file(File.join( File.dirname(__FILE__), '..', '..',...
ruby
MIT
c3c3a73c82d760e522233cf5be9abed1047995f2
2026-01-04T17:36:45.142142Z
false