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 |
|---|---|---|---|---|---|---|---|---|
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/lib/tasks/profile.rb | lib/tasks/profile.rb | def update_profile
User.find_each do |user|
next if user.profile
profile = Profile.new
profile.user = user
profile.user_group = user.user_group
profile.library = user.library
profile.required_role = user.required_role
profile.user_number = user.user_number
profile.keyword_list = user.k... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/lib/tasks/reserve.rb | lib/tasks/reserve.rb | def update_reserve
Reserve.find_each do |reserve|
ReserveTransition.first_or_create(reserve_id: 1, sort_key: 0, to_state: reserve.state)
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/lib/tasks/agent_type.rb | lib/tasks/agent_type.rb | def update_agent_type
agent_types = YAML.safe_load(open("db/fixtures/enju_biblio/agent_types.yml").read)
agent_types.each do |line|
l = line[1].select! { |k, v| %w(name display_name note).include?(k) }
case l["name"]
when "person"
agent_type = AgentType.where(name: "Person").first
agent_typ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/lib/enju_leaf/version.rb | lib/enju_leaf/version.rb | # frozen_string_literal: true
module EnjuLeaf
VERSION = "1.6.0".freeze
module Version
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/application.rb | config/application.rb | require_relative "boot"
require "rails/all"
require 'csv'
require 'nkf'
require 'rss'
require_relative '../lib/enju_leaf/version'
require_relative '../lib/openurl'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module E... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/environment.rb | config/environment.rb | # Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/puma.rb | config/puma.rb | # This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
# Puma starts a configurable number of processes (workers) and each process
# serves... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/routes.rb | config/routes.rb | Rails.application.routes.draw do
authenticate :user, lambda {|u| u.role.try(:name) == 'Administrator' } do
mount MissionControl::Jobs::Engine, at: "/jobs"
end
resources :manifestations
resources :items
resources :picture_files do
get :download
end
resources :agents
resources :manifestation_relat... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/spring.rb | config/spring.rb | Spring.watch(
".ruby-version",
".rbenv-vars",
"tmp/restart.txt",
"tmp/caching-dev.txt"
)
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/sitemap.rb | config/sitemap.rb | # Set the host name for URL creation
SitemapGenerator::Sitemap.default_host = URI.parse(ENV['ENJU_LEAF_BASE_URL']).to_s
SitemapGenerator::Sitemap.create do
# Put links creation logic here.
#
# The root path '/' and sitemap index file are added automatically for you.
# Links are added to the Sitemap in the orde... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/boot.rb | config/boot.rb | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/content_security_policy.rb | config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
# Rails.application.configure do
# config.content_security... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/filter_parameter_logging.rb | config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behavio... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/application_controller_renderer.rb | config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/statesman.rb | config/initializers/statesman.rb | Statesman.configure do
storage_adapter(Statesman::Adapters::ActiveRecord)
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/devise.rb | config/initializers/devise.rb | # frozen_string_literal: true
# Assuming you have not yet modified this file, each configuration option below
# is set to its default value. Note that some are commented out while others
# are not: uncommented lines are intended to protect your configuration from
# breaking changes in upgrades (i.e., in the event that... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/new_framework_defaults_7_2.rb | config/initializers/new_framework_defaults_7_2.rb | # Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.2 framework defaults upgrade.
#
# Uncomment each configuration one by one to switch to the new default.
# Once your application is ready to run with all new defaults, you can remove
# this file and set the `config.load_defaults... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/wrap_parameters.rb | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/string.rb | config/initializers/string.rb | require 'localized_name'
require 'bookmark_url'
class String
include LocalizedName
include BookmarkUrl
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/permissions_policy.rb | config/initializers/permissions_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide HTTP permissions policy. For further
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
# Rails.application.config.permissions_policy do |policy|
# policy.camera :none
# policy.gyroscope ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/assets.rb | config/initializers/assets.rb | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
Rails.application.config... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
# You can also remove all the silencers if you're trying to debug a ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
Mime::Type.register "application/octet-stream", :download
Mime::Type.register "application/xml", :mods
Mime::Type.register "application/rdf+xml", :rdf
Mime::Type... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/environments/test.rb | config/environments/test.rb | require "active_support/core_ext/integer/time"
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data the... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/environments/development.rb | config/environments/development.rb | require "active_support/core_ext/integer/time"
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 any time
# it changes. This slows down response time but is perfect for developme... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/config/environments/production.rb | config/environments/production.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.enable_reloading = false
# Eager load code on boot. This eager loads most of Rails and
# your app... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/diweektest.rb | test/diweektest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for DIWeek class
# Author:: Matthew Lipper
class DIWeekTest < BaseExpressionTest
def test_day_in_week_te
expr = DIWeek.new(Friday)
assert expr.include?(@date_20040109), "'Friday' should include #{@date_20040109} which is a Friday"
assert ex... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/beforetetest.rb | test/beforetetest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for BeforeTE class
# Author:: Matthew Lipper
class BeforeTETest < BaseExpressionTest
include TExpr
def test_include_inclusive
expr = BeforeTE.new(@pdate_20071030, true)
assert expr.include?(@date_20050101), "Should include an earlier date"
... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/minitest_helper.rb | test/minitest_helper.rb | $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'runt'
require 'date'
require 'time'
require 'rubygems' # Needed for minitest on 1.8.7
require 'minitest/autorun'
| ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/everytetest.rb | test/everytetest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for EveryTE class
# Author:: Matthew Lipper
class EveryTETest < BaseExpressionTest
def test_every_other_week
date = @pdate_20081112
expr = EveryTE.new(date, 14, DPrecision::DAY)
assert !expr.include?(date + 7)
assert expr.include?(date ... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/sugartest.rb | test/sugartest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
class SugarTest < MiniTest::Unit::TestCase
include Runt
def setup
@date = PDate.day(2008,7,1)
end
def test_method_missing_should_be_called_for_invalid_name
begin
self.some_tuesday
rescue NoMethodError
# YAY!
end
end
def test_cons... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/test_runt.rb | test/test_runt.rb | require 'minitest_helper'
class TestRunt < MiniTest::Unit::TestCase
def test_that_it_has_a_version_number
refute_nil ::Runt::VERSION
end
def test_it_does_something_useful
#assert false
end
end
| ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/pdatetest.rb | test/pdatetest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
# Unit tests for PDate class
# Author:: Matthew Lipper
class PDateTest < MiniTest::Unit::TestCase
include Runt
def setup
# 2010 (August - ignored)
@year_prec = PDate.year(2010,8)
#August, 2004
@month_prec = PDate.month(2004,8)
#January 25th, 2004... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/icalendartest.rb | test/icalendartest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
# RFC 2445 is the iCalendar specification. It includes dozens of
# specific examples that make great tests for Runt temporal expressions.
class ICalendarTest < MiniTest::Unit::TestCase
include Runt
# "Daily for 10 occurences"
def test_example_1
start_date = D... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | true |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/reweektest.rb | test/reweektest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for REWeek class
# Author:: Matthew Lipper
class REWeekTest < BaseExpressionTest
def test_invalid_ctor_arg
assert_raises(ArgumentError,"Expected ArgumentError for invalid day of week ordinal"){ REWeek.new(10,4) }
end
def test_monday_thru_frid... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/dprecisiontest.rb | test/dprecisiontest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
# Unit tests for DPrecision class
#
# Author:: Matthew Lipper
class DPrecisionTest < MiniTest::Unit::TestCase
include Runt
def test_comparable
assert(DPrecision::YEAR<DPrecision::MONTH, "DPrecision.year was not less than DPrecision.month")
assert(DPrecision... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/remonthtest.rb | test/remonthtest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for REMonth class
# Author:: Matthew Lipper
class REMonthTest < BaseExpressionTest
def test_20th_thru_29th_of_every_month
expr = REMonth.new(20,29)
assert expr.include?(@date_20050123), "Expression #{expr.to_s} should include #{@date_20050123.to... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/dimonthtest.rb | test/dimonthtest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for DIMonth class
# Author:: Matthew Lipper
class DIMonthTest < BaseExpressionTest
def setup
super
@date_range = @date_20050101..@date_20051231
end
###
# Dates functionality & tests contributed by Emmett Shear
###
def test_dates_mixin... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/combinedexpressionstest.rb | test/combinedexpressionstest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for composite temporal expressions
# Author:: Matthew Lipper
class CombinedExpressionTest < BaseExpressionTest
def test_dates_on_last_fri_or_first_tues
date_range = @date_20050101..@date_20051231
expr = DIMonth.new(Last, Friday) | DIMonth.new(F... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/reyeartest.rb | test/reyeartest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for REYear class
# Author:: Matthew Lipper
class REYearTest < BaseExpressionTest
def test_ctor_one_arg
expr = REYear.new(11)
assert expr.start_month == 11, "Start month should equal 11"
assert expr.end_month == 11, "End month should equal 1... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/yeartetest.rb | test/yeartetest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for YearTE class
# Author:: Matthew Lipper
class YearTETest < BaseExpressionTest
def test_2006
expr = YearTE.new(2006)
assert expr.include?(@pdate_20060914), "Expression #{expr.to_s} should include #{@pdate_20060914}"
assert !expr.include?(... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/daterangetest.rb | test/daterangetest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
# Unit tests for DateRange class
#
# Author:: Matthew Lipper
class DateRangeTest < MiniTest::Unit::TestCase
include Runt
def test_sub_range
r_start = PDate.min(2004,2,29,16,24)
r_end = PDate.min(2004,3,2,4,22)
range = DateRange.new(r_start,r_end)
ass... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/collectiontest.rb | test/collectiontest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for Collection class
# Author:: Matthew Lipper
class CollectionTest < BaseExpressionTest
def setup
super
@expr = Collection.new
end
def test_initialize
assert !@expr.expressions.nil?, "Newly created Collection should have a non-nil @ex... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/weekintervaltest.rb | test/weekintervaltest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
class WeekIntervalTest < BaseExpressionTest
def test_every_other_week
expr = WeekInterval.new(Date.new(2013,4,23),2)
good_dates = [Date.new(2013,4,21), Date.new(2013,4,27),Date.new(2013,5,8)]
good_dates.each do |date|
assert(expr.include?(date),"Expr<#{expr... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/baseexpressiontest.rb | test/baseexpressiontest.rb | #!/usr/bin/env ruby
require 'minitest_helper.rb'
$DEBUG=false
# Base test case for refactored temporal expression unit tests
# Author:: Matthew Lipper
class BaseExpressionTest < MiniTest::Unit::TestCase
include Runt
include DPrecision
def setup
@stub1 = StubExpression.new(false, "stub 1", false)
@st... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/difftest.rb | test/difftest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for Diff class
# Author:: Matthew Lipper
class DiffTest < BaseExpressionTest
def setup
super
@diff = Diff.new(@stub1, @stub2)
@date = @pdate_20071008
end
def test_initialize
assert_same @stub1, @diff.expr1, "Expected #{@stub1} inst... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/intersecttest.rb | test/intersecttest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for Intersect class
# Author:: Matthew Lipper
class IntersectTest < BaseExpressionTest
def setup
super
@intersect = Intersect.new
@date = @pdate_20071008
end
def test_to_s
assert_equal 'empty', @intersect.to_s
@intersect.add(@s... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/scheduletest.rb | test/scheduletest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
# Unit tests for Schedule classes
# Author:: Matthew Lipper
class ScheduleTest < MiniTest::Unit::TestCase
include Runt
def setup
# Jane is very busy these days.
@sched=Schedule.new
# Elmo's World is on TV: Mon-Fri 8am-8:30am
@elmo=Event.new("Elmo's W... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/uniontest.rb | test/uniontest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for Union class
# Author:: Matthew Lipper
class UnionTest < BaseExpressionTest
def setup
super
@union = Union.new
@date = @pdate_20071028
end
def test_include
assert !@union.include?(@date), "Empty Union instance should not include... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/runttest.rb | test/runttest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
class RuntModuleTest < MiniTest::Unit::TestCase
def test_last
assert Runt::Last == -1
end
def test_last_of
assert Runt::Last_of == -1
end
def test_second_to_last
assert Runt::Second_to_last == -2
end
def test_ordinals
#1.upto(31){ |n| put... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/aftertetest.rb | test/aftertetest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for AfterTE class
# Author:: Matthew Lipper
class AfterTETest < BaseExpressionTest
include TExpr
def test_include_inclusive
expr = AfterTE.new(@pdate_20071030, true)
assert !expr.include?(@date_20050101), "Should not include an earlier date"... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/expressionbuildertest.rb | test/expressionbuildertest.rb | #!/usr/bin/env ruby
require 'minitest_helper'
class ExpressionBuilderTest < MiniTest::Unit::TestCase
def setup
@builder = ExpressionBuilder.new
end
def test_define_should_instance_eval_a_block
@builder.define do
@ctx = "meow"
end
assert_equal "meow", @builder.ctx, "Expected instance vari... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/dayintervaltetest.rb | test/dayintervaltetest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for DayIntervalTE class
# Author:: Matthew Lipper
class DayIntervalTETest < BaseExpressionTest
def test_every_8_days
date = @date_20040116
# Match every 8 days
expr = DayIntervalTE.new(date, 8)
assert expr.include?(date + 8), "Expressi... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/wimonthtest.rb | test/wimonthtest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for WIMonth class
# Author:: Matthew Lipper
class WIMonthTest < BaseExpressionTest
def setup
super
@date_range = @date_20050101..@date_20050228
end
def test_second_week_in_month
expr = WIMonth.new(Second)
assert expr.include?(@pda... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/temporalrangetest.rb | test/temporalrangetest.rb |
#!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for TemporalRange class
# Author:: Matthew Lipper
class TemporalRangeTest < BaseExpressionTest
def test_include
rspec = TemporalRange.new(@stub1)
assert !rspec.include?("Any Object"), "Expression should not include any given argument"
@stu... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/temporaldatetest.rb | test/temporaldatetest.rb |
#!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for TemporalDate class
# Author:: Matthew Lipper
class TemporalDateTest < BaseExpressionTest
def setup
super
@spec = TemporalDate.new(@stub1)
end
def test_initialize
assert_same @stub1, @spec.date_expr, "Expected #{@stub1}, instead go... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/temporalexpressiontest.rb | test/temporalexpressiontest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for TExpr classes
# Author:: Matthew Lipper
class TExprTest < BaseExpressionTest
include TExpr
def test_include
assert !self.include?(true), "Default include? method should always return false"
end
def test_to_s
assert_equal self.to_s, ... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/test/redaytest.rb | test/redaytest.rb | #!/usr/bin/env ruby
require 'baseexpressiontest'
# Unit tests for REDay class
# Author:: Matthew Lipper
class REDayTest < BaseExpressionTest
def test_noon_to_430
#noon to 4:30pm
expr = REDay.new(12,0,16,30)
assert expr.include?(@pdate_2012050815), "Expression #{expr.to_s} should include #{@pdate_2012... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/examples/schedule_tutorialtest.rb | examples/schedule_tutorialtest.rb | #!/usr/bin/ruby
require 'test/unit'
require 'runt'
require 'schedule_tutorial'
class ReminderTest < Test::Unit::TestCase
include Runt
def setup
@schedule = Schedule.new
@north_event = Event.new("north side of the street will be ticketed")
north_expr = (DIWeek.new(Mon) | DIWeek.new(Wed) | DIWeek.new(... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/examples/payment_reporttest.rb | examples/payment_reporttest.rb | #!/usr/bin/ruby
require 'test/unit'
require 'runt'
require 'payment_report'
class ReportTest < Test::Unit::TestCase
include Runt
def setup
@schedule = Schedule.new
# Gas payment on the first Wednesday of every month
@gas_payment = Payment.new("Gas", 234)
@gas_expr = DIMonth.new(First, Wednesday... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/examples/schedule_tutorial.rb | examples/schedule_tutorial.rb | #!/usr/bin/ruby
require 'runt'
class Reminder
TO = "me@myselfandi.com"
FROM = "reminder@daemon.net"
SUBJECT = "Move your car!"
TEXT = "Warning: "
attr_reader :schedule, :mail_server
def initialize(schedule,mail_server)
@schedule = schedule
@mail_server = mail_server
end
def run(date)
re... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/examples/reminder.rb | examples/reminder.rb | #!/usr/bin/ruby
# NOTE this is slightly broken; it is in the process of being fixed
base = File.basename(Dir.pwd)
if base == "examples" || base =~ /runt/
Dir.chdir("..") if base == "examples"
$LOAD_PATH.unshift(Dir.pwd + '/lib')
Dir.chdir("examples") if base =~ /runt/
end
require 'runt'
class Reminder
inc... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/examples/payment_report.rb | examples/payment_report.rb | #!/usr/bin/ruby
require 'runt'
class Report
attr_reader :schedule
def initialize(schedule)
@schedule = schedule
end
def list(range)
result = {}
range.each do |dt|
events = @schedule.events(dt)
result[dt]=events unless events.empty?
end
result
end
end
class Payment < Runt::... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt.rb | lib/runt.rb | #!/usr/bin/env ruby
# :title:Runt -- Ruby Temporal Expressions
#
# == Runt -- Ruby Temporal Expressions
#
# The usage and design patterns expressed in this library are mostly...*uhm*..
# <em>entirely</em>..*cough*...based on a series of
# <tt>articles</tt>[http://www.martinfowler.com] by Martin Fowler.
#
# It highly r... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/pdate.rb | lib/runt/pdate.rb | #!/usr/bin/env ruby
require 'date'
require 'runt'
module Runt
# :title:PDate
# == PDate
# Date and DateTime with explicit precision.
#
# Based the <tt>pattern</tt>[http://martinfowler.com/ap2/timePoint.html] by Martin Fowler.
#
#
# Author:: Matthew Lipper
class PDate < DateTime
include Comparabl... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/version.rb | lib/runt/version.rb | module Runt
VERSION = "0.9.0"
end
| ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/expressionbuilder.rb | lib/runt/expressionbuilder.rb | require 'runt'
# Convenience class for building temporal expressions in a more
# human-friendly way. Used in conjunction with shortcuts defined in the
# sugar.rb file, this allows one to create expressions like the following:
#
# b = ExpressionBuilder.new
# expr = b.define do
# occurs daily_8_30am_to_9_45am
# ... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/sugar.rb | lib/runt/sugar.rb | #!/usr/bin/env ruby
#
#
# == Overview
#
# This file provides an optional extension to the Runt module which
# provides convenient shortcuts for commonly used temporal expressions.
#
# Several methods for creating new temporal expression instances are added
# to a client class by including the Runt module.
#
# === ... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/daterange.rb | lib/runt/daterange.rb | #!/usr/bin/env ruby
require 'date'
require 'runt'
module Runt
# :title:DateRange
# == DateRange
#
#
# Based the <tt>range</tt>[http://martinfowler.com/ap2/range.html] pattern by Martin Fowler.
#
#
#
# Author:: Matthew Lipper
class DateRange < Range
include DPrecision
attr_reader :start_... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/dprecision.rb | lib/runt/dprecision.rb | #!/usr/bin/env ruby
require 'runt'
require 'date'
module Runt
# :title:DPrecision
# == DPrecision
# Module providing automatic precisioning of Date, DateTime, and PDate classes.
#
# Inspired by a <tt>pattern</tt>[http://martinfowler.com/ap2/timePoint.html] by Martin Fowler.
#
#
# Author:: Matthew Lip... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/temporalexpression.rb | lib/runt/temporalexpression.rb | #!/usr/bin/env ruby
require 'date'
require 'runt/dprecision'
require 'runt/pdate'
require 'pp'
#
# Author:: Matthew Lipper
module Runt
#
# 'TExpr' is short for 'TemporalExpression' and are inspired by the recurring event
# <tt>pattern</tt>[http://martinfowler.com/apsupp/recurring.pdf]
# described by Martin Fowler. ... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
mlipper/runt | https://github.com/mlipper/runt/blob/d0dab62fa45571e50e2018dbe1e12a9fe2752f61/lib/runt/schedule.rb | lib/runt/schedule.rb | #!/usr/bin/env ruby
module Runt
# Implementation of a <tt>pattern</tt>[http://martinfowler.com/apsupp/recurring.pdf]
# for recurring calendar events created by Martin Fowler.
class Schedule
def initialize
@elems = Hash.new
self
end
# Schedule event to occur using the given expression... | ruby | MIT | d0dab62fa45571e50e2018dbe1e12a9fe2752f61 | 2026-01-04T17:54:05.922730Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/test_helper.rb | test/test_helper.rb | # frozen_string_literal: true
if ENV["COVERAGE"] == "true"
require "simplecov"
require "simplecov-console"
require "codecov"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::Console,
SimpleCov::Formatter::Codecov,
]
SimpleC... | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/jobs/application_job.rb | test/dummy/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/helpers/application_helper.rb | test/dummy/app/helpers/application_helper.rb | module ApplicationHelper
include Pagy::Frontend
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/controllers/application_controller.rb | test/dummy/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
include Pagy::Backend
def hello
p hello
end
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/models/pet.rb | test/dummy/app/models/pet.rb | class Pets < User
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/models/comment.rb | test/dummy/app/models/comment.rb | class Comments < ApplicationRecord
belongs_to :commentable, polymorphic: true
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/models/application_record.rb | test/dummy/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/models/user.rb | test/dummy/app/models/user.rb | class Users < ApplicationRecord
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/mailers/application_mailer.rb | test/dummy/app/mailers/application_mailer.rb | class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
layout 'mailer'
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/channels/application_cable/channel.rb | test/dummy/app/channels/application_cable/channel.rb | module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/app/channels/application_cable/connection.rb | test/dummy/app/channels/application_cable/connection.rb | module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/db/schema.rb | test/dummy/db/schema.rb |
ActiveRecord::Schema[7.0].define(version: 2023_04_25_154701) do
create_table "users", force: :cascade do |t|
t.string "email"
end
create_table "comments", force: :cascade do |t|
t.bigint :commentable_id
t.string :commentable_type
end
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/test/support/test_helper.rb | test/dummy/test/support/test_helper.rb | puts "This is a test support file" | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/test/models/user_test.rb | test/dummy/test/models/user_test.rb | class UserTest
end | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/spec/support/support_file.rb | test/dummy/spec/support/support_file.rb | puts "This is a spec support file" | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/spec/models/user_spec.rb | test/dummy/spec/models/user_spec.rb | class FooBar
end | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/lib/monkeypatches.rb | test/dummy/lib/monkeypatches.rb | puts "Monkeypatches go here" | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/application.rb | test/dummy/config/application.rb | require_relative 'boot'
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_mailbox/engine"
require "action_text/en... | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/environment.rb | test/dummy/config/environment.rb | # Load the Rails application.
require_relative 'application'
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/puma.rb | test/dummy/config/puma.rb | # 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... | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/routes.rb | test/dummy/config/routes.rb | Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/spring.rb | test/dummy/config/spring.rb | Spring.watch(
".ruby-version",
".rbenv-vars",
"tmp/restart.txt",
"tmp/caching-dev.txt"
)
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/boot.rb | test/dummy/config/boot.rb | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/initializers/content_security_policy.rb | test/dummy/config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy
# For further information see the following documentation
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
# Rails.application.config.content_security_policy do |policy|
... | ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/initializers/filter_parameter_logging.rb | test/dummy/config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
fastruby/rails_stats | https://github.com/fastruby/rails_stats/blob/805b022b27464b5767ccbf8bf053c03b6d693aa7/test/dummy/config/initializers/application_controller_renderer.rb | test/dummy/config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# end
| ruby | MIT | 805b022b27464b5767ccbf8bf053c03b6d693aa7 | 2026-01-04T17:54:07.356535Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.