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 |
|---|---|---|---|---|---|---|---|---|
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/any.rb | lib/bake/type/any.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
module Bake
module Type
# An ordered list of types. The first type to match the input is used.
#
# ```ruby
# type = Bake::Type::Any(Bake::Type::String, Bake::Type::Integer)
# ```
#
class Any
#... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/boolean.rb | lib/bake/type/boolean.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Boolean
extend Type
def self.composite?
false
end
def self.parse(input)
if input =~ /t(rue)?|y(es)?/i
return true
e... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/string.rb | lib/bake/type/string.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module String
extend Type
def self.composite?
false
end
def self.parse(input)
input.to_s
end
end
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/input.rb | lib/bake/type/input.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Input
extend Type
def self.composite?
false
end
def self.parse(input)
case input
when "-"
return $stdin
when IO... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/integer.rb | lib/bake/type/integer.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Integer
extend Type
def self.composite?
false
end
def self.parse(input)
Integer(input)
end
end
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/nil.rb | lib/bake/type/nil.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Nil
extend Type
def self.composite?
false
end
def self.parse(input)
if input =~ /nil|null/i
return nil
else
ra... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/hash.rb | lib/bake/type/hash.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
class Hash
include Type
def initialize(key_type, value_type)
@key_type = key_type
@value_type = value_type
end
def composite?
t... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/symbol.rb | lib/bake/type/symbol.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Symbol
extend Type
def self.composite?
false
end
def self.parse(input)
input.to_sym
end
end
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/command/top.rb | lib/bake/command/top.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "samovar"
require "console/terminal"
require_relative "call"
require_relative "list"
module Bake
module Command
# The top level command line application.
class Top < Samovar::Command
self.desc... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/command/list.rb | lib/bake/command/list.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "samovar"
require "set"
module Bake
module Command
# List all available commands.
class List < Samovar::Command
self.description = "List all available commands."
one :pattern, "The patte... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/command/call.rb | lib/bake/command/call.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "samovar"
require_relative "../registry"
require_relative "../context"
module Bake
module Command
# Execute one or more commands.
class Call < Samovar::Command
self.description = "Execute one ... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/format/ndjson.rb | lib/bake/format/ndjson.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.
require "json"
module Bake
module Format
class NDJSON
def self.input(file)
new(file)
end
def self.output(file, value)
value.each do |item|
file.puts(JSON.generate(item))
end
end
... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/format/yaml.rb | lib/bake/format/yaml.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.
require "yaml"
module Bake
module Format
module YAML
def self.input(file)
::YAML.load(file)
end
def self.output(file, value)
::YAML.dump(value, file)
end
end
REGISTRY[:yaml] = YAML... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/format/raw.rb | lib/bake/format/raw.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.
require "pp"
module Bake
module Format
module Raw
def self.input(file)
file
end
def self.output(file, value)
PP.pp(value, file)
end
end
REGISTRY[:raw] = Raw
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/format/json.rb | lib/bake/format/json.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.
require "json"
module Bake
module Format
module JSON
def self.input(file)
::JSON.load(file)
end
OPTIONS = {indent: " ", space: " ", space_before: "", object_nl: "\n", array_nl: "\n"}
def... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/registry/bakefile_loader.rb | lib/bake/registry/bakefile_loader.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2024-2025, by Samuel Williams.
require_relative "../scope"
module Bake
module Registry
class BakefileLoader
def initialize(path)
@path = path
end
def to_s
"#{self.class} #{@path}"
end
attr :path
def ... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/registry/directory_loader.rb | lib/bake/registry/directory_loader.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "../scope"
module Bake
module Registry
# Represents a directory which contains bakefiles.
class DirectoryLoader
# Initialize the loader with the specified root path.
# @parameter ro... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/registry/aggregate.rb | lib/bake/registry/aggregate.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "console"
require_relative "directory_loader"
require_relative "bakefile_loader"
module Bake
# Structured access to the working directory and loaded gems for loading bakefiles.
module Registry
cla... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/config/sus.rb | config/sus.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2023-2025, by Samuel Williams.
require "covered/sus"
include Covered::Sus
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/features/support/env.rb | features/support/env.rb | $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
require 'sonia'
require 'spec/expectations'
| ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/features/step_definitions/sonia_steps.rb | features/step_definitions/sonia_steps.rb | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false | |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/yahoo_weather/yahoo_weather.rb | widgets/yahoo_weather/yahoo_weather.rb | module Sonia
module Widgets
class YahooWeather < Sonia::Widget
URL = "http://weather.yahooapis.com/forecastrss?w=%s&u=%s"
def initialize(config)
super(config)
EventMachine::add_periodic_timer(60 * 15) { fetch_data }
end
def initial_push
fetch_data
end
... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/hoptoad/hoptoad.rb | widgets/hoptoad/hoptoad.rb | require 'roxml'
module Sonia
module Widgets
# ROXML classes doesn't include all stuff that Hoptoad returns
# since we dont need it : we already have the api key and we
# only need to count the total of errors for each projects
# ROXML Projects class
class Project
include ROXML
xml_acce... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/tfl/tfl.rb | widgets/tfl/tfl.rb | module Sonia
module Widgets
class Tfl < Sonia::Widget
URL = "http://api.tubeupdates.com/?method=get.status&lines=all&format=json"
def initialize(config)
super(config)
EventMachine::add_periodic_timer(150) { fetch_data }
end
def initial_push
fetch_data
end
... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/twitter/twitter.rb | widgets/twitter/twitter.rb | require 'twitter/json_stream'
module Sonia
module Widgets
class Twitter < Sonia::Widget
FRIENDS_URL = "http://api.twitter.com/1/statuses/friends/%s.json"
CREATE_FRIENDSHIP_URL = "http://api.twitter.com/1/friendships/create/%s.json?follow=true"
USER_LOOKUP_URL = "http://api.twitt... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/github/github.rb | widgets/github/github.rb | module Sonia
module Widgets
class Github < Sonia::Widget
REPOSITIORIES_URL = "http://github.com/api/v2/yaml/repos/show/%s"
NETWORK_META_URL = "%s://github.com/%s/%s/network_meta"
NETWORK_DATA_CHUNK_URL = "%s://github.com/%s/%s/network_data_chunk?nethash=%s"
def initialize(confi... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/campfire/campfire.rb | widgets/campfire/campfire.rb | require 'twitter/json_stream'
require 'uri'
require 'digest/md5'
module Sonia
module Widgets
class Campfire < Sonia::Widget
GRAVATAR_URL = "http://www.gravatar.com/avatar/"
TRANSCRIPT_URL = "%s/room/%s/transcript.json"
attr_reader :room_uri
def initialize(config)
super(config)
... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/rss/rss.rb | widgets/rss/rss.rb | module Sonia
module Widgets
class RSS < Sonia::Widget
def initialize(config)
super(config)
EventMachine::add_periodic_timer(config[:poll_time]) { fetch_data }
end
def initial_push
fetch_data
end
private
def fetch_data
log_info "Polling `#{servi... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/foursquare/foursquare.rb | widgets/foursquare/foursquare.rb | module Sonia
module Widgets
class Foursquare < Sonia::Widget
CHECKINS_URL = "http://api.foursquare.com/v1/checkins.json"
def initialize(config)
super(config)
EventMachine::add_periodic_timer(150) { fetch_data }
end
def initial_push
fetch_data
end
def... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/widgets/icinga/icinga.rb | widgets/icinga/icinga.rb | require 'nokogiri'
module Sonia
module Widgets
class Icinga < Sonia::Widget
def initialize(config)
super(config)
EventMachine::add_periodic_timer(60) { fetch_data }
end
def initial_push
fetch_data
end
def format_status(stat)
{
:count => ... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/spec/spec_helper.rb | spec/spec_helper.rb | $LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'sonia'
require 'spec'
require 'spec/autorun'
Spec::Runner.configure do |config|
end
| ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/spec/sonia/config_spec.rb | spec/sonia/config_spec.rb | require 'spec_helper'
require 'sonia/config'
describe Sonia::Config do
describe "#new" do
let(:data) {{
:name => 'Sonia',
:nested => {
:one => 1,
:two => 2
}
}}
subject { Sonia::Config.new(data) }
its(:name) { should == 'Sonia' }
its(:nested) { should be_ki... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia.rb | lib/sonia.rb | $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
require 'logger'
require 'active_support'
require 'sonia/version'
# @author Piotr Usewicz
module Sonia
autoload :Server, 'sonia/server'
autoload :Widget, 'sonia/widget'
autoload :Widgets, 'sonia/widgets'
autoload :WebServer, 'sonia/web_server... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/version.rb | lib/sonia/version.rb | module Sonia
VERSION = "0.0.1"
end
| ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/widgets.rb | lib/sonia/widgets.rb | module Sonia
# Responsible for just namespacing widgets
module Widgets
Dir[File.join(Sonia.root, "/widgets/*/*.rb")].each do |file|
#autoload File.basename(file, '.rb').classify.to_sym, file
require file
end
end
end
| ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/helpers.rb | lib/sonia/helpers.rb | module Sonia
module Helpers
# Returns all available widgets with relative path recognized by the webserver
#
# @return [Array] Array of relalive widget Javascript paths
def widget_javascripts
Dir[Sonia.root + "/widgets/*/*.js"].map do |file|
widget_name = File.basename(file, ".js")
... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/web_server.rb | lib/sonia/web_server.rb | require 'sinatra'
require 'haml'
module Sonia
# Sonia's Web Server
#
# Allows dynamically generating HTML pages
#
# @author Piotr Usewicz
class WebServer < Sinatra::Base
helpers Sonia::Helpers
set :public, File.expand_path(File.dirname(__FILE__) + '/../../public')
set :views, File.expand_... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/cli.rb | lib/sonia/cli.rb | require 'thor'
require "launchy"
module Sonia
class CLI < Thor
# namespace nil
desc "start", "Start Sonia server"
method_option :config, :type => :string, :aliases => "-c", :required => true
method_option :'no-auto', :type => :boolean
def start
require "sonia"
Sonia::Server.run!(Conf... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/widget.rb | lib/sonia/widget.rb | require "yajl"
require "yaml"
require "nokogiri"
require "digest/sha1"
module Sonia
# @abstract
class Widget
class << self
def inherited(subclass)
(@widgets ||= []) << subclass unless widgets.include?(subclass)
end
def widgets
@widgets ||= []
end
end
attr_reade... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/config.rb | lib/sonia/config.rb | module Sonia
# Simple configuration class
#
# @example
# "Config.new({:name => "Piotr"}).piotr" #=> "Piotr"
class Config
# @param [Hash] data Hash containing configuration data
def initialize(data={})
@data = {}
update!(data)
end
# Updates configuration data
#
# @param [... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
pusewicz/sonia | https://github.com/pusewicz/sonia/blob/80e1a22b3f598d8bbac553380acc7c5a869b2143/lib/sonia/server.rb | lib/sonia/server.rb | require "eventmachine"
require "em-websocket"
require 'em-http'
require "yajl"
require "yaml"
require "thin"
module Sonia
# Main Sonia event loop
#
# Starts both WebServer and WebSocket server
#
# @author Piotr Usewicz
module Server
extend self
# Defaults
WEBSOCKET_HOST = "localhost"
WEBSO... | ruby | MIT | 80e1a22b3f598d8bbac553380acc7c5a869b2143 | 2026-01-04T17:57:57.950848Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/metadata.rb | metadata.rb | name 'ruby_build'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Manages the ruby-build framework and its installed rubies. A LWRP is also defined.'
source_url 'https://github.com/sous-chefs/ruby_build'
issues_url 'http... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/test/integration/default/controls/verify_ruby_build.rb | test/integration/default/controls/verify_ruby_build.rb | control 'Check definitions' do
impact 1.0
title 'Verify we can return a list of definitions'
desc 'Verify we can get a list of Ruby definitions'
describe command('/usr/local/bin/ruby-build --definitions') do
its('exit_status') { should eq 0 }
its('stdout') { should match /3.0.4/ }
end
end
control 'ru... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/test/cookbooks/test/metadata.rb | test/cookbooks/test/metadata.rb | name 'test'
version '1.0.0'
depends 'ruby_build'
| ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/test/cookbooks/test/recipes/default.rb | test/cookbooks/test/recipes/default.rb | apt_update
homebrew_update
ruby_build_install
ruby_build_definition '3.0.4' do
version_prefix true
patch 'test.patch'
end
| ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/spec/spec_helper.rb | spec/spec_helper.rb | require 'chefspec'
require 'chefspec/berkshelf'
require_relative '../libraries/package_deps'
RSpec.configure do |config|
config.color = true
config.formatter = :documentation
end
| ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/spec/libraries/cruby_spec.rb | spec/libraries/cruby_spec.rb | require 'spec_helper'
describe '#cruby_package_deps' do
context 'CentOS' do
recipe do
Chef::DSL::Recipe.include(Chef::Rbenv::PackageDeps)
log cruby_package_deps
end
context 'CentOS 7' do
platform 'centos', '7'
it { is_expected.to write_log('gcc, bzip2, openssl-devel, libyaml-dev... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/libraries/package_deps.rb | libraries/package_deps.rb | class Chef
module Rbenv
module MacOs
def openssl_prefix
`/usr/local/bin/brew --prefix openssl@1.1`.strip!
end
end
module PackageDeps
def cruby_package_deps
case node['platform_family']
when 'rhel', 'fedora', 'amazon'
%w( gcc bzip2 openssl-devel libyaml-... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/resources/homebrew_update.rb | resources/homebrew_update.rb | unified_mode true if respond_to? :unified_mode
provides :homebrew_update
description 'Use the **homebrew_update** resource to manage Homebrew repository updates on MacOS.'
introduced '16.2'
examples <<~DOC
**Update the hombrew repository data at a specified interval**:
```ruby
homebrew_update 'all platforms' do... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/resources/definition.rb | resources/definition.rb | include Chef::Rbenv::MacOs
# for compatibility with earlier incarnations
# of this resource
#
provides :ruby_build_ruby
property :definition, String,
name_property: true,
description: 'Version of Ruby to install'
property :prefix_path, String,
default: '/usr/local/ruby',
description: 'Location to install Rub... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
sous-chefs/ruby_build | https://github.com/sous-chefs/ruby_build/blob/f4985daab9ac89b00771108ea8ac4fe18ae376e2/resources/install.rb | resources/install.rb | property :name, String, default: ''
property :git_ref, String,
default: 'master',
description: 'Git reference to download, set to a tag to get a specific version'
unified_mode true if respond_to? :unified_mode
action :install do
src_path = "#{Chef::Config['file_cache_path']}/ruby-build"
if platform_family?(... | ruby | Apache-2.0 | f4985daab9ac89b00771108ea8ac4fe18ae376e2 | 2026-01-04T17:58:09.746881Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/test/dmanga_test.rb | test/dmanga_test.rb | require 'dmanga'
require_relative 'test_helper'
class DMangaTest < Minitest::Test
def test_that_it_has_a_version_number
refute_nil ::DManga::VERSION
end
end
| ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/test/test_helper.rb | test/test_helper.rb | # require 'minitest/reporters'
require 'minitest/autorun'
require 'minitest/pride'
# MiniTest::Reporters.use!
| ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/test/options_test.rb | test/options_test.rb | # require 'minitest/autorun'
require 'dmanga/options'
require_relative 'test_helper'
class TestOption < Minitest::Test
def test_options_manga_name
opt = DManga::Options.new(['manga name'])
assert_equal opt.manga, 'manga name'
end
def test_options_without_download_path
opt = DManga... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/test/zip_file_generator_test.rb | test/zip_file_generator_test.rb | require 'dmanga/zip_file_generator'
class TestZipFileGenerator < Minitest::Test
def test_put_into_archive
out_file = "#{File.dirname(__FILE__)}/files/test.zip"
in_dir = "#{File.dirname(__FILE__)}/files"
zf = DManga::ZipFileGenerator.new(in_dir, out_file)
zf.write
assert File.exist?... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/test/site_parser_base_test.rb | test/site_parser_base_test.rb | require 'webmock/minitest'
require 'dmanga/site_parser_base'
require 'dmanga/mangahost_parser'
require 'dmanga/util'
require_relative 'test_helper'
class TestSiteParserBase < Minitest::Test
SEARCH_PAGE = [ File.dirname(__FILE__), "files",
"onepunch-search.html"].join("/")
CHAPTER_PAGE = [
... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga.rb | lib/dmanga.rb | require "dmanga/version"
require 'dmanga/util'
require 'dmanga/site_parser_base'
require 'dmanga/mangahost_parser'
require 'dmanga/options'
require 'dmanga/zip_file_generator'
| ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/version.rb | lib/dmanga/version.rb | module DManga
VERSION = '1.2.2'
end
| ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/options.rb | lib/dmanga/options.rb | require 'optparse'
require 'dmanga/version'
module DManga
class Options
DEFAULT_DOWNLOAD_DIR = "#{ENV['HOME']}/Downloads"
attr_reader :download_dir, :verbose, :manga
attr_accessor :site
def initialize(argv)
@download_dir = DEFAULT_DOWNLOAD_DIR
@verbose = false... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/mangahost_parser.rb | lib/dmanga/mangahost_parser.rb | require 'dmanga/site_parser_base'
require 'dmanga/zip_file_generator'
module DManga
class MangaHostParser < SiteParserBase
# url used to search in the site
SEARCH_URL = "https://mangahosted.com/find/"
# regex to extract url of found mangas
SEARCH_LINK_REGEX = /entry-title">\s*<a\s*href="(.*)?"\s*ti... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/os.rb | lib/dmanga/os.rb | # module to set operating system
module DManga
module OS
def self.windows?
/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM
end
end
end
| ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/zip_file_generator.rb | lib/dmanga/zip_file_generator.rb | require 'zip'
# This is a simple example which uses rubyzip to
# recursively generate a zip file from the contents of
# a specified directory. The directory itself is not
# included in the archive, rather just its contents.
#
# Usage:
# directory_to_zip = "/tmp/input"
# output_file = "/tmp/out.zip"
# zf = ZipFile... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/site_parser_base.rb | lib/dmanga/site_parser_base.rb | require 'dmanga/options'
require 'dmanga/os'
require 'ruby-progressbar'
require 'open-uri'
require 'addressable/uri'
# todo: if downloading returns an error, skip to next chapter
module DManga
class SiteParserBase
USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0"
attr_acce... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dkeas/DManga | https://github.com/dkeas/DManga/blob/e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8/lib/dmanga/util.rb | lib/dmanga/util.rb | require 'formatador'
module DManga
class MangaNotFoundError < RuntimeError
end
def self.display_error(message, error)
Formatador.display_line("\t[_red_][white][bold]ERRO: #{message}.[/]")
Formatador.display_line("\t[_red_][white][bold]ERROR: #{error.message}.[/]")
end
def self.disp... | ruby | MIT | e8b94508c8fdf169f3e00cb2bdfe695c19e5beb8 | 2026-01-04T17:58:07.727342Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/spec_helper.rb | spec/spec_helper.rb | require 'coveralls'
Coveralls.wear!
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
Coveralls::SimpleCov::Formatter,
SimpleCov::Formatter::HTMLFormatter
])
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'pry'
Rails.backtrace_cleaner.remov... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/support/database_cleaner.rb | spec/support/database_cleaner.rb | require 'database_cleaner'
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, :js => true) do
DatabaseCleaner.strategy = :truncation
end
config.before(:eac... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/performance/slow_filterer_spec.rb | spec/performance/slow_filterer_spec.rb | require 'spec_helper'
require 'benchmark/ips'
describe 'Performance of SlowFilterer', performance: true do
it 'performs fast' do
Benchmark.ips do |x|
params = {
name: 'one',
a: 'two',
b: 'three',
sort: 'field_21'
}
# Add a bunch of useless params, too
(0..... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/features/basic_spec.rb | spec/features/basic_spec.rb | require 'spec_helper'
module BasicSpecHelper
if defined?(Kaminari)
def ensure_page_links(*args)
expect(page).to have_selector('nav.pagination')
args.each do |x|
if x.is_a?(Integer)
expect(page).to have_link(x)
else
expect(page).to have_selector('li', text: x)
... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/filterers/slow_filterer.rb | spec/dummy/app/filterers/slow_filterer.rb | class SlowFilterer < Filterer::Base
sort_option 'name', default: true, tiebreaker: true
def starting_query
Person
end
def param_name(x)
results.where(name: x)
end
def param_a(x)
results
end
def param_b(x)
results
end
def param_c(x)
results
end
def param_d(x)
results... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/filterers/person_filterer.rb | spec/dummy/app/filterers/person_filterer.rb | class PersonFilterer < Filterer::Base
def starting_query
Person
end
def param_name(x)
results.where(name: x)
end
sort_option 'name', default: true
sort_option 'id'
self.per_page = 10
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/filterers/unpaginated_person_filterer.rb | spec/dummy/app/filterers/unpaginated_person_filterer.rb | class UnpaginatedPersonFilterer < PersonFilterer
self.per_page = nil
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/helpers/application_helper.rb | spec/dummy/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/controllers/people_controller.rb | spec/dummy/app/controllers/people_controller.rb | class PeopleController < ApplicationController
def index
@people = PersonFilterer.filter(params)
end
def no_pagination
@people = UnpaginatedPersonFilterer.filter(params)
render :index
end
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/controllers/application_controller.rb | spec/dummy/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/models/person.rb | spec/dummy/app/models/person.rb | class Person < ActiveRecord::Base
belongs_to :company
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/app/models/company.rb | spec/dummy/app/models/company.rb | class Company < ActiveRecord::Base
has_many :people
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/db/schema.rb | spec/dummy/db/schema.rb | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/db/migrate/20131117183023_create_dummy_database.rb | spec/dummy/db/migrate/20131117183023_create_dummy_database.rb | class CreateDummyDatabase < ActiveRecord::Migration
def change
create_table :people do |t|
t.string :name
t.string :email
t.integer :company_id
t.timestamps
end
create_table :companies do |t|
t.string :name
t.timestamps
end
end
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/application.rb | spec/dummy/config/application.rb | require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
require 'filterer'
module Dummy
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/i... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/environment.rb | spec/dummy/config/environment.rb | # Load the Rails application.
require File.expand_path('../application', __FILE__)
if ENV['WILL_PAGINATE']
require 'will_paginate'
else
require 'kaminari'
end
# Initialize the Rails application.
Dummy::Application.initialize!
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/routes.rb | spec/dummy/config/routes.rb | Rails.application.routes.draw do
resources :people do
collection do
get 'no_pagination'
end
end
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/boot.rb | spec/dummy/config/boot.rb | # Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/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 | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/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.
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/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 | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/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 | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/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 | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/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
# Mime::Type.register_alias "text/html", :iphone
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/initializers/secret_token.rb | spec/dummy/config/initializers/secret_token.rb | # Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to diction... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/environments/test.rb | spec/dummy/config/environments/test.rb | Dummy::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 sui... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/environments/development.rb | spec/dummy/config/environments/development.rb | Dummy::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 ser... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/dummy/config/environments/production.rb | spec/dummy/config/environments/production.rb | Dummy::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 thread web server... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/lib/filterer/active_record_spec.rb | spec/lib/filterer/active_record_spec.rb | require 'spec_helper'
describe 'ActiveRecord' do
it 'finds for a model' do
included = Person.create(name: 'b')
excluded = Person.create(name: 'c')
params = { name: 'b' }
expect(PersonFilterer).to receive(:new).with(params, anything).and_call_original
expect(Person.filter(params)).to eq [included... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/spec/lib/filterer/base_spec.rb | spec/lib/filterer/base_spec.rb | require 'spec_helper'
class FakeQuery
COUNT = 5
def method_missing(method, *args)
self
end
def to_str
'FakeQuery'
end
def to_ary
['FakeQuery']
end
def count(*args); COUNT end;
end
class DefaultFilterer < Filterer::Base; end;
class MutationFilterer < Filterer::Base
def starting_query... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/lib/filterer.rb | lib/filterer.rb | require 'filterer/engine'
require 'filterer/base'
module Filterer
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/lib/generators/rspec/filterer_generator.rb | lib/generators/rspec/filterer_generator.rb | module Rspec
module Generators
class FiltererGenerator < Rails::Generators::NamedBase
desc "Generate a Filterer spec in spec/filterers/"
argument :name, :type => :string, :required => true, :banner => 'FiltererName'
source_root File.expand_path("../templates", __FILE__)
def copy_files #... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/lib/generators/rspec/templates/filter_spec.rb | lib/generators/rspec/templates/filter_spec.rb | require 'spec_helper'
describe <%= class_name %> do
pending "add some examples to (or delete) #{__FILE__}"
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/lib/generators/test_unit/filterer_generator.rb | lib/generators/test_unit/filterer_generator.rb | module TestUnit
module Generators
class FiltererGenerator < Rails::Generators::NamedBase
desc "Generate a Filterer test in test/filterers/"
argument :name, :type => :string, :required => true, :banner => 'FiltererName'
source_root File.expand_path("../templates", __FILE__)
def copy_file... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/lib/generators/test_unit/templates/filter_test.rb | lib/generators/test_unit/templates/filter_test.rb | require 'test_helper'
class <%= class_name %> < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
dobtco/filterer | https://github.com/dobtco/filterer/blob/47b16e84651da4769d2932076c087d88fd9de167/lib/generators/filterer/filterer_generator.rb | lib/generators/filterer/filterer_generator.rb | class FiltererGenerator < Rails::Generators::NamedBase
desc "Generate a Filterer in app/filterers/"
argument :name, :type => :string, :required => true, :banner => 'FiltererName'
source_root File.expand_path("../templates", __FILE__)
def copy_files # :nodoc:
template "filter.rb", "app/filterers/#{file_na... | ruby | MIT | 47b16e84651da4769d2932076c087d88fd9de167 | 2026-01-04T17:58:11.153161Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.