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
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/jobs/destroy_problems_by_app_job.rb
app/jobs/destroy_problems_by_app_job.rb
# frozen_string_literal: true class DestroyProblemsByAppJob < ApplicationJob queue_as :default # @param app_id [String] def perform(app_id) app = App.find_by(id: app_id) ProblemDestroy.execute(app.problems) end end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/form_helper.rb
app/helpers/form_helper.rb
# frozen_string_literal: true module FormHelper def errors_for(document) return unless document.errors.any? content_tag(:div, class: "error-messages") do body = content_tag(:h2, "Dang. The following errors are keeping this from being a success.") body + content_tag(:ul) do document.error...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/sort_helper.rb
app/helpers/sort_helper.rb
# frozen_string_literal: true module SortHelper def link_for_sort(name, field = nil) field ||= name.underscore current = (params_sort == field) order = (current && (params_order == "asc")) ? "desc" : "asc" url = request.path + "?sort=#{field}&order=#{order}" url += "&all_errs=true" if all_errs ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/apps_helper.rb
app/helpers/apps_helper.rb
# frozen_string_literal: true module AppsHelper def link_to_copy_attributes_from_other_app return if App.count <= 1 html = link_to("copy settings from another app", "#", class: "button copy_config") html << select("duplicate", "app", App.all.asc(:name).reject { |a| a == @app } .collect...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/notices_helper.rb
app/helpers/notices_helper.rb
# frozen_string_literal: true module NoticesHelper # @deprecated Remove it later def notice_atom_summary(notice) render "notices/atom_entry", notice: notice end end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/navigation_helper.rb
app/helpers/navigation_helper.rb
# frozen_string_literal: true module NavigationHelper # Returns ' active' if you are on a given controller # - active_if_here(:users) => ' active' if users controller # Or on one of a list of controllers # - active_if_here([:users, :blogs, :comments]) # Or on certain action(s) in a certain controller # -...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/problems_helper.rb
app/helpers/problems_helper.rb
# frozen_string_literal: true module ProblemsHelper def problem_confirm(action) t(format("problems.confirm.%s", action)) unless Errbit::Config.confirm_err_actions.eql? false end def auto_link_format(body) sanitize( auto_link(simple_format(body), :all, target: "_blank").html_safe, tags: ["a",...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/hash_helper.rb
app/helpers/hash_helper.rb
# frozen_string_literal: true module HashHelper def pretty_hash(hash, nesting = 0) return "{}" if hash.empty? || hash.is_a?(String) tab_size = 2 nesting += 1 pretty = "{" sorted_keys = hash.keys.sort sorted_keys.each do |key| val = hash[key].is_a?(Hash) ? pretty_hash(hash[key], nestin...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/helpers/application_helper.rb
app/helpers/application_helper.rb
# frozen_string_literal: true module ApplicationHelper def message_graph(problem) create_percentage_table_for(problem.messages) end def generate_problem_ical(notices) calendar = Icalendar::Calendar.new notices.each_with_index do |notice, index| calendar.event do |event| event.summary ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/policies/application_policy.rb
app/policies/application_policy.rb
# frozen_string_literal: true class ApplicationPolicy attr_reader :user, :record # @param user [User] The user making the request # @param record [Mongoid::Document] The record being accessed def initialize(user, record) raise Pundit::NotAuthorizedError, "must be logged in" if user.blank? @user = use...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/policies/user_policy.rb
app/policies/user_policy.rb
# frozen_string_literal: true class UserPolicy < ApplicationPolicy FIELDS = [ :name, :username, :email, :password, :github_login, :per_page, :time_zone, :password, :password_confirmation ].freeze # @param user [User] The user making the request # @param record [User] The record being accessed def in...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/policies/app_policy.rb
app/policies/app_policy.rb
# frozen_string_literal: true class AppPolicy < ApplicationPolicy # @param user [User] The user making the request # @param record [App] The record being accessed def initialize(user, record) # rubocop:disable Style/RedundantInitialize, Lint/UselessMethodDefinition super end def index? false end ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/watchers_controller.rb
app/controllers/watchers_controller.rb
# frozen_string_literal: true class WatchersController < ApplicationController def create app = App.find(params[:app_id]) app.watchers.create!(user: current_user) flash[:success] = t(".success", app: app.name) redirect_to app_path(app) end def destroy app = App.find(params[:app_id]) ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/unlink_googles_controller.rb
app/controllers/unlink_googles_controller.rb
# frozen_string_literal: true class UnlinkGooglesController < ApplicationController def update @user = User.find(params[:user_id]) authorize @user @user.update!(google_uid: nil) flash[:success] = "Successfully unlinked #{@user.email} account!" redirect_to user_path(@user) end end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/apps_controller.rb
app/controllers/apps_controller.rb
# frozen_string_literal: true class AppsController < ApplicationController include ProblemsSearcher before_action :require_admin!, except: [:index, :show, :search] before_action :parse_email_at_notices_or_set_default, only: [:create, :update] before_action :parse_notice_at_notices_or_set_default, only: [:crea...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/problems_controller.rb
app/controllers/problems_controller.rb
# frozen_string_literal: true class ProblemsController < ApplicationController include ProblemsSearcher before_action :need_selected_problem, only: [ :resolve_several, :unresolve_several, :unmerge_several ] expose(:app_scope) do params[:app_id] ? App.where(_id: params[:app_id]) : App.all end exp...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/unlink_githubs_controller.rb
app/controllers/unlink_githubs_controller.rb
# frozen_string_literal: true class UnlinkGithubsController < ApplicationController def update @user = User.find(params[:user_id]) authorize @user @user.update!(github_login: nil, github_oauth_token: nil) flash[:success] = "Successfully unlinked #{Errbit::Config.github_site_title} account!" r...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/site_config_controller.rb
app/controllers/site_config_controller.rb
# frozen_string_literal: true class SiteConfigController < ApplicationController before_action :require_admin! def index @config = SiteConfig.document end def update SiteConfig.document .update(notice_fingerprinter: filtered_update_params.to_h) flash[:success] = I18n.t("site_config.update....
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/users_controller.rb
app/controllers/users_controller.rb
# frozen_string_literal: true class UsersController < ApplicationController def index @users = policy_scope(User) .order_by(name: :asc) .page(params[:page]) .per(current_user.per_page) end def show @user = User.find(params[:id]) authorize @user end def new @user = User.ne...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/notices_controller.rb
app/controllers/notices_controller.rb
# frozen_string_literal: true class NoticesController < ApplicationController class ParamsError < StandardError end skip_before_action :authenticate_user!, only: :create skip_before_action :verify_authenticity_token, only: :create rescue_from ParamsError, with: :bad_params def create # params[:data]...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/comments_controller.rb
app/controllers/comments_controller.rb
# frozen_string_literal: true class CommentsController < ApplicationController expose :app expose :problem expose :comment def create problem.comments << comment if problem.save flash[:success] = I18n.t("comments.create.success") else flash[:error] = I18n.t("comments.create.error") ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/application_controller.rb
app/controllers/application_controller.rb
# frozen_string_literal: true class ApplicationController < ActionController::Base include Pundit::Authorization protect_from_forgery before_action :authenticate_user_from_token! before_action :authenticate_user! before_action :set_time_zone rescue_from Pundit::NotAuthorizedError, with: :user_not_author...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/health_controller.rb
app/controllers/health_controller.rb
# frozen_string_literal: true class HealthController < ActionController::Base # rubocop:disable Rails/ApplicationController def api_key_tester app = App.where(api_key: params[:api_key]).first is_good_result = app ? true : false response_status = is_good_result ? :ok : :forbidden render json: {ok: is_...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/concerns/problems_searcher.rb
app/controllers/concerns/problems_searcher.rb
# frozen_string_literal: true module ProblemsSearcher extend ActiveSupport::Concern included do expose(:params_sort) do if ["environment", "app", "message", "last_notice_at", "count"].member?(params[:sort]) params[:sort] else "last_notice_at" end end expose(:params_o...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/api/v1/stats_controller.rb
app/controllers/api/v1/stats_controller.rb
# frozen_string_literal: true module Api module V1 class StatsController < ApplicationController respond_to :json, :xml # The stats API only requires an api_key for the given app. skip_before_action :authenticate_user! before_action :require_api_key_or_authenticate_user! def app ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/api/v1/problems_controller.rb
app/controllers/api/v1/problems_controller.rb
# frozen_string_literal: true module Api module V1 class ProblemsController < ApplicationController respond_to :json, :xml FIELDS = [ "_id", "app_id", "app_name", "environment", "message", "where", "first_notice_at", "last_notice_at", "resolved", "resolved_at", "notices_count...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/api/v1/notices_controller.rb
app/controllers/api/v1/notices_controller.rb
# frozen_string_literal: true module Api module V1 class NoticesController < ApplicationController respond_to :json, :xml def index query = {} fields = ["created_at", "message", "error_class"] if params.key?(:start_date) && params.key?(:end_date) start_date = Time....
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/api/v1/comments_controller.rb
app/controllers/api/v1/comments_controller.rb
# frozen_string_literal: true module Api module V1 class CommentsController < ApplicationController skip_before_action :verify_authenticity_token skip_before_action :authenticate_user! respond_to :json, :xml FIELDS = ["_id", "err_id", "user_id", "body"].freeze def index re...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/api/v3/notices_controller.rb
app/controllers/api/v3/notices_controller.rb
# frozen_string_literal: true module Api module V3 class NoticesController < ApplicationController VERSION_TOO_OLD = "Notice for old app version ignored" UNKNOWN_API_KEY = "Your API key is unknown" skip_before_action :verify_authenticity_token skip_before_action :authenticate_user! ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/controllers/users/omniauth_callbacks_controller.rb
app/controllers/users/omniauth_callbacks_controller.rb
# frozen_string_literal: true module Users class OmniauthCallbacksController < Devise::OmniauthCallbacksController def github_auto_sign_up(github_token) return if Errbit::Config.github_org_id.nil? # See if the user is a member of the organization that we have access for # If they are, automati...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/watcher.rb
app/models/watcher.rb
# frozen_string_literal: true class Watcher include Mongoid::Document include Mongoid::Timestamps field :email embedded_in :app, inverse_of: :watchers belongs_to :user, optional: true validate :ensure_user_or_email before_validation :clear_unused_watcher_type attr_accessor :watcher_type def wat...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/issue.rb
app/models/issue.rb
# frozen_string_literal: true class Issue include ActiveModel::Model attr_accessor :problem, :user, :body def issue_tracker @issue_tracker ||= problem.app.issue_tracker end def tracker @tracker ||= issue_tracker&.tracker end def render_body_args if tracker.respond_to?(:render_body_args) ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/issue_tracker.rb
app/models/issue_tracker.rb
# frozen_string_literal: true class IssueTracker include Mongoid::Document include Mongoid::Timestamps embedded_in :app, inverse_of: :issue_tracker field :type_tracker, type: String field :options, type: Hash, default: {} validate :validate_tracker def tracker @tracker ||= begin kla...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/backtrace.rb
app/models/backtrace.rb
# frozen_string_literal: true class Backtrace include Mongoid::Document include Mongoid::Timestamps IN_APP_PATH = %r{^(?:\[|/)PROJECT_ROOT\]?(?!(/vendor))/?} GEMS_PATH = %r{(?:\[|/)GEM_ROOT\]?/gems/([^/]+)} field :fingerprint field :lines index fingerprint: 1 def self.find_or_create(lines) fing...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/problem.rb
app/models/problem.rb
# frozen_string_literal: true # Represents a single Problem. The problem may have been # reported as various Errs, but the user has grouped the # Errs together as belonging to the same problem. class Problem include Mongoid::Document include Mongoid::Timestamps CACHED_NOTICE_ATTRIBUTES = { messages: :messa...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/app.rb
app/models/app.rb
# frozen_string_literal: true class App include Comparable include Mongoid::Document include Mongoid::Timestamps field :name, type: String field :api_key field :github_repo field :bitbucket_repo field :custom_backtrace_url_template field :asset_host field :repository_branch, type: String field :...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/comment.rb
app/models/comment.rb
# frozen_string_literal: true class Comment include Mongoid::Document include Mongoid::Timestamps after_create :increase_counter_cache after_create :deliver_email, if: :emailable? before_destroy :decrease_counter_cache field :body, type: String index(user_id: 1) belongs_to :err, class_name: "Problem...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notice.rb
app/models/notice.rb
# frozen_string_literal: true class Notice include Mongoid::Document include Mongoid::Timestamps include ActiveModel::Serializers::Xml UNAVAILABLE = "N/A" # Mongo will not accept index keys larger than 1,024 bytes and that includes # some amount of BSON encoding overhead, so keep it under 1,000 bytes to...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/error_report.rb
app/models/error_report.rb
# frozen_string_literal: true ## # Processes a new error report. # # Accepts a hash with the following attributes: # # * <tt>:error_class</tt> - the class of error # * <tt>:message</tt> - the error message # * <tt>:backtrace</tt> - an array of stack trace lines # # * <tt>:request</tt> - a hash of values describing the...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_service.rb
app/models/notification_service.rb
# frozen_string_literal: true class NotificationService LABEL = "" include Mongoid::Document include Rails.application.routes.url_helpers default_url_options[:host] = ActionMailer::Base.default_url_options[:host] default_url_options[:port] = ActionMailer::Base.default_url_options[:port] field :room_id,...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/site_config.rb
app/models/site_config.rb
# frozen_string_literal: true class SiteConfig CONFIG_SOURCE_SITE = "site" CONFIG_SOURCE_APP = "app" include Mongoid::Document include Mongoid::Timestamps after_save :denormalize embeds_one :notice_fingerprinter, autobuild: true validates_associated :notice_fingerprinter accepts_nested_attributes_fo...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/err.rb
app/models/err.rb
# frozen_string_literal: true # Represents a set of Notices which can be automatically # determined to refer to the same Error (Errbit groups # notices into errs by a notice's fingerprint.) class Err include Mongoid::Document include Mongoid::Timestamps field :fingerprint index problem_id: 1 index fingerp...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notice_fingerprinter.rb
app/models/notice_fingerprinter.rb
# frozen_string_literal: true class NoticeFingerprinter include Mongoid::Document include Mongoid::Timestamps field :error_class, default: true, type: Boolean field :message, default: true, type: Boolean field :backtrace_lines, default: -1, type: Integer field :component, default: true, type: Boolean fi...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/user.rb
app/models/user.rb
# frozen_string_literal: true class User PER_PAGE = 30 include Mongoid::Document include Mongoid::Timestamps devise(*Errbit::Config.devise_modules) field :email field :github_login field :github_oauth_token field :google_uid field :name field :admin, type: Boolean, default: false field :per_pa...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_services/slack_service.rb
app/models/notification_services/slack_service.rb
# frozen_string_literal: true module NotificationServices class SlackService < NotificationService CHANNEL_NAME_REGEXP = /^#[a-z\d_-]+$/ LABEL = "slack" FIELDS += [ [:service_url, { placeholder: "Slack Hook URL (https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXX)", label...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_services/hoiio_service.rb
app/models/notification_services/hoiio_service.rb
# frozen_string_literal: true module NotificationServices class HoiioService < NotificationService LABEL = "hoiio" FIELDS += [ [:api_token, { placeholder: "App ID", label: "App ID" }], [:subdomain, { placeholder: "Access Token", label: "Access Token" }]...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_services/pushover_service.rb
app/models/notification_services/pushover_service.rb
# frozen_string_literal: true module NotificationServices class PushoverService < NotificationService LABEL = "pushover" FIELDS += [ [:api_token, { placeholder: "User Key", label: "User Key" }], [:subdomain, { placeholder: "Application API Token", label: "App...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_services/hubot_service.rb
app/models/notification_services/hubot_service.rb
# frozen_string_literal: true module NotificationServices class HubotService < NotificationService LABEL = "hubot" FIELDS += [ [:api_token, { placeholder: "http://hubot.example.org:8080/hubot/say", label: "Hubot URL" }], [:room_id, { placeholder: "#dev", labe...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_services/webhook_service.rb
app/models/notification_services/webhook_service.rb
# frozen_string_literal: true module NotificationServices class WebhookService < NotificationService LABEL = "webhook" FIELDS = [ [:api_token, { placeholder: "URL to receive a POST request when an error occurs", label: "URL" }] ] def check_params if FIELDS.detect { ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/models/notification_services/campfire_service.rb
app/models/notification_services/campfire_service.rb
# frozen_string_literal: true module NotificationServices class CampfireService < NotificationService LABEL = "campfire" FIELDS += [ [:subdomain, { label: "Subdomain", placeholder: "subdomain from http://{{subdomain}}.campfirenow.com" }], [:api_token, { label: "API T...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/user_destroy.rb
app/interactors/user_destroy.rb
# frozen_string_literal: true class UserDestroy attr_reader :user # @param user [User] User to destroy def initialize(user) @user = user end def destroy App.watched_by(user).each do |app| watcher = app.watchers.where(user: user).first app.watchers.delete(watcher) end user.dest...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/notice_refingerprinter.rb
app/interactors/notice_refingerprinter.rb
# frozen_string_literal: true class NoticeRefingerprinter LOG_EVERY = 100 LOG_ITR = "%.1f%% complete, %i notice(s) remaining" LOG_START = "Regenerating notice fingerprints for %i notices" def self.run count = Notice.count puts format(LOG_START, count) Notice.no_timeout.each_with_index do |notice,...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/outdated_problem_clearer.rb
app/interactors/outdated_problem_clearer.rb
# frozen_string_literal: true class OutdatedProblemClearer ## # Clear all problem not present for more than one week. # def execute nb_problem_outdated.tap do |nb| if nb > 0 criteria.each do |problem| ProblemDestroy.new(problem).execute end compact_database en...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/resolved_problem_clearer.rb
app/interactors/resolved_problem_clearer.rb
# frozen_string_literal: true class ResolvedProblemClearer ## # Clear all problem already resolved # def execute nb_problem_resolved.tap do |nb| if nb > 0 criteria.each do |problem| ProblemDestroy.new(problem).execute end compact_database end end end p...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/problem_destroy.rb
app/interactors/problem_destroy.rb
# frozen_string_literal: true class ProblemDestroy attr_reader :problem def initialize(problem) @problem = problem end def execute delete_errs delete_comments problem.delete end ## # Destroy all problem pass in args # # @params [ Array[Problem] ] problems the list of problem need t...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/problem_recacher.rb
app/interactors/problem_recacher.rb
# frozen_string_literal: true class ProblemRecacher LOG_EVERY = 100 LOG_ITR = "%.1f%% complete, %i problem(s) remaining" LOG_START = "Re-caching problem attributes for %i problems" def self.run count = Problem.count puts format(LOG_START, count) Problem.no_timeout.each_with_index do |problem, ind...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/interactors/problem_merge.rb
app/interactors/problem_merge.rb
# frozen_string_literal: true class ProblemMerge attr_reader :merged_problem, :child_problems def initialize(*problems) problems = problems.flatten.uniq @merged_problem = problems[0] @child_problems = problems[1..-1] fail ArgumentError, "need almost 2 uniq different problems" if @child_problems.em...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/configurator.rb
app/lib/configurator.rb
# frozen_string_literal: true # Configurator maps lists of environment variables to names that you define in # order to provide a consistent way to use configuration throughout your # application class Configurator # Run the configurator and return the processed values # # @example Simple mapping # ENV['BAR'...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/sparklines.rb
app/lib/sparklines.rb
# frozen_string_literal: true module Sparklines class << self def for_relative_percentages(array_of_relative_percentages) bars = array_of_relative_percentages.map do |percent| "<i style='height:#{percent}%'></i>" end.join "<div class='spark'>#{bars}</div>".html_safe end end end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/hoptoad.rb
app/lib/hoptoad.rb
# frozen_string_literal: true require_relative "hoptoad/v2" module Hoptoad class ApiVersionError < StandardError def initialize super("Wrong API Version: Expecting 2.0, 2.1, 2.2, 2.3 or 2.4") end end class << self def parse_xml!(xml) parsed = ActiveSupport::XmlMini.backend.parse(xml)["n...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/hoptoad/v2.rb
app/lib/hoptoad/v2.rb
# frozen_string_literal: true module Hoptoad module V2 def self.process_notice(parsed) for_errbit_api( normalize( rekey(parsed) ) ) end private def self.rekey(node) case node when Hash if node.key?("var") && node.key?("key") {norma...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/airbrake_api/params_error.rb
app/lib/airbrake_api/params_error.rb
# frozen_string_literal: true module AirbrakeApi class ParamsError < StandardError end end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/airbrake_api/v3/notice_parser.rb
app/lib/airbrake_api/v3/notice_parser.rb
# frozen_string_literal: true module AirbrakeApi module V3 class NoticeParser class ParamsError < StandardError end attr_reader :params, :error def initialize(params = {}) @params = params.is_a?(ActionController::Parameters) ? params.to_unsafe_h : params end def att...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/lib/errbit/version.rb
app/lib/errbit/version.rb
# frozen_string_literal: true module Errbit class Version def initialize(ver, dev = false) @version = ver @dev = dev end def full_version full = [@version] if @dev full << "dev" full << source_version end full.compact.join("-") end def source_...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/mailers/mailer.rb
app/mailers/mailer.rb
# frozen_string_literal: true # Haml doesn't load routes automatically when called via a rake task. # This is only necessary when sending test emails (i.e. from rake hoptoad:test) require Rails.root.join("config/routes.rb") class Mailer < ApplicationMailer helper ApplicationHelper default :from => Errbit::Config...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/app/mailers/application_mailer.rb
app/mailers/application_mailer.rb
# frozen_string_literal: true class ApplicationMailer < ActionMailer::Base layout "mailer" end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/db/seeds.rb
db/seeds.rb
# frozen_string_literal: true require "securerandom" puts "Seeding database" puts "-------------------------------" # Create an initial Admin User admin_username = ENV["ERRBIT_ADMIN_USER"] || "errbit" def admin_email return "admin@example.com" if heroku_pr_review_app? ENV["ERRBIT_ADMIN_EMAIL"] || "errbit@#{Err...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/rails_helper.rb
spec/rails_helper.rb
# frozen_string_literal: true
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true # This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] = "test" require "simplecov" SimpleCov.start "rails" do enable_coverage :branch primary_coverage :branch # https://github.com/simplecov-ruby/simplecov/issu...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/initializers/devise_spec.rb
spec/initializers/devise_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe Devise do def load_initializer load File.join(Rails.root, "config", "initializers", "devise.rb") end after do # reset to the defaults load_initializer end describe "omniauth github" do it "sets the client options correctly...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/initializers/action_mailer_spec.rb
spec/initializers/action_mailer_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "initializers/action_mailer" do def load_initializer load File.join(Rails.root, "config", "initializers", "action_mailer.rb") end after do ActionMailer::Base.delivery_method = :test end describe "delivery method" do it "sets t...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/backtrace_line_decorator_spec.rb
spec/decorators/backtrace_line_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe BacktraceLineDecorator, type: :decorator do let(:backtrace_line) do described_class.new( number: 884, file: "/path/to/file/ea315ea4.rb", method: :instance_eval ) end let(:backtrace_line_in_app) do described_class....
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/notice_decorator_spec.rb
spec/decorators/notice_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe NoticeDecorator, type: :decorator do # rubocop:disable Lint/EmptyBlock, RSpec/EmptyExampleGroup end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/issue_tracker_type_decorator_spec.rb
spec/decorators/issue_tracker_type_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe IssueTrackerTypeDecorator, type: :decorator do let(:fake_tracker_class) do klass = Class.new(ErrbitPlugin::IssueTracker) do def self.label "fake" end def self.note "a note" end def self.fields ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/problem_decorator_spec.rb
spec/decorators/problem_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe ProblemDecorator, type: :decorator do # rubocop:disable Lint/EmptyBlock, RSpec/EmptyExampleGroup end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/backtrace_decorator_spec.rb
spec/decorators/backtrace_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe BacktraceDecorator, type: :decorator do let(:backtrace) do described_class.new( Backtrace.new( lines: [ {number: 131, file: "[PROJECT_ROOT]app/controllers/accounts_controller.rb", method: :update_pr...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/issue_tracker_field_decorator_spec.rb
spec/decorators/issue_tracker_field_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe IssueTrackerFieldDecorator, type: :decorator do describe "#label" do it "return the label of field_info by default" do expect(described_class.new(:foo, label: "hello").label).to eq("hello") end it "return the key of field if no l...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/issue_tracker_decorator_spec.rb
spec/decorators/issue_tracker_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe IssueTrackerDecorator, type: :decorator do let(:fake_tracker) do klass = Class.new(ErrbitPlugin::IssueTracker) do def self.label "fake" end def self.note "a note" end def self.fields { ...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/decorators/app_decorator_spec.rb
spec/decorators/app_decorator_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe AppDecorator, type: :decorator do describe "#email_at_notices" do it "return the list separate by comma" do expect(described_class.new(double(email_at_notices: [2, 3])).email_at_notices).to eq("2, 3") end end describe "#notify_us...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/jobs/destroy_problems_by_id_job_spec.rb
spec/jobs/destroy_problems_by_id_job_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe DestroyProblemsByIdJob, type: :job do it { expect(subject).to be_an(ApplicationJob) } it "destroys all selected problems" do app = create(:app) problem1 = create(:problem, app: app) expect do described_class.perform_later([pro...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/jobs/application_job_spec.rb
spec/jobs/application_job_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe ApplicationJob, type: :job do it { expect(subject).to be_an(ActiveJob::Base) } end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/jobs/destroy_problems_by_app_job_spec.rb
spec/jobs/destroy_problems_by_app_job_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe DestroyProblemsByAppJob, type: :job do it { expect(subject).to be_an(ApplicationJob) } it "destroys all problems" do app = create(:app) create(:problem, app: app) expect do described_class.perform_later(app.id) end.to chan...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/system/watch_unwatch_app_spec.rb
spec/system/watch_unwatch_app_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "A user can watch and unwatch an application", type: :system, retry: 3 do context "when user log in and watch a project" do it "is expected to log in and watch a project" do current_user = create(:user) app = create(:app) sig...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/system/sign_in_with_google_with_domain_validation_spec.rb
spec/system/sign_in_with_google_with_domain_validation_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "Sign in with Google with domain validation", type: :system, retry: 3 do before { expect(Errbit::Config).to receive(:google_authentication).and_return(true).at_least(:once).times } before { expect(Errbit::Config).to receive(:google_auto_provisio...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/system/sign_in_with_google_spec.rb
spec/system/sign_in_with_google_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "Sign in with Google", type: :system, retry: 3 do context "sign in via Google with recognized user" do let!(:user) { create(:user, google_uid: "123456789") } before { expect(Errbit::Config).to receive(:google_authentication).and_return(tru...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/system/sign_in_and_sign_out_spec.rb
spec/system/sign_in_and_sign_out_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "Sign in and sign out with email and password", type: :system, retry: 3 do let!(:user) { create(:user, password: "password") } context "when user successful sign in and sign out" do it "is expected to sign in user and sign out" do visi...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/system/sign_in_with_google_with_auto_provision_spec.rb
spec/system/sign_in_with_google_with_auto_provision_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "Sign in with Google with auto provision", type: :system, retry: 3 do context "create an account for recognized user if they log in" do before { expect(Errbit::Config).to receive(:google_authentication).and_return(true) } before { expect(E...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/system/sign_in_with_github_spec.rb
spec/system/sign_in_with_github_spec.rb
# frozen_string_literal: true require "rails_helper" RSpec.describe "Sign in with GitHub", type: :system, retry: 3 do context "sign in via GitHub with recognized user" do let!(:user) { create(:user, github_login: "biow0lf") } before { expect(Errbit::Config).to receive(:github_authentication).and_return(tru...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/macros.rb
spec/support/macros.rb
# frozen_string_literal: true def it_requires_authentication(options = {}) default_options = { for: { index: :get, show: :get, new: :get, create: :post, edit: :get, update: :patch, destroy: :delete }, params: {id: "4c6c760494df2a18cc000015"} } options.reverse...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/selenium-webdriver.rb
spec/support/selenium-webdriver.rb
# frozen_string_literal: true RSpec.configure do |config| config.before(:each, type: :system) do # Chrome headless driven_by :selenium_chrome_headless # Chrome non-headless # driven_by :selenium_chrome # Firefox headless # driven_by :selenium_headless # Firefox non-headless # driven_b...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/active_job.rb
spec/support/active_job.rb
# frozen_string_literal: true ActiveJob::Base.queue_adapter = :inline
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/capybara.rb
spec/support/capybara.rb
# frozen_string_literal: true # https://github.com/teamcapybara/capybara/blob/3.40.0/lib/capybara/registrations/drivers.rb#L31-L41 Capybara.register_driver :selenium_chrome_headless do |app| version = Capybara::Selenium::Driver.load_selenium options_key = Capybara::Selenium::Driver::CAPS_VERSION.satisfied_by?(ver...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/vcr.rb
spec/support/vcr.rb
# frozen_string_literal: true VCR.configure do |c| c.cassette_library_dir = Rails.root.join("spec/cassettes") c.hook_into :webmock c.ignore_localhost = true c.default_cassette_options = { decode_compressed_response: true, allow_unused_http_interactions: false } end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/rspec-rebound.rb
spec/support/rspec-rebound.rb
# frozen_string_literal: true require "rspec/rebound" RSpec.configure do |config| # show retry status in spec process config.verbose_retry = true # show exception that triggers a retry if verbose_retry is set to true config.display_try_failure_messages = true # run retry only on features # config.around...
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/devise.rb
spec/support/devise.rb
# frozen_string_literal: true RSpec.configure do |config| config.include Devise::Test::ControllerHelpers, type: :controller config.include Devise::Test::IntegrationHelpers, type: :system config.include Devise::Test::IntegrationHelpers, type: :request end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/super_diff.rb
spec/support/super_diff.rb
# frozen_string_literal: true require "super_diff/rspec-rails"
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/mongoid.rb
spec/support/mongoid.rb
# frozen_string_literal: true RSpec.configure do |config| config.before(:suite) do Mongoid::Config.truncate! Mongoid::Tasks::Database.create_indexes end config.before do Mongoid::Config.truncate! end end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/omniauth.rb
spec/support/omniauth.rb
# frozen_string_literal: true OmniAuth.config.test_mode = true
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/factory_bot_rails.rb
spec/support/factory_bot_rails.rb
# frozen_string_literal: true RSpec.configure do |config| config.include FactoryBot::Syntax::Methods end
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false
errbit/errbit
https://github.com/errbit/errbit/blob/0f325841e2e723f662e2b0ec4ede3d5c30136fa0/spec/support/webmock.rb
spec/support/webmock.rb
# frozen_string_literal: true require "webmock/rspec" WebMock.disable_net_connect!
ruby
MIT
0f325841e2e723f662e2b0ec4ede3d5c30136fa0
2026-01-04T15:46:48.143000Z
false