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
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/db/seeds.rb
ruby/sentry-rails/rails-7.0/db/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). # # Examples: # # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) # ...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/db/schema.rb
ruby/sentry-rails/rails-7.0/db/schema.rb
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/db/migrate/20220403110436_create_posts.rb
ruby/sentry-rails/rails-7.0/db/migrate/20220403110436_create_posts.rb
class CreatePosts < ActiveRecord::Migration[7.0] def change create_table :posts do |t| t.string :title t.text :content t.timestamps end end end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/test/application_system_test_case.rb
ruby/sentry-rails/rails-7.0/test/application_system_test_case.rb
require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :selenium, using: :chrome, screen_size: [1400, 1400] end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/test/test_helper.rb
ruby/sentry-rails/rails-7.0/test/test_helper.rb
ENV["RAILS_ENV"] ||= "test" require_relative "../config/environment" require "rails/test_help" class ActiveSupport::TestCase # Run tests in parallel with specified workers parallelize(workers: :number_of_processors) # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/test/channels/application_cable/connection_test.rb
ruby/sentry-rails/rails-7.0/test/channels/application_cable/connection_test.rb
require "test_helper" class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase # test "connects with cookies" do # cookies.signed[:user_id] = 42 # # connect # # assert_equal connection.user_id, "42" # end end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/spec/rails_helper.rb
ruby/sentry-rails/rails-7.0/spec/rails_helper.rb
# This file is copied to spec/ when you run 'rails generate rspec:install' require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' require_relative '../config/environment' # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? requ...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/spec/spec_helper.rb
ruby/sentry-rails/rails-7.0/spec/spec_helper.rb
# This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause # this file to always be loaded, without a need to explicitly require ...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/spec/requests/welcomes_spec.rb
ruby/sentry-rails/rails-7.0/spec/requests/welcomes_spec.rb
require 'rails_helper' RSpec.describe "Welcomes", type: :request do before do setup_sentry_test end after do teardown_sentry_test end describe "GET /" do it "captures and sends exception to Sentry" do get "/" expect(response).to have_http_status(500) expect(sentry_events.count...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/application.rb
ruby/sentry-rails/rails-7.0/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 ExampleApp class Application < Rails::Application # Initialize configuration defaults for originally generated Rail...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/environment.rb
ruby/sentry-rails/rails-7.0/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/puma.rb
ruby/sentry-rails/rails-7.0/config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/routes.rb
ruby/sentry-rails/rails-7.0/config/routes.rb
require "resque/server" Rails.application.routes.draw do resources :posts get '500', to: 'welcome#report_demo' root to: "welcome#index" get 'appearance', to: 'welcome#appearance' get 'connect_trace', to: 'welcome#connect_trace' get 'view_error', to: 'welcome#view_error' get 'sidekiq_error', to: 'welcome...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/boot.rb
ruby/sentry-rails/rails-7.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/initializers/content_security_policy.rb
ruby/sentry-rails/rails-7.0/config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.configure do # config.content_security_po...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/initializers/filter_parameter_logging.rb
ruby/sentry-rails/rails-7.0/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure parameters to be filtered from the log file. Use this to limit dissemination of # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported # notations and behaviors. Rails.application.config.filter_parameters += [ ...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/initializers/inflections.rb
ruby/sentry-rails/rails-7.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/initializers/permissions_policy.rb
ruby/sentry-rails/rails-7.0/config/initializers/permissions_policy.rb
# 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 |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :s...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/initializers/assets.rb
ruby/sentry-rails/rails-7.0/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 # Precompile additional...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/initializers/sentry.rb
ruby/sentry-rails/rails-7.0/config/initializers/sentry.rb
Sentry.init do |config| config.breadcrumbs_logger = [:active_support_logger] config.background_worker_threads = 0 config.send_default_pii = true config.traces_sample_rate = 1.0 # set a float between 0.0 and 1.0 to enable performance monitoring config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ing...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/environments/test.rb
ruby/sentry-rails/rails-7.0/config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data the...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/environments/development.rb
ruby/sentry-rails/rails-7.0/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-7.0/config/environments/production.rb
ruby/sentry-rails/rails-7.0/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.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your applica...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/minimum-rails/app.rb
ruby/sentry-rails/minimum-rails/app.rb
require "bundler/inline" gemfile(true) do source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '> 2.6' gem 'sentry-rails', path: "../../" gem 'railties', '~> 6.0.0' end require "action_view/railtie" require "action_controller/railtie" require 'sentry-rails' Se...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/app/jobs/application_job.rb
ruby/sentry-rails/rails-8.0/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationError end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/app/jobs/error_job.rb
ruby/sentry-rails/rails-8.0/app/jobs/error_job.rb
class ErrorJob < ApplicationJob queue_as :default def perform(*args) foo end end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/app/helpers/application_helper.rb
ruby/sentry-rails/rails-8.0/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/app/controllers/application_controller.rb
ruby/sentry-rails/rails-8.0/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has. allow_browser versions: :modern end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/app/models/application_record.rb
ruby/sentry-rails/rails-8.0/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base primary_abstract_class end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/app/mailers/application_mailer.rb
ruby/sentry-rails/rails-8.0/app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/db/seeds.rb
ruby/sentry-rails/rails-8.0/db/seeds.rb
# This file should ensure the existence of records required to run the application in every environment (production, # development, test). The code here should be idempotent so that it can be executed at any point in every environment. # The data can then be loaded with the bin/rails db:seed command (or created alongsi...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/db/queue_schema.rb
ruby/sentry-rails/rails-8.0/db/queue_schema.rb
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/db/cache_schema.rb
ruby/sentry-rails/rails-8.0/db/cache_schema.rb
# frozen_string_literal: true ActiveRecord::Schema[7.2].define(version: 1) do create_table "solid_cache_entries", force: :cascade do |t| t.binary "key", limit: 1024, null: false t.binary "value", limit: 536870912, null: false t.datetime "created_at", null: false t.integer "key_hash", limit: 8, null: ...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/db/schema.rb
ruby/sentry-rails/rails-8.0/db/schema.rb
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/db/cable_schema.rb
ruby/sentry-rails/rails-8.0/db/cable_schema.rb
ActiveRecord::Schema[7.1].define(version: 1) do create_table "solid_cable_messages", force: :cascade do |t| t.binary "channel", limit: 1024, null: false t.binary "payload", limit: 536870912, null: false t.datetime "created_at", null: false t.integer "channel_hash", limit: 8, null: false t.index ["...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/test/application_system_test_case.rb
ruby/sentry-rails/rails-8.0/test/application_system_test_case.rb
require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ] end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/test/test_helper.rb
ruby/sentry-rails/rails-8.0/test/test_helper.rb
ENV["RAILS_ENV"] ||= "test" require_relative "../config/environment" require "rails/test_help" module ActiveSupport class TestCase # Run tests in parallel with specified workers parallelize(workers: :number_of_processors) # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. ...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/test/jobs/error_job_test.rb
ruby/sentry-rails/rails-8.0/test/jobs/error_job_test.rb
require "test_helper" class ErrorJobTest < ActiveJob::TestCase # test "the truth" do # assert true # end end
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/application.rb
ruby/sentry-rails/rails-8.0/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 Rails80 class Application < Rails::Application # Initialize configuration defaults for originally generated Rails v...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/environment.rb
ruby/sentry-rails/rails-8.0/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/puma.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/routes.rb
ruby/sentry-rails/rails-8.0/config/routes.rb
Rails.application.routes.draw do # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. get...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/importmap.rb
ruby/sentry-rails/rails-8.0/config/importmap.rb
# Pin npm packages by running ./bin/importmap pin "application" pin "@hotwired/turbo-rails", to: "turbo.min.js" pin "@hotwired/stimulus", to: "stimulus.min.js" pin "@hotwired/stimulus-loading", to: "stimulus-loading.js" pin_all_from "app/javascript/controllers", under: "controllers"
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/boot.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/initializers/content_security_policy.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/initializers/filter_parameter_logging.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/initializers/inflections.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/initializers/assets.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/initializers/sentry.rb
ruby/sentry-rails/rails-8.0/config/initializers/sentry.rb
Sentry.init do |config| config.breadcrumbs_logger = [:active_support_logger] config.background_worker_threads = 0 config.send_default_pii = true config.traces_sample_rate = 1.0 # set a float between 0.0 and 1.0 to enable performance monitoring config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ing...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/environments/development.rb
ruby/sentry-rails/rails-8.0/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do config.active_job.queue_adapter = :solid_queue config.solid_queue.connects_to = { database: { writing: :queue } } # Settings specified here will take precedence over those in config/application.rb. # Make code changes take effect i...
ruby
MIT
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
getsentry/examples
https://github.com/getsentry/examples/blob/02dbc89a35fe1804dbe00e481716a9dd79920cf5/ruby/sentry-rails/rails-8.0/config/environments/production.rb
ruby/sentry-rails/rails-8.0/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
02dbc89a35fe1804dbe00e481716a9dd79920cf5
2026-01-04T17:57:20.388692Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/spec/itunes_spec.rb
spec/itunes_spec.rb
require File.expand_path('../spec_helper', __FILE__) describe ITunes do after do ITunes.reset end use_vcr_cassette :record => :new_episodes, :match_requests_on => [:uri, :method] context "when delegating to a client" do it "should return the same results as a client" do ITunes.music('Jose James...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/spec/spec_helper.rb
spec/spec_helper.rb
require 'simplecov' SimpleCov.start do add_group 'ITunes', 'lib/itunes' add_group 'Faraday Middleware', 'lib/faraday' add_group 'Specs', 'spec' end require File.expand_path('../../lib/itunes', __FILE__) require 'rspec' require 'vcr' RSpec.configure do |c| c.extend VCR::RSpec::Macros end VCR.config do |c| ...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/spec/itunes/client_spec.rb
spec/itunes/client_spec.rb
require 'spec_helper' describe ITunes::Client do before(:each) do @client = ITunes::Client.new end use_vcr_cassette :record => :new_episodes, :match_requests_on => [:uri, :method] describe ".lookup" do it "should return results for valid ids" do item = @client.lookup('396405320') item.res...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes.rb
lib/itunes.rb
require 'faraday_middleware' require 'itunes/configuration' require 'itunes/client' module ITunes extend Configuration # Alias for ITunes::Client.new # # @return [ITunes::Client] def self.client(options={}) ITunes::Client.new(options) end # Alias for ITunes::Client.new # # @return [ITunes::Clie...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes/version.rb
lib/itunes/version.rb
module ITunes VERSION = '0.7.0' end
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes/configuration.rb
lib/itunes/configuration.rb
require 'faraday' require File.expand_path('../version', __FILE__) module ITunes # Defines constants and methods related to configuration module Configuration # An array of valid keys in the options hash when configuring VALID_OPTIONS_KEYS = [:adapter, :endpoint, :limit, :user_agent, :request_options].fre...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes/client.rb
lib/itunes/client.rb
require File.expand_path('../request', __FILE__) module ITunes class Client # @private attr_accessor *Configuration::VALID_OPTIONS_KEYS # Creates a new Client def initialize(options={}) options = ITunes.options.merge(options) Configuration::VALID_OPTIONS_KEYS.each do |key| send(...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes/request.rb
lib/itunes/request.rb
module ITunes module Request # @private private # Perform an HTTP GET request def request(request_type, params) url = '/WebObjects/MZStoreServices.woa/wa/ws' + request_type response = connection.get do |req| req.url url, params req.options.timeout = Configuration::DEFAUL...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes/client/search.rb
lib/itunes/client/search.rb
module ITunes module Search # Performs a music search # @param [String] term The search term # @option options [Symbol] def music(term, options={}) search(term, 'music', options) end # Performs a movie search # @param [String] term The search term # @option options [Symbol] ...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
dewski/itunes
https://github.com/dewski/itunes/blob/55bfe21926c60b01665dd4b9fecb6ec57279e9cb/lib/itunes/client/lookup.rb
lib/itunes/client/lookup.rb
module ITunes module Lookup ID_TYPES = { :amg_artist => 'amgArtistId', :id => 'id', :amg_album => 'amgAlbumId', :upc => 'upc' } # Performs a lookup request based on iTunes IDs, UPCs/ EANs, and All Music Guide (AMG) IDs # @param [String] id # @option options [Symbol] :id_type used to specify the opt...
ruby
MIT
55bfe21926c60b01665dd4b9fecb6ec57279e9cb
2026-01-04T17:58:16.478853Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/spec_helper.rb
spec/spec_helper.rb
require 'simplecov' require 'jsonapi/rspec' SimpleCov.start do add_filter '/spec/' end SimpleCov.minimum_coverage 90 # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_d...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/id_spec.rb
spec/jsonapi/id_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#have_id' do it 'succeeds when id matches' do expect('id' => 'foo').to have_id('foo') end it 'fails when id mismatches' do expect('id' => 'foo').not_to have_id('bar') end it 'fails when id is absent' do expect({}).not_to have_id('foo') end...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/type_spec.rb
spec/jsonapi/type_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#have_type' do it 'succeeds when type matches' do expect('type' => 'foo').to have_type('foo') end it 'succeeds when expectation is symbol' do expect('type' => 'foo').to have_type(:foo) end it 'succeeds when type is a symbol' do expect('type'...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/relationships_spec.rb
spec/jsonapi/relationships_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#have_relationship(s)' do let(:doc) do { 'relationships' => { 'user' => { 'data' => { 'id' => '1', 'type' => 'user' } }, 'comments' => { 'data' => [ { 'id' => '1', 'type' => 'comment' }, ...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/rspec_spec.rb
spec/jsonapi/rspec_spec.rb
require 'securerandom' require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#as_indifferent_hash' do let(:doc) do { id: SecureRandom.uuid, list: [ { one: 1, 'one + one' => :two } ], hash: { key: :value, 'another key' => 'another value' } } end it do expect(JSONAPI::R...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/links_spec.rb
spec/jsonapi/links_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec do let(:doc) do { 'links' => { 'self' => 'self_link', 'related' => 'related_link' } } end context '#have_link' do it { expect(doc).to have_link(:self) } it { expect(doc).to have_link(:self).with_value('self_link') } ...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/attributes_spec.rb
spec/jsonapi/attributes_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec do let(:doc) do { 'attributes' => { 'one' => 1, 'two' => 2, 'four' => 3, 'six' => { foo: 'bar' } } } end describe '#have_attribute' do it { expect(doc).to have_attribute(:one) } it { expect(doc).not_t...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/jsonapi_object_spec.rb
spec/jsonapi/jsonapi_object_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#have_jsonapi_object' do context 'when providing no value' do it 'succeeds when jsonapi object is present' do expect('jsonapi' => { 'version' => '1.0' }).to have_jsonapi_object end it 'fails when jsonapi object is absent' do expect({}).no...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/meta_spec.rb
spec/jsonapi/meta_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#have_meta' do let(:doc) do { 'meta' => { 'one' => 'I', 'two' => 'II', 'three' => 'III' } } end context 'when providing no value' do it 'succeeds when meta is present' do expect(doc).to have_meta end ...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/spec/jsonapi/errors_spec.rb
spec/jsonapi/errors_spec.rb
require 'spec_helper' RSpec.describe JSONAPI::RSpec, '#have_error' do let(:doc) do { 'errors' => [ { 'status' => '422', 'source' => { 'pointer' => '/data/attributes/firstName' }, 'title' => 'Invalid Attribute', 'detail' => 'First name must contain at least th...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec.rb
lib/jsonapi/rspec.rb
require 'json' require 'rspec/matchers' require 'rspec/core' require 'jsonapi/rspec/id' require 'jsonapi/rspec/type' require 'jsonapi/rspec/attributes' require 'jsonapi/rspec/relationships' require 'jsonapi/rspec/links' require 'jsonapi/rspec/meta' require 'jsonapi/rspec/jsonapi_object' require 'jsonapi/rspec/errors' ...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/attributes.rb
lib/jsonapi/rspec/attributes.rb
module JSONAPI module RSpec module Attributes ::RSpec::Matchers.define :have_attribute do |attr_name| match do |doc| doc = JSONAPI::RSpec.as_indifferent_hash(doc) attributes_node = doc['attributes'] return false unless attributes_node @existing_attributes = ...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/relationships.rb
lib/jsonapi/rspec/relationships.rb
module JSONAPI module RSpec module Relationships ::RSpec::Matchers.define :have_relationship do |rel| match do |actual| actual = JSONAPI::RSpec.as_indifferent_hash(actual) return false unless (actual['relationships'] || {}).key?(rel.to_s) !@data_set || actual['relation...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/meta.rb
lib/jsonapi/rspec/meta.rb
module JSONAPI module RSpec module Meta ::RSpec::Matchers.define :have_meta do |val| match do |actual| actual = JSONAPI::RSpec.as_indifferent_hash(actual) return false unless actual.key?('meta') return true unless val val = JSONAPI::RSpec.as_indifferent_hash(...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/errors.rb
lib/jsonapi/rspec/errors.rb
module JSONAPI module RSpec module Meta ::RSpec::Matchers.define :have_error do |error| match do |actual| actual = JSONAPI::RSpec.as_indifferent_hash(actual) return false unless actual.key?('errors') return false unless actual['errors'].is_a?(Array) return tr...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/type.rb
lib/jsonapi/rspec/type.rb
module JSONAPI module RSpec module Type ::RSpec::Matchers.define :have_type do |expected| match do |actual| JSONAPI::RSpec.as_indifferent_hash(actual)['type'].to_s == expected.to_s end end end end end
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/id.rb
lib/jsonapi/rspec/id.rb
module JSONAPI module RSpec module Id ::RSpec::Matchers.define :have_id do |expected| match do |actual| JSONAPI::RSpec.as_indifferent_hash(actual)['id'] == expected end end end end end
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/jsonapi_object.rb
lib/jsonapi/rspec/jsonapi_object.rb
module JSONAPI module RSpec module JsonapiObject ::RSpec::Matchers.define :have_jsonapi_object do |val| match do |actual| actual = JSONAPI::RSpec.as_indifferent_hash(actual) val = JSONAPI::RSpec.as_indifferent_hash(val) actual.key?('jsonapi') && (!val || actual['jsonap...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
jsonapi-rb/jsonapi-rspec
https://github.com/jsonapi-rb/jsonapi-rspec/blob/f3af9a8e2f4e5ae149760e14222b79b8a530f774/lib/jsonapi/rspec/links.rb
lib/jsonapi/rspec/links.rb
module JSONAPI module RSpec module Links ::RSpec::Matchers.define :have_link do |link| match do |actual| actual = JSONAPI::RSpec.as_indifferent_hash(actual) actual.key?('links') && actual['links'].key?(link.to_s) && (!@val_set || actual['links'][link.to_s] == @val) ...
ruby
MIT
f3af9a8e2f4e5ae149760e14222b79b8a530f774
2026-01-04T17:58:16.857566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/spec/dare_spec.rb
spec/dare_spec.rb
require 'spec_helper' describe Dare do it 'does stuff' do expect(1).to eq 1 end end
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/spec/spec_helper.rb
spec/spec_helper.rb
#require 'coveralls' #Coveralls.wear! require 'jquery' require 'dare'
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/spec/dare/window_spec.rb
spec/dare/window_spec.rb
require 'spec_helper' describe Dare::Window do let(:canvas) {double()} let(:clock) {double()} let(:window_without_defaults) {Dare::Window.new(clock: clock, canvas: canvas, no_mouse: true)} let(:window_with_defaults) {Dare::Window.new(width: 200, height: 100, clock: clock, canvas: canvas, no_mouse: true)} bef...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/examples/tutorial/tutorial.rb
examples/tutorial/tutorial.rb
require 'dare' class Star attr_reader :x, :y def initialize(animation) @animation = animation @creation_time = Dare.ms @x = rand 640 @y = rand 480 end def draw img = @animation[((Dare.ms-@creation_time)/100).to_i % @animation.size] img.draw_rot(@x, @y) end def update end end ...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/examples/pong/pong.rb
examples/pong/pong.rb
require 'dare' class Paddle attr_reader :x, :y, :width, :height def initialize(game, side) @game = game @side = side @x = 20 @y = Game::HEIGHT/2 @width = 30 @height = 80 end def draw @game.draw_rect( top_left: [@x,@y-@height/2], width: @width, height: @height, ...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/examples/mario/mario.rb
examples/mario/mario.rb
require 'dare' require 'json' class Level attr_reader :background_color, :images def initialize(path, window = Dare.default_canvas) @data = JSON.parse("{\n \"id\":\"level1\",\n \"background_color\":\"#6f84ff\",\n \"tiles\":{\n \"bricks\":{\n \"ground\":[[0,12,16,12],[0,13,14,13]],\n \"questio...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare.rb
lib/dare.rb
require 'opal' #this will be removed when 0.7.0 is released require 'opal-jquery' require_tree 'dare' module Dare # returns the current version of this gem VERSION = "0.2.0" # returns the magnitude of the horizontal component of a vector # at some angle and some magnitude where the angle is in degrees # st...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/clock.rb
lib/dare/clock.rb
module Dare class Clock def initialize(opts = {}) opts[:update_interval] ||= 16.666 @update_interval = opts[:update_interval] end def start(&block) @interval = `setInterval(function(){#{block.call}}, #{@update_interval})` end def stop `clearInterval(#@interval)` end ...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/canvas.rb
lib/dare/canvas.rb
module Dare class Canvas attr_reader :id, :canvas def initialize(opts = {}) opts[:width] ||= 640 opts[:height] ||= 480 opts[:border] ||= false `var my_canvas = document.createElement("canvas")` @id = rand(36**8).to_s(36) `my_canvas.setAttribute('id', #{@id})` `my_canv...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/window.rb
lib/dare/window.rb
module Dare class Color attr_accessor :red, :green, :blue def initialize(color) end end class Window attr_reader :width, :height, :ticks, :mouse_x, :mouse_y, :canvas, :key, :update_interval # Creates a new window object to hold all your game goodness # @param [Hash] opts the options to ...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/sound.rb
lib/dare/sound.rb
module Dare # wrapper for JS Audio # takes a path/uri as an argument # e.g. song = Dare::Sound.new('my_song.mp3') # song.play will then play the mp3 in the browser # class Sound # loads an audio resource from a path # Sound.new('http://www.google.com/song.mp3') # Sound.new('local_song_in_same_...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/font.rb
lib/dare/font.rb
module Dare class Font def initialize(opts = {}) opts[:font] ||= "Arial" opts[:canvas] ||= Dare.default_canvas opts[:size] ||= 30 opts[:color] ||= "black" @font = opts[:size].to_s + "px" + " " + opts[:font] @canvas = opts[:canvas] @color = opts[:color] end def d...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/keyboard_constants.rb
lib/dare/keyboard_constants.rb
%x{ //set jquery vars if jquery migrate doesn't work for some reason try{ $.browser.mozilla; $.browser.webkit; } catch(e) { $.browser = {'mozilla': false,'webkit': false}; } } module Dare # These are the corresponding character keycodes for keyboard presses # e.g. # if button_down? Dare::KbDown ...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/sprite.rb
lib/dare/sprite.rb
module Dare class Sprite attr_accessor :images, :state def initialize(window = Dare.default_canvas) @window = window @images = [] @state = Hash.new {|h,k| h[k] = Dare::AnimationState.new} @current_image = 0 @ticks_on_current_image = 0 @x = 0 @y = 0 end def dr...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
domgetter/dare
https://github.com/domgetter/dare/blob/a017efd98275992912f016fefe45a17f00117fe5/lib/dare/image.rb
lib/dare/image.rb
module Dare # Represents an image which can be drawn to a canvas # class Image # Loads a new image resource from an absolute URL or relative path # # @param [String] path ("") the path to the resource # @param [Hash] opts ({}) the options to create an image. # @option opts [Dare::Canvas] :ca...
ruby
MIT
a017efd98275992912f016fefe45a17f00117fe5
2026-01-04T17:58:17.217566Z
false
pinterest/it-cpe-cookbooks
https://github.com/pinterest/it-cpe-cookbooks/blob/f021bd5f53d40256ef902e168399c0c3c04f2a9f/cpe_helloit/metadata.rb
cpe_helloit/metadata.rb
# vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 name 'cpe_helloit' maintainer 'Pinterest' maintainer_email 'itcpe@pinterest.com' license 'Apache-2.0' description 'Installs/Configures cpe_helloit' version '0.1.0' chef_version '>= 14.14' supports 'mac_os_x' depends 'cpe_launchd' depends 'cpe_profiles'...
ruby
Apache-2.0
f021bd5f53d40256ef902e168399c0c3c04f2a9f
2026-01-04T17:58:20.108383Z
false
pinterest/it-cpe-cookbooks
https://github.com/pinterest/it-cpe-cookbooks/blob/f021bd5f53d40256ef902e168399c0c3c04f2a9f/cpe_helloit/recipes/default.rb
cpe_helloit/recipes/default.rb
# # Cookbook:: cpe_helloit # Recipe:: default # # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 # # Copyright:: (c) 2017-present, Pinterest, Inc. # All rights reserved. # # This source code is licensed under the Apache 2.0 license found in the # LICENSE file in the root directory of this source tree. ...
ruby
Apache-2.0
f021bd5f53d40256ef902e168399c0c3c04f2a9f
2026-01-04T17:58:20.108383Z
false
pinterest/it-cpe-cookbooks
https://github.com/pinterest/it-cpe-cookbooks/blob/f021bd5f53d40256ef902e168399c0c3c04f2a9f/cpe_helloit/attributes/default.rb
cpe_helloit/attributes/default.rb
# # Cookbook:: cpe_helloit # Attributes:: default # # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 # # Copyright:: (c) 2017-present, Pinterest, Inc. # All rights reserved. # # This source code is licensed under the Apache 2.0 license found in the # LICENSE file in the root directory of this source tr...
ruby
Apache-2.0
f021bd5f53d40256ef902e168399c0c3c04f2a9f
2026-01-04T17:58:20.108383Z
false
pinterest/it-cpe-cookbooks
https://github.com/pinterest/it-cpe-cookbooks/blob/f021bd5f53d40256ef902e168399c0c3c04f2a9f/cpe_helloit/resources/cpe_helloit_defaults.rb
cpe_helloit/resources/cpe_helloit_defaults.rb
# # Cookbook:: cpe_helloit # Resource:: cpe_helloit_defaults # # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 # # Copyright:: (c) 2022-present, Pinterest, Inc. # All rights reserved. # # This source code is licensed under the Apache 2.0 license found in the # LICENSE file in the root directory of thi...
ruby
Apache-2.0
f021bd5f53d40256ef902e168399c0c3c04f2a9f
2026-01-04T17:58:20.108383Z
false
pinterest/it-cpe-cookbooks
https://github.com/pinterest/it-cpe-cookbooks/blob/f021bd5f53d40256ef902e168399c0c3c04f2a9f/cpe_helloit/resources/cpe_helloit_install.rb
cpe_helloit/resources/cpe_helloit_install.rb
# # Cookbook:: cpe_helloit # Resources:: cpe_helloit_install # # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 # # Copyright:: (c) 2017-present, Pinterest, Inc. # All rights reserved. # # This source code is licensed under the Apache 2.0 license found in the # LICENSE file in the root directory of thi...
ruby
Apache-2.0
f021bd5f53d40256ef902e168399c0c3c04f2a9f
2026-01-04T17:58:20.108383Z
false