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 |
|---|---|---|---|---|---|---|---|---|
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/spec/ruby-statistics/distribution/bernoulli_spec.rb | spec/ruby-statistics/distribution/bernoulli_spec.rb | require 'spec_helper'
describe RubyStatistics::Distribution::Bernoulli do
describe '.density_function' do
it 'is not defined when the outcome is different from zero or one' do
expect(described_class.density_function(rand(2..10), rand)).to be_nil
expect(described_class.density_function(rand(-5..-1), r... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/spec/ruby-statistics/distribution/negative_binomial_spec.rb | spec/ruby-statistics/distribution/negative_binomial_spec.rb | require 'spec_helper'
describe RubyStatistics::Distribution::NegativeBinomial do
describe '#probability_mass_function' do
it 'is not defined for negative values' do
expect(described_class.new(0, 0).probability_mass_function(rand(-10...0))).to be_nil
end
it 'is not defined for values greater than t... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/spec/ruby-statistics/distribution/chi_squared_spec.rb | spec/ruby-statistics/distribution/chi_squared_spec.rb | require 'spec_helper'
describe RubyStatistics::Distribution::ChiSquared do
describe '#cumulative_function' do
it 'returns the expected probabilities for the chi-squared distribution' do
results = [0.0374, 0.1509, 0.3, 0.4506, 0.5841]
chi_sq = described_class.new(5) # 5 degrees of freedom
(1..5... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/spec/ruby-statistics/distribution/t_student_spec.rb | spec/ruby-statistics/distribution/t_student_spec.rb | require 'spec_helper'
describe RubyStatistics::Distribution::TStudent do
describe '#cumulative_function' do
it 'returns the expected values for the T-Student distribution' do
results = [0.7886751, 0.9082483, 0.9522670, 0.9714045, 0.9811252]
t_student = described_class.new(2) # degrees of freedom: 2
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/spec/ruby-statistics/distribution/empirical_spec.rb | spec/ruby-statistics/distribution/empirical_spec.rb | require 'spec_helper'
describe RubyStatistics::Distribution::Empirical do
describe '#cumulative_function' do
it 'calculates the CDF for the specified value using a group of samples' do
# Result in R
# > cdf <- ecdf(c(1,2,3,4,5,6,7,8,9,0))
# > cdf(7)
# [1] 0.8
samples = [1, 2, 3, 4, ... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/spec/ruby-statistics/distribution/normal_spec.rb | spec/ruby-statistics/distribution/normal_spec.rb | require 'spec_helper'
describe RubyStatistics::Distribution::Normal do
describe '#cumulative_function' do
it 'returns the expected probabilites for the normal distribution' do
results = [0.3445783, 0.4207403, 0.5000000, 0.5792597, 0.6554217]
normal = described_class.new(3, 5) # mean 3, std 5
(... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics.rb | lib/ruby-statistics.rb | require File.dirname(__FILE__) + '/enumerable'
require File.dirname(__FILE__) + '/math'
Dir[ File.dirname(__FILE__) + '/ruby-statistics/**/*.rb'].each {|file| require file }
module RubyStatistics
# Your code goes here...
end
| ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/math.rb | lib/math.rb | module Math
def self.factorial(n)
return if n < 0
n = n.to_i # Only integers.
return 1 if n == 0 || n == 1
Math.gamma(n + 1) # Math.gamma(x) == (n - 1)! for integer values
end
def self.combination(n, r)
self.factorial(n)/(self.factorial(r) * self.factorial(n - r)).to_r # n!/(r! * [n - r]!)
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/enumerable.rb | lib/enumerable.rb | # TODO: Avoid monkey-patching.
module Enumerable
def mean
self.reduce(:+) / self.length.to_f
end
def variance
mean = self.mean
self.reduce(0) { |memo, value| memo + ((value - mean) ** 2) } / (self.length - 1).to_f
end
def standard_deviation
Math.sqrt(self.variance)
end
end
| ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/version.rb | lib/ruby-statistics/version.rb | module RubyStatistics
VERSION = "4.1.0"
end
| ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution.rb | lib/ruby-statistics/distribution.rb | Dir[File.dirname(__FILE__) + '/distribution/**/*.rb'].each {|file| require file }
module RubyStatistics
module Distribution
end
end
| ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/statistical_test.rb | lib/ruby-statistics/statistical_test.rb | Dir[File.dirname(__FILE__) + '/statistical_test/**/*.rb'].each {|file| require file }
module RubyStatistics
module StatisticalTest
end
end
# If StatisticalTest is not defined, setup alias.
if defined?(RubyStatistics) && !(defined?(StatisticalTest))
StatisticalTest = RubyStatistics::StatisticalTest
end
| ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/spearman_rank_coefficient.rb | lib/ruby-statistics/spearman_rank_coefficient.rb | module RubyStatistics
class SpearmanRankCoefficient
def self.rank(data:, return_ranks_only: true)
descending_order_data = data.sort { |a, b| b <=> a }
rankings = {}
data.each do |value|
# If we have ties, the find_index method will only retrieve the index of the
# first element ... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/statistical_test/chi_squared_test.rb | lib/ruby-statistics/statistical_test/chi_squared_test.rb | module RubyStatistics
module StatisticalTest
class ChiSquaredTest
def self.chi_statistic(expected, observed)
# If the expected is a number, we asumme that all expected observations
# has the same probability to occur, hence we expect to see the same number
# of expected observations ... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/statistical_test/t_test.rb | lib/ruby-statistics/statistical_test/t_test.rb | module RubyStatistics
module StatisticalTest
class TTest
# Errors for Zero std
class ZeroStdError < StandardError
STD_ERROR_MSG = 'Standard deviation for the difference or group is zero. Please, reconsider sample contents'.freeze
end
# Perform a T-Test for one or two samples.
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/statistical_test/kolmogorov_smirnov_test.rb | lib/ruby-statistics/statistical_test/kolmogorov_smirnov_test.rb | module RubyStatistics
module StatisticalTest
class KolmogorovSmirnovTest
# Common alpha, and critical D are calculated following formulas from: https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test#Two-sample_Kolmogorov%E2%80%93Smirnov_test
def self.two_samples(group_one:, group_two:, alpha: 0... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/statistical_test/f_test.rb | lib/ruby-statistics/statistical_test/f_test.rb | module RubyStatistics
module StatisticalTest
class FTest
# This method calculates the one-way ANOVA F-test statistic.
# We assume that all specified arguments are arrays.
# It returns an array with three elements:
# [F-statistic or F-score, degrees of freedom numerator, degrees of freedo... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/statistical_test/wilcoxon_rank_sum_test.rb | lib/ruby-statistics/statistical_test/wilcoxon_rank_sum_test.rb | module RubyStatistics
module StatisticalTest
class WilcoxonRankSumTest
def rank(elements)
ranked_elements = {}
elements.sort.each_with_index do |element, index|
if ranked_elements.fetch(element, false)
# This allow us to solve the ties easily when performing the rank s... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/gamma.rb | lib/ruby-statistics/distribution/gamma.rb | # frozen_string_literal: true
module RubyStatistics
module Distribution
class Gamma
attr_reader :shape, :scale, :rate
def initialize(shape:, scale: nil)
@shape = shape
@scale = scale
# If the scale is nil, it means we want the distribution to behave with a rate parameter
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/beta.rb | lib/ruby-statistics/distribution/beta.rb | module RubyStatistics
module Distribution
class Beta
attr_accessor :alpha, :beta
def initialize(alp, bet)
self.alpha = alp.to_r
self.beta = bet.to_r
end
def cumulative_function(value)
Math.incomplete_beta_function(value, alpha, beta)
end
def density_f... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/empirical.rb | lib/ruby-statistics/distribution/empirical.rb | module RubyStatistics
module Distribution
class Empirical
attr_accessor :samples
def initialize(samples:)
self.samples = samples
end
# Formula grabbed from here: https://statlect.com/asymptotic-theory/empirical-distribution
def cumulative_function(x:)
cumulative_sum... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/geometric.rb | lib/ruby-statistics/distribution/geometric.rb | module RubyStatistics
module Distribution
class Geometric
attr_accessor :probability_of_success, :always_success_allowed
def initialize(p, always_success: false)
self.probability_of_success = p.to_r
self.always_success_allowed = always_success
end
def density_function(k)
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/weibull.rb | lib/ruby-statistics/distribution/weibull.rb | module RubyStatistics
module Distribution
class Weibull
attr_accessor :shape, :scale # k and lambda
def initialize(k, lamb)
self.shape = k.to_r
self.scale = lamb.to_r
end
def cumulative_function(random_value)
return 0 if random_value < 0
1 - Math.exp(-((r... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/negative_binomial.rb | lib/ruby-statistics/distribution/negative_binomial.rb | module RubyStatistics
module Distribution
class NegativeBinomial
attr_accessor :number_of_failures, :probability_per_trial
def initialize(r, p)
self.number_of_failures = r.to_i
self.probability_per_trial = p
end
def probability_mass_function(k)
return if number_of... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/poisson.rb | lib/ruby-statistics/distribution/poisson.rb | module RubyStatistics
module Distribution
class Poisson
attr_accessor :expected_number_of_occurrences
alias_method :mean, :expected_number_of_occurrences
alias_method :variance, :expected_number_of_occurrences
def initialize(l)
self.expected_number_of_occurrences = l
end
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/t_student.rb | lib/ruby-statistics/distribution/t_student.rb | module RubyStatistics
module Distribution
class TStudent
attr_accessor :degrees_of_freedom
attr_reader :mode
def initialize(v)
self.degrees_of_freedom = v
@mode = 0
end
### Extracted from https://codeplea.com/incomplete-beta-function-c
### This function is sha... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/binomial.rb | lib/ruby-statistics/distribution/binomial.rb | module RubyStatistics
module Distribution
class Binomial
attr_accessor :number_of_trials, :probability_per_trial
def initialize(n, p)
self.number_of_trials = n.to_i
self.probability_per_trial = p
end
def probability_mass_function(k)
return if k < 0 || k > number_of... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/logseries.rb | lib/ruby-statistics/distribution/logseries.rb | module RubyStatistics
module Distribution
class LogSeries
def self.density_function(k, p)
return if k <= 0
k = k.to_i
left = (-1.0 / Math.log(1.0 - p))
right = (p ** k).to_r
left * right / k
end
def self.cumulative_function(k, p)
return if k <= ... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/normal.rb | lib/ruby-statistics/distribution/normal.rb | module RubyStatistics
module Distribution
class Normal
attr_accessor :mean, :standard_deviation, :variance
alias_method :mode, :mean
def initialize(avg, std)
self.mean = avg.to_r
self.standard_deviation = std.to_r
self.variance = std.to_r**2
end
def cumulati... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/f.rb | lib/ruby-statistics/distribution/f.rb | module RubyStatistics
module Distribution
class F
attr_accessor :d1, :d2 # Degrees of freedom #1 and #2
def initialize(k, j)
self.d1 = k
self.d2 = j
end
# Formula extracted from http://www.itl.nist.gov/div898/handbook/eda/section3/eda3665.htm#CDF
def cumulative_func... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/chi_squared.rb | lib/ruby-statistics/distribution/chi_squared.rb | module RubyStatistics
module Distribution
class ChiSquared
attr_accessor :degrees_of_freedom
alias_method :mean, :degrees_of_freedom
def initialize(k)
self.degrees_of_freedom = k
end
def cumulative_function(value)
if degrees_of_freedom == 2
# Special case... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/uniform.rb | lib/ruby-statistics/distribution/uniform.rb | module RubyStatistics
module Distribution
class Uniform
attr_accessor :left, :right
def initialize(a, b)
self.left = a.to_r
self.right = b.to_r
end
def density_function(value)
if value >= left && value <= right
1/(right - left)
else
0
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/bernoulli.rb | lib/ruby-statistics/distribution/bernoulli.rb | module RubyStatistics
module Distribution
class Bernoulli
def self.density_function(n, p)
return if n != 0 && n != 1 # The support of the distribution is n = {0, 1}.
case n
when 0 then 1.0 - p
when 1 then p
end
end
def self.cumulative_function(n, p)
... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
estebanz01/ruby-statistics | https://github.com/estebanz01/ruby-statistics/blob/0ac388ab734120bd708164a10261b25b53faf29d/lib/ruby-statistics/distribution/tables/chi_squared.rb | lib/ruby-statistics/distribution/tables/chi_squared.rb | module RubyStatistics
module Distribution
module Tables
class ChiSquared
# Values retrieved from the following table provided by the University of Arizona.
# https://math.arizona.edu/~jwatkins/chi-square-table.pdf
TABLE = [
[0.000, 0.000, 0.001, 0.004, 0.016, 2.706, 3.841, ... | ruby | MIT | 0ac388ab734120bd708164a10261b25b53faf29d | 2026-01-04T17:46:01.529291Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/spec/rspec/helper.rb | spec/rspec/helper.rb | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false | |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/spec/lib/jekyll/menus.rb | spec/lib/jekyll/menus.rb | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false | |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll-menus.rb | lib/jekyll-menus.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
require "jekyll/menus"
| ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus.rb | lib/jekyll/menus.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
autoload :Utils, "jekyll/menus/utils"
autoload :Drops, "jekyll/menus/drops"
def initialize(site)
@site = site
end
#
def menus
Utils.deep_merge(_data_menus, Util... | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/drops.rb | lib/jekyll/menus/drops.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
module Drops
autoload :Menu, "jekyll/menus/drops/menu"
autoload :All, "jekyll/menus/drops/all"
autoload :Item, "jekyll/menus/drops/item"
end
end
end
| ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/version.rb | lib/jekyll/menus/version.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
VERSION = "0.6.1"
end
end
| ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/utils.rb | lib/jekyll/menus/utils.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
module Utils module_function
def deep_merge(old, _new)
return old | _new if old.is_a?(Array)
old.merge(_new) do |_, o, n|
(o.is_a?(Hash) && n.is_a?(Hash)) || (o.i... | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/hook.rb | lib/jekyll/menus/hook.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
module Drops
class SiteDrop
attr_accessor :menus
end
end
end
Jekyll::Hooks.register :site, :pre_render do |site, payload|
payload.site.menus = Jekyll::Menus.new(site).to_liquid_drop
end
| ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/drops/menu.rb | lib/jekyll/menus/drops/menu.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
module Drops
class Menu < Liquid::Drop
attr_reader :parent, :identifier, :menu
def initialize(menu, identifier, parent)
@parent = parent
@identifier = id... | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/drops/item.rb | lib/jekyll/menus/drops/item.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
module Drops
class Item < Liquid::Drop
def initialize(item, parent)
@parent = parent
@item =
item
end
#
def children
... | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
forestryio/jekyll-menus | https://github.com/forestryio/jekyll-menus/blob/288acfacfaa14a94fbfd6738b10f9311da3a436c/lib/jekyll/menus/drops/all.rb | lib/jekyll/menus/drops/all.rb | # Frozen-string-literal: true
# Copyright: 2015 Forestry.io - MIT License
# Encoding: utf-8
module Jekyll
class Menus
module Drops
class All < Liquid::Drop
def initialize(menus)
@menus = menus
end
#
def find
to_a.find do |menu|
yield menu
... | ruby | MIT | 288acfacfaa14a94fbfd6738b10f9311da3a436c | 2026-01-04T17:46:07.109073Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/spec/spec_helper.rb | spec/spec_helper.rb | require "rspec"
require "rspec/its"
require "fauxhai"
RSpec.configure do |config|
# Basic configuraiton
config.run_all_when_everything_filtered = true
config.filter_run(:focus)
config.add_formatter("documentation")
# Run specs in random order to surface order dependencies. If you find an
# order dependenc... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/spec/mocker_spec.rb | spec/mocker_spec.rb | require "spec_helper"
describe Fauxhai::Mocker do
describe "#data" do
let(:options) { {} }
subject { described_class.new({ github_fetching: false }.merge(options)).data }
context "with a platform and version" do
let(:options) { { platform: "chefspec", version: "0.6.1" } }
its(["hostname"]) {... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai.rb | lib/fauxhai.rb | module Fauxhai
autoload :Exception, "fauxhai/exception"
autoload :Fetcher, "fauxhai/fetcher"
autoload :Mocker, "fauxhai/mocker"
autoload :VERSION, "fauxhai/version"
def self.root
@@root ||= File.expand_path("../../", __FILE__)
end
def self.mock(*args, &block)
Fauxhai::Mocker.new(*args, &block)
... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/version.rb | lib/fauxhai/version.rb | module Fauxhai
VERSION = "9.3.0".freeze
end
| ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/fetcher.rb | lib/fauxhai/fetcher.rb | require "digest/sha1"
require "json" unless defined?(JSON)
module Fauxhai
class Fetcher
def initialize(options = {}, &override_attributes)
@options = options
if !force_cache_miss? && cached?
@data = cache
else
require "net/ssh" unless defined?(Net::SSH)
Net::SSH.start(h... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/exception.rb | lib/fauxhai/exception.rb | module Fauxhai
module Exception
class InvalidPlatform < ArgumentError; end
class InvalidVersion < ArgumentError; end
end
end
| ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/runner.rb | lib/fauxhai/runner.rb | require "ohai" unless defined?(Ohai::System)
require "ohai/plugins/chef"
module Fauxhai
class Runner
def initialize(args)
@system = Ohai::System.new
@system.all_plugins
case @system.data["platform"]
when "windows", :windows
require_relative "runner/windows"
singleton_clas... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/mocker.rb | lib/fauxhai/mocker.rb | require "json" unless defined?(JSON)
require "pathname" unless defined?(Pathname)
module Fauxhai
class Mocker
# The base URL for the GitHub project (raw)
RAW_BASE = "https://raw.githubusercontent.com/chefspec/fauxhai/master".freeze
# A message about where to find a list of platforms
PLATFORM_LIST_ME... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/runner/default.rb | lib/fauxhai/runner/default.rb | module Fauxhai
class Runner
module Default
def bin_dir
"/usr/local/bin"
end
def counters
{
"network" => {
"interfaces" => {
"lo" => {
"tx" => {
"queuelen" => "1",
"bytes" => 0,
... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
chefspec/fauxhai | https://github.com/chefspec/fauxhai/blob/86a0ac4d5ab91f249801ffa290ae39a58d99b6b4/lib/fauxhai/runner/windows.rb | lib/fauxhai/runner/windows.rb | module Fauxhai
class Runner
module Windows
require_relative "default"
include ::Fauxhai::Runner::Default
def default_interface
"0xe"
end
def network
{
"interfaces" => {
"#{default_interface}" => {
"configuration" => {
... | ruby | MIT | 86a0ac4d5ab91f249801ffa290ae39a58d99b6b4 | 2026-01-04T17:45:47.766557Z | false |
n8/tracer_bullets | https://github.com/n8/tracer_bullets/blob/e1a304940910b51f5029a7e83aee4e1dd29b7034/lib/tracer_bullets.rb | lib/tracer_bullets.rb | require "tracer_bullets/version"
module TracerBullets
module Methods
def tracer_bullet
if Rails.env.development?
_tracer_bullets_log( "Elapsed: #{((Time.now - @tracer_bullet_start_time)*1000).to_i}ms #{caller(0)[1]}" )
@tracer_bullet_start_time = Time.now
end
end
alias_method... | ruby | MIT | e1a304940910b51f5029a7e83aee4e1dd29b7034 | 2026-01-04T17:46:14.711660Z | false |
n8/tracer_bullets | https://github.com/n8/tracer_bullets/blob/e1a304940910b51f5029a7e83aee4e1dd29b7034/lib/tracer_bullets/version.rb | lib/tracer_bullets/version.rb | module TracerBullets
VERSION = "0.0.5"
end
| ruby | MIT | e1a304940910b51f5029a7e83aee4e1dd29b7034 | 2026-01-04T17:46:14.711660Z | false |
hyperoslo/capistrano-foreman | https://github.com/hyperoslo/capistrano-foreman/blob/4c08afc005de4f04000e7678b781671cb4360c56/lib/capistrano-foreman.rb | lib/capistrano-foreman.rb | ruby | MIT | 4c08afc005de4f04000e7678b781671cb4360c56 | 2026-01-04T17:46:13.153110Z | false | |
hyperoslo/capistrano-foreman | https://github.com/hyperoslo/capistrano-foreman/blob/4c08afc005de4f04000e7678b781671cb4360c56/lib/capistrano/foreman.rb | lib/capistrano/foreman.rb | load File.expand_path('../tasks/foreman.rb', __FILE__)
| ruby | MIT | 4c08afc005de4f04000e7678b781671cb4360c56 | 2026-01-04T17:46:13.153110Z | false |
hyperoslo/capistrano-foreman | https://github.com/hyperoslo/capistrano-foreman/blob/4c08afc005de4f04000e7678b781671cb4360c56/lib/capistrano/tasks/foreman.rb | lib/capistrano/tasks/foreman.rb | namespace :foreman do
task :setup do
invoke :'foreman:export'
invoke :'foreman:start'
end
desc 'Export the Procfile'
task :export do
on roles fetch(:foreman_roles) do
opts = {
app: fetch(:application),
log: File.join(shared_path, 'log'),
}.merge fetch(:foreman_options, {... | ruby | MIT | 4c08afc005de4f04000e7678b781671cb4360c56 | 2026-01-04T17:46:13.153110Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/coverage_helper.rb | spec/coverage_helper.rb | # frozen_string_literal: true
require "simplecov"
require "simplecov-rcov"
# return non-zero if not met
SimpleCov.at_exit do
SimpleCov.minimum_coverage 100
SimpleCov.result.format!
end
SimpleCov.start do
add_filter "lib/simple_scheduler/railtie"
add_filter "/spec/"
end
# Format the reports in a way I like
S... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/rails_helper.rb | spec/rails_helper.rb | # frozen_string_literal: true
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= "test"
require "coverage_helper"
require File.expand_path("../spec/dummy/config/environment.rb", __dir__)
# Prevent database truncation if the environment is production
abort("The Rails environ... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/spec_helper.rb | spec/spec_helper.rb | # frozen_string_literal: true
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
# assertions if you prefer.
config.expect_with :rspec... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/simple_scheduler/scheduler_job_spec.rb | spec/simple_scheduler/scheduler_job_spec.rb | # frozen_string_literal: true
require "rails_helper"
describe SimpleScheduler::SchedulerJob, type: :job do
let(:now) { Time.parse("2017-01-27 00:00:00 CST") }
# Set the environment variable for a custom YAML configuration file.
# @param path [String]
def config_path(path)
stub_const("ENV", ENV.to_hash.me... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/simple_scheduler/task_spec.rb | spec/simple_scheduler/task_spec.rb | # frozen_string_literal: true
require "rails_helper"
describe SimpleScheduler::Task, type: :model do
describe "initialize" do
it "requires the `class` param" do
expect do
described_class.new(every: "10.minutes")
end.to raise_error(ArgumentError, "Missing param `class` specifying the class of... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/simple_scheduler/at_spec.rb | spec/simple_scheduler/at_spec.rb | # frozen_string_literal: true
require "rails_helper"
describe SimpleScheduler::At, type: :model do
describe "AT_PATTERN" do
let(:pattern) { SimpleScheduler::At::AT_PATTERN }
it "matches valid times" do
match = pattern.match("0:00")
expect(match[2]).to eq("0")
expect(match[3]).to eq("00")
... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/simple_scheduler/future_job_spec.rb | spec/simple_scheduler/future_job_spec.rb | # frozen_string_literal: true
require "rails_helper"
describe SimpleScheduler::FutureJob, type: :job do
describe "successfully queues" do
subject(:job) { described_class.perform_later }
it "queues the job" do
expect { job }.to change(enqueued_jobs, :size).by(1)
end
it "is in default queue" d... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/test_no_args_worker.rb | spec/dummy/app/jobs/test_no_args_worker.rb | # Sidekiq Worker for testing a worker with no args
class TestNoArgsWorker
include Sidekiq::Worker
def perform; end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/test_worker.rb | spec/dummy/app/jobs/test_worker.rb | # Sidekiq Worker for testing
class TestWorker
include Sidekiq::Worker
def perform(scheduled_time); end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/test_job.rb | spec/dummy/app/jobs/test_job.rb | # Active Job for testing
class TestJob < ApplicationJob
def perform(scheduled_time); end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/test_optional_args_worker.rb | spec/dummy/app/jobs/test_optional_args_worker.rb | # Sidekiq Worker for testing a worker with optional args
class TestOptionalArgsWorker
include Sidekiq::Worker
def perform(scheduled_time, options = nil); end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/application_job.rb | spec/dummy/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/test_no_args_job.rb | spec/dummy/app/jobs/test_no_args_job.rb | # Active Job for testing a job with no args
class TestNoArgsJob < ApplicationJob
def perform; end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/jobs/test_optional_args_job.rb | spec/dummy/app/jobs/test_optional_args_job.rb | # Active Job for testing a job with optional args
class TestOptionalArgsJob < ApplicationJob
def perform(scheduled_time, options = nil); end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/helpers/application_helper.rb | spec/dummy/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/controllers/application_controller.rb | spec/dummy/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/models/application_record.rb | spec/dummy/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/channels/application_cable/channel.rb | spec/dummy/app/channels/application_cable/channel.rb | module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/app/channels/application_cable/connection.rb | spec/dummy/app/channels/application_cable/connection.rb | module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/application.rb | spec/dummy/config/application.rb | require_relative "boot"
require "action_controller/railtie"
require "rails/test_unit/railtie"
Bundler.require(*Rails.groups)
require "simple_scheduler"
module Dummy
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configurat... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/environment.rb | spec/dummy/config/environment.rb | # Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/puma.rb | spec/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 | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/routes.rb | spec/dummy/config/routes.rb | Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/spring.rb | spec/dummy/config/spring.rb | %w(
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
).each { |path| Spring.watch(path) }
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/boot.rb | spec/dummy/config/boot.rb | # Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/filter_parameter_logging.rb | spec/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 | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/application_controller_renderer.rb | spec/dummy/config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/session_store.rb | spec/dummy/config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_dummy_session'
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/wrap_parameters.rb | spec/dummy/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 | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/inflections.rb | spec/dummy/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 | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/cookies_serializer.rb | spec/dummy/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 | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/backtrace_silencers.rb | spec/dummy/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| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a probl... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/initializers/mime_types.rb | spec/dummy/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
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/environments/test.rb | spec/dummy/config/environments/test.rb | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# 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 suit... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/environments/development.rb | spec/dummy/config/environments/development.rb | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web serv... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/spec/dummy/config/environments/production.rb | spec/dummy/config/environments/production.rb | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/lib/simple_scheduler.rb | lib/simple_scheduler.rb | # frozen_string_literal: true
require "active_job"
require "sidekiq/api"
require_relative "simple_scheduler/at"
require_relative "simple_scheduler/future_job"
require_relative "simple_scheduler/railtie"
require_relative "simple_scheduler/scheduler_job"
require_relative "simple_scheduler/task"
require_relative "simple_... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/lib/simple_scheduler/task.rb | lib/simple_scheduler/task.rb | # frozen_string_literal: true
module SimpleScheduler
# Class for parsing each task in the scheduler config YAML file and returning
# the values needed to schedule the task in the future.
#
# @!attribute [r] job_class
# @return [Class] The class of the job or worker.
# @!attribute [r] params
# @return... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/lib/simple_scheduler/version.rb | lib/simple_scheduler/version.rb | # frozen_string_literal: true
module SimpleScheduler
VERSION = "2.0.0"
end
| ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
simplymadeapps/simple_scheduler | https://github.com/simplymadeapps/simple_scheduler/blob/fac50a8119736f1df3ddabb2aeef33efd000902e/lib/simple_scheduler/at.rb | lib/simple_scheduler/at.rb | # frozen_string_literal: true
require "delegate"
module SimpleScheduler
# A delegator that parses the :at option on a task into the first time it should run.
# Instead of inheriting from Time (which conflicts with ActiveSupport time helpers),
# this wraps a Time instance and selectively overrides hour/hour? sem... | ruby | MIT | fac50a8119736f1df3ddabb2aeef33efd000902e | 2026-01-04T17:46:19.163745Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.