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 |
|---|---|---|---|---|---|---|---|---|
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/test/models/parsers/gaggiuino_test.rb | test/models/parsers/gaggiuino_test.rb | require "test_helper"
module Parsers
class GaggiuinoTest < ActiveSupport::TestCase
setup do
@user = build_stubbed(:user)
end
def new_shot(path, user: @user)
Shot.from_file(user, File.read(path))
end
test "extracts gaggiuino shot file" do
shot = new_shot("test/files/gaggiuino-1... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/test/mailers/previews/user_mailer_preview.rb | test/mailers/previews/user_mailer_preview.rb | class UserMailerPreview < ActionMailer::Preview
def yearly_brew
user = User.admin
UserMailer.with(user:).yearly_brew
end
%i[black_friday cancelled_after_trial cancelled_premium].each do
define_method(it) do
user = User.order("RANDOM()").first
UserMailer.with(user:).public_send(it)
end... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/test/mailers/previews/passwords_mailer_preview.rb | test/mailers/previews/passwords_mailer_preview.rb | class PasswordsMailerPreview < ActionMailer::Preview
def reset
PasswordsMailer.reset(User.take)
end
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/ci.rb | config/ci.rb | # Run using bin/ci
CI.run do
step "Setup", "bin/setup --skip-server"
step "Style: Ruby", "bin/rubocop"
step "Security: Gem audit", "bin/bundler-audit"
step "Security: Importmap vulnerability audit", "bin/importmap audit"
step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-wa... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/application.rb | config/application.rb | require_relative "boot"
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Visualizer
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rail... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/environment.rb | config/environment.rb | # Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/puma.rb | config/puma.rb | # This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
#
# Puma starts a configurable number of processes (workers) and each process
# serve... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/routes.rb | config/routes.rb | Rails.application.routes.draw do
match "(*any)", to: redirect(subdomain: ""), via: :all, constraints: {subdomain: "www"}
constraints ->(request) { AuthConstraint.admin?(request) } do
mount MissionControl::Jobs::Engine, at: "/jobs"
mount PgHero::Engine, at: "/pghero"
end
use_doorkeeper do
controlle... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/importmap.rb | config/importmap.rb | pin "application"
pin "@rails/activestorage", to: "activestorage.esm.js"
pin "@hotwired/turbo-rails", to: "turbo.min.js"
pin "@hotwired/stimulus", to: "stimulus.min.js"
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
pin "highcharts", to: "https://cdn.jsdelivr.net/npm/highcharts@12.4.0/esm/highcharts.js"
p... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/boot.rb | config/boot.rb | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/content_security_policy.rb | config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
# Rails.application.configure do
# config.content_security... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/filter_parameter_logging.rb | config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behavio... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/application_controller_renderer.rb | config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: "example.org",
# https: false
# )
# end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/webauthn.rb | config/initializers/webauthn.rb | WebAuthn.configure do
it.allowed_origins = [Rails.configuration.webauthn_origin]
it.rp_name = "Visualizer"
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/doorkeeper.rb | config/initializers/doorkeeper.rb | Doorkeeper.configure do
# Change the ORM that doorkeeper will use (requires ORM extensions installed).
# Check the list of supported ORMs here: https://github.com/doorkeeper-gem/doorkeeper#orms
orm :active_record
# This block will be called to check whether the resource owner is authenticated or not.
resourc... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/prosopite.rb | config/initializers/prosopite.rb | if Rails.env.local?
require "prosopite/middleware/rack"
Rails.configuration.middleware.use(Prosopite::Middleware::Rack)
Prosopite.min_n_queries = 3
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/logging.rb | config/initializers/logging.rb | if Rails.env.production?
appsignal_logger = Appsignal::Logger.new("rails")
Rails.logger.broadcast_to(appsignal_logger)
Rails.logger = ActiveSupport::TaggedLogging.new(appsignal_logger)
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/generators.rb | config/initializers/generators.rb | Rails.application.config.generators do
it.orm :active_record, primary_key_type: :uuid
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/turbo_streams.rb | config/initializers/turbo_streams.rb | Turbo::Streams::BroadcastJob.queue_name = :real_time
Turbo::Streams::ActionBroadcastJob.queue_name = :real_time
Turbo::Streams::BroadcastStreamJob.queue_name = :real_time
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/wrap_parameters.rb | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/aws.rb | config/initializers/aws.rb | require "aws-sdk-s3"
if Rails.application.credentials.aws
Aws.config.update(
credentials: Aws::Credentials.new(
Rails.application.credentials.aws&.access_key_id,
Rails.application.credentials.aws&.secret_access_key
),
region: Rails.application.credentials.aws&.region
)
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/omniauth.rb | config/initializers/omniauth.rb | Rails.application.config.middleware.use OmniAuth::Builder do
provider(
:airtable,
Rails.application.credentials.dig(:airtable, :client_id),
Rails.application.credentials.dig(:airtable, :client_secret),
scope: "data.records:read data.records:write schema.bases:read schema.bases:write webhook:manage"
... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/permissions_policy.rb | config/initializers/permissions_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide HTTP permissions policy. For further
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
# Rails.application.config.permissions_policy do |policy|
# policy.camera :none
# policy.gyroscope ... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/assets.rb | config/initializers/assets.rb | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/actual_db_schema.rb | config/initializers/actual_db_schema.rb | if defined?(ActualDbSchema)
ActualDbSchema.configure do
it.enabled = Rails.env.development?
it.auto_rollback_disabled = ENV["ACTUAL_DB_SCHEMA_AUTO_ROLLBACK_DISABLED"].present?
it.ui_enabled = Rails.env.development? || ENV["ACTUAL_DB_SCHEMA_UI_ENABLED"].present?
it.git_hooks_enabled = true
end
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
# You can also remove all the silencers if you're trying to debug a ... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/reactionview.rb | config/initializers/reactionview.rb | if Rails.env.development?
ReActionView.configure do
it.intercept_erb = true
it.debug_mode = true
end
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/appsignal.rb | config/initializers/appsignal.rb | module Appsignal
class SimpleMessage < StandardError
end
def self.set_message(message, ...)
ex = SimpleMessage.new(message)
ex.set_backtrace(caller.drop(1))
report_error(ex, ...)
end
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/initializers/cors.rb | config/initializers/cors.rb | Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins "*"
resource "*", headers: :any, methods: %i[get post patch put delete options head]
end
end
| ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/environments/test.rb | config/environments/test.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 suite and is wiped
# and recreated between test runs. Don't rely on the data there!
Rails.application.configure do
# Settings... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/environments/development.rb | config/environments/development.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Make code changes take effect immediately without server restart.
config.enable_reloading = true
# Do not eager load code on boot.
config.eager... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
miharekar/visualizer | https://github.com/miharekar/visualizer/blob/2c24602948f183e5c6e7d639fd97ee1aff4d23ca/config/environments/production.rb | config/environments/production.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.enable_reloading = false
# Eager load code on boot for better performance and memory savings (ignor... | ruby | MIT | 2c24602948f183e5c6e7d639fd97ee1aff4d23ca | 2026-01-04T17:41:55.482911Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/test/test_latex_to_pdf.rb | test/test_latex_to_pdf.rb | # -*- coding: utf-8 -*-
require 'rails-latex/erb_latex'
require 'rails-latex/errors'
require 'ostruct'
require 'pathname'
require 'logger'
class TestLatexToPdf < Minitest::Test
def setup
super
FileUtils.rm_rf("#{TMP_DIR}/tmp/rails-latex")
end
def teardown
super
LatexToPdf.instance_eval { @config... | ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/test/test_helper.rb | test/test_helper.rb | ENV['RAILS_ENV'] ||= 'test'
require 'minitest/autorun'
require 'minitest/reporters'
Minitest::Reporters.use!
TMP_DIR = File.expand_path("../tmp",__FILE__)
module Rails
def self.root
TMP_DIR
end
def self.logger
Logger.new(STDERR)
end
end
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/app/controllers/latex_example_controller.rb | examples/rails-latex-demo/app/controllers/latex_example_controller.rb | class LatexExampleController < ApplicationController
def index
end
def barcode
render :layout => 'barcode', formats: [:pdf]
end
def barcode_as_string
@pdf=render_to_string(action: 'barcode', layout: "barcode", formats: [:pdf])
self.content_type = 'text/html'
File.open(file="#{Rails.root}/tm... | ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/app/controllers/application_controller.rb | examples/rails-latex-demo/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/application.rb | examples/rails-latex-demo/config/application.rb | require_relative 'boot'
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
# require "active_record/railtie"
require "action_controller/railtie"
# require "action_mailer/railtie"
require "action_view/railtie"
# require "action_cable/engine"
# require "sprockets/... | ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/environment.rb | examples/rails-latex-demo/config/environment.rb | # Load the Rails application.
require_relative 'application'
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/routes.rb | examples/rails-latex-demo/config/routes.rb | Rails.application.routes.draw do
get 'latex_example' => "latex_example#index"
get 'latex_example/barcode' => "latex_example#barcode"
get 'latex_example/barcode_as_string' => "latex_example#barcode_as_string"
root :to => "latex_example#index"
end
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/boot.rb | examples/rails-latex-demo/config/boot.rb | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/filter_parameter_logging.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/application_controller_renderer.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/session_store.rb | examples/rails-latex-demo/config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_rails-5-latex-demo_session'
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/new_framework_defaults.rb | examples/rails-latex-demo/config/initializers/new_framework_defaults.rb | # Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
#
# Read the Rails 5.0 release notes for more info on each option.
# Enable per-form CSRF tokens. Previous versions had false.
Rails.application.config.action_controller.per_form_csrf_to... | ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/wrap_parameters.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/inflections.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/cookies_serializer.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/backtrace_silencers.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/initializers/mime_types.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/environments/test.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/environments/development.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/examples/rails-latex-demo/config/environments/production.rb | examples/rails-latex-demo/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 | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/lib/rails-latex.rb | lib/rails-latex.rb | require "rails-latex/version"
require "rails-latex/errors"
require "rails-latex/erb_latex"
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/lib/rails-latex/version.rb | lib/rails-latex/version.rb | module RailsLatex
VERSION = "2.3.5"
end
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/lib/rails-latex/errors.rb | lib/rails-latex/errors.rb | module RailsLatex
class ProcessingError < StandardError
attr_reader :src, :log
def initialize(msg = 'RailsLatex processing failed.', src = '', log = '')
@src = src
@log = log
super(msg)
end
end
end
| ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/lib/rails-latex/latex_to_pdf.rb | lib/rails-latex/latex_to_pdf.rb | # -*- coding: utf-8 -*-
class LatexToPdf
def self.config
@config||={
:recipe => [
# {
# :command => 'pdflatex',
# :arguments => ['-halt-on-error', '-shell-escape', '-interaction=batchmode'],
# :extra_arguments => [],
# :runs => 1
# }
],
:command ... | ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
amagical-net/rails-latex | https://github.com/amagical-net/rails-latex/blob/2e7709535b513f6dfa431dc92aee244c0e4edb58/lib/rails-latex/erb_latex.rb | lib/rails-latex/erb_latex.rb | # -*- coding: utf-8 -*-
require 'fileutils'
require 'rails-latex/latex_to_pdf'
require 'action_view'
module ActionView # :nodoc: all
module Template::Handlers
class ERBLatex < ERB
def self.call(template, source = nil)
source ||= template.source
new.compile(template, source)
... | ruby | MIT | 2e7709535b513f6dfa431dc92aee244c0e4edb58 | 2026-01-04T17:42:32.362260Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/profile/benchmarks.rb | profile/benchmarks.rb | # frozen_string_literal: true
require 'ethon'
require 'open-uri'
require 'patron'
require 'curb'
require 'net/http'
require 'cgi'
require 'benchmark/ips'
require_relative '../spec/support/server'
require_relative '../spec/support/localhost_server'
LocalhostServer.new(TESTSERVER.new, 3000)
LocalhostServer.new(TESTSERV... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/profile/perf_spec_helper.rb | profile/perf_spec_helper.rb | # frozen_string_literal: true
#### SETUP
require 'bundler'
Bundler.setup
require 'rspec'
require 'support/localhost_server'
require 'support/server'
require_relative 'support/memory_test_helpers'
require 'logger'
if ENV['VERBOSE']
Ethon.logger = Logger.new($stdout)
Ethon.logger.level = Logger::DEBUG
end
RSpec.c... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/profile/memory_leaks.rb | profile/memory_leaks.rb | # frozen_string_literal: true
require 'ethon'
require 'ethon/easy'
require_relative 'perf_spec_helper'
require 'rspec/autorun'
describe "low-level interactions with libcurl" do
describe Ethon::Multi do
memory_leak_test("init") do
Ethon::Multi.new
end
memory_leak_test("handle") do
Ethon::Mul... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/profile/support/os_memory_leak_tracker.rb | profile/support/os_memory_leak_tracker.rb | # frozen_string_literal: true
class OSMemoryLeakTracker
attr_reader :current_run
def initialize
@previous_run = @current_run = 0
end
def difference_between_runs(basis=@previous_run)
@current_run - basis
end
def total_difference_between_runs
difference_between_runs(@initial_count_run)
end
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/profile/support/memory_test_helpers.rb | profile/support/memory_test_helpers.rb | # frozen_string_literal: true
require_relative 'ruby_object_leak_tracker'
require_relative 'os_memory_leak_tracker'
module MemoryTestHelpers
class << self
attr_accessor :gc_proc, :iterations, :logger
def setup
if RUBY_PLATFORM == "java"
# for leak detection
JRuby.objectspace = true if ... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/profile/support/ruby_object_leak_tracker.rb | profile/support/ruby_object_leak_tracker.rb | # frozen_string_literal: true
class RubyObjectLeakTracker
attr_reader :previous_count_hash, :current_count_hash
def initialize
@previous_count_hash = @current_count_hash = {}
end
def difference_between_runs(basis=@previous_count_hash)
@difference_between_runs ||= Hash[@current_count_hash.map do |o... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/spec_helper.rb | spec/spec_helper.rb | # frozen_string_literal: true
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require 'bundler'
Bundler.setup
require "ethon"
require 'rspec'
require_relative 'support/localhost_server'
require_relative 'support/server'
# Ethon.logger = Logger.new($stdout... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/support/localhost_server.rb | spec/support/localhost_server.rb | # frozen_string_literal: true
require 'rack'
require 'webrick'
require 'net/http'
require 'rackup'
require 'timeout'
# The code for this is inspired by Capybara's server:
# http://github.com/jnicklas/capybara/blob/0.3.9/lib/capybara/server.rb
class LocalhostServer
READY_MESSAGE = "Server ready"
# Fallback to ol... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/support/server.rb | spec/support/server.rb | #!/usr/bin/env ruby
# frozen_string_literal: true
require 'json'
require 'zlib'
require 'sinatra/base'
TESTSERVER = Sinatra.new do
use Rack::RewindableInput::Middleware if defined?(Rack::RewindableInput::Middleware)
set :logging, nil
fail_count = 0
post '/file' do
{
'content-type' => params[:file]... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/multi_spec.rb | spec/ethon/multi_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Multi do
describe ".new" do
it "inits curl" do
expect(Ethon::Curl).to receive(:init)
Ethon::Multi.new
end
context "with default options" do
it "allows running #perform with the default execution_mode" do
Ethon:... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/curl_spec.rb | spec/ethon/curl_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Curl do
describe ".init" do
before { Ethon::Curl.send(:class_variable_set, :@@initialized, false) }
context "when global_init fails" do
it "raises global init error" do
expect(Ethon::Curl).to receive(:global_init).and_return(1... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/loggable_spec.rb | spec/ethon/loggable_spec.rb | # frozen_string_literal: true
require "spec_helper"
describe Ethon::Loggable do
describe "#logger=" do
let(:logger) do
Logger.new($stdout).tap do |log|
log.level = Logger::INFO
end
end
before do
Ethon.logger = logger
end
it "sets the logger" do
expect(Ethon.log... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy_spec.rb | spec/ethon/easy_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy do
let(:easy) { Ethon::Easy.new }
describe ".new" do
it "inits curl" do
expect(Ethon::Curl).to receive(:init)
easy
end
context "when options are empty" do
it "sets only callbacks" do
expect_any_instance... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/libc_spec.rb | spec/ethon/libc_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Libc do
describe "#getdtablesize", :if => !Ethon::Curl.windows? do
it "returns an integer" do
expect(Ethon::Libc.getdtablesize).to be_a(Integer)
end
it "returns bigger zero", :if => !Ethon::Curl.windows? do
expect(Ethon::Lib... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/multi/operations_spec.rb | spec/ethon/multi/operations_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Multi::Operations do
let(:multi) { Ethon::Multi.new }
let(:easy) { Ethon::Easy.new }
let(:pointer) { FFI::MemoryPointer.new(:int) }
describe "#handle" do
it "returns a pointer" do
expect(multi.handle).to be_a(FFI::Pointer)
end
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/multi/stack_spec.rb | spec/ethon/multi/stack_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Multi::Stack do
let(:multi) { Ethon::Multi.new }
let(:easy) { Ethon::Easy.new }
describe "#add" do
context "when easy already added" do
before { multi.add(easy) }
it "returns nil" do
expect(multi.add(easy)).to be_nil
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/multi/options_spec.rb | spec/ethon/multi/options_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Multi::Options do
let(:multi) { Ethon::Multi.new }
[
:maxconnects, :pipelining, :socketdata, :socketfunction,
:timerdata, :timerfunction, :max_total_connections
].each do |name|
describe "#{name}=" do
it "responds_to" do
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/form_spec.rb | spec/ethon/easy/form_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Form do
let(:hash) { {} }
let!(:easy) { Ethon::Easy.new }
let(:form) { Ethon::Easy::Form.new(easy, hash) }
describe ".new" do
it "assigns attribute to @params" do
expect(form.instance_variable_get(:@params)).to eq(hash)
en... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/header_spec.rb | spec/ethon/easy/header_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Header do
let(:easy) { Ethon::Easy.new }
describe "#headers=" do
let(:headers) { { 'User-Agent' => 'Ethon' } }
it "sets header" do
expect_any_instance_of(Ethon::Easy).to receive(:set_callbacks)
expect(Ethon::Curl).to re... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/callbacks_spec.rb | spec/ethon/easy/callbacks_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Callbacks do
let!(:easy) { Ethon::Easy.new }
describe "#set_callbacks" do
before do
expect(Ethon::Curl).to receive(:set_option).exactly(3).times
end
it "sets write-, debug-, and headerfunction" do
easy.set_callbacks... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/mirror_spec.rb | spec/ethon/easy/mirror_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Mirror do
let(:options) { nil }
let(:mirror) { described_class.new(options) }
describe "::INFORMATIONS_TO_LOG" do
[
:return_code, :response_code, :response_body, :response_headers,
:total_time, :starttransfer_time, :appcon... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/debug_info_spec.rb | spec/ethon/easy/debug_info_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::DebugInfo do
let(:easy) { Ethon::Easy.new }
before do
easy.url = "http://localhost:3001/"
easy.perform
end
describe "#debug_info" do
context "when verbose is not set to true" do
it "does not save any debug info after ... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/informations_spec.rb | spec/ethon/easy/informations_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Informations do
let(:easy) { Ethon::Easy.new }
before do
easy.url = "http://localhost:3001"
easy.perform
end
describe "#httpauth_avail" do
it "returns" do
expect(easy.httpauth_avail).to be
end
end
describe "#... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/response_callbacks_spec.rb | spec/ethon/easy/response_callbacks_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::ResponseCallbacks do
let(:easy) { Ethon::Easy.new }
[:on_complete, :on_headers, :on_body, :on_progress].each do |callback_type|
describe "##{callback_type}" do
it "responds" do
expect(easy).to respond_to("#{callback_type}"... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/features_spec.rb | spec/ethon/easy/features_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Informations do
describe "#supports_asynch_dns?" do
it "returns boolean" do
expect([true, false].include? Ethon::Easy.supports_asynch_dns?).to be_truthy
end
end
describe "#supports_zlib?" do
it "returns boolean" do
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/util_spec.rb | spec/ethon/easy/util_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Util do
class Dummy
include Ethon::Easy::Util
end
let(:klass) { Dummy.new }
describe "escape_zero_byte" do
context "when value has no zero byte" do
let(:value) { "hello world" }
it "returns same value" do
e... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/operations_spec.rb | spec/ethon/easy/operations_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Operations do
let(:easy) { Ethon::Easy.new }
describe "#handle" do
it "returns a pointer" do
expect(easy.handle).to be_a(FFI::Pointer)
end
end
describe "#perform" do
let(:url) { nil }
let(:timeout) { nil }
le... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http_spec.rb | spec/ethon/easy/http_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http do
let(:easy) { Ethon::Easy.new }
describe "#http_request" do
let(:url) { "http://localhost:3001/" }
let(:action_name) { :get }
let(:options) { {} }
let(:get) { double(:setup) }
let(:get_class) { Ethon::Easy::Http:... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/queryable_spec.rb | spec/ethon/easy/queryable_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Queryable do
let(:hash) { {} }
let!(:easy) { Ethon::Easy.new }
let(:params) { Ethon::Easy::Params.new(easy, hash) }
describe "#to_s" do
context "when query_pairs empty" do
before { params.instance_variable_set(:@query_pairs, [... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/options_spec.rb | spec/ethon/easy/options_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Options do
let(:easy) { Ethon::Easy.new }
[
:accept_encoding, :cainfo, :capath, :connecttimeout, :connecttimeout_ms, :cookie,
:cookiejar, :cookiefile, :copypostfields, :customrequest, :dns_cache_timeout,
:followlocation, :forbid... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/delete_spec.rb | spec/ethon/easy/http/delete_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Delete do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:delete) { described_class.new(url, {:params => params, :body => form}) }
context "when requesting" do... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/head_spec.rb | spec/ethon/easy/http/head_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Head do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:head) { described_class.new(url, {:params => params, :body => form}) }
describe "#setup" do
context... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/put_spec.rb | spec/ethon/easy/http/put_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Put do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:options) { Hash.new }
let(:put) { described_class.new(url, options.merge({:params => params, :body => for... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/patch_spec.rb | spec/ethon/easy/http/patch_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Patch do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:patch) { described_class.new(url, {:params => params, :body => form}) }
describe "#setup" do
it "s... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/post_spec.rb | spec/ethon/easy/http/post_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Post do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:options) { Hash.new }
let(:post) { described_class.new(url, options.merge({:params => params, :body => f... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/get_spec.rb | spec/ethon/easy/http/get_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Get do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:options) { {} }
let(:get) { described_class.new(url, {:params => params, :body => form}.merge(options)) }... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/custom_spec.rb | spec/ethon/easy/http/custom_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Custom do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:custom) { described_class.new("PURGE", url, {:params => params, :body => form}) }
describe "#setup" d... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/spec/ethon/easy/http/options_spec.rb | spec/ethon/easy/http/options_spec.rb | # frozen_string_literal: true
require 'spec_helper'
describe Ethon::Easy::Http::Options do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
let(:form) { nil }
let(:options) { described_class.new(url, {:params => params, :body => form}) }
describe "#setup" do
i... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon.rb | lib/ethon.rb | # frozen_string_literal: true
require 'logger'
require 'ffi'
require 'thread'
begin
require 'mime/types/columnar'
rescue LoadError
begin
require 'mime/types'
rescue LoadError
end
end
require 'tempfile'
require 'ethon/libc'
require 'ethon/curl'
require 'ethon/easy'
require 'ethon/errors'
require 'ethon/logg... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curl.rb | lib/ethon/curl.rb | # frozen_string_literal: true
require 'ethon/curls/codes'
require 'ethon/curls/options'
require 'ethon/curls/infos'
require 'ethon/curls/form_options'
require 'ethon/curls/messages'
require 'ethon/curls/functions'
module Ethon
# FFI Wrapper module for Curl. Holds constants and required initializers.
#
# @api pr... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.