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
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/section.rb
lib/riddle/configuration/section.rb
# frozen_string_literal: true module Riddle class Configuration class Section def self.settings [] end def valid? true end private def settings_body settings.select { |setting| !send(setting).nil? }.collect { |setting| if ...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/parser.rb
lib/riddle/configuration/parser.rb
# encoding: UTF-8 # frozen_string_literal: true require 'stringio' class Riddle::Configuration::Parser SOURCE_CLASSES = { 'mysql' => Riddle::Configuration::SQLSource, 'pgsql' => Riddle::Configuration::SQLSource, 'mssql' => Riddle::Configuration::SQLSource, 'xmlpipe' => Riddle::Configuratio...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/remote_index.rb
lib/riddle/configuration/remote_index.rb
# frozen_string_literal: true module Riddle class Configuration class RemoteIndex attr_accessor :address, :port, :name def initialize(address, port, name) @address = address @port = port @name = name end def remote "#{address}:#{port}...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/searchd.rb
lib/riddle/configuration/searchd.rb
# frozen_string_literal: true module Riddle class Configuration class Searchd < Riddle::Configuration::Section def self.settings [ :listen, :address, :port, :log, :query_log, :query_log_format, :read_timeout, :client_timeout, :max_children, :pid_file, :max_matches, :se...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/index_settings.rb
lib/riddle/configuration/index_settings.rb
# frozen_string_literal: true module Riddle class Configuration module IndexSettings def self.settings [ :type, :path, :docinfo, :mlock, :morphology, :dict, :index_sp, :index_zones, :min_stemming_len, :stopwords, :wordforms, :exceptions, :min_word_len, :charset_dictpat...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/realtime_index.rb
lib/riddle/configuration/realtime_index.rb
# frozen_string_literal: true module Riddle class Configuration class RealtimeIndex < Riddle::Configuration::Section include Riddle::Configuration::IndexSettings def self.settings Riddle::Configuration::IndexSettings.settings + [ :rt_mem_limit, :rt_field, :rt_attr_uint, :rt_attr_bi...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/distributed_index.rb
lib/riddle/configuration/distributed_index.rb
# frozen_string_literal: true module Riddle class Configuration class DistributedIndex < Riddle::Configuration::Section def self.settings [ :type, :local, :agent, :agent_blackhole, :agent_connect_timeout, :agent_query_timeout ] end attr_accessor :name, :loca...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/indexer.rb
lib/riddle/configuration/indexer.rb
# frozen_string_literal: true module Riddle class Configuration class Indexer < Riddle::Configuration::Section def self.settings [ :mem_limit, :max_iops, :max_iosize, :max_xmlpipe2_field, :write_buffer, :max_file_field_buffer, :on_file_field_error, :lemmatizer_cache ...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/xml_source.rb
lib/riddle/configuration/xml_source.rb
# frozen_string_literal: true module Riddle class Configuration class XMLSource < Riddle::Configuration::Source def self.settings [ :type, :xmlpipe_command, :xmlpipe_field, :xmlpipe_attr_uint, :xmlpipe_attr_bool, :xmlpipe_attr_timestamp, :xmlpipe_attr_str2ordinal, :xm...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/template_index.rb
lib/riddle/configuration/template_index.rb
# frozen_string_literal: true module Riddle class Configuration class TemplateIndex < Riddle::Configuration::Section include Riddle::Configuration::IndexSettings def self.settings Riddle::Configuration::IndexSettings.settings end attr_accessor :parent def initialize(name)...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/sql_source.rb
lib/riddle/configuration/sql_source.rb
# frozen_string_literal: true module Riddle class Configuration class SQLSource < Riddle::Configuration::Source def self.settings [ :type, :sql_host, :sql_user, :sql_pass, :sql_db, :sql_port, :sql_sock, :mysql_connect_flags, :mysql_ssl_cert, :mysql_ssl_key, :mysql_ssl_...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/configuration/tsv_source.rb
lib/riddle/configuration/tsv_source.rb
# frozen_string_literal: true module Riddle class Configuration class TSVSource < Riddle::Configuration::Source def self.settings [:type, :tsvpipe_command, :tsvpipe_attr_field, :tsvpipe_attr_multi] end attr_accessor *self.settings def initialize(name, type = 'tsvpipe') @...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/2.0.1/client.rb
lib/riddle/2.0.1/client.rb
# frozen_string_literal: true Riddle::Client::Versions[:search] = 0x118 Riddle::Client::Versions[:excerpt] = 0x103
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/client/filter.rb
lib/riddle/client/filter.rb
# frozen_string_literal: true module Riddle class Client class Filter attr_accessor :attribute, :values, :exclude # Attribute name, values (which can be an array or a range), and whether # the filter should be exclusive. def initialize(attribute, values, exclude=false) @attribute...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/client/response.rb
lib/riddle/client/response.rb
# frozen_string_literal: true module Riddle class Client # Used to interrogate responses from the Sphinx daemon. Keep in mind none # of the methods here check whether the data they're grabbing are what the # user expects - it just assumes the user knows what the data stream is # made up of. class...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
pat/riddle
https://github.com/pat/riddle/blob/748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43/lib/riddle/client/message.rb
lib/riddle/client/message.rb
# frozen_string_literal: true module Riddle class Client # This class takes care of the translation of ints, strings and arrays to # the format required by the Sphinx service. class Message def initialize @message = StringIO.new String.new(""), "w" @message.set_encoding 'ASCII-8BIT'...
ruby
MIT
748ca04d14a9c04b7a5f2d64dbcd4897c1ab3f43
2026-01-04T17:45:28.600554Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start do add_filter(/schema\.rb/) end ENV["RAILS_ENV"] = "test" ENV["BUNDLE_GEMFILE"] = "#{File.dirname(__FILE__)}/../Gemfile" ENV["DATABASE_URL"] = "sqlite3::memory:" require "bundler/setup" require "rails" require "active_model/railtie" require "active...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/test/factory_bot/preload_test.rb
test/factory_bot/preload_test.rb
# frozen_string_literal: true require "test_helper" class PreloadTest < ActiveSupport::TestCase setup do FactoryBot::Preload.clean_with = :truncation FactoryBot::Preload.helper_name = FactoryBot::Preload.default_helper_name end test "queues preloader block" do block = proc { } FactoryBot.preloa...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start do add_filter(/schema\.rb/) end ENV["RAILS_ENV"] = "test" ENV["BUNDLE_GEMFILE"] = "#{File.dirname(__FILE__)}/../Gemfile" ENV["DATABASE_URL"] = "sqlite3::memory:" require "bundler/setup" require "rails" require "active_model/railtie" require "active...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/factories.rb
spec/support/factories.rb
# frozen_string_literal: true FactoryBot.define do sequence(:email) {|n| "john#{n}@doe.com" } factory :user do name { "John Doe" } email { generate(:email) } end factory :skill do user { users(:john) } end factory :preload do name { "My Preload" } end factory :asset, class: "Models:...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/app/app/models/category.rb
spec/support/app/app/models/category.rb
# frozen_string_literal: true class Category < ActiveRecord::Base has_and_belongs_to_many :users end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/app/app/models/skill.rb
spec/support/app/app/models/skill.rb
# frozen_string_literal: true class Skill < ActiveRecord::Base belongs_to :user end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/app/app/models/preload.rb
spec/support/app/app/models/preload.rb
# frozen_string_literal: true class Preload < ActiveRecord::Base end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/app/app/models/user.rb
spec/support/app/app/models/user.rb
# frozen_string_literal: true class User < ActiveRecord::Base has_many :skills has_and_belongs_to_many :categories end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/app/app/models/models/asset.rb
spec/support/app/app/models/models/asset.rb
# frozen_string_literal: true module Models class Asset < ActiveRecord::Base end end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/support/app/db/schema.rb
spec/support/app/db/schema.rb
# frozen_string_literal: true ActiveRecord::Schema.define(version: 0) do begin drop_table :users if table_exists?(:users) drop_table :skills if table_exists?(:skills) drop_table :preloads if table_exists?(:preloads) drop_table :categories if table_exists?(:categories) drop_table :categories_users...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/spec/factory_bot/preload_spec.rb
spec/factory_bot/preload_spec.rb
# frozen_string_literal: true require "spec_helper" describe FactoryBot::Preload do it "queues preloader block" do block = proc { } FactoryBot.preload(&block) expect(FactoryBot::Preload.preloaders).to include(block) end it "should lazy load all factories, loading only when used" do expect(Facto...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/lib/factory_bot/preload.rb
lib/factory_bot/preload.rb
# frozen_string_literal: true require "factory_bot" require "active_record" module FactoryBot module Preload class << self attr_accessor :preloaders, :factories, :record_ids, :clean_with, :default_helper_name, :helper_name, :reserved_tables end self.preloaders = [] self.fa...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/lib/factory_bot/preload/version.rb
lib/factory_bot/preload/version.rb
# frozen_string_literal: true module FactoryBot module Preload module Version MAJOR = 0 MINOR = 3 PATCH = 1 STRING = "#{MAJOR}.#{MINOR}.#{PATCH}" end end end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/lib/factory_bot/preload/helpers.rb
lib/factory_bot/preload/helpers.rb
# frozen_string_literal: true module FactoryBot module Preload module Helpers include ::FactoryBot::Syntax::Methods def self.load_models return unless defined?(Rails) models_path = Rails.application.root.join("app/models/**/*.rb") Dir[models_path].sort.each do |file| ...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/lib/factory_bot/preload/minitest.rb
lib/factory_bot/preload/minitest.rb
# frozen_string_literal: true require "minitest" require "factory_bot/syntax/methods" module FactoryBot module Preload def self.minitest FactoryBot::Preload::Helpers.load_models FactoryBot::Preload.clean FactoryBot::Preload.run end module MinitestSetup def setup FactoryB...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/lib/factory_bot/preload/rspec.rb
lib/factory_bot/preload/rspec.rb
# frozen_string_literal: true require "rspec/core" require "factory_bot/syntax/methods" RSpec.configure do |config| config.include FactoryBot::Preload::Helpers config.before(:suite) do FactoryBot::Preload.clean FactoryBot::Preload.run end config.before(:each) do FactoryBot::Preload.reload_factor...
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
fnando/factory_bot-preload
https://github.com/fnando/factory_bot-preload/blob/e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb/lib/factory_bot/preload/extension.rb
lib/factory_bot/preload/extension.rb
# frozen_string_literal: true module FactoryBot def self.preload(&block) Preload.preloaders << block end module Syntax module Default class DSL def preload(&block) ::FactoryBot.preload(&block) end end end end end
ruby
MIT
e94a0ef8e2ffacff5de753efdc0a3b6f8f1a3acb
2026-01-04T17:45:31.138848Z
false
soffes/unmarkdown
https://github.com/soffes/unmarkdown/blob/201a7df1e45a9ea071073d28e2f75efdf67d1413/test/unmarkdown_test.rb
test/unmarkdown_test.rb
require 'test_helper' module Unmarkdown class UnmarkdownTest < Test def test_that_it_parses refute_nil Unmarkdown.parse('foo') end end end
ruby
MIT
201a7df1e45a9ea071073d28e2f75efdf67d1413
2026-01-04T17:45:32.739897Z
false
soffes/unmarkdown
https://github.com/soffes/unmarkdown/blob/201a7df1e45a9ea071073d28e2f75efdf67d1413/test/test_helper.rb
test/test_helper.rb
require 'rubygems' require 'bundler' Bundler.require :test if ENV['COVERAGE'] require 'simplecov' SimpleCov.start end require 'minitest/autorun' require 'unmarkdown' # Support files Dir["#{File.expand_path(File.dirname(__FILE__))}/support/*.rb"].each do |file| require file end class Unmarkdown::Test < MiniTes...
ruby
MIT
201a7df1e45a9ea071073d28e2f75efdf67d1413
2026-01-04T17:45:32.739897Z
false
soffes/unmarkdown
https://github.com/soffes/unmarkdown/blob/201a7df1e45a9ea071073d28e2f75efdf67d1413/test/parser_test.rb
test/parser_test.rb
require 'test_helper' class ParserTest < Unmarkdown::Test include Unmarkdown def test_headers 6.times do |i| i += 1 html = "<h#{i}>Header</h#{i}>" markdown = '' i.times { markdown << '#' } markdown << ' Header' assert_equal markdown, parse(html) end html = '<h1>S...
ruby
MIT
201a7df1e45a9ea071073d28e2f75efdf67d1413
2026-01-04T17:45:32.739897Z
false
soffes/unmarkdown
https://github.com/soffes/unmarkdown/blob/201a7df1e45a9ea071073d28e2f75efdf67d1413/lib/unmarkdown.rb
lib/unmarkdown.rb
require 'unmarkdown/version' require 'unmarkdown/parser' module Unmarkdown module_function # Takes an HTML string and returns a Markdown string def parse(html, options = {}) Parser.new(html, options).parse end end
ruby
MIT
201a7df1e45a9ea071073d28e2f75efdf67d1413
2026-01-04T17:45:32.739897Z
false
soffes/unmarkdown
https://github.com/soffes/unmarkdown/blob/201a7df1e45a9ea071073d28e2f75efdf67d1413/lib/unmarkdown/version.rb
lib/unmarkdown/version.rb
module Unmarkdown VERSION = '0.2.0' end
ruby
MIT
201a7df1e45a9ea071073d28e2f75efdf67d1413
2026-01-04T17:45:32.739897Z
false
soffes/unmarkdown
https://github.com/soffes/unmarkdown/blob/201a7df1e45a9ea071073d28e2f75efdf67d1413/lib/unmarkdown/parser.rb
lib/unmarkdown/parser.rb
require 'nokogiri' module Unmarkdown class Parser BLOCK_ELEMENT_NAMES = %w{h1 h2 h3 h4 h5 h6 blockquote pre hr ul ol li p div}.freeze AUTOLINK_URL_REGEX = /((?:https?|ftp):[^'"\s]+)/i.freeze AUTOLINK_EMAIL_REGEX = %r{([-.\w]+\@[-a-z0-9]+(?:\.[-a-z0-9]+)*\.[a-z]+)}i.freeze def initialize(html, option...
ruby
MIT
201a7df1e45a9ea071073d28e2f75efdf67d1413
2026-01-04T17:45:32.739897Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/spec_helper.rb
spec/spec_helper.rb
require "rubygems" require "bundler" Bundler.setup(:default, :development) unless ENV["NO_ACTIVERECORD"] require "simplecov" SimpleCov.configure do load_profile "root_filter" load_profile "test_frameworks" end ENV["COVERAGE"] && SimpleCov.start do add_filter "/.rvm/" end end $LOAD_PATH.unshift...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/version_spec.rb
spec/plsql/version_spec.rb
require "spec_helper" describe "Version" do it "should return ruby-plsql version" do expect(PLSQL::VERSION).to eq(File.read(File.dirname(__FILE__) + "/../../VERSION").chomp) end end
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/view_spec.rb
spec/plsql/view_spec.rb
require "spec_helper" describe "View" do before(:all) do plsql.connect! CONNECTION_PARAMS plsql.connection.autocommit = false plsql.execute <<-SQL CREATE TABLE test_employees ( employee_id NUMBER(15) NOT NULL, first_name VARCHAR2(50), last_name VARCHAR2(50), ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/package_spec.rb
spec/plsql/package_spec.rb
require "spec_helper" describe "Package" do before(:all) do plsql.connection = get_connection plsql.execute <<-SQL CREATE OR REPLACE PACKAGE test_package IS test_variable NUMBER; FUNCTION test_procedure ( p_string VARCHAR2 ) RETURN VARCHAR2; END; SQL plsql.execut...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/sql_statements_spec.rb
spec/plsql/sql_statements_spec.rb
require "spec_helper" describe "SQL statements /" do before(:all) do plsql.connect! CONNECTION_PARAMS plsql.connection.autocommit = false end after(:all) do plsql.logoff end after(:each) do plsql.rollback end describe "SELECT" do before(:all) do plsql.execute "DROP TABLE test...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/type_spec.rb
spec/plsql/type_spec.rb
require "spec_helper" describe "Type" do before(:all) do plsql.connection = get_connection plsql.execute "DROP TYPE t_employee" rescue nil plsql.execute "DROP TYPE t_phones" rescue nil plsql.execute "DROP TYPE t_phone" rescue nil plsql.execute <<-SQL CREATE OR REPLACE TYPE t_address AS OBJE...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/procedure_spec.rb
spec/plsql/procedure_spec.rb
# encoding: utf-8 require "spec_helper" describe "Parameter type mapping /" do shared_examples "Function with string parameters" do |datatype| before(:all) do plsql.connect! CONNECTION_PARAMS plsql.execute <<-SQL CREATE OR REPLACE FUNCTION test_uppercase ( p_string #{datatype} ) ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
true
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/schema_spec.rb
spec/plsql/schema_spec.rb
require "spec_helper" describe "Schema" do it "should create Schema object" do expect(plsql.class).to eq(PLSQL::Schema) end end describe "Schema connection" do before(:each) do @conn = get_connection end after(:each) do unless defined? JRUBY_VERSION @conn.logoff else @conn.cl...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/table_spec.rb
spec/plsql/table_spec.rb
require "spec_helper" describe "Table" do before(:all) do plsql.connect! CONNECTION_PARAMS plsql.connection.autocommit = false plsql.execute <<-SQL CREATE TABLE test_employees ( employee_id NUMBER(15) NOT NULL, first_name VARCHAR2(50), last_name VARCHAR(50), ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/variable_spec.rb
spec/plsql/variable_spec.rb
# encoding: utf-8 require "spec_helper" describe "Package variables /" do describe "String" do before(:all) do plsql.connect! CONNECTION_PARAMS plsql.execute <<-SQL CREATE OR REPLACE PACKAGE test_package IS varchar2_variable VARCHAR2(50); varchar2_variable2 VARCHAR2(50);...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/connection_spec.rb
spec/plsql/connection_spec.rb
# encoding: utf-8 require "spec_helper" describe "Connection" do before(:all) do @raw_conn = get_connection @conn = PLSQL::Connection.create(@raw_conn) end after(:all) do unless defined?(JRuby) @raw_conn.logoff rescue nil else @raw_conn.close rescue nil end end describe "c...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/plsql/sequence_spec.rb
spec/plsql/sequence_spec.rb
require "spec_helper" describe "Table" do before(:all) do plsql.connection = get_connection plsql.connection.autocommit = false plsql.execute "CREATE SEQUENCE test_employees_seq" end after(:all) do plsql.execute "DROP SEQUENCE test_employees_seq" plsql.logoff end after(:each) do pls...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/spec/support/test_db.rb
spec/support/test_db.rb
class TestDb DATABASE_USERS = %w{hr arunit} def self.build db = self.new db.cleanup_database_users db.create_user_tablespace db.setup_database_users db.connection.logoff end def self.database_version db = self.new db.database_version end def connection unless defined?(@con...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/ruby_plsql.rb
lib/ruby_plsql.rb
require "time" require "date" require "bigdecimal" %w(connection sql_statements schema procedure procedure_call package variable table view sequence type version helpers).each do |file| require "plsql/#{file}" end unless defined?(JRUBY_VERSION) require "plsql/oci_connection" else require "plsql/jdbc_connection"...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/ruby-plsql.rb
lib/ruby-plsql.rb
require "ruby_plsql"
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/sql_statements.rb
lib/plsql/sql_statements.rb
module PLSQL module SQLStatements # Select first row as array or values (without column names) def select_first(sql, *bindvars) @connection.select_first(sql, *bindvars) end # Select all rows as array or values (without column names) def select_all(sql, *bindvars, &block) @connection.s...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/table.rb
lib/plsql/table.rb
module PLSQL module TableClassMethods #:nodoc: def find(schema, table) if schema.select_first( "SELECT table_name FROM all_tables WHERE owner = :owner AND table_name = :table_name", schema.schema_name, table.to_s.upcase) new(schema, table) # search for syn...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/version.rb
lib/plsql/version.rb
module PLSQL #:nodoc: VERSION = File.read(File.dirname(__FILE__) + "/../../VERSION").chomp end
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/type.rb
lib/plsql/type.rb
module PLSQL module TypeClassMethods #:nodoc: def find(schema, type) if schema.select_first( "SELECT type_name FROM all_types WHERE owner = :owner AND type_name = :table_name", schema.schema_name, type.to_s.upcase) new(schema, type) # search for synonym ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/package.rb
lib/plsql/package.rb
module PLSQL module PackageClassMethods #:nodoc: def find(schema, package) package_name = package.to_s.upcase find_in_schema(schema, package_name) || find_by_synonym(schema, package_name) end def find_in_schema(schema, package_name) row = schema.select_first(<<-SQL, schema.schema_name, ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/view.rb
lib/plsql/view.rb
module PLSQL module ViewClassMethods #:nodoc: def find(schema, view) if schema.select_first( "SELECT view_name FROM all_views WHERE owner = :owner AND view_name = :view_name", schema.schema_name, view.to_s.upcase) new(schema, view) # search for synonym ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/oci_connection.rb
lib/plsql/oci_connection.rb
begin require "oci8" rescue LoadError # OCI8 driver is unavailable. msg = $!.to_s if /-- oci8$/ =~ msg # ruby-oci8 is not installed. # MRI <= 1.9.2, Rubinius, JRuby: # no such file to load -- oci8 # MRI >= 1.9.3: # cannot load such file -- oci8 msg = "Please install ruby-oci8 gem." ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/sequence.rb
lib/plsql/sequence.rb
module PLSQL module SequenceClassMethods #:nodoc: def find(schema, sequence) if schema.select_first( "SELECT sequence_name FROM all_sequences WHERE sequence_owner = :owner AND sequence_name = :sequence_name", schema.schema_name, sequence.to_s.upcase) new(schema,...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/helpers.rb
lib/plsql/helpers.rb
module PLSQL #:nodoc: module ArrayHelpers #:nodoc: def self.to_hash(keys, values) #:nodoc: (0...keys.size).inject({}) { |hash, i| hash[keys[i]] = values[i]; hash } end end end
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/procedure_call.rb
lib/plsql/procedure_call.rb
module PLSQL class ProcedureCall #:nodoc: def initialize(procedure, args = [], options = {}) @procedure = procedure @schema = @procedure.schema @dbms_output_stream = @schema.dbms_output_stream @skip_self = options[:skip_self] @self = options[:self] if args.size == 1 && args[0]...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/connection.rb
lib/plsql/connection.rb
module PLSQL class Connection attr_reader :raw_driver attr_reader :activerecord_class def initialize(raw_conn, ar_class = nil) #:nodoc: @raw_driver = self.class.driver_type @raw_connection = raw_conn @activerecord_class = ar_class end def self.create(raw_conn, ar_class = nil) #...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/oci8_patches.rb
lib/plsql/oci8_patches.rb
# apply TIMESTAMP fractional seconds patch to ruby-oci8 2.0.3 # see http://rubyforge.org/forum/forum.php?thread_id=46576&forum_id=1078 if OCI8::VERSION == "2.0.3" && !OCI8::BindType::Util.method_defined?(:datetime_to_array_without_timestamp_patch) OCI8::BindType::Util.module_eval do alias :datetime_to_array_wi...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/jdbc_connection.rb
lib/plsql/jdbc_connection.rb
begin require "java" require "jruby" # ojdbc6.jar or ojdbc5.jar file should be in JRUBY_HOME/lib or should be in ENV['PATH'] or load path java_version = java.lang.System.getProperty("java.version") ojdbc_jars = if java_version =~ /^1.5/ %w(ojdbc5.jar) elsif java_version =~ /^1.6/ %w(ojdbc6.jar) ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/variable.rb
lib/plsql/variable.rb
module PLSQL module VariableClassMethods #:nodoc: def find(schema, variable, package, override_schema_name = nil) variable_upcase = variable.to_s.upcase schema.select_all( "SELECT text FROM all_source WHERE owner = :owner AND name = :object_name AND type = 'PACKAGE'...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/schema.rb
lib/plsql/schema.rb
module PLSQL class Schema include SQLStatements @@schemas = {} class <<self def find_or_new(connection_alias) #:nodoc: connection_alias ||= :default if @@schemas[connection_alias] @@schemas[connection_alias] else @@schemas[connection_alias] = self.new ...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
rsim/ruby-plsql
https://github.com/rsim/ruby-plsql/blob/7bee9ba2b3207de7c1ae4112d8af2636b586c610/lib/plsql/procedure.rb
lib/plsql/procedure.rb
module PLSQL module ProcedureClassMethods #:nodoc: def find(schema, procedure, package = nil, override_schema_name = nil) if package.nil? if (row = schema.select_first( "SELECT #{procedure_object_id_src(schema)}.object_id FROM all_procedures p, all_objects o WHERE p.own...
ruby
MIT
7bee9ba2b3207de7c1ae4112d8af2636b586c610
2026-01-04T17:45:33.227772Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry_spec.rb
spec/retry_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry do let(:strategy) { :constant } let(:options) { {} } let(:retry_instance) { described_class.new(strategy: strategy, **options) } let(:job) do Class.new(ActiveJob::Base) do def perform(*_args) raise RuntimeErr...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true require 'active_job/retry' require 'rspec/its' ActiveJob::Base.queue_adapter = :test RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| moc...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry/exponential_options_validator_spec.rb
spec/retry/exponential_options_validator_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::ExponentialOptionsValidator do let(:validator) { described_class.new(options) } subject(:validate!) { -> { validator.validate! } } context 'valid options' do context 'unlimited retries' do let(:options) { { limit: ni...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry/constant_options_validator_spec.rb
spec/retry/constant_options_validator_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::ConstantOptionsValidator do let(:validator) { described_class.new(options) } subject(:validate!) { -> { validator.validate! } } context 'valid options' do context 'unlimited retries' do let(:options) { { limit: nil, ...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry/constant_backoff_strategy_spec.rb
spec/retry/constant_backoff_strategy_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::ConstantBackoffStrategy do let(:strategy) { described_class.new(options) } describe '#should_retry?' do subject { strategy.should_retry?(attempt, exception) } let(:attempt) { 1 } let(:exception) { RuntimeError.new } ...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry/variable_backoff_strategy_spec.rb
spec/retry/variable_backoff_strategy_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::VariableBackoffStrategy do let(:backoff_strategy) { described_class.new(options) } describe '#should_retry?' do subject { backoff_strategy.should_retry?(attempt, exception) } let(:attempt) { 1 } let(:exception) { Run...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry/variable_options_validator_spec.rb
spec/retry/variable_options_validator_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::VariableOptionsValidator do let(:validator) { described_class.new(options) } subject(:validate!) { -> { validator.validate! } } context 'valid options' do context 'empty delays' do let(:options) { { delays: [] } } ...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/spec/retry/exponential_backoff_strategy_spec.rb
spec/retry/exponential_backoff_strategy_spec.rb
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::ExponentialBackoffStrategy do let(:strategy) { described_class.new(options) } describe '#should_retry?' do subject { strategy.should_retry?(attempt, exception) } let(:attempt) { 1 } let(:exception) { RuntimeError.new...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/activejob/retry.rb
lib/activejob/retry.rb
# frozen_string_literal: true require 'active_job/retry'
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry.rb
lib/active_job/retry.rb
# frozen_string_literal: true require 'active_job' require 'active_support' require 'active_support/core_ext' # ActiveJob uses core exts, but doesn't require it require 'active_job/retry/version' require 'active_job/retry/errors' require 'active_job/retry/strategy' unless ActiveJob::Base.method_defined?(:deserialize)...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/version.rb
lib/active_job/retry/version.rb
# frozen_string_literal: true module ActiveJob class Retry < Module VERSION = '0.6.3' end end
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/errors.rb
lib/active_job/retry/errors.rb
# frozen_string_literal: true module ActiveJob class Retry < Module class InvalidConfigurationError < StandardError; end class UnsupportedAdapterError < StandardError; end end end
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/strategy.rb
lib/active_job/retry/strategy.rb
# frozen_string_literal: true require 'active_job/retry/constant_backoff_strategy' require 'active_job/retry/variable_backoff_strategy' require 'active_job/retry/exponential_backoff_strategy' module ActiveJob class Retry < Module module Strategy def self.choose(strategy, options) case strategy ...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/variable_backoff_strategy.rb
lib/active_job/retry/variable_backoff_strategy.rb
# frozen_string_literal: true require 'active_job/retry/constant_backoff_strategy' require 'active_job/retry/variable_options_validator' module ActiveJob class Retry < Module class VariableBackoffStrategy < ConstantBackoffStrategy def initialize(options) super(options) VariableOptionsValid...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/constant_backoff_strategy.rb
lib/active_job/retry/constant_backoff_strategy.rb
# frozen_string_literal: true require 'active_job/retry/constant_options_validator' module ActiveJob class Retry < Module class ConstantBackoffStrategy def initialize(options) ConstantOptionsValidator.new(options).validate! @retry_limit = options.fetch(:limit, 1) @retry_de...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/constant_options_validator.rb
lib/active_job/retry/constant_options_validator.rb
# frozen_string_literal: true require 'active_job/retry/errors' module ActiveJob class Retry < Module class ConstantOptionsValidator def initialize(options) @options = options end def validate! validate_limit_numericality! validate_infinite_limit! validate_dela...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/variable_options_validator.rb
lib/active_job/retry/variable_options_validator.rb
# frozen_string_literal: true require 'active_job/retry/errors' module ActiveJob class Retry < Module class VariableOptionsValidator DELAY_MULTIPLIER_KEYS = %i[min_delay_multiplier max_delay_multiplier].freeze def initialize(options) @options = options end def validate! ...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/exponential_backoff_strategy.rb
lib/active_job/retry/exponential_backoff_strategy.rb
# frozen_string_literal: true require 'active_job/retry/exponential_options_validator' module ActiveJob class Retry < Module class ExponentialBackoffStrategy < ConstantBackoffStrategy def initialize(options) ExponentialOptionsValidator.new(options).validate! @retry_limit = options...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/deserialize_monkey_patch.rb
lib/active_job/retry/deserialize_monkey_patch.rb
# frozen_string_literal: true # In Rails 4.2, ActiveJob externally applies deserialized job ID, queue name, arguments to # the instantiated job in `ActiveJob::Base.deserialize`, which cannot be overridden in # subclasses. https://github.com/rails/rails/pull/18260 changes this to delegate as much # of the deserializati...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
isaacseymour/activejob-retry
https://github.com/isaacseymour/activejob-retry/blob/06045dd843e51bb8f0d91058f9f9874f033f3407/lib/active_job/retry/exponential_options_validator.rb
lib/active_job/retry/exponential_options_validator.rb
# frozen_string_literal: true require 'active_job/retry/errors' module ActiveJob class Retry < Module class ExponentialOptionsValidator def initialize(options) @options = options end def validate! validate_limit_numericality! validate_infinite_limit! validate_d...
ruby
MIT
06045dd843e51bb8f0d91058f9f9874f033f3407
2026-01-04T17:45:33.653067Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/tasks/ken.rb
tasks/ken.rb
# desc "Explaining what the task does" # task :ken do # # Task goes here # end
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/tasks/spec.rb
tasks/spec.rb
begin gem 'rspec', '~>1.1.12' require 'spec' require 'spec/rake/spectask' task :default => [ :spec ] desc 'Run specifications' Spec::Rake::SpecTask.new(:spec) do |t| t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts') t.spec_files = Pathname.glob((ROOT + 'spec/**/*_spe...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/rails/init.rb
rails/init.rb
# when used as a rails plugin require 'ken'
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/test_helper.rb
test/test_helper.rb
require 'rubygems' require 'test/unit' require 'shoulda' require 'pathname' require 'json' require 'matchy' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) TEST_ROOT = Pathname(__FILE__).dirname.expand_path require TEST_ROOT.parent + 'lib/ken' def load_fi...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/integration/ken_test.rb
test/integration/ken_test.rb
require 'test_helper' class KenTest < Test::Unit::TestCase context "Ken.get" do setup do Ken::Session.new('http://www.freebase.com', 'ma', 'xxxxx') end should 'return a Ken::Resource' do the_police = Ken.get("/en/the_police") the_police.should be_kind_of(Ken::Resource) end ...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/unit/session_test.rb
test/unit/session_test.rb
require 'test_helper' class SessionTest < Test::Unit::TestCase context "A Session instance" do setup do # Ken::Logger.new(STDOUT, :info) Ken::Session.new('http://www.freebase.com', 'ma', 'xxxxx') end should 'return the correct set of types' do result = Ken.session.mqlread({:id => "...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/unit/resource_test.rb
test/unit/resource_test.rb
require 'test_helper' class ResourceTest < Test::Unit::TestCase context "A Resource instance" do setup do data = load_fixture('the_police') @the_police = Ken::Resource.new(data) end should "have types" do @the_police.should have(6).types @the_police.types.first.should be_kind_o...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/unit/type_test.rb
test/unit/type_test.rb
require 'test_helper' class TypeTest < Test::Unit::TestCase context "A Session instance" do setup do data = load_fixture('the_police') @type = Ken::Resource.new(data).types.first end should 'have an id and a name' do @type.id.should be_kind_of(String) @type.name.should be_kind_...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/unit/attribute_test.rb
test/unit/attribute_test.rb
require 'test_helper' class AttributeTest < Test::Unit::TestCase context "An Attribute instance" do setup do data = load_fixture('the_police') @the_police = Ken::Resource.new(data) @attribute = @unique_value_attribute = @the_police.views[0].active_start @unique_object_attribute = @...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false
michael/ken-rb
https://github.com/michael/ken-rb/blob/b77ce234e5ff389da433c658d5988d146a2d8be8/test/unit/topic_test.rb
test/unit/topic_test.rb
require 'test_helper' class TopicTest < Test::Unit::TestCase context "A Topic instance" do setup do data = load_fixture('the_police_topic') @the_police = Ken::Topic.new(data) end should "have an id" do @the_police.id.should == "/en/the_police" end should "have aliases"...
ruby
MIT
b77ce234e5ff389da433c658d5988d146a2d8be8
2026-01-04T17:45:38.274680Z
false