source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.0/config/environments/test.rb
Ruby
mit
89
main
1,561
Dummy40::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 s...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.0/config/environments/production.rb
Ruby
mit
89
main
2,669
Dummy40::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both thread web serv...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.0/config/initializers/secret_token.rb
Ruby
mit
89
main
661
# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to diction...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.0/config/initializers/abstract_mysql2_adapter.rb
Ruby
mit
89
main
229
# https://stackoverflow.com/a/40758542/96823 require 'active_record/connection_adapters/mysql2_adapter' ActiveRecord::ConnectionAdapters::Mysql2Adapter::NATIVE_DATABASE_TYPES[:primary_key] = 'int(11) auto_increment PRIMARY KEY'
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/routes.rb
Ruby
mit
89
main
1,790
Dummy31::Application.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'produ...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/application.rb
Ruby
mit
89
main
2,077
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" # require "sprockets/railtie" # require "rails/test_unit/railtie" if defined?(Bundler) # If you precompi...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/environments/development.rb
Ruby
mit
89
main
938
Dummy31::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 s...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/environments/test.rb
Ruby
mit
89
main
1,681
Dummy31::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 ...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/environments/production.rb
Ruby
mit
89
main
1,676
Dummy31::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 # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/initializers/secret_token.rb
Ruby
mit
89
main
498
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/config/initializers/session_store.rb
Ruby
mit
89
main
418
# Be sure to restart your server when you modify this file. Dummy31::Application.config.session_store :cookie_store, :key => '_dummy-3.1_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "ra...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.1/db/seeds.rb
Ruby
mit
89
main
355
# 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 rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name =>...
github
toy/dump
https://github.com/toy/dump
spec/dummy-8.1/config/ci.rb
Ruby
mit
89
main
622
# 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: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error" # Optional: set a green GitHub commit status to ...
github
toy/dump
https://github.com/toy/dump
spec/dummy-8.1/config/application.rb
Ruby
mit
89
main
1,450
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/dummy-8.1/config/environments/production.rb
Ruby
mit
89
main
3,670
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.0/config/application.rb
Ruby
mit
89
main
798
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/railti...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.0/config/environments/development.rb
Ruby
mit
89
main
1,603
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.0/config/environments/production.rb
Ruby
mit
89
main
3,255
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.0/config/application.rb
Ruby
mit
89
main
1,163
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.0/config/environments/production.rb
Ruby
mit
89
main
3,895
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/routes.rb
Ruby
mit
89
main
1,790
Dummy32::Application.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'produ...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/application.rb
Ruby
mit
89
main
2,844
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" # require "sprockets/railtie" # require "rails/test_unit/railtie" if defined?(Bundler) # If you precompi...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/environments/development.rb
Ruby
mit
89
main
1,240
Dummy32::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 se...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/environments/production.rb
Ruby
mit
89
main
1,975
Dummy32::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 # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/environments/test.rb
Ruby
mit
89
main
1,527
Dummy32::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 su...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/initializers/session_store.rb
Ruby
mit
89
main
418
# Be sure to restart your server when you modify this file. Dummy32::Application.config.session_store :cookie_store, :key => '_dummy-3.2_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "ra...
github
toy/dump
https://github.com/toy/dump
spec/dummy-3.2/config/initializers/secret_token.rb
Ruby
mit
89
main
498
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
github
toy/dump
https://github.com/toy/dump
spec/dump/rails_root_spec.rb
Ruby
mit
89
main
1,070
# frozen_string_literal: true require 'spec_helper' require 'dump/rails_root' def temp_remove_const(where, which) around do |example| if where.const_defined?(which) old = where.send(:const_get, which) where.send(:remove_const, which) example.run where.send(:remove_const, which) if where....
github
toy/dump
https://github.com/toy/dump
spec/dump/env_spec.rb
Ruby
mit
89
main
4,223
# frozen_string_literal: true require 'spec_helper' require 'dump/env' describe Dump::Env do before do stub_const('ENV', {}) end describe 'with_env' do it 'sets env to new_value for duration of block' do ENV['LIKE'] = 'old_value' expect(ENV.fetch('LIKE', nil)).to eq('old_value') desc...
github
toy/dump
https://github.com/toy/dump
spec/dump/snapshot_spec.rb
Ruby
mit
89
main
11,439
# frozen_string_literal: true require 'spec_helper' require 'dump/snapshot' describe Dump::Snapshot do def dump_path(file_name) File.join(Dump.rails_root, 'dump', file_name) end def new_dump(file_name) Dump::Snapshot.new(dump_path(file_name)) end describe 'lock' do before do @yield_recei...
github
toy/dump
https://github.com/toy/dump
spec/dump/writer_spec.rb
Ruby
mit
89
main
12,679
# frozen_string_literal: true require 'spec_helper' require 'dump/writer' Writer = Dump::Writer describe Writer do describe 'create' do it 'creates instance and open' do @dump = double('dump') expect(@dump).to receive(:open) expect(described_class).to receive(:new).with('/abc/123.tmp').and_ret...
github
toy/dump
https://github.com/toy/dump
spec/dump/table_manipulation_spec.rb
Ruby
mit
89
main
10,111
# frozen_string_literal: true require 'spec_helper' require 'dump/table_manipulation' describe Dump::TableManipulation do include described_class describe 'schema_tables' do it 'returns schema_tables' do expect(schema_tables).to eq(%w[schema_info schema_migrations]) end end describe 'verify_co...
github
toy/dump
https://github.com/toy/dump
spec/dump/reader_spec.rb
Ruby
mit
89
main
25,573
# frozen_string_literal: true require 'spec_helper' require 'dump/reader' require 'active_record/migration' Reader = Dump::Reader describe Reader do describe 'restore' do it 'creates instance and opens' do @dump = double('dump') expect(@dump).to receive(:open) expect(described_class).to receiv...
github
toy/dump
https://github.com/toy/dump
spec/dump/env/filter_spec.rb
Ruby
mit
89
main
1,952
# frozen_string_literal: true require 'spec_helper' require 'dump/env/filter' describe Dump::Env::Filter do it 'passes everything if initialized with nil' do filter = described_class.new(nil) expect(filter.pass?('a')).to be_truthy expect(filter.pass?('b')).to be_truthy expect(filter.pass?('c')).to b...
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.0/config/boot.rb
Ruby
mit
89
main
212
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. require 'logger' # fix rails relying on concurrent-ruby < 1.3.5 to require logger?
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.0/config/application.rb
Ruby
mit
89
main
1,147
require_relative 'boot' require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.0/config/environments/production.rb
Ruby
mit
89
main
4,823
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...
github
toy/dump
https://github.com/toy/dump
spec/tasks/assets_spec.rb
Ruby
mit
89
main
3,077
# frozen_string_literal: true require 'spec_helper' require 'dump' require 'rake' describe 'rake assets' do before do @rake = Rake::Application.new Rake.application = @rake load 'tasks/assets.rake' ENV['ASSETS'] = nil end it "sets ENV['ASSETS'] to paths from config/assets" do data = <<-end_...
github
toy/dump
https://github.com/toy/dump
spec/tasks/dump_spec.rb
Ruby
mit
89
main
2,812
# frozen_string_literal: true require 'spec_helper' require 'dump' require 'rake' describe 'rake dump' do before do @rake = Rake::Application.new Rake.application = @rake load 'tasks/dump.rake' Rake::Task.define_task(:environment) end %w[versions create restore cleanup].each do |task| descr...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.1/config/application.rb
Ruby
mit
89
main
990
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/railti...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.1/config/environments/development.rb
Ruby
mit
89
main
1,619
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.1/config/environments/production.rb
Ruby
mit
89
main
3,460
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...
github
toy/dump
https://github.com/toy/dump
spec/recipes/dump_spec.rb
Ruby
mit
89
main
26,721
# frozen_string_literal: true require 'spec_helper' require 'dump' require 'capistrano' describe 'cap dump' do plus = '+'.shellescape before do @cap = Capistrano::Configuration.new Capistrano::Configuration.instance = @cap @cap.load File.expand_path('../../../recipes/dump.rb', __FILE__) @remote_p...
github
toy/dump
https://github.com/toy/dump
spec/dummy-8.0/config/application.rb
Ruby
mit
89
main
1,450
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/db/schema.rb
Ruby
mit
89
main
452
# frozen_string_literal: true ActiveRecord::Schema.define(:version => 0) do create_table :chickens, :force => true do |t| %w[string text integer float decimal datetime timestamp time date binary boolean].each do |type| t.column "#{type}_col", type end end create_table :another_chickens, :force => ...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.2/config/application.rb
Ruby
mit
89
main
1,450
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.2/config/environments/production.rb
Ruby
mit
89
main
4,659
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your app...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.2/config/environments/development.rb
Ruby
mit
89
main
2,985
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.2/config/initializers/assets.rb
Ruby
mit
89
main
504
# 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 addition...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.1/config/application.rb
Ruby
mit
89
main
1,217
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_model/railtie" require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" # require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.1/config/environments/production.rb
Ruby
mit
89
main
2,767
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.1/config/environments/development.rb
Ruby
mit
89
main
1,014
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-2.3/config/environment.rb
Ruby
mit
89
main
1,980
# Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.18' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') ...
github
toy/dump
https://github.com/toy/dump
spec/dummy-2.3/config/initializers/cookie_verification_secret.rb
Ruby
mit
89
main
505
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary atta...
github
toy/dump
https://github.com/toy/dump
spec/dummy-2.3/config/initializers/session_store.rb
Ruby
mit
89
main
802
# Be sure to restart your server when you modify this file. # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. Act...
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.1/config/boot.rb
Ruby
mit
89
main
212
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require 'logger' # fix rails relying on concurrent-ruby < 1.3.5 to require logger?
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.1/config/application.rb
Ruby
mit
89
main
1,193
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.1/config/environments/production.rb
Ruby
mit
89
main
5,149
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-6.1/config/environments/development.rb
Ruby
mit
89
main
2,493
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.2/config/application.rb
Ruby
mit
89
main
1,086
require_relative 'boot' require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "action_cable/eng...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.2/config/environments/development.rb
Ruby
mit
89
main
1,896
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-5.2/config/environments/production.rb
Ruby
mit
89
main
3,611
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.2/config/application.rb
Ruby
mit
89
main
1,382
require File.expand_path('../boot', __FILE__) # 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 "sprockets/railtie" # require "rails/test...
github
toy/dump
https://github.com/toy/dump
spec/dummy-4.2/config/environments/production.rb
Ruby
mit
89
main
2,799
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...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.1/config/application.rb
Ruby
mit
89
main
1,450
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
github
toy/dump
https://github.com/toy/dump
spec/dummy-7.1/config/environments/production.rb
Ruby
mit
89
main
4,294
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your app...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
fernet.gemspec
Ruby
mit
89
master
775
# -*- encoding: utf-8 -*- require File.expand_path('../lib/fernet/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ["Harold Giménez"] gem.email = ["harold.gimenez@gmail.com"] gem.description = "Delicious HMAC Digest(if) authentication and AES-128-CBC encryption" gem.summary =...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet.rb
Ruby
mit
89
master
2,523
require 'fernet/errors' require 'fernet/version' require 'fernet/bit_packing' require 'fernet/encryption' require 'fernet/token' require 'fernet/generator' require 'fernet/verifier' require 'fernet/secret' require 'fernet/configuration' Fernet::Configuration.run module Fernet # Public: generates a fernet token # ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/verifier.rb
Ruby
mit
89
master
2,066
#encoding UTF-8 require 'base64' require 'openssl' require 'date' require_relative 'errors' module Fernet # Public: verifies Fernet Tokens class Verifier class UnknownTokenVersion < Fernet::Error; end attr_reader :token, :enforce_ttl attr_accessor :ttl # Internal: initializes a Verifier # ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/encryption.rb
Ruby
mit
89
master
2,232
require 'openssl' module Fernet # Internal: Encapsulates encryption and signing primitives module Encryption AES_BLOCK_SIZE = 16.freeze # Internal: Encrypts the provided message using a AES-128-CBC cipher with a # random IV and the provided encryption key # # opts - a hash containing # ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/configuration.rb
Ruby
mit
89
master
1,207
require 'singleton' module Fernet # Public: singleton class used to globally set various # configuration defaults class Configuration include Singleton # Public: Returns whether to enforce a message TTL (true or false) attr_accessor :enforce_ttl # Public: Returns how many seconds messages are co...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/token.rb
Ruby
mit
89
master
5,217
# encoding UTF-8 require 'base64' require 'valcro' require_relative 'errors' module Fernet # Internal: encapsulates a fernet token structure and validation class Token include Valcro class InvalidToken < Fernet::Error; end # Internal: the default token version DEFAULT_VERSION = 0x80.freeze # ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/bit_packing.rb
Ruby
mit
89
master
857
module Fernet # Internal: wrappers used for consistent bit packing across rubies # # Ruby 1.9.2 and below silently ignore endianness specifiers in # packing/unpacking format directives module BitPacking extend self # Internal - packs a value as a big endian, 64 bit integer # # value - a byte ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/generator.rb
Ruby
mit
89
master
1,713
#encoding UTF-8 require 'base64' require 'openssl' require 'date' module Fernet # Internal: Generates Fernet tokens class Generator # Internal: Returns the token's message attr_accessor :message # Internal: Initializes a generator # # opts - a hash containing the following keys: # * secret...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
lib/fernet/secret.rb
Ruby
mit
89
master
1,354
require 'base64' require_relative 'errors' module Fernet # Internal: Encapsulates a secret key, a 32-byte sequence consisting # of an encryption and a signing key. class Secret class InvalidSecret < Fernet::Error; end # Internal - Initialize a Secret # # secret - the secret, optionally encoded...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/fernet_spec.rb
Ruby
mit
89
master
2,335
# encoding: utf-8 require 'spec_helper' require 'fernet' describe Fernet do after { Fernet::Configuration.run } let(:secret) { 'JrdICDH6x3M7duQeM8dJEMK4Y5TkBIsYDw1lPy35RiY=' } let(:bad_secret) { 'badICDH6x3M7duQeM8dJEMK4Y5TkBIsYDw1lPy35RiY=' } it 'can verify tokens it generates' do ['harold@heroku.c...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/spec_helper.rb
Ruby
mit
89
master
735
# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper"` to ensure that it is only # loaded once. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec....
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/secret_spec.rb
Ruby
mit
89
master
824
require 'spec_helper' require 'fernet/secret' describe Fernet::Secret do it "can resolve a URL safe base64 encoded 32 byte string" do resolves_input(Base64.urlsafe_encode64("A"*16 + "B"*16)) end it "can resolve a base64 encoded 32 byte string" do resolves_input(Base64.encode64("A"*16 + "B"*16)) end ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/bit_packing_spec.rb
Ruby
mit
89
master
1,273
require 'spec_helper' require 'fernet/bit_packing' describe Fernet::BitPacking do VALUE_TO_BYTES = { 0x0000000000000000 => [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ], 0x00000000000000FF => [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF ], 0x000000FF00000000 => [ 0x00, 0x00, 0x00, 0xFF, 0x00, 0x...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/token_spec.rb
Ruby
mit
89
master
3,791
require 'spec_helper' require 'fernet' require 'json' describe Fernet::Token, 'validation' do let(:secret) { 'odN/0Yu+Pwp3oIvvG8OiE5w4LsLrqfWYRb3knQtSyKI=' } it 'is invalid with a bad MAC signature' do generated = Fernet::Token.generate(secret: secret, message: 'hello') ...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/acceptance/generate_spec.rb
Ruby
mit
89
master
872
require 'spec_helper' require 'fernet' require 'json' require 'base64' describe Fernet::Generator do it 'generates tokens according to the spec' do path = File.expand_path( './../fernet-spec/generate.json', File.dirname(__FILE__) ) generate_json = JSON.parse(File.read(path)) generate_json.each...
github
fernet/fernet-rb
https://github.com/fernet/fernet-rb
spec/acceptance/verify_spec.rb
Ruby
mit
89
master
1,551
require 'spec_helper' require 'fernet' require 'json' require 'base64' describe Fernet::Verifier do it 'verifies tokens according to the spec' do path = File.expand_path( './../fernet-spec/verify.json', File.dirname(__FILE__) ) verify_json = JSON.parse(File.read(path)) verify_json.each do |te...
github
manuelvanrijn/local-subdomain
https://github.com/manuelvanrijn/local-subdomain
local-subdomain.gemspec
Ruby
mit
89
main
1,087
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'local-subdomain/version' Gem::Specification.new do |spec| spec.name = 'local-subdomain' spec.version = LocalSubdomain::VERSION spec.authors = ['Manuel van Rijn'] spec...
github
manuelvanrijn/local-subdomain
https://github.com/manuelvanrijn/local-subdomain
lib/local-subdomain/filters/local_subdomain.rb
Ruby
mit
89
main
609
module LocalSubdomain extend ActiveSupport::Concern included do before_action :redirect_to_lvh_me end def redirect_to_lvh_me return unless Rails.env.development? redirect_domain = ENV['SERVER_REDIRECT_DOMAIN'] || 'lvh.me' served_by_lvh_me = !request.env['SERVER_NAME'][/#{redirect_domain}$/]....
github
manuelvanrijn/local-subdomain
https://github.com/manuelvanrijn/local-subdomain
lib/local-subdomain/rack/handler.rb
Ruby
mit
89
main
1,048
# Override the Rack::Handler to bind to 0.0.0.0 which is required to support # http://lvh.me redirects module Rack module Handler class << self alias_method :orig_default, :default end def self.default(options = {}) orig_default.instance_eval do class << self alias_method :...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
my_obfuscate.gemspec
Ruby
mit
89
master
921
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "my_obfuscate/version" Gem::Specification.new do |s| s.name = %q{my_obfuscate} s.version = MyObfuscate::VERSION s.required_ruby_version = ">= 3" s.license = "MIT" s.authors = ["Andrew Cantino", "Dave Willett", "Mike Grafton", "Ma...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate.rb
Ruby
mit
89
master
4,189
require 'jcode' if RUBY_VERSION < '1.9' require 'digest/md5' require 'faker' require 'walker_method' # Class for obfuscating MySQL dumps. This can parse mysqldump outputs when using the -c option, which includes # column names in the insert statements. class MyObfuscate attr_accessor :config, :globally_kept_columns,...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/postgres.rb
Ruby
mit
89
master
1,267
class MyObfuscate class Postgres include MyObfuscate::CopyStatementParser include MyObfuscate::ConfigScaffoldGenerator # Copy statements contain the column values tab separated like so: # blah blah blah blah # which we want to turn into: # [['blah','blah','blah','blah']] # # We wr...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/copy_statement_parser.rb
Ruby
mit
89
master
1,573
class MyObfuscate module CopyStatementParser # Postgres uses COPY statements instead of INSERT and look like: # # COPY some_table (a, b, c, d) FROM stdin; # 1 2 3 4 # 5 6 7 8 # \. # # This requires the parse methods to persist data (table name and # column names) across mu...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/config_applicator.rb
Ruby
mit
89
master
4,874
class MyObfuscate class ConfigApplicator def self.apply_table_config(row, table_config, columns) return row unless table_config.is_a?(Hash) row_hash = row_as_hash(row, columns) table_config.each do |column, definition| index = columns.index(column) definition = { :type => defi...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/config_scaffold_generator.rb
Ruby
mit
89
master
2,937
class MyObfuscate module ConfigScaffoldGenerator def generate_config(obfuscator, config, input_io, output_io) input_io.each do |line| if obfuscator.database_type == :postgres table_data = parse_copy_statement(line) else table_data = parse_insert_statement(line) e...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/insert_statement_parser.rb
Ruby
mit
89
master
794
class MyObfuscate module InsertStatementParser def parse(obfuscator, config, input_io, output_io) input_io.each do |line| if table_data = parse_insert_statement(line) table_name = table_data[:table_name] columns = table_data[:column_names] ignore = table_data[:ignore] ...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/sql_server.rb
Ruby
mit
89
master
2,934
class MyObfuscate class SqlServer include MyObfuscate::InsertStatementParser include MyObfuscate::ConfigScaffoldGenerator def parse_insert_statement(line) if regex_match = insert_regex.match(line) { :table_name => regex_match[1].to_sym, :column_names => regex_match[2...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
lib/my_obfuscate/mysql.rb
Ruby
mit
89
master
3,215
#encoding: UTF-8 require 'stringio' require 'strscan' class MyObfuscate class Mysql include MyObfuscate::InsertStatementParser include MyObfuscate::ConfigScaffoldGenerator LPAREN = /\(/ RPAREN = /\)/ NULL_LITERAL = /NULL/ STRING_LITERAL = /'(\\\\|\\'|.)*?'/ # Matching "\\" followed by "\'" f...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
spec/spec_helper.rb
Ruby
mit
89
master
268
require 'rubygems' require 'bundler' Bundler.require(:default, :development) $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'my_obfuscate' RSpec.configure do |config| config.mock_with :rspec end
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
spec/my_obfuscate_spec.rb
Ruby
mit
89
master
36,545
require 'spec_helper' describe MyObfuscate do describe "MyObfuscate.reassembling_each_insert" do before do @column_names = [:a, :b, :c, :d] @test_insert = "INSERT INTO `some_table` (`a`, `b`, `c`, `d`) VALUES ('(\\'bob@bob.com','b()ob','some(thingelse1','25)('),('joe@joe.com','joe','somethingelse2','...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
spec/my_obfuscate/config_applicator_spec.rb
Ruby
mit
89
master
14,148
require 'spec_helper' require 'uri' describe MyObfuscate::ConfigApplicator do describe ".apply_table_config" do it "should work on email addresses" do 100.times do new_row = MyObfuscate::ConfigApplicator.apply_table_config(["blah", "something_else"], {:a => {:type => :email}}, [:a, :b]) ex...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
spec/my_obfuscate/mysql_spec.rb
Ruby
mit
89
master
4,348
require 'spec_helper' describe MyObfuscate::Mysql do describe "#rows_to_be_inserted" do it "should split a mysql string into fields" do string = "INSERT INTO `some_table` (thing1,thing2) VALUES ('bob@bob.com','bob', 'somethingelse1', 25, '2', 10, 'hi') ; " fields = [['bob@bob.com', 'bob', 'some...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
spec/my_obfuscate/sql_server_spec.rb
Ruby
mit
89
master
2,928
require 'spec_helper' describe MyObfuscate::SqlServer do describe "#parse_insert_statement" do it "should return a hash of table_name, column_names for SQL Server input statements" do hash = subject.parse_insert_statement("INSERT [dbo].[TASKS] ([TaskID], [TaskName]) VALUES (61, N'Report Thing')") exp...
github
cantino/my_obfuscate
https://github.com/cantino/my_obfuscate
spec/my_obfuscate/postgres_spec.rb
Ruby
mit
89
master
2,143
require 'spec_helper' describe MyObfuscate::Postgres do let(:helper) { MyObfuscate::Postgres.new } describe "#rows_to_be_inserted" do it 'splits tab seperated values' do line = "1 2 3 4" expect(helper.rows_to_be_inserted(line)).to eq([["1","2","3","4"]]) end it "preserves empty strings a...