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
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/revision.rb
app/models/revision.rb
class Revision < ActiveRecord::Base belongs_to :branch has_one :diff, :class_name => "RevisionDiff", :foreign_key => :after_revision_id has_many :builds has_many :code_object_references, :dependent => :destroy has_many :code_objects, :through => :code_object_references validates :uid, :presence => true e...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/code_object.rb
app/models/code_object.rb
class CodeObject < ActiveRecord::Base self.inheritance_column = 'zoink' # we use the type column ourselve belongs_to :project has_many :code_object_roles, :dependent => :destroy accepts_nested_attributes_for :code_object_roles validate :fullname, :presence => true, :uniqueness => {:scope => :revision} ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/build.rb
app/models/build.rb
class Build < ActiveRecord::Base has_one :project, :through => :branch belongs_to :branch belongs_to :revision has_one :revision_diff, :primary_key => "revision_id", :foreign_key => "after_revision_id" validates :branch, :presence => true validates :status, :presence => true end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/code_object_role.rb
app/models/code_object_role.rb
class CodeObjectRole < ActiveRecord::Base belongs_to :code_object belongs_to :code_object_role_name end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/statistics.rb
app/models/statistics.rb
class Statistics < ActiveRecord::Base private def no_same_name_for_same_date if self.class.where(:date => date, :name => name).count > 0 errors.add(:name, "name/date combination already exist") end end validate :no_same_name_for_same_date validates :date, :presence => true validates :name, :...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/code_object_reference.rb
app/models/code_object_reference.rb
class CodeObjectReference < ActiveRecord::Base belongs_to :revision belongs_to :code_object validates :revision, :presence => true validates :code_object, :presence => true end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/revision_diff.rb
app/models/revision_diff.rb
class RevisionDiff < ActiveRecord::Base belongs_to :branch belongs_to :before_revision, :class_name => 'Revision' belongs_to :after_revision, :class_name => 'Revision' has_many :code_object_diffs, :dependent => :destroy validate :branch, :presence => true validate :before_revision, :presence => true va...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/code_object_role_name.rb
app/models/code_object_role_name.rb
class CodeObjectRoleName < ActiveRecord::Base validates :name, :presence => true, :uniqueness => true end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/code_object_diff.rb
app/models/code_object_diff.rb
class CodeObjectDiff < ActiveRecord::Base belongs_to :revision_diff belongs_to :before_object, :class_name => 'CodeObject' belongs_to :after_object, :class_name => 'CodeObject' validate :revision_diff, :presence => true validate :before_object, :presence => true validate :after_object, :presence => true e...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/branch.rb
app/models/branch.rb
class Branch < ActiveRecord::Base belongs_to :project has_many :revisions, -> { order 'created_at DESC' }, :dependent => :destroy has_many :revision_diffs, -> { order 'id DESC' }, :dependent => :destroy has_many :builds, -> { order 'number DESC' }, :dependent => :destroy belongs_to :latest_revision, :class_n...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/app/models/user.rb
app/models/user.rb
class User < ActiveRecord::Base serialize :follows serialize :organizations def projects all_user_names = (organizations || []) + [user_name] uids = all_user_names.map do |username| uid = InchCI::ProjectUID.new({ :service => provider, :user => username, :repo => '%' }).project_uid...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/seeds.rb
db/seeds.rb
require 'open-uri' content = open('https://raw.githubusercontent.com/rrrene/inch-pages/master/_projects.yml').read project_names = YAML.load(content) COUNT = ENV['COUNT'] || 5 project_names[0...COUNT.to_i].each do |name| uid = "github:#{name}" repo_url = "https://github.com/#{name}.git" puts uid.inspect Inch...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/schema.rb
db/schema.rb
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20141221105013_create_users.rb
db/migrate/20141221105013_create_users.rb
class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :provider t.string :uid t.string :github_access_token t.string :display_name t.string :user_name t.string :email t.text :follows t.datetime :last_signin_at t.datetime ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140410230225_create_code_object_diffs.rb
db/migrate/20140410230225_create_code_object_diffs.rb
class CreateCodeObjectDiffs < ActiveRecord::Migration def change create_table :code_object_diffs do |t| t.references :revision_diff t.references :before_object t.references :after_object t.string :change t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20141219090021_add_index_on_code_object_references.rb
db/migrate/20141219090021_add_index_on_code_object_references.rb
class AddIndexOnCodeObjectReferences < ActiveRecord::Migration def change add_index :code_object_references, [:code_object_id, :revision_id], unique: true end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140409211108_create_code_object_references.rb
db/migrate/20140409211108_create_code_object_references.rb
class CreateCodeObjectReferences < ActiveRecord::Migration def change create_table :code_object_references do |t| t.references :revision t.references :code_object t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20150103111834_add_index_on_build_table.rb
db/migrate/20150103111834_add_index_on_build_table.rb
class AddIndexOnBuildTable < ActiveRecord::Migration def change add_index :builds, [:branch_id] end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140324230757_create_projects.rb
db/migrate/20140324230757_create_projects.rb
class CreateProjects < ActiveRecord::Migration def change create_table :projects do |t| t.string :uid t.string :name t.string :description t.string :homepage_url t.string :source_code_url t.string :repo_url t.string :documentation_url t.references :default_branch...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20151223114527_add_index_on_code_objects_references.rb
db/migrate/20151223114527_add_index_on_code_objects_references.rb
class AddIndexOnCodeObjectsReferences < ActiveRecord::Migration def change add_index :code_object_references, [:revision_id] end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140327230743_create_code_objects.rb
db/migrate/20140327230743_create_code_objects.rb
class CreateCodeObjects < ActiveRecord::Migration def change create_table :code_objects do |t| t.references :project t.string :type t.text :fullname t.text :docstring t.integer :score t.string :grade, :limit => 1 t.integer :priority t.string :location ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20150101142423_add_hook_active_to_projects.rb
db/migrate/20150101142423_add_hook_active_to_projects.rb
class AddHookActiveToProjects < ActiveRecord::Migration def change add_column :projects, :github_hook_active, :boolean, :default => false end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20150201151745_add_badge_fields_to_projects.rb
db/migrate/20150201151745_add_badge_fields_to_projects.rb
class AddBadgeFieldsToProjects < ActiveRecord::Migration def change add_column :projects, :badge_generated, :boolean, :default => false add_column :projects, :badge_filled_in_percent, :integer add_column :projects, :badge_in_readme, :boolean, :default => false add_column :projects, :badge_in_readme_ad...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140922200938_add_language_to_projects.rb
db/migrate/20140922200938_add_language_to_projects.rb
class AddLanguageToProjects < ActiveRecord::Migration def change add_column :projects, :language, :string end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140826124416_create_statistics.rb
db/migrate/20140826124416_create_statistics.rb
class CreateStatistics < ActiveRecord::Migration def change create_table :statistics do |t| t.datetime :date t.string :name t.integer :value t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140927081335_add_origin_to_projects.rb
db/migrate/20140927081335_add_origin_to_projects.rb
class AddOriginToProjects < ActiveRecord::Migration def change add_column :projects, :origin, :string end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20150212200619_add_stderr_to_builds.rb
db/migrate/20150212200619_add_stderr_to_builds.rb
class AddStderrToBuilds < ActiveRecord::Migration def change add_column :builds, :stderr, :text end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140408185039_create_code_object_role_names.rb
db/migrate/20140408185039_create_code_object_role_names.rb
class CreateCodeObjectRoleNames < ActiveRecord::Migration def change create_table :code_object_role_names do |t| t.string :name t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140327230804_create_code_object_roles.rb
db/migrate/20140327230804_create_code_object_roles.rb
class CreateCodeObjectRoles < ActiveRecord::Migration def change create_table :code_object_roles do |t| t.references :code_object t.references :code_object_role_name t.string :ref_name t.integer :priority t.integer :score t.integer :potential_score t.integer :min_score ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20141003104039_change_description_in_projects_to_text.rb
db/migrate/20141003104039_change_description_in_projects_to_text.rb
class ChangeDescriptionInProjectsToText < ActiveRecord::Migration def change change_column :projects, :description, :text end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20141219114822_add_index_on_code_object_roles.rb
db/migrate/20141219114822_add_index_on_code_object_roles.rb
class AddIndexOnCodeObjectRoles < ActiveRecord::Migration def change add_index :code_object_roles, :code_object_id end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140604182559_add_badge_in_readme_to_revisions.rb
db/migrate/20140604182559_add_badge_in_readme_to_revisions.rb
class AddBadgeInReadmeToRevisions < ActiveRecord::Migration def change add_column :revisions, :badge_in_readme, :boolean, :default => false end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140805200806_add_inch_version_to_builds.rb
db/migrate/20140805200806_add_inch_version_to_builds.rb
class AddInchVersionToBuilds < ActiveRecord::Migration def change add_column :builds, :inch_version, :string end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140331170945_create_builds.rb
db/migrate/20140331170945_create_builds.rb
class CreateBuilds < ActiveRecord::Migration def change create_table :builds do |t| t.references :branch t.references :revision t.datetime :started_at t.datetime :finished_at t.string :status t.string :trigger t.integer :number t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20160222085815_alter_revision_message_to_text.rb
db/migrate/20160222085815_alter_revision_message_to_text.rb
class AlterRevisionMessageToText < ActiveRecord::Migration def change change_column :revisions, :message, :text end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20141223134843_add_hook_id_to_projects.rb
db/migrate/20141223134843_add_hook_id_to_projects.rb
class AddHookIdToProjects < ActiveRecord::Migration def change add_column :projects, :github_hook_id, :integer end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20150101181738_add_index_on_diff_tables.rb
db/migrate/20150101181738_add_index_on_diff_tables.rb
class AddIndexOnDiffTables < ActiveRecord::Migration def change add_index :revision_diffs, [:branch_id] add_index :code_object_diffs, [:revision_diff_id] end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140410230212_create_revision_diffs.rb
db/migrate/20140410230212_create_revision_diffs.rb
class CreateRevisionDiffs < ActiveRecord::Migration def change create_table :revision_diffs do |t| t.references :branch t.references :before_revision t.references :after_revision t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140327230732_create_revisions.rb
db/migrate/20140327230732_create_revisions.rb
class CreateRevisions < ActiveRecord::Migration def change create_table :revisions do |t| t.references :branch t.string :uid t.string :tag_uid t.string :message t.string :author_name t.string :author_email t.datetime :authored_at t.timestamps end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20150327194017_add_organizations_to_users.rb
db/migrate/20150327194017_add_organizations_to_users.rb
class AddOrganizationsToUsers < ActiveRecord::Migration def change add_column :users, :organizations, :text end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20140327230712_create_branches.rb
db/migrate/20140327230712_create_branches.rb
class CreateBranches < ActiveRecord::Migration def change create_table :branches do |t| t.references :project t.string :name t.references :latest_revision t.timestamps end add_index :branches, [:project_id, :name] end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/db/migrate/20141222100946_add_more_infos_to_projects.rb
db/migrate/20141222100946_add_more_infos_to_projects.rb
class AddMoreInfosToProjects < ActiveRecord::Migration def change add_column :projects, :languages, :text add_column :projects, :fork, :boolean end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/test_helper.rb
test/test_helper.rb
ENV["RAILS_ENV"] ||= "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' module TestHelper def assert_positive_difference(expression, message = nil, &block) expressions = Array(expression) exps = expressions.map { |e| e.respond_to?(:call) ? e : lambda { eval...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/services/action/project/create_test.rb
test/services/action/project/create_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper') describe ::Action::Project::Create do let(:described_class) { ::Action::Project::Create } let(:repo_url) { "https://github.com/rrrene/repomen.git" } let(:repo_nwo) { "rrrene/repomen" } let(:invalid_input) { "invalid_input" } let(:orig...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/support/mini_test_spec.rb
test/support/mini_test_spec.rb
require 'minitest/autorun' require 'active_support/testing/assertions' class MiniTest::Spec include ActiveSupport::Testing::Assertions include ActiveSupport::Testing::SetupAndTeardown include ActiveRecord::TestFixtures include TestHelper alias :method_name :name if defined? :name self.fixture_path = Fi...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/support/sidekiq.rb
test/support/sidekiq.rb
require 'sidekiq/testing' Sidekiq::Testing.inline! Sidekiq::Logging.logger = nil
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/support/worker_output_mock.rb
test/support/worker_output_mock.rb
class WorkerOutputMock MOCKS_FILE = File.join(Rails.root, 'test', 'worker_outputs.yml') MOCKS = YAML.load( File.read(MOCKS_FILE) ) # @return [Hash] a mocked worker output def self.[](key) if hash = MOCKS[key.to_s] hash else raise "WorkerOutputMock not found: #{key.inspect}" end end ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/support/omniauth.rb
test/support/omniauth.rb
OmniAuth.config.test_mode = true omniauth_hash = { 'provider' => 'github', 'uid' => '12345', 'info' => { 'name' => 'marvin', 'email' => 'hi@marvintherobot.com', 'nickname' => 'MarvinTheRobot' }, 'extra' => { 'raw_info' => { 'location' => 'San Francisco', 'gravatar_id' => '123456789...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/integration/worker/project/update_info_test.rb
test/integration/worker/project/update_info_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper') describe ::InchCI::Worker::Project::UpdateInfo do fixtures :all let(:described_class) { ::InchCI::Worker::Project::UpdateInfo } let(:project_uid) { "github:rrrene/sparkr" } it "should work using .enqueue" do described_class.enqueu...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/integration/worker/project/build_test.rb
test/integration/worker/project/build_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper') describe ::InchCI::Worker::Project::Build do let(:described_class) { ::InchCI::Worker::Project::Build } let(:repo_url) { "https://github.com/rrrene/repomen.git" } it "should work using .enqueue" do changes = %w(Build.count Revision.c...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/integration/worker/project/build_json_test.rb
test/integration/worker/project/build_json_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper') describe ::InchCI::Worker::Project::BuildJSON do let(:described_class) { ::InchCI::Worker::Project::BuildJSON } let(:filename) { File.expand_path(File.dirname(__FILE__) + '/../../../fixtures/dumps/elixir/inch_ex.json') } it "should work ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/project_uid_test.rb
test/inch_ci/project_uid_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') require 'inch_ci/project_uid' describe ::InchCI::ProjectUID do fixtures :all let(:described_class) { ::InchCI::ProjectUID } it "should return project_uid for params" do params = {:service => 'github', :user => 'user_name', :repo => 'with...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/access_token_test.rb
test/inch_ci/access_token_test.rb
require 'test_helper' describe ::InchCI::AccessToken do let(:file) { File.join("tmp/access_token.yml") } let(:access_token) { ::InchCI::AccessToken.new(file) } before { FileUtils.rm_f(file) } describe "with contents" do before do File.open(file, "w") { |fh| fh.write("github: bar\n") } end ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/badge_test.rb
test/inch_ci/badge_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') describe ::InchCI::Badge do fixtures :all let(:described_class) { ::InchCI::Badge } it "should only create code objects when they change" do project = Project.find_by_uid("github:rrrene/sparkr") branch = project.default_branch cou...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/repo_url_test.rb
test/inch_ci/repo_url_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') describe ::InchCI::RepoURL do fixtures :all let(:described_class) { ::InchCI::RepoURL } it "should return project_uid for GitHub web-url" do info = described_class.new('https://github.com/user_name/with-numbers-1232') assert_equal 'gi...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/worker/project/build/generate_badge_test.rb
test/inch_ci/worker/project/build/generate_badge_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../../test_helper') describe ::InchCI::Worker::Project::Build::GenerateBadge do fixtures :all let(:described_class) { ::InchCI::Worker::Project::Build::GenerateBadge } it "should only create code objects when they change" do project = Project.find_b...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/worker/project/build/save_build_data_test.rb
test/inch_ci/worker/project/build/save_build_data_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../../test_helper') describe ::InchCI::Worker::Project::Build::SaveBuildData do fixtures :all let(:described_class) { ::InchCI::Worker::Project::Build::SaveBuildData } let(:build) { Build.create!(:started_at => Time.now, :branch => Branch.first, :status ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/inch_ci/worker/project/build/handler_worker_output_test.rb
test/inch_ci/worker/project/build/handler_worker_output_test.rb
require File.expand_path(File.dirname(__FILE__) + '/../../../../test_helper') describe ::InchCI::Worker::Project::Build::HandleWorkerOutput do fixtures :builds let(:described_class) { ::InchCI::Worker::Project::Build::HandleWorkerOutput } let(:repo_url) { 'https://github.com/rrrene/sparkr.git' } let(:branch_n...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/page_helper_test.rb
test/helpers/page_helper_test.rb
require 'test_helper' class PageHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/api_helper_test.rb
test/helpers/api_helper_test.rb
require 'test_helper' class ApiHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/help_helper_test.rb
test/helpers/help_helper_test.rb
require 'test_helper' class HelpHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/users_helper_test.rb
test/helpers/users_helper_test.rb
require 'test_helper' class UsersHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/admin/builds_helper_test.rb
test/helpers/admin/builds_helper_test.rb
require 'test_helper' class Admin::BuildsHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/admin/projects_helper_test.rb
test/helpers/admin/projects_helper_test.rb
require 'test_helper' class Admin::ProjectsHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/admin/overview_helper_test.rb
test/helpers/admin/overview_helper_test.rb
require 'test_helper' class Admin::OverviewHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/admin/cli_helper_test.rb
test/helpers/admin/cli_helper_test.rb
require 'test_helper' class Admin::CliHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/helpers/api/builds_helper_test.rb
test/helpers/api/builds_helper_test.rb
require 'test_helper' class Api::BuildsHelperTest < ActionView::TestCase end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/sessions_controller_test.rb
test/controllers/sessions_controller_test.rb
require 'test_helper' class SessionsControllerTest < ActionController::TestCase setup do request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] end test "should get :create" do skip # this fails since we do not yet have mocked the /following API call assert_difference(%w(User.count), 0) d...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/code_objects_controller_test.rb
test/controllers/code_objects_controller_test.rb
require 'test_helper' class CodeObjectsControllerTest < ActionController::TestCase fixtures :all test "should get :show with existing revision" do rev = '8849af2b7ad96c6aa650a6fd5490ef83629faf2a' short_rev = rev[0..6] [rev, short_rev].each do |revision_uid| %w(html js).each do |format| p...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/users_controller_test.rb
test/controllers/users_controller_test.rb
require 'test_helper' class UsersControllerTest < ActionController::TestCase UNAUTHORIZED = 401 test "should get :init_projects" do with_login do |current_user| post :init_projects, :format => 'js' assert_response :success end end test "should get :sync_projects" do with_login do |cur...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/projects_controller_test.rb
test/controllers/projects_controller_test.rb
require 'test_helper' class ProjectsControllerTest < ActionController::TestCase fixtures :all # # BADGE # def fake_badge(service, user, repo) project = Project.find_by_uid("#{service}:#{user}/#{repo}") project.branches.each do |branch| InchCI::Badge.create(project, branch, [0,0,0,0]) end ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/help_controller_test.rb
test/controllers/help_controller_test.rb
require 'test_helper' class HelpControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/builds_controller_test.rb
test/controllers/admin/builds_controller_test.rb
require 'test_helper' class Admin::BuildsControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/badges_controller_test.rb
test/controllers/admin/badges_controller_test.rb
require 'test_helper' class Admin::BadgesControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/statistics_controller_test.rb
test/controllers/admin/statistics_controller_test.rb
require 'test_helper' class Admin::StatisticsControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/users_controller_test.rb
test/controllers/admin/users_controller_test.rb
require 'test_helper' class Admin::UsersControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/overview_controller_test.rb
test/controllers/admin/overview_controller_test.rb
require 'test_helper' class Admin::OverviewControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/projects_controller_test.rb
test/controllers/admin/projects_controller_test.rb
require 'test_helper' class Admin::ProjectsControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/admin/cli_controller_test.rb
test/controllers/admin/cli_controller_test.rb
require 'test_helper' class Admin::CliControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/api/builds_controller_test.rb
test/controllers/api/builds_controller_test.rb
require 'test_helper' class Api::BuildsControllerTest < ActionController::TestCase def setup @controller = Api::BuildsController.new end def params {"language"=>"elixir", "git_repo_url"=>"git://github.com/rrrene/inch_ex.git", "travis" => true, "travis_repo_slug" => "rrrene/inch_ex", "args"=>nil, "object...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/controllers/api/cli_controller_test.rb
test/controllers/api/cli_controller_test.rb
require 'test_helper' class ApiCliControllerTest < ActionController::TestCase def setup @controller = Api::CliController.new end test "should not error on GET" do get :run assert_response :success end test "should run with valid params" do params = {"language" => "elixir", "objects"=>[{"obj...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/models/user_test.rb
test/models/user_test.rb
require 'test_helper' class UserTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/models/statistics_test.rb
test/models/statistics_test.rb
require 'test_helper' describe Statistics do let(:date) { Time.now } it "should not save for the same date twice" do attributes = { :date => date, :name => "some-key", :value => 1 } record = Statistics.new(attributes) assert record.save attributes = { :date => date, ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/test/models/project_test.rb
test/models/project_test.rb
require 'test_helper' class ProjectTest < ActiveSupport::TestCase test "should not save record with malformed UID" do bad_attributes = { :uid => "github:rrrene/sparkr/", :repo_url => "https://github.com/rrrene/sparkr.git" } record = Project.new(bad_attributes) refute record.save end ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/project_uid.rb
lib/inch_ci/project_uid.rb
module InchCI class ProjectUID attr_reader :service, :user_name, :repo_name def initialize(params_or_uid) if params_or_uid.is_a?(Hash) @service = params_or_uid[:service] @user_name = params_or_uid[:user] @repo_name = params_or_uid[:repo] else service_and_nwo = para...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/gossip.rb
lib/inch_ci/gossip.rb
require 'net/http' require 'uri' module InchCI module Gossip def self.load_config filename = File.join(Rails.root, "config", "gossip.yml") if File.exist?(filename) YAML.load(File.read(filename)) else {} end end GOSSIP_HOST = load_config['server'] GOSSIP_ACTIVE...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/diff.rb
lib/inch_ci/diff.rb
module InchCI class Diff def initialize(objects1, objects2) @objects1, @objects2 = objects1, objects2 end def comparisons __objects_names.map do |fullname| object1 = @objects1.detect { |o| o.fullname == fullname } object2 = @objects2.detect { |o| o.fullname == fullname } ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/store.rb
lib/inch_ci/store.rb
module InchCI # ActiveRecordStore provides a thin layer on top of ActiveRecord so we do not # need to use it's API in our own code. module Store FindUser = -> (service_name, user_name) { User.where(:provider => service_name, :user_name => user_name).first } FindUserById = -> (id) { User.find(id) } Upd...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/git_hub_info.rb
lib/inch_ci/git_hub_info.rb
require 'open-uri' require 'inch_ci/access_token' module InchCI # Retrieves project specific information via the GitHub API. module GitHubInfo def self.client @client ||= begin options = if AccessToken[:github_client_id] && AccessToken[:github_secret] {:client_id => AccessToken[:github_...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/badge.rb
lib/inch_ci/badge.rb
module InchCI module BadgeMethods IMAGE_FORMATS = %w(png svg) IMAGE_STYLES = %w(default shields flat flat-square) DEFAULT_IMAGE_FORMAT = IMAGE_FORMATS.first DEFAULT_IMAGE_STYLE = IMAGE_STYLES.first def self.included(base) base.extend ClassMethods end def filename(format = DEFAULT_I...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/grade_list_collection.rb
lib/inch_ci/grade_list_collection.rb
module InchCI class GradeListCollection include Enumerable GRADES = %w(A B C U) def initialize(code_objects) @count = code_objects.count @grade_lists = create_grade_lists(code_objects) @grade_percentages = calculate_grade_percentages(@grade_lists) end def [](grade) @grad...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/controller.rb
lib/inch_ci/controller.rb
module InchCI module Controller def expose(view) view.exposures.each do |name| value = view.send(name) instance_variable_set("@#{name}", value) end end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/config.rb
lib/inch_ci/config.rb
module InchCI module Config LANGUAGES_BUILD_LOCALLY = %w(Ruby JavaScript) LANGUAGES_BUILD_EXTERNALLY = %w(Elixir) LANGUAGES = LANGUAGES_BUILD_LOCALLY + LANGUAGES_BUILD_EXTERNALLY MIN_RELEVANT_PRIORITY = 0 end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/repo_url.rb
lib/inch_ci/repo_url.rb
module InchCI class RepoURL attr_reader :service, :url def initialize(url) @url = url.to_s.gsub(/(\/)\Z/, '') [@url, @url + '.git'].each do |_url| @service ||= Repomen::Repo::Service.for(_url) end end def project_uid return if service.nil? "#{service.name}:#{ser...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/access_token.rb
lib/inch_ci/access_token.rb
module InchCI # Manages access tokens for GitHub et al. class AccessToken def initialize(path) @hash = load_yaml(path) || {} end def [](key) @hash[key.to_s] end private def load_yaml(path) YAML.load_file(path) rescue Errno::ENOENT nil end class << self...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/action.rb
lib/inch_ci/action.rb
require 'inch_ci/project_uid' module InchCI module Action def self.included(other) other.extend(ClassMethods) end def exposures self.class.exposures end module ClassMethods attr_accessor :exposure_map def exposes(*names) exposures.concat names attr_reade...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/worker/project.rb
lib/inch_ci/worker/project.rb
require 'inch_ci/worker/project/build' require 'inch_ci/worker/project/build_json' require 'inch_ci/worker/project/build_tags' require 'inch_ci/worker/project/update_hook' require 'inch_ci/worker/project/update_info' module InchCI module Worker module Project EXTERNALLY_BUILD = ['elixir'] # @return ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/worker/user.rb
lib/inch_ci/worker/user.rb
require 'inch_ci/worker/user/update_projects' module InchCI module Worker module User end end end
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/worker/user/update_projects.rb
lib/inch_ci/worker/user/update_projects.rb
require 'inch_ci/git_hub_info' module InchCI module Worker module User # The UpdateProjects worker is responsible for updating a user's # projects. class UpdateProjects include Sidekiq::Worker ORIGIN = 'github_sync' TRIGGER = 'github_sync' # @param id [Fixnum] ...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false
inch-ci/inch_ci-web
https://github.com/inch-ci/inch_ci-web/blob/db1437218f544e4f21bdfd3690a952bf26a84028/lib/inch_ci/worker/project/build.rb
lib/inch_ci/worker/project/build.rb
require 'inch_ci/worker/project/build/handle_worker_output' require 'inch_ci/gossip' require 'open3' module InchCI module Worker module Project STATUS_SCHEDULED = Store::STATUS_SCHEDULED STATUS_CANCELLED = 'cancelled' STATUS_RUNNING = 'running' # The Build worker is responsible for "buil...
ruby
MIT
db1437218f544e4f21bdfd3690a952bf26a84028
2026-01-04T17:44:13.103953Z
false