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
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/access_control/admin_authorization.rb
lib/comfortable_mexican_sofa/access_control/admin_authorization.rb
# frozen_string_literal: true module ComfortableMexicanSofa::AccessControl module AdminAuthorization # By default there's no authorization of any kind def authorize true end end end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/access_control/admin_authentication.rb
lib/comfortable_mexican_sofa/access_control/admin_authentication.rb
# frozen_string_literal: true module ComfortableMexicanSofa::AccessControl module AdminAuthentication # Set username and password in config/initializers/comfortable_mexican_sofa.rb # Like this: # ComfortableMexicanSofa::AccessControl::AdminAuthentication.username = 'myname' # ComfortableMexicanS...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/routes/cms.rb
lib/comfortable_mexican_sofa/routes/cms.rb
# frozen_string_literal: true class ActionDispatch::Routing::Mapper def comfy_route_cms(options = {}) ComfortableMexicanSofa.configuration.public_cms_path = options[:path] scope module: :comfy, as: :comfy do namespace :cms, path: options[:path] do get "cms-css/:site_id/:identifier(/:cache_bus...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/routes/cms_admin.rb
lib/comfortable_mexican_sofa/routes/cms_admin.rb
# frozen_string_literal: true class ActionDispatch::Routing::Mapper def comfy_route_cms_admin(path: "admin") scope module: :comfy, as: :comfy do scope module: :admin do namespace :cms, as: :admin_cms, path: path, except: :show do get "/", to: "base#jump" concern :with_revision...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/application.rb
config/application.rb
# frozen_string_literal: true require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ComfortableMexicanSofa class Application < Rails::Application require_relative "../...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/environment.rb
config/environment.rb
# frozen_string_literal: true # Load the rails application require File.expand_path("application", __dir__) # Initialize the rails application ComfortableMexicanSofa::Application.initialize!
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/cms_routes.rb
config/cms_routes.rb
# frozen_string_literal: true # We can't have this in config/routes.rb as they will get pulled in into parent # application automatically. We want user to manually place them. ComfortableMexicanSofa::Application.routes.draw do comfy_route :cms_admin comfy_route :cms end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/boot.rb
config/boot.rb
# frozen_string_literal: true # Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) File.exist?(ENV["BUNDLE_GEMFILE"])
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/initializers/comfortable_mexican_sofa.rb
config/initializers/comfortable_mexican_sofa.rb
# frozen_string_literal: true ComfortableMexicanSofa.configure do |config| # Title of the admin area # config.cms_title = 'ComfortableMexicanSofa CMS Engine' # Controller that is inherited from CmsAdmin::BaseController # config.admin_base_controller = 'ApplicationController' # Controller that Comfy::Cm...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/environments/test.rb
config/environments/test.rb
# frozen_string_literal: true defined?(ComfortableMexicanSofa::Application) && ComfortableMexicanSofa::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/config/environments/development.rb
config/environments/development.rb
# frozen_string_literal: true defined?(ComfortableMexicanSofa::Application) && ComfortableMexicanSofa::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto_spec.rb
spec/pronto_spec.rb
module Pronto describe Pronto do describe '.run' do subject { Pronto.run(commit, repo, Formatter::NullFormatter.new, file) } let(:commit) { '3e0e3ab' } let(:repo) { 'spec/fixtures/test.git' } let(:file) { nil } context 'no runners' do before { Runner.runners.clear } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/spec_helper.rb
spec/spec_helper.rb
require 'support/coverage' require 'rspec' require 'rspec/its' require 'pronto' RSpec.configure do |config| config.order = :random Kernel.srand config.seed config.expect_with(:rspec) { |c| c.syntax = :should } config.mock_with(:rspec) { |c| c.syntax = :should } end def load_fixture(fixture_name) path = F...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/support/coverage.rb
spec/support/coverage.rb
if ENV['COVERAGE'] require 'simplecov' SimpleCov.command_name "rspec_#{Process.pid}" SimpleCov.start do add_filter '/spec/' end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/status_spec.rb
spec/pronto/status_spec.rb
module Pronto describe Status do let(:status) { described_class.new(sha, state, context, description) } let(:sha) { '3e0e3ab' } let(:state) { 'state' } let(:context) { 'context' } let(:description) { 'desc' } describe '==' do context 'itself' do subject { status == status.dup } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/bitbucket_server_spec.rb
spec/pronto/bitbucket_server_spec.rb
module Pronto describe BitbucketServer do let(:bitbucket) { described_class.new(repo) } let(:repo) do double(remote_urls: ['git@bitbucket.org:prontolabs/pronto.git'], branch: nil) end let(:sha) { '61e4bef' } describe '#pull_comments' do subject { bitbucket.pull_comments(...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/runners_spec.rb
spec/pronto/runners_spec.rb
module Pronto describe Runners do describe '#run' do subject { described_class.new(runners, config).run(patches) } let(:patches) { double(commit: nil, none?: false) } let(:config) { Config.new } let(:fake_runner) do Class.new do def self.title 'fake_runner' ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/gem_names_spec.rb
spec/pronto/gem_names_spec.rb
module Pronto describe GemNames do let(:gem_names) { described_class.new } describe '.to_a' do subject { gem_names.to_a } before { Gem::Specification.should_receive(:find_all) { gems } } context 'properly named gem' do let(:gems) { [double(name: 'pronto-rubocop')] } it { sh...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/gitlab_spec.rb
spec/pronto/gitlab_spec.rb
module Pronto describe Gitlab do let(:gitlab) { described_class.new(repo) } describe '#slug' do subject { gitlab.send(:slug) } before(:each) do ENV['PRONTO_GITLAB_API_ENDPOINT'] = 'http://gitlab.example.com/api/v4' ENV['PRONTO_GITLAB_API_PRIVATE_TOKEN'] = 'token' end ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/config_file_spec.rb
spec/pronto/config_file_spec.rb
module Pronto describe ConfigFile do let(:config_file) { described_class.new } describe '#path' do subject { config_file.path } it { should eq '.pronto.yml' } context 'when specified by the environment variable' do let(:file_path) { '/etc/pronto-config.yml' } before do ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/message_spec.rb
spec/pronto/message_spec.rb
module Pronto describe Message do let(:message) { described_class.new(path, line, level, msg, '8cda581') } let(:path) { 'README.md' } let(:line) { Git::Line.new } let(:msg) { 'message' } let(:level) { :warning } describe '.new' do subject { message } Message::LEVELS.each do |mes...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/bitbucket_spec.rb
spec/pronto/bitbucket_spec.rb
module Pronto describe Bitbucket do let(:bitbucket) { described_class.new(repo) } let(:repo) do double(remote_urls: ['git@bitbucket.org:prontolabs/pronto.git'], branch: nil) end let(:sha) { '61e4bef' } let(:comment) do double(content: 'note', filename: 'path', line_to: 1,...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/github_pull_spec.rb
spec/pronto/github_pull_spec.rb
module Pronto describe GithubPull do let(:github_pull) { described_class.new(octokit_client, slug) } let(:slug) { 'prontolabs/pronto' } let(:octokit_client) { double(Octokit::Client) } before do github_pull.instance_variable_set(:@client, octokit_client) end describe '#pull_by_id' do ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/github_spec.rb
spec/pronto/github_spec.rb
module Pronto describe Github do let(:github) { described_class.new(repo) } let(:repo) { double(remote_urls: ssh_remote_urls, branch: nil, head_detached?: false) } let(:ssh_remote_urls) { ["git@github.com:#{github_slug}.git"] } let(:github_slug) { 'prontolabs/pronto' } let(:sha) { '61e4bef' } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/logger_spec.rb
spec/pronto/logger_spec.rb
module Pronto describe Logger do let(:logger) { described_class.new(io) } let(:io) { StringIO.new } let(:output) { io.string } describe '#log' do before { logger.log('hello world') } subject { output } it { should_not be_empty } its([-1, 1]) { should == "\n" } end end ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/comment_spec.rb
spec/pronto/comment_spec.rb
module Pronto describe Comment do let(:comment) { described_class.new(sha, body, path, position) } let(:sha) { '3e0e3ab' } let(:body) { 'body' } let(:path) { '/path/to/file' } let(:position) { 1 } describe '==' do context 'itself' do subject { comment == comment.dup } it...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/runner_spec.rb
spec/pronto/runner_spec.rb
module Pronto describe Runner do let(:runner) { Runner.new([]) } describe '.title' do before { Runner.any_instance.stub(:run) } subject { Runner.title } it { should == 'recorder' } end describe '#ruby_file?' do subject { runner.ruby_file?(path) } context 'ending with ....
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/config_spec.rb
spec/pronto/config_spec.rb
module Pronto describe Config do let(:config) { described_class.new(config_hash) } let(:config_hash) { {} } describe '#default_commit' do subject { config.default_commit } context 'from env variable' do before { stub_const('ENV', 'PRONTO_DEFAULT_COMMIT' => 'development') } it...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/gitlab_merge_request_review_formatter_spec.rb
spec/pronto/formatter/gitlab_merge_request_review_formatter_spec.rb
module Pronto module Formatter describe GitlabMergeRequestReviewFormatter do ENV['PRONTO_GITLAB_API_ENDPOINT'] = 'http://example.com/api/v4' ENV['PRONTO_GITLAB_API_PRIVATE_TOKEN'] = 'token' ENV['CI_MERGE_REQUEST_IID'] = '1' let(:formatter) { described_class.new } let(:diff_refs) { ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/colorizable_spec.rb
spec/pronto/formatter/colorizable_spec.rb
module Pronto module Formatter describe Colorizable do let(:formatter_class) do klass = described_class Class.new(TextFormatter) do include klass end end let(:formatter) do formatter_class.new end describe '#colorize' do subject { ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/text_formatter_spec.rb
spec/pronto/formatter/text_formatter_spec.rb
module Pronto module Formatter describe TextFormatter do let(:formatter) { described_class.new } before { $stdout.stub(:tty?) { false } } describe '#format' do subject { formatter.format(messages, nil, nil) } let(:messages) { [message, message] } let(:message) { Message...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/github_formatter_spec.rb
spec/pronto/formatter/github_formatter_spec.rb
module Pronto module Formatter describe GithubFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, repo, nil) } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } let(:published_comments_msg) do "%...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/github_pull_request_formatter_spec.rb
spec/pronto/formatter/github_pull_request_formatter_spec.rb
module Pronto module Formatter describe GithubPullRequestFormatter do let(:formatter) { described_class.new } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } describe '#format' do subject { formatter.format(messages, repo, patches) } let(:messages) { [message, mess...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/bitbucket_pull_request_formatter_spec.rb
spec/pronto/formatter/bitbucket_pull_request_formatter_spec.rb
module Pronto module Formatter describe BitbucketPullRequestFormatter do let(:formatter) { described_class.new } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } describe '#format' do subject { formatter.format(messages, repo, patches) } let(:messages) { [message, m...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/bitbucket_formatter_spec.rb
spec/pronto/formatter/bitbucket_formatter_spec.rb
module Pronto module Formatter describe BitbucketFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, repo, nil) } let(:messages) { [message, message] } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/formatter_spec.rb
spec/pronto/formatter/formatter_spec.rb
module Pronto module Formatter describe '.register' do context 'format method not implementend' do subject { Formatter.register(formatter) } let(:formatter) do Class.new(Pronto::Formatter::Base) do def self.name 'custom_formatter' end ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/checkstyle_formatter_spec.rb
spec/pronto/formatter/checkstyle_formatter_spec.rb
module Pronto module Formatter describe CheckstyleFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, nil, nil) } let(:line) { double(new_lineno: 1, commit_sha: '123') } let(:error) { Message.new('path/to', line, :err...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/null_formatter_spec.rb
spec/pronto/formatter/null_formatter_spec.rb
module Pronto module Formatter describe NullFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, nil, nil) } let(:messages) { [message, message] } let(:message) { Message.new('path/to', line, :warning, 'crucial') } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/json_formatter_spec.rb
spec/pronto/formatter/json_formatter_spec.rb
module Pronto module Formatter describe JsonFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, nil, nil) } let(:messages) { [message, message] } let(:message) { Message.new('path/to', line, :warning, 'crucial') } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/github_combined_status_formatter_spec.rb
spec/pronto/formatter/github_combined_status_formatter_spec.rb
module Pronto module Formatter RSpec.describe GithubCombinedStatusFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, repo, nil) } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } let(:runner_class) do ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/github_status_formatter_spec.rb
spec/pronto/formatter/github_status_formatter_spec.rb
module Pronto module Formatter RSpec.describe GithubStatusFormatter do let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, repo, nil) } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } let(:runner_class) do ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/gitlab_formatter_spec.rb
spec/pronto/formatter/gitlab_formatter_spec.rb
module Pronto module Formatter describe GitlabFormatter do ENV['PRONTO_GITLAB_API_ENDPOINT'] = 'http://example.com/api/v4' ENV['PRONTO_GITLAB_API_PRIVATE_TOKEN'] = 'token' let(:formatter) { described_class.new } describe '#format' do subject { formatter.format(messages, repo, nil...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/github_pull_request_review_formatter_spec.rb
spec/pronto/formatter/github_pull_request_review_formatter_spec.rb
module Pronto module Formatter describe GithubPullRequestReviewFormatter do let(:formatter) { described_class.new } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } describe '#format' do subject { formatter.format(messages, repo, patches) } let(:messages) { [message...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/bitbucket_server_pull_request_formatter_spec.rb
spec/pronto/formatter/bitbucket_server_pull_request_formatter_spec.rb
module Pronto module Formatter describe BitbucketServerPullRequestFormatter do let(:formatter) { described_class.new } let(:repo) { Git::Repository.new('spec/fixtures/test.git') } describe '#format' do subject { formatter.format(messages, repo, patches) } let(:messages) { [mess...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/formatter/github_status_formatter/sentence_spec.rb
spec/pronto/formatter/github_status_formatter/sentence_spec.rb
module Pronto module Formatter RSpec.describe GithubStatusFormatter::Sentence do let(:sentence) { described_class.new(words) } describe '#to_s' do subject { sentence.to_s } context 'when no words' do let(:words) { [] } it 'returns empty string' do sub...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/git/patches_spec.rb
spec/pronto/git/patches_spec.rb
module Pronto module Git describe Patches do let(:patches) { described_class.new(repo, commit, patch_array) } let(:repo) { nil } let(:commit) { nil } let(:patch_array) { [] } describe '#repo' do subject { patches.repo } context 'non-nil repo' do let(:repo)...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/git/patch_spec.rb
spec/pronto/git/patch_spec.rb
module Pronto module Git describe Patch do let(:patch) { described_class.new(rugged_patch, repo) } let(:repo) { nil } describe '#additions' do subject { patch.additions } let(:rugged_patch) { double(stat: [15, 13]) } it { should == 15 } end describe '#dele...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/git/repository_spec.rb
spec/pronto/git/repository_spec.rb
module Pronto module Git describe Repository do let(:repo) { described_class.new('spec/fixtures/test.git') } describe '#path' do subject { repo.path } its(:to_s) { should end_with 'pronto/spec/fixtures' } end describe '#branch' do subject { repo.branch } i...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/git/line_spec.rb
spec/pronto/git/line_spec.rb
module Pronto module Git describe Line do let(:line) { described_class.new(rugged_line, patch, hunk) } let(:patch) { nil } let(:hunk) { nil } describe '#addition?' do subject { line.addition? } let(:rugged_line) { double(addition?: true) } it { should == true } ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/clients/bitbucket_client_spec.rb
spec/pronto/clients/bitbucket_client_spec.rb
module Pronto describe BitbucketClient do let(:client) { described_class.new('username', 'password') } describe '#create_commit_comment' do subject { client.create_commit_comment(slug, sha, body, path, position) } let(:slug) { 'prontolabs/pronto' } let(:sha) { '123' } let(:body) { 'co...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/spec/pronto/clients/bitbucket_server_client_spec.rb
spec/pronto/clients/bitbucket_server_client_spec.rb
module Pronto describe BitbucketServerClient do let(:client) { described_class.new('username', 'password', 'endpoint') } describe '#create_pull_comment' do subject { client.create_pull_comment(slug, sha, body, path, position) } let(:slug) { 'prontolabs/pronto' } let(:sha) { '123' } le...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto.rb
lib/pronto.rb
require 'rugged' require 'octokit' require 'gitlab' require 'forwardable' require 'httparty' require 'rainbow' require 'pronto/error' require 'pronto/gem_names' require 'pronto/logger' require 'pronto/config_file' require 'pronto/config' require 'pronto/clients/bitbucket_client' require 'pronto/clients/bitbucket_se...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/version.rb
lib/pronto/version.rb
module Pronto module Version STRING = '0.11.5'.freeze MSG = '%s (running on %s %s %s)'.freeze module_function def verbose format(MSG, STRING, RUBY_ENGINE, RUBY_VERSION, RUBY_PLATFORM) end end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/bitbucket.rb
lib/pronto/bitbucket.rb
module Pronto class Bitbucket < Client def pull_comments(sha) @comment_cache["#{pull_id}/#{sha}"] ||= begin client.pull_comments(slug, pull_id).map do |comment| Comment.new(sha, comment.content, comment.filename, comment.line_to) end end end def commit_comments(sha) ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/logger.rb
lib/pronto/logger.rb
module Pronto class Logger def self.silent null = File.open(File::NULL, 'w') new(null) end def initialize(out) @out = out end def log(*args) @out.puts(*args) end end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/config_file.rb
lib/pronto/config_file.rb
module Pronto class ConfigFile DEFAULT_MESSAGE_FORMAT = '%{msg}'.freeze DEFAULT_WARNINGS_PER_REVIEW = 30 EMPTY = { 'all' => { 'exclude' => [], 'include' => [] }, 'github' => { 'slug' => nil, 'access_token' => nil, 'api_endpoint' => 'https://api.gi...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/runners.rb
lib/pronto/runners.rb
module Pronto class Runners def initialize(runners = Runner.runners, config = Config.new) @runners = runners @config = config end def run(patches) patches = reject_excluded(config.excluded_files('all'), patches) return [] if patches.none? result = [] active_runners.ea...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/github_pull.rb
lib/pronto/github_pull.rb
module Pronto # Provides strategies for finding corresponding PR on GitHub class GithubPull def initialize(client, slug) @client = client @slug = slug end def pull_requests @pull_requests ||= @client.pull_requests(@slug) end def pull_by_id(pull_id) result = pull_request...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/gitlab.rb
lib/pronto/gitlab.rb
module Pronto class Gitlab < Client def commit_comments(sha) @comment_cache[sha.to_s] ||= begin client.commit_comments(slug, sha).auto_paginate.map do |comment| Comment.new(sha, comment.note, comment.path, comment.line) end end end def pull_comments(sha) @comme...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/plugin.rb
lib/pronto/plugin.rb
module Pronto module Plugin module ClassMethods def repository @repository ||= [] end def inherited(klass) repository << klass end end def self.included(klass) klass.extend ClassMethods end end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/github.rb
lib/pronto/github.rb
require 'pronto/github_pull' module Pronto class Github < Client def initialize(repo) super(repo) @github_pull = Pronto::GithubPull.new(client, slug) end def pull_comments(sha) @comment_cache["#{pull_id}/#{sha}"] ||= begin client.pull_comments(slug, pull_id).map do |comment| ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/comment.rb
lib/pronto/comment.rb
module Pronto Comment = Struct.new(:sha, :body, :path, :position) do def ==(other) position == other.position && path == other.path && body == other.body end def to_s "[#{sha}] #{path}:#{position} - #{body}" end end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/message.rb
lib/pronto/message.rb
module Pronto class Message attr_reader :path, :line, :level, :msg, :commit_sha, :runner LEVELS = %i[info warning error fatal].freeze def initialize(path, line, level, msg, commit_sha = nil, runner = nil) unless LEVELS.include?(level) raise ::ArgumentError, "level should be set to one of #...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/runner.rb
lib/pronto/runner.rb
module Pronto class Runner include Plugin def initialize(patches, commit = nil) @patches = patches @commit = commit @config = Config.new end def self.runners repository end def self.title @runner_name ||= begin source_path, _line = instance_method(:run)...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/cli.rb
lib/pronto/cli.rb
require 'thor' module Pronto class CLI < Thor require 'pronto' require 'pronto/version' class << self def is_thor_reserved_word?(word, type) return false if word == 'run' super end end desc 'run [PATH]', 'Run Pronto' method_option :'exit-code', ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/gem_names.rb
lib/pronto/gem_names.rb
module Pronto class GemNames def to_a gems.map { |gem| gem.name.sub(/^pronto-/, '') }.uniq.sort end private def gems Gem::Specification.find_all.select do |gem| if gem.name =~ /^pronto-/ true elsif gem.name != 'pronto' runner_path = File.join(gem.full_...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/client.rb
lib/pronto/client.rb
module Pronto class Client def initialize(repo) @repo = repo @config = Config.new @comment_cache = {} @pull_id_cache = {} end def env_pull_id if (pull_request = ENV['PULL_REQUEST_ID']) warn "[DEPRECATION] `PULL_REQUEST_ID` is deprecated. Please use `PRONTO_PULL_REQU...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/bitbucket_server.rb
lib/pronto/bitbucket_server.rb
module Pronto class BitbucketServer < Bitbucket def pull_comments(sha) @comment_cache["#{pull_id}/#{sha}"] ||= begin client.pull_comments(slug, pull_id).map do |comment| anchor = comment['commentAnchor'] if anchor Comment.new(sha, comment['comment']['text'], ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/config.rb
lib/pronto/config.rb
module Pronto class Config def initialize(config_hash = ConfigFile.new.to_h) @config_hash = config_hash end %w[github gitlab bitbucket].each do |service| ConfigFile::EMPTY[service].each do |key, _| name = "#{service}_#{key}" define_method(name) { ENV["PRONTO_#{name.upcase}"] |...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/status.rb
lib/pronto/status.rb
module Pronto Status = Struct.new(:sha, :state, :context, :description) do def ==(other) sha == other.sha && state == other.state && context == other.context && description == other.description end def to_s "[#{sha}] #{context} #{state} - #{description}" end end ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/error.rb
lib/pronto/error.rb
module Pronto class Error < StandardError; end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_formatter.rb
lib/pronto/formatter/github_formatter.rb
module Pronto module Formatter class GithubFormatter < CommitFormatter def self.name 'github' end def client_module Github end def pretty_name 'GitHub' end def line_number(message, _) message.line.commit_line.position if message.line ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/json_formatter.rb
lib/pronto/formatter/json_formatter.rb
require 'json' module Pronto module Formatter class JsonFormatter < Base def self.name 'json' end def format(messages, _repo, _patches) messages.map do |message| lineno = message.line.new_lineno if message.line result = { level: message.level[0].upcase, mes...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_pull_request_formatter.rb
lib/pronto/formatter/github_pull_request_formatter.rb
module Pronto module Formatter class GithubPullRequestFormatter < PullRequestFormatter def self.name 'github_pr' end def client_module Github end def pretty_name 'GitHub' end def line_number(message, _) message.line&.new_lineno end...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_pull_request_review_formatter.rb
lib/pronto/formatter/github_pull_request_review_formatter.rb
module Pronto module Formatter class GithubPullRequestReviewFormatter < PullRequestFormatter def self.name 'github_pr_review' end def client_module Github end def pretty_name 'GitHub' end def submit_comments(client, comments) client.publ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/gitlab_merge_request_review_formatter.rb
lib/pronto/formatter/gitlab_merge_request_review_formatter.rb
module Pronto module Formatter class GitlabMergeRequestReviewFormatter < PullRequestFormatter def self.name 'gitlab_mr' end def client_module Gitlab end def pretty_name 'Gitlab' end def existing_comments(_, client, repo) sha = repo.head_...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/git_formatter.rb
lib/pronto/formatter/git_formatter.rb
module Pronto module Formatter class GitFormatter < Base def format(messages, repo, patches) client = client_module.new(repo) existing = existing_comments(messages, client, repo) comments = new_comments(messages, patches) additions = remove_duplicate_comments(existing, commen...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/bitbucket_pull_request_formatter.rb
lib/pronto/formatter/bitbucket_pull_request_formatter.rb
module Pronto module Formatter class BitbucketPullRequestFormatter < PullRequestFormatter def self.name 'bitbucket_pr' end def client_module Bitbucket end def pretty_name 'BitBucket' end def line_number(message, _) message.line.line.new_...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/colorizable.rb
lib/pronto/formatter/colorizable.rb
module Pronto module Formatter module Colorizable def colorize(string, color) rainbow.wrap(string).color(color) end private def rainbow @rainbow ||= Rainbow.new.tap do |rainbow| rainbow.enabled = $stdout.tty? end end end end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_status_formatter.rb
lib/pronto/formatter/github_status_formatter.rb
require_relative 'github_status_formatter/status_builder' module Pronto module Formatter class GithubStatusFormatter < Base def self.name 'github_status' end def format(messages, repo, _) client = Github.new(repo) head = repo.head_commit_sha messages_by_runner ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/base.rb
lib/pronto/formatter/base.rb
module Pronto module Formatter class Base def self.name raise NoMethodError, 'Must be implemented in subclasses.' end def config @config ||= Config.new end end end end
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/pull_request_formatter.rb
lib/pronto/formatter/pull_request_formatter.rb
module Pronto module Formatter class PullRequestFormatter < GitFormatter def existing_comments(_, client, repo) sha = repo.head_commit_sha comments = client.pull_comments(sha) grouped_comments(comments) end def submit_comments(client, comments) comments.each { |c...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/gitlab_formatter.rb
lib/pronto/formatter/gitlab_formatter.rb
module Pronto module Formatter class GitlabFormatter < CommitFormatter def self.name 'gitlab' end def client_module Gitlab end def pretty_name 'GitLab' end def line_number(message, _) message.line.commit_line.new_lineno if message.line ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_combined_status_formatter.rb
lib/pronto/formatter/github_combined_status_formatter.rb
require_relative 'github_status_formatter/status_builder' module Pronto module Formatter class GithubCombinedStatusFormatter < Base def self.name 'github_combined_status' end def format(messages, repo, _) client = Github.new(repo) head = repo.head_commit_sha cr...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/bitbucket_server_pull_request_formatter.rb
lib/pronto/formatter/bitbucket_server_pull_request_formatter.rb
module Pronto module Formatter class BitbucketServerPullRequestFormatter < PullRequestFormatter def self.name 'bitbucket_server_pr' end def client_module BitbucketServer end def pretty_name 'BitBucket Server' end def line_number(message, _) ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/text_message_decorator.rb
lib/pronto/formatter/text_message_decorator.rb
require 'delegate' module Pronto module Formatter class TextMessageDecorator < SimpleDelegator include Colorizable LOCATION_COLOR = :cyan LEVEL_COLORS = { info: :yellow, warning: :magenta, error: :red, fatal: :red }.freeze def to_h original...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/checkstyle_formatter.rb
lib/pronto/formatter/checkstyle_formatter.rb
require 'rexml/document' module Pronto module Formatter class CheckstyleFormatter < Base def self.name 'checkstyle' end def initialize @output = '' end def format(messages, _repo, _patches) open_xml process_messages(messages) close_xml ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/null_formatter.rb
lib/pronto/formatter/null_formatter.rb
module Pronto module Formatter class NullFormatter < Base def self.name 'null' end def format(_messages, _repo, _patches); end end end end Pronto::Formatter.register(Pronto::Formatter::NullFormatter)
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/bitbucket_formatter.rb
lib/pronto/formatter/bitbucket_formatter.rb
module Pronto module Formatter class BitbucketFormatter < CommitFormatter def self.name 'bitbucket' end def client_module Bitbucket end def pretty_name 'BitBucket' end def line_number(message, _) message.line.new_lineno if message.line ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/formatter.rb
lib/pronto/formatter/formatter.rb
module Pronto module Formatter class << self def register(formatter_klass) unless formatter_klass.method_defined?(:format) raise NoMethodError, "format method is not declared in the #{formatter_klass.name} class." end base = Pronto::Formatter::Base raise "#{formatt...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/text_formatter.rb
lib/pronto/formatter/text_formatter.rb
require 'pronto/formatter/text_message_decorator' module Pronto module Formatter class TextFormatter < Base def self.name 'text' end def format(messages, _repo, _patches) messages.map do |message| message_format = config.message_format(self.class.name) messa...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/commit_formatter.rb
lib/pronto/formatter/commit_formatter.rb
module Pronto module Formatter class CommitFormatter < GitFormatter def existing_comments(messages, client, _) shas = messages.map(&:commit_sha) comments = shas.flat_map { |sha| client.commit_comments(sha) } grouped_comments(comments) end def submit_comments(client, comm...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_status_formatter/status_builder.rb
lib/pronto/formatter/github_status_formatter/status_builder.rb
require_relative 'sentence' module Pronto module Formatter class GithubStatusFormatter < Base class StatusBuilder def initialize(runner, messages) @runner = runner @messages = messages end def description desc = map_description desc.empty? ? ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/formatter/github_status_formatter/sentence.rb
lib/pronto/formatter/github_status_formatter/sentence.rb
module Pronto module Formatter class GithubStatusFormatter < Base class Sentence def initialize(words) @words = words end def to_s case words.size when 0 '' when 1 words[0].to_s.dup when 2 "#{words...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/git/repository.rb
lib/pronto/git/repository.rb
require 'pathname' module Pronto module Git class Repository def initialize(path) @repo = Rugged::Repository.new(path) end def diff(commit, options = nil) target, patches = case commit when :unstaged, :index [head_commit_sha...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/git/line.rb
lib/pronto/git/line.rb
module Pronto module Git Line = Struct.new(:line, :patch, :hunk) do extend Forwardable def_delegators :line, :addition?, :deletion?, :content, :new_lineno, :old_lineno, :line_origin COMPARISON_ATTRIBUTES = %i[content line_origin old_lineno ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/git/patch.rb
lib/pronto/git/patch.rb
module Pronto module Git Patch = Struct.new(:patch, :repo) do extend Forwardable def_delegators :patch, :delta, :hunks, :stat def additions stat[0] end def deletions stat[1] end def blame(lineno) repo.blame(new_file_path, lineno) end ...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/git/patches.rb
lib/pronto/git/patches.rb
module Pronto module Git class Patches include Enumerable attr_reader :commit, :repo def initialize(repo, commit, patches) @repo = repo @commit = commit @patches = patches.map { |patch| Git::Patch.new(patch, repo) } end def each(&block) @patches.eac...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/rake_task/travis_pull_request.rb
lib/pronto/rake_task/travis_pull_request.rb
require 'pronto' require 'rake' require 'rake/tasklib' module Pronto module RakeTask # Provides a custom rake task to use with Travis. # # require 'rubocop/rake/travis_pull_request' # Pronto::Rake::TravisPullRequest.new class TravisPullRequest < Rake::TaskLib attr_accessor :name attr_...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false
prontolabs/pronto
https://github.com/prontolabs/pronto/blob/efeae7d71803af25b662ffee1c515303d65e2e51/lib/pronto/clients/bitbucket_client.rb
lib/pronto/clients/bitbucket_client.rb
# frozen_string_literal: true require 'ostruct' class BitbucketClient include HTTParty base_uri 'https://api.bitbucket.org/2.0/repositories' def initialize(username, password) self.class.basic_auth(username, password) end def commit_comments(slug, sha) response = get("/#{slug}/commit/#{sha}/commen...
ruby
MIT
efeae7d71803af25b662ffee1c515303d65e2e51
2026-01-04T15:53:40.586894Z
false