source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/queue_schema.rb
Ruby
mit
207
main
9,589
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/cable_schema.rb
Ruby
mit
207
main
3,417
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/schema.rb
Ruby
mit
207
main
19,295
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216203009_add_account_references_to_documents.rb
Ruby
mit
207
main
389
class AddAccountReferencesToDocuments < ActiveRecord::Migration[8.0] def up add_reference :documents, :account, null: true, foreign_key: true account = Account.order(:created_at).first Document.update_all(account_id: account.id) if account.present? change_column_null :documents, :account_id, false ...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241031144508_create_users.rb
Ruby
mit
207
main
250
class CreateUsers < ActiveRecord::Migration[8.1] def change create_table :users do |t| t.string :email, null: false t.index 'LOWER(email)', unique: true, name: 'index_users_on_lowercase_email' t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216181845_create_account_users.rb
Ruby
mit
207
main
482
class CreateAccountUsers < ActiveRecord::Migration[8.0] def up create_table :account_users do |t| t.references :account, null: false, foreign_key: true t.references :user, null: false, foreign_key: true t.timestamps end account = Account.order(:created_at).first if account.present?...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241031144435_create_passwordless_sessions.passwordless_engine.rb
Ruby
mit
207
main
713
# frozen_string_literal: true # This migration comes from passwordless_engine (originally 20171104221735) class CreatePasswordlessSessions < ActiveRecord::Migration[6.0] def change create_table(:passwordless_sessions) do |t| t.belongs_to( :authenticatable, polymorphic: true, type: :...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241030213534_make_name_not_null.solid_queue.rb
Ruby
mit
207
main
617
# This migration comes from solid_queue (originally 20240813160053) class MakeNameNotNull < ActiveRecord::Migration[7.1] def up SolidQueue::Process.where(name: nil).find_each do |process| process.name ||= [ process.kind.downcase, SecureRandom.hex(10) ].join("-") process.save! end change_colum...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241030213535_change_solid_queue_recurring_tasks_static_to_not_null.solid_queue.rb
Ruby
mit
207
main
248
# This migration comes from solid_queue (originally 20240819165045) class ChangeSolidQueueRecurringTasksStaticToNotNull < ActiveRecord::Migration[7.1] def change change_column_null :solid_queue_recurring_tasks, :static, false, true end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216185123_create_websites.rb
Ruby
mit
207
main
236
class CreateWebsites < ActiveRecord::Migration[8.0] def change create_table :websites do |t| t.references :account, null: false, foreign_key: true t.string :url t.text :data t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20251029170246_create_chat_mcp_sessions.rb
Ruby
mit
207
main
426
class CreateChatMcpSessions < ActiveRecord::Migration[8.0] def change create_table :chat_mcp_sessions do |t| t.references :chat, null: false, foreign_key: true t.references :mcp_server, null: false, foreign_key: true t.boolean :enabled, default: true t.jsonb :metadata, default: {} t...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20240610190553_add_missing_index_to_blocked_executions.solid_queue.rb
Ruby
mit
207
main
309
# This migration comes from solid_queue (originally 20240110143450) class AddMissingIndexToBlockedExecutions < ActiveRecord::Migration[7.1] def change add_index :solid_queue_blocked_executions, [ :concurrency_key, :priority, :job_id ], name: "index_solid_queue_blocked_executions_for_release" end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216213448_change_vector_limit.rb
Ruby
mit
207
main
324
class ChangeVectorLimit < ActiveRecord::Migration[8.0] def up Chunk.update_all(embedding: nil) change_column :chunks, :embedding, :vector, limit: ENV.fetch("EMBEDDING_DIMENSIONS", 768).to_i end def down Chunk.update_all(embedding: nil) change_column :chunks, :embedding, :vector, limit: 768 end ...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20251029125004_add_metadata_to_messages.rb
Ruby
mit
207
main
200
class AddMetadataToMessages < ActiveRecord::Migration[8.0] def change add_column :messages, :metadata, :jsonb, default: {}, null: false add_index :messages, :metadata, using: :gin end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20250926205327_add_references_to_chats_tool_calls_and_messages.rb
Ruby
mit
207
main
339
class AddReferencesToChatsToolCallsAndMessages < ActiveRecord::Migration[8.0] def change add_reference :chats, :model, foreign_key: true add_reference :tool_calls, :message, null: false, foreign_key: true add_reference :messages, :model, foreign_key: true add_reference :messages, :tool_call, foreign_k...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216202004_add_account_references_to_api_tokens.rb
Ruby
mit
207
main
392
class AddAccountReferencesToApiTokens < ActiveRecord::Migration[8.0] def up add_reference :api_tokens, :account, null: true, foreign_key: true account = Account.order(:created_at).first ApiToken.update_all(account_id: account.id) if account.present? change_column_null :api_tokens, :account_id, false...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20250909195812_add_informations_to_documents.rb
Ruby
mit
207
main
494
class AddInformationsToDocuments < ActiveRecord::Migration[8.0] def change add_column :documents, :keywords, :string add_column :documents, :url, :string add_column :qnas, :keywords, :string add_column :qnas, :title, :string add_column :qnas, :url, :string add_column :texts, :keywords, :string...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241030213532_create_recurring_tasks.solid_queue.rb
Ruby
mit
207
main
560
# This migration comes from solid_queue (originally 20240719134516) class CreateRecurringTasks < ActiveRecord::Migration[7.1] def change create_table :solid_queue_recurring_tasks do |t| t.string :key, null: false, index: { unique: true } t.string :schedule, null: false t.string :command, limit: ...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20260402102301_add_ruby_llm_v1_14_columns.rb
Ruby
mit
207
main
213
class AddRubyLlmV114Columns < ActiveRecord::Migration[8.0] def change if column_exists?(:tool_calls, :thought_signature, :string) change_column :tool_calls, :thought_signature, :text end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20260402102252_add_ruby_llm_v1_10_columns.rb
Ruby
mit
207
main
560
class AddRubyLlmV110Columns < ActiveRecord::Migration[8.0] def change unless column_exists?(:messages, :thinking_text) add_column :messages, :thinking_text, :text end unless column_exists?(:messages, :thinking_signature) add_column :messages, :thinking_signature, :text end unless col...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20240628203936_create_chunks.rb
Ruby
mit
207
main
254
class CreateChunks < ActiveRecord::Migration[8.0] def change create_table :chunks do |t| t.belongs_to :document, null: false, foreign_key: true t.text :content t.vector :embedding, limit: 768 t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241218200949_add_account_references_to_chats.rb
Ruby
mit
207
main
369
class AddAccountReferencesToChats < ActiveRecord::Migration[8.0] def up add_reference :chats, :account, null: true, foreign_key: true account = Account.order(:created_at).first Chat.update_all(account_id: account.id) if account.present? change_column_null :chats, :account_id, false end def down...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20240610190554_create_recurring_executions.solid_queue.rb
Ruby
mit
207
main
564
# This migration comes from solid_queue (originally 20240218110712) class CreateRecurringExecutions < ActiveRecord::Migration[7.1] def change create_table :solid_queue_recurring_executions do |t| t.references :job, index: { unique: true }, null: false t.string :task_key, null: false t.datetime :...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241105095357_create_credentials.rb
Ruby
mit
207
main
263
class CreateCredentials < ActiveRecord::Migration[8.0] def change create_table :credentials do |t| t.references :user, null: false, foreign_key: true t.string :provider t.text :uid t.jsonb :data t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241104215344_create_authors.rb
Ruby
mit
207
main
230
class CreateAuthors < ActiveRecord::Migration[8.0] def change create_table :authors do |t| t.string :name t.string :description t.string :url t.string :image_url t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20250926205326_create_models.rb
Ruby
mit
207
main
892
class CreateModels < ActiveRecord::Migration[8.0] def change create_table :models do |t| t.string :model_id, null: false t.string :name, null: false t.string :provider, null: false t.string :family t.datetime :model_created_at t.integer :context_window t.integer :max_outp...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20240606222853_create_documents.rb
Ruby
mit
207
main
221
class CreateDocuments < ActiveRecord::Migration[8.0] def change create_table :documents do |t| t.string :title t.text :content t.vector :embedding, limit: 768 t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241030213533_add_name_to_processes.solid_queue.rb
Ruby
mit
207
main
201
# This migration comes from solid_queue (originally 20240811173327) class AddNameToProcesses < ActiveRecord::Migration[7.1] def change add_column :solid_queue_processes, :name, :string end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216185700_create_qnas.rb
Ruby
mit
207
main
233
class CreateQnas < ActiveRecord::Migration[8.0] def change create_table :qnas do |t| t.references :account, null: false, foreign_key: true t.text :question t.text :answer t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20251124130414_add_ruby_llm_v1_9_columns.rb
Ruby
mit
207
main
435
class AddRubyLlmV19Columns < ActiveRecord::Migration[8.0] def change unless column_exists?(:messages, :cached_tokens) add_column :messages, :cached_tokens, :integer end unless column_exists?(:messages, :cache_creation_tokens) add_column :messages, :cache_creation_tokens, :integer end ...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20240607065213_create_messages.rb
Ruby
mit
207
main
323
class CreateMessages < ActiveRecord::Migration[8.0] def change create_table :messages do |t| t.references :chat, null: false, foreign_key: true t.integer :role, null: false, default: 0 t.string :content t.integer :response_number, null: false, default: 0 t.timestamps end end e...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20251029165502_create_mcp_servers.rb
Ruby
mit
207
main
804
class CreateMcpServers < ActiveRecord::Migration[8.0] def change create_table :mcp_servers do |t| t.references :account, null: false, foreign_key: true t.string :name, null: false t.string :transport_type, null: false, default: "streamable" t.text :endpoint t.jsonb :auth_config, defa...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216181749_create_accounts.rb
Ruby
mit
207
main
395
class CreateAccounts < ActiveRecord::Migration[8.0] def up create_table :accounts do |t| t.string :name t.belongs_to :owner, null: false, foreign_key: { to_table: :users } t.string :uid t.timestamps end owner = User.order(:created_at).first Account.find_or_create_by(name: "Fi...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20251113201104_encrypt_sensitive_data.rb
Ruby
mit
207
main
289
class EncryptSensitiveData < ActiveRecord::Migration[8.0] def up User.find_each(&:encrypt) McpServer.find_each(&:encrypt) Author.find_each(&:encrypt) end def down User.find_each(&:decrypt) McpServer.find_each(&:decrypt) Author.find_each(&:decrypt) end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241118194153_create_api_tokens.rb
Ruby
mit
207
main
240
class CreateApiTokens < ActiveRecord::Migration[8.0] def change create_table :api_tokens do |t| t.references :user, null: false, foreign_key: true t.string :name t.string :token t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20251110133901_create_prompts.rb
Ruby
mit
207
main
574
class CreatePrompts < ActiveRecord::Migration[8.0] def up create_table :prompts do |t| t.belongs_to :account, null: true, foreign_key: true t.belongs_to :user, null: true, foreign_key: true t.string :name t.text :content t.timestamps end Account.find_each do |account| ...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216190106_add_chunkable_to_chunks.rb
Ruby
mit
207
main
813
class AddChunkableToChunks < ActiveRecord::Migration[8.0] def up add_column :chunks, :chunkable_type, :string Chunk.update_all(chunkable_type: "Document") remove_index :chunks, :document_id rename_column :chunks, :document_id, :chunkable_id add_index :chunks, [ :chunkable_type, :chunkable_id ] ...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20241216191734_create_texts.rb
Ruby
mit
207
main
210
class CreateTexts < ActiveRecord::Migration[8.0] def change create_table :texts do |t| t.references :account, null: false, foreign_key: true t.text :data t.timestamps end end end
github
dilolabs/nosia
https://github.com/dilolabs/nosia
db/migrate/20250926205325_create_tool_calls.rb
Ruby
mit
207
main
342
class CreateToolCalls < ActiveRecord::Migration[8.0] def change create_table :tool_calls do |t| t.string :tool_call_id, null: false t.string :name, null: false t.jsonb :arguments, default: {} t.timestamps end add_index :tool_calls, :tool_call_id, unique: true add_index :tool_c...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
lib/mcp_catalog.rb
Ruby
mit
207
main
3,395
class McpCatalog class << self def all @catalog ||= load_catalog end def find(id) all.find { |server| server[:id] == id.to_s } end def by_category(category) all.select { |server| server[:category] == category.to_s } end def categories @categories ||= load_categor...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
lib/prompts.rb
Ruby
mit
207
main
444
class Prompts class << self def system_prompt all["system_prompt"] end def context_relevance_guard all["context_relevance_guard"] end def answer_relevance_guard all["answer_relevance_guard"] end def all @prompts ||= load_prompts end private def load...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
lib/tasks/embeddings.rake
Ruby
mit
207
main
1,449
namespace :embeddings do desc "Change embedding dimensions of existing models" task change_dimensions: :environment do # Ask for user confirmation puts "This task will change the embedding dimensions of existing models." puts "Are you sure you want to proceed? (yes/no)" confirmation = STDIN.gets.cho...
github
dilolabs/nosia
https://github.com/dilolabs/nosia
test/application_system_test_case.rb
Ruby
mit
207
main
430
require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase if ENV["CAPYBARA_SERVER_PORT"] served_by host: "rails-app", port: ENV["CAPYBARA_SERVER_PORT"] driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ], options: { browser: :remote, url: "http:...
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
sidekiq-rate-limiter.gemspec
Ruby
mit
207
master
1,208
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "sidekiq-rate-limiter/version" Gem::Specification.new do |s| s.name = "sidekiq-rate-limiter" s.license = 'MIT' s.version = Sidekiq::RateLimiter::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Docady"...
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
Rakefile
Ruby
mit
207
master
286
require 'bundler' Bundler::GemHelper.install_tasks require 'rspec/core/rake_task' RSpec::Core::RakeTask.new task :default => :spec desc 'Start IRB with preloaded environment' task :console do exec 'irb', "-I#{File.join(File.dirname(__FILE__), 'lib')}", '-rsidekiq-rate-limiter' end
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
lib/sidekiq-rate-limiter/fetch.rb
Ruby
mit
207
master
2,702
require 'sidekiq' require 'sidekiq/fetch' require 'redis_rate_limiter' module Sidekiq::RateLimiter DEFAULT_LIMIT_NAME = 'sidekiq-rate-limit'.freeze unless defined?(DEFAULT_LIMIT_NAME) class Fetch < Sidekiq::BasicFetch def retrieve_work limit(super) end def limit(work) message = JSON.p...
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
lib/sidekiq-rate-limiter/server.rb
Ruby
mit
207
master
613
require 'sidekiq-rate-limiter/version' require 'sidekiq-rate-limiter/fetch' Sidekiq.configure_server do |config| # Backwards compatibility for Sidekiq < 6.1.0 (see https://github.com/mperham/sidekiq/pull/4602 for details) if (Sidekiq::BasicFetch.respond_to?(:bulk_requeue)) Sidekiq.options[:fetch] = Sidekiq::Ra...
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
spec/spec_helper.rb
Ruby
mit
207
master
1,615
require 'sidekiq' require 'sidekiq/testing' require 'pry-byebug' ## Configuring sidekiq options = { logger: nil, redis: { url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') } } Sidekiq.configure_client do |config| options.each do |option, value| config.send("#{option}=", value) end end Sidekiq.confi...
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
spec/sidekiq-rate-limiter/fetch_spec.rb
Ruby
mit
207
master
3,355
require 'spec_helper' require 'sidekiq' require 'sidekiq/api' RSpec.describe Sidekiq::RateLimiter::Fetch do before(:all) do class Job include Sidekiq::Worker sidekiq_options 'queue' => 'basic', 'retry' => false, 'rate' => { '...
github
enova/sidekiq-rate-limiter
https://github.com/enova/sidekiq-rate-limiter
spec/sidekiq-rate-limiter/server_spec.rb
Ruby
mit
207
master
857
require 'spec_helper' RSpec.describe Sidekiq::RateLimiter, 'server configuration' do before do allow(Sidekiq).to receive(:server?).and_return true require 'sidekiq-rate-limiter/server' end it 'should set Sidekiq.options[:fetch] as desired' do Sidekiq.configure_server do |config| if Sidekiq::VE...
github
yuki24/artemis
https://github.com/yuki24/artemis
Rakefile
Ruby
mit
207
main
441
require "bundler/gem_tasks" require "rake/testtask" TESTS_IN_ISOLATION = ['test/railtie_test.rb', 'test/rake_tasks_test.rb'] Rake::TestTask.new(:test) do |t| t.libs << "test" t.test_files = FileList['test/**/*_test.rb'] - TESTS_IN_ISOLATION t.warning = false end Rake::TestTask.new('test:isolated') do |t| ...
github
yuki24/artemis
https://github.com/yuki24/artemis
Gemfile
Ruby
mit
207
main
292
source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in artemis.gemspec gemspec gem "bigdecimal" gem "drb" gem "irb" gem "logger" gem "mutex_m" gem "reline" gem "curb", ">= 0.9.6" gem "minitest" gem "webrick"
github
yuki24/artemis
https://github.com/yuki24/artemis
artemis.gemspec
Ruby
mit
207
main
1,124
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "artemis/version" Gem::Specification.new do |spec| spec.name = "artemis" spec.version = Artemis::VERSION spec.authors = ["Jon Allured", "Yuki Nishijima"] spec.email = ["jon.al...
github
yuki24/artemis
https://github.com/yuki24/artemis
Appraisals
Ruby
mit
207
main
1,442
appraise "rails_edge" do git 'https://github.com/rails/rails.git' do gem "rails" gem "railties" gem "activesupport" end gem "rackup" end appraise "graphql_2_0" do gem "rails", '~> 7.1.0' gem "railties", '~> 7.1.0' gem "activesupport", '~> 7.1.0' gem "rackup" gem "graphql", "< 2.1" end ap...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis.rb
Ruby
mit
207
main
1,044
require "artemis/version" require "artemis/client" require "artemis/railtie" if defined?(Rails) module Artemis def self.config_for_graphql(app) if app.respond_to?(:config_for) app.config_for(:graphql) else config_for(:graphql, app: app) end end # backported from https://github.com/rails/...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/client.rb
Ruby
mit
207
main
11,908
# frozen_string_literal: true require 'delegate' require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/hash/deep_merge' require 'active_support/core_ext/module/delegation' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/string/inflections' req...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/railtie.rb
Ruby
mit
207
main
2,816
require 'active_support/file_update_checker' module Artemis class Railtie < ::Rails::Railtie #:nodoc: config.artemis = ActiveSupport::OrderedOptions.new config.artemis.query_path = "app/operations" config.artemis.fixture_path = "test/fixtures/graphql" config.artemis.schema_path =...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters.rb
Ruby
mit
207
main
594
# frozen-string-literal: true require 'active_support/dependencies/autoload' module Artemis module Adapters extend ActiveSupport::Autoload autoload :CurbAdapter autoload :MultiDomainAdapter autoload :NetHttpAdapter autoload :NetHttpPersistentAdapter autoload :TestAdapter class << self ...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/exceptions.rb
Ruby
mit
207
main
303
module Artemis class Error < StandardError end class EndpointNotFound < Error end class ConfigurationError < Error end class GraphQLFileNotFound < Error end class FixtureNotFound < Error end class GraphQLError < Error end class GraphQLServerError < GraphQLError end end
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/test_helper.rb
Ruby
mit
207
main
4,606
# frozen_string_literal: true require 'erb' require 'yaml' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/string/inflections' require 'artemis/exceptions' module Artemis # TODO: Write documentation for +TestHelper+ module TestHelper mattr_accessor :__graphql_fi...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/graphql_endpoint.rb
Ruby
mit
207
main
2,638
# frozen_string_literal: true require 'active_support/core_ext/hash/deep_merge' require 'active_support/core_ext/hash/keys' require 'active_support/core_ext/class/attribute_accessors' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/string/inflections' require 'graphql/client' require '...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters/curb_adapter.rb
Ruby
mit
207
main
1,847
# frozen_string_literal: true require 'delegate' require 'json' require 'curb' require 'artemis/adapters/abstract_adapter' require 'artemis/exceptions' module Artemis module Adapters class CurbAdapter < AbstractAdapter attr_reader :multi def initialize(uri, service_name: , timeout: , pool_size: ,...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters/net_http_persistent_adapter.rb
Ruby
mit
207
main
1,453
# frozen_string_literal: true require 'delegate' begin require "active_support/isolated_execution_state" rescue LoadError # no-op... Rails 7.0 requires this. end begin require 'active_support/deprecation' require 'active_support/deprecator' rescue LoadError end require 'active_support/core_ext/numeric/time'...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters/abstract_adapter.rb
Ruby
mit
207
main
1,755
# frozen_string_literal: true require 'active_support/core_ext/object/blank' require 'graphql/client/http' module Artemis module Adapters class AbstractAdapter < ::GraphQL::Client::HTTP attr_reader :service_name, :timeout, :pool_size EMPTY_HEADERS = {}.freeze DEFAULT_HEADERS = { "Acc...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters/multi_domain_adapter.rb
Ruby
mit
207
main
2,232
# frozen_string_literal: true require 'artemis/adapters/abstract_adapter' module Artemis module Adapters class MultiDomainAdapter < AbstractAdapter attr_reader :adapter def initialize(_uri, service_name: , timeout: , pool_size: , adapter_options: {}) if adapter_options[:adapter] == :multi_d...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters/net_http_adapter.rb
Ruby
mit
207
main
1,806
# frozen_string_literal: true require 'json' require 'net/http' require 'artemis/adapters/abstract_adapter' require 'artemis/exceptions' module Artemis module Adapters class NetHttpAdapter < AbstractAdapter def multiplex(queries, context: {}) make_request({ _json: queries }, context) end ...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/artemis/adapters/test_adapter.rb
Ruby
mit
207
main
1,440
# frozen_string_literal: true require 'active_support/core_ext/module/attribute_accessors' module Artemis module Adapters class TestAdapter cattr_accessor :requests self.requests = [] cattr_accessor :responses self.responses = [] Request = Struct.new(:document, :operation_name, :...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/generators/artemis/install/install_generator.rb
Ruby
mit
207
main
1,950
require 'graphql/client' require 'graphql/client/http' class Artemis::InstallGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :endpoint_url, type: :string, banner: "The endpoint URL for a GraphQL service" class_option :authorization, type: :string, defaul...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/generators/artemis/install/templates/client.rb
Ruby
mit
207
main
241
<% module_namespacing do -%> class <%= class_name %> < Artemis::Client # If an access token needs to be assigned to every request: # self.default_context = { # headers: { # Authorization: "token ..." # } # } end <% end %>
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/generators/artemis/query/query_generator.rb
Ruby
mit
207
main
1,730
# frozen_string_literal: true require 'graphql/schema/finder' class Artemis::QueryGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :query_type, type: :string, required: true, banner: "Query type" argument :graphql_file_name, type: :string...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/generators/artemis/mutation/mutation_generator.rb
Ruby
mit
207
main
1,500
# frozen_string_literal: true require 'graphql/schema/finder' class Artemis::MutationGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :mutation_type, type: :string, required: true, banner: "Mutation type" argument :graphql_file_name, type: :...
github
yuki24/artemis
https://github.com/yuki24/artemis
lib/tasks/artemis.rake
Ruby
mit
207
main
1,741
# frozen_string_literal: true require 'json' require 'active_support/core_ext/string/inflections' require 'graphql/client' namespace :graphql do namespace :schema do desc "Downloads and saves the GraphQL schema (options: SERVICE=service_name AUTHORIZATION='token ...')" task update: :environment do se...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/callbacks_test.rb
Ruby
mit
207
main
1,587
require_relative 'helpers/test_helper' require 'active_support/core_ext/module/attribute_accessors' class CallbacksTest < ActiveSupport::TestCase Client = Class.new(Artemis::Client) do def self.name 'Github' end mattr_accessor :before_callback, :after_callback self.before_callback = nil s...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/test_helper_test.rb
Ruby
mit
207
main
3,335
require_relative 'helpers/test_helper' require 'artemis/test_helper' class TestHelperTest < ActiveSupport::TestCase include Artemis::TestHelper def graphql_fixture_path File.join(PROJECT_DIR, "test/fixtures/responses") end setup do graphql_requests.clear graphql_responses.clear end test "can...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/client_test.rb
Ruby
mit
207
main
6,926
require 'helpers/test_helper' class ClientTest < ActiveSupport::TestCase setup do requests.clear end test ".lookup_graphql_file returns the path to the matching graph file" do assert_equal "#{PROJECT_DIR}/test/fixtures/github/user.graphql", Github.resolve_graphql_file_path("user") end test ".lookup...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/railtie_test.rb
Ruby
mit
207
main
5,980
require "rack/test" require "rails/version" require_relative "helpers/isolated_test_helper" class RailtieTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods include Generation setup do build_app FileUtils.rm_rf "#{app_path}/config/environments" end ...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/autoloading_test.rb
Ruby
mit
207
main
4,806
require_relative 'helpers/test_helper' class AutoLoadingTest < ActiveSupport::TestCase test ".load_constant loads the specified constant if there is a matching graphql file" do Github.send(:remove_const, :User) if Github.constants.include?(:User) Github.load_constant(:User) assert_equal 'constant', def...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/adapters_test.rb
Ruby
mit
207
main
8,449
require_relative 'helpers/test_helper' require 'artemis/adapters/abstract_adapter' class AdaptersTest < ActiveSupport::TestCase Artemis::Adapters::AbstractAdapter.send(:attr_writer, :uri, :timeout) test "NetHttpAdapter behaves like an adapter" do adapter = Artemis::Adapters::NetHttpAdapter.new("http://localh...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/rake_tasks_test.rb
Ruby
mit
207
main
4,674
# frozen_string_literal: true require_relative "helpers/isolated_test_helper" module ApplicationTests module RakeTests class RakeRoutesTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Generation setup do build_app FileUtils.rm_rf "#{app_path}/co...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/endpoint_test.rb
Ruby
mit
207
main
1,722
require_relative 'helpers/test_helper' class GraphQLEndpointTest < ActiveSupport::TestCase teardown do Artemis::GraphQLEndpoint.const_get(:ENDPOINT_INSTANCES).delete("gitlab") end test ".lookup raises an exception when the service is missing" do assert_raises Artemis::EndpointNotFound do Artemis::...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/helpers/isolated_test_helper.rb
Ruby
mit
207
main
3,667
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require "active_support" require 'active_support/core_ext/kernel/reporting' require 'active_support/deprecation' require 'active_support/testing/autorun' require 'minitest/pride' require "rails/railtie" begin require 'active_support/testing/method_call_ass...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/helpers/test_helper.rb
Ruby
mit
207
main
1,773
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require "active_support" require 'active_support/core_ext/kernel/reporting' require 'active_support/deprecation' require 'active_support/testing/autorun' require 'minitest/pride' require "rails/railtie" require 'artemis' begin require 'active_support/testi...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/helpers/fake_server.rb
Ruby
mit
207
main
2,467
require 'json' require 'rack' require 'webrick' require 'net/http' RACK_SERVER = begin require 'rackup/handler/webrick' Rackup::Handler::WEBrick rescue LoadError Rack::Handler::WEBrick end FAKE_SERVER = ->(env) { case env['PATH_INFO'] whe...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/generators/install_generator_test.rb
Ruby
mit
207
main
2,995
require_relative '../helpers/test_helper' require 'rails/generators/test_case' require 'generators/artemis/install/install_generator' class InstallGeneratorTest < Rails::Generators::TestCase tests Artemis::InstallGenerator arguments %w(github https://api.github.com/graphql) destination File.join(Dir.pwd, "tmp")...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/generators/query_generator_test.rb
Ruby
mit
207
main
2,733
require_relative '../helpers/test_helper' require 'rails/generators/test_case' require 'generators/artemis/query/query_generator' class QueryGeneratorTest < Rails::Generators::TestCase tests Artemis::QueryGenerator arguments %w(user) destination File.join(Dir.pwd, "tmp") setup :prepare_destination teardown...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/generators/mutation_generator_test.rb
Ruby
mit
207
main
2,124
require_relative '../helpers/test_helper' require 'rails/generators/test_case' require 'generators/artemis/mutation/mutation_generator' class MutationGeneratorTest < Rails::Generators::TestCase tests Artemis::MutationGenerator arguments %w(addStar) destination File.join(Dir.pwd, "tmp") setup :prepare_destinat...
github
yuki24/artemis
https://github.com/yuki24/artemis
test/backport/method_call_assertions.rb
Ruby
mit
207
main
1,050
require "minitest/mock" module MethodCallAssertions # :nodoc: private def assert_called(object, method_name, message = nil, times: 1, returns: nil) times_called = 0 object.stub(method_name, proc { times_called += 1; returns }) { yield } error = "Expected #{method_name} to be called #{times} times, " ...
github
drkameleon/complete-hsk-vocabulary
https://github.com/drkameleon/complete-hsk-vocabulary
scripts/minify.rb
Ruby
mit
207
main
1,642
######################################################################### # Complete HSK Vocabulary # ------------ # Script to minify complete.json and level-based lists. # # Usage: # ruby scripts/minify.rb [input_file] [--dry-run] # # Copyright (c) 2026 Yanis Zafirópulos (aka Dr.Kameleon) # Licensed under the MIT Li...
github
drkameleon/complete-hsk-vocabulary
https://github.com/drkameleon/complete-hsk-vocabulary
scripts/process.rb
Ruby
mit
207
main
3,089
######################################################################### # Complete HSK Vocabulary # ------------ # Script to process the complete dataset into minified # and level-based lists. # # Usage: # ruby scripts/process.rb [--dry-run] # # Copyright (c) 2026 Yanis Zafirópulos (aka Dr.Kameleon) # Licensed und...
github
drkameleon/complete-hsk-vocabulary
https://github.com/drkameleon/complete-hsk-vocabulary
scripts/filter.rb
Ruby
mit
207
main
2,376
######################################################################### # Complete HSK Vocabulary # ------------ # Script to filter complete.json # into level-based lists, either exclusive or inclusive. # # Usage: # ruby scripts/filter.rb [exclusive|inclusive] # [level1] [level2] ... [--d...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
active_record_upsert.gemspec
Ruby
mit
207
main
1,135
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'active_record_upsert/version' Gem::Specification.new do |spec| spec.name = "active_record_upsert" spec.version = ActiveRecordUpsert::VERSION spec.authors = ["Jesper Jos...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
Rakefile
Ruby
mit
207
main
926
require 'logger' # Fix concurrent-ruby removing "logger" dependency which Rails itself does not have require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'active_record' RSpec::Core::RakeTask.new(:spec) task :setup_and_run_spec do |rake_task| puts "<:#{rake_task.name}> Ensuring database is prepared..."...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/spec_helper.rb
Ruby
mit
207
main
1,051
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'logger' # Fix concurrent-ruby removing "logger" dependency which Rails itself does not have require 'active_record' require 'database_cleaner' require 'securerandom' # Configure Rails Environment ENV['RAILS_ENV'] = 'test' require 'active_record/connec...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config.ru
Ruby
mit
207
main
248
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) # Action Cable requires that all classes are loaded in advance Rails.application.eager_load! run Rails.application
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config/boot.rb
Ruby
mit
207
main
342
# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) require "logger" # Fix concurrent-ruby removing "logger" dependency which Rails itself does not have $LOAD_PATH.unshift File.expand_path('../../...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config/application.rb
Ruby
mit
207
main
210
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) module Dummy class Application < Rails::Application config.active_record.schema_format = :sql end end
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config/routes.rb
Ruby
mit
207
main
227
Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html # Serve websocket cable requests in-process # mount ActionCable.server => '/cable' end
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config/puma.rb
Ruby
mit
207
main
1,927
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum, this matches ...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config/environments/development.rb
Ruby
mit
207
main
2,141
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
github
jesjos/active_record_upsert
https://github.com/jesjos/active_record_upsert
spec/dummy/config/environments/production.rb
Ruby
mit
207
main
3,442
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...