hexsha
stringlengths
40
40
size
int64
2
1.01M
content
stringlengths
2
1.01M
avg_line_length
float64
1.5
100
max_line_length
int64
2
1k
alphanum_fraction
float64
0.25
1
91f70d35c373973e3c63cbc292acd653ab3923f7
4,940
# 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 ...
47.047619
92
0.74413
e9855bb4019a218731ad12901ed7e2ade14d8f8a
424
cask "interarchy" do version "10.0.7" sha256 "c1f8fbb9add4d134123d72b80d1d04540d38157f7c51478cb9efb0e88138c090" url "https://downloads.kangacode.com/Interarchy/Interarchy_#{version}.zip" name "Interarchy" desc "File fransfer tool" homepage "https://www.kangacode.com/interarchy/" livecheck do url :ho...
24.941176
76
0.709906
ede8bed21c08e0a7f1477b737c62732f3e7a0970
718
describe Ecomm::Checkout::BuildOrder do describe '#call' do let(:session) do order = Ecomm::OrderForm.from_model(build(:order)) order.billing = Ecomm::AddressForm.from_model(build(:address)) { order: order } end let(:order) { described_class.call(session) } it 'returns Ecomm::Order...
27.615385
68
0.682451
21ee870dc08433162e6515be79d03e95c9366b9a
2,179
class Preprocessor def initialize(input, output, filename) @input = input @output = output @filename = filename @linenum = 1 @lines = false end def getline line = @input.gets @linenum += 1 if line return line end def preprocess puts '// THIS FILE WAS GENERATED BY vm/codeg...
22.463918
76
0.536944
014abec9f18a05e308c8f97261730e5a8589e60f
3,560
require 'cloud_controller/metrics/varz_updater' require 'cloud_controller/metrics/statsd_updater' module VCAP::CloudController::Metrics class PeriodicUpdater def initialize(start_time, log_counter, updaters=[VarzUpdater.new, StatsdUpdater.new]) @start_time = start_time @updaters = updaters @...
31.22807
100
0.641011
283dcd18103ae857e639683405ee9cfc115bf09c
47
module ImmobilienScout VERSION = "0.1.4" end
11.75
22
0.723404
622c2c31a3e58c56ab08922ca15b34138e1fde36
1,775
# 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...
37.765957
86
0.735775
bbe8b66bb41cb5c6253146284fdb83894b33eb82
3,790
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...
41.195652
102
0.757256
79db955064474f0363c6b2de0ab2a825b85243c3
1,072
# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # This file is d...
29.777778
80
0.728545
8745b6005a96b756f95ce7e13f8e63883928c531
1,535
Gem::Specification.new do |s| s.name = 'hive-runner' s.version = '2.1.29' s.date = Time.now.strftime("%Y-%m-%d") s.summary = 'Hive Runner' s.description = 'Core component of the Hive CI runner' s.authors = ['Joe Haig'] s.email = 'joe.haig@bbc.co.uk' s.files = Dir['R...
45.147059
102
0.652769
bb1ff15fb8ecbc376331304d1501f8b490bc2cf3
21,721
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic...
53.5
365
0.728143
ed043bacf3184a928180489dab2610aefba76668
8,587
# frozen_string_literal: true require 'spec_helper' RSpec.describe Projects::AutocompleteService do describe '#issues' do describe 'confidential issues' do let(:author) { create(:user) } let(:assignee) { create(:user) } let(:non_member) { create(:user) } let(:member) { create(:user) } ...
37.17316
131
0.669035
9123fa728c7a3fc0304276e9c18fd436cb992b96
517
module DIDWW module Resource class TrunkGroup < Base has_many :trunks property :name, type: :string # Type: String # Description: Trunk Group name property :capacity_limit, type: :integer # Type: Integer # Description: maximum number of simultaneous calls for the trunk ...
21.541667
71
0.642166
1a9b43305ec96193faf76ae498e52e029f3ff670
9,806
class AwsElasticbeanstalk < Formula include Language::Python::Virtualenv desc "Client for Amazon Elastic Beanstalk web service" homepage "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html" url "https://files.pythonhosted.org/packages/84/0e/0df616d87aaa363454dbf342f7f3996bf036c1a4d5dbf64e8f046...
46.695238
147
0.825209
ffdff9ae09e6a0fc1d3355345a287a8890fefc2b
1,773
# encoding: utf-8 class CreateEolLogging < EOL::LoggingMigration def self.up ActiveRecord::Migration.raise_error_if_in_production # Basically, I want to throw an error if we're not using MySQL, while at the same time providing the framework # for adding other DB support in the future... if ActiveReco...
46.657895
143
0.72476
38579ebdf562eb184d588e6d650e92ae9c8cba5b
2,481
require 'test_helper' class UserTest < ActiveSupport::TestCase # test "the truth" do # assert true # end def setup @user = User.new(name: "Sample User", email: "user@sample.com", password: "foobar", password_confirmation: "foobar") end test "should be valid" do assert @user.valid? end test...
27.263736
120
0.624345
28aae4b24b79c2cb079d68c59bfed226f562f243
751
#!/usr/bin/env ruby # encoding: utf-8 __dir = File.dirname(File.expand_path(__FILE__)) require File.join(__dir, "example_helper") amq_client_example "Declare a new fanout exchange" do |client| puts "AMQP connection is open: #{client.connection.server_properties.inspect}" channel = AMQ::Client::Channel.new(client...
25.896552
99
0.715047
3311bbc01246b2fd58a7000200b61ec888682061
4,612
# # Be sure to run `pod spec lint Panorama.podspec' to ensure this is a # valid spec and to remove all comments including this before submitting the spec. # # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html # To see working Podspecs in the CocoaPods repo see https://github.co...
35.751938
98
0.590633
7aa0f002491cd9d35c1f7fdda5b90eaedd39a36d
12,044
require 'spec_helper' describe 'Puppet::Type::Service::Provider::Gentoo', unless: Puppet::Util::Platform.windows? || Puppet::Util::Platform.jruby? do let(:provider_class) { Puppet::Type.type(:service).provider(:gentoo) } before :each do allow(Puppet::Type.type(:service)).to receive(:defaultprovider)....
47.984064
170
0.653271
33b9b254a56d1479fa2b835dd2962bffb9d9557f
936
require 'spec_helper' describe Spree::Variant do describe "#price_in" do it "returns the sale price if it is present" do variant = create(:variant, :sale_price => 8.00) expected = Spree::Price.new(:variant_id => variant.id, :currency => "USD", :amount => variant.sale_price) result = variant.pr...
33.428571
111
0.673077
7a614a0ada45cf1caf7f0041782f8abcd080d768
382
require "rails_helper" require_relative "../../../../support/api/v1/views/index" describe "api/v1/ad_placements/index.json.jbuilder" do before(:each) do assign(:resources, create(:ad, :with_placements).placements) render end it_behaves_like "an index view", 3, [ :id, :ad, :start_date, :e...
19.1
64
0.649215
91a3416fea19177e1aa0041bdfe2ef6979ac30a7
3,329
require 'spec_helper' describe Tugboat::CLI do include_context "spec" describe "wait" do it "waits for a droplet with a fuzzy name" do stub_request(:get, "https://api.digitalocean.com/droplets?api_key=#{api_key}&client_id=#{client_key}"). to_return(:headers => {'Content-Type' => 'application/...
49.686567
145
0.678582
624fdafc3d51614613aa40a41c55a0853dd54a86
388
# frozen_string_literal: true require "atdis/models/application" module ATDIS module Models class Response < Model field_mappings( application: Application ) validates :application, presence_before_type_cast: { spec_section: "4.3" } # This model is only valid if the children ar...
20.421053
80
0.693299
ed7f5a8126be768fba53893f308e3d9dc6378268
421
require 'bundler/setup' require 'boring_presenters' require 'lib/user' require 'lib/user_presenter' RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = '.rspec_status' # Disable RSpec exposing methods globally on `Module` and `main` ...
24.764706
66
0.76247
4a5085ca20e9eb6e6570bae10e2446d667c587fd
1,213
module Decorators module V4 class CapitalDecorator def initialize(assessment) @assessment = assessment @summary = assessment.capital_summary end def as_json payload unless @summary.nil? end private def payload { capital_items: capita...
22.054545
91
0.610058
0309b5994c4b686c71b21bdb70d77df936bb0768
3,157
# # Author:: Adam Jacob (<adam@opscode.com>) # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ht...
33.231579
108
0.614191
4a047179d89464e0425ec4c79ef7cea9a6346dc5
923
cask "goneovim" do version "0.6.1" sha256 "870083f880f66619566e8f7a574c562e7dd3f71fc0e86b6706d12e85e76dda73" url "https://github.com/akiyosi/goneovim/releases/download/v#{version}/Goneovim-v#{version}-macos.tar.bz2" name "Goneovim" desc "Neovim GUI written in Golang, using a Golang qt backend" homepage "ht...
27.147059
108
0.710726
9153cf2b307d6fb481449c4742736f5ea0c4f9ce
672
class A # @type instance: A # @type module: A.class # A#foo is defined and the implementation is compatible. def foo(x) x end # A#bar is defined but the implementation is incompatible. # !expects MethodArityMismatch: method=bar def bar(y) y end # Object#to_s is defined but the implementat...
21
89
0.696429
f7441806af20ed18d039137e905128e6fe321277
321
FactoryBot.define do factory :order do account customer user order_number 1001 total_line_items_price 110 total_discounts 10 subtotal 100 total_tax 10 total_price 110 total_weight 2 end end...
20.0625
34
0.510903
1a82e7d087a6814b9d92edea904ada22779964b2
597
require 'yaml' require 'active_support/all' module KawaiiApiCli class << self attr_accessor :ui end autoload :Config, 'kawaiiapi_cli/config' autoload :ResponseCodeException, 'kawaiiapi_cli/exception/response_code_exception' autoload :UI, 'kawaiiapi_cli/ui' au...
29.85
91
0.646566
acb4660bd5d49f7e39e103a59a38228d2f5e8cf6
217
class Dog #GIVE A DOG A NAME def name=(new_name) @name = new_name end def name @name end #GIVE A DOG A BREED def breed=(new_breed) @breed = new_breed end def breed @breed end end
11.421053
23
0.608295
6a23cecb8653ba7a19f5c190ab28031f922ccf1d
1,114
require File.expand_path('../boot', __FILE__) 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 Orbital class Application < Rails::Application # Settings in config/environments/* take prece...
41.259259
99
0.733393
1c2b0726a1cd507d7c2fdcc93de77f0f7d390083
4,444
require 'concurrent/atomic/mutex_atomic_fixnum' require 'concurrent/synchronization' module Concurrent ################################################################### # @!macro [new] atomic_fixnum_method_initialize # # Creates a new `AtomicFixnum` with the given initial value. # # @param [Fixnum]...
33.164179
134
0.621512
e9d952125282a20d6b4be59e5fa15d45a5b99253
2,463
# # tkextlib/iwidgets/radiobox.rb # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # require 'tk' require 'tkextlib/iwidgets.rb' module Tk module Iwidgets class Radiobox < Tk::Iwidgets::Labeledframe end end end class Tk::Iwidgets::Radiobox TkCommandNames = ['::iwidgets::radi...
20.355372
75
0.634998
bf99d6b8003dcabb2d995e44dff5bb8ec4305e5a
721
require 'msgpack' require 'serialport' class ZunDokoServer def initialize @port = SerialPort.new("/dev/zptty0", 38400) @port.read_timeout = 1000 @port.flow_control = SerialPort::HARD @unpacker = MessagePack::Unpacker.new(@port) @msgid = 0 end def call(method, args) @msgid = (@msg...
18.973684
52
0.61165
87e32e9d3b1dae70cce69f0077b990f9fedf51c9
2,103
module Lolita module I18nHelper def locale_options [[::I18n.t("lolita-i18n.choose-other-language"),nil]] + (::I18n.available_locales - [::I18n.default_locale]).sort.map{|locale| [::I18n.t("#{locale}", :default => locale.to_s.upcase), locale] } end def translation active_locale,...
31.38806
131
0.573942
ff2528e51bc4f23b73aeadd6449b8f5906d9c94d
2,918
# frozen_string_literal: true # encoding : utf-8 Money.locale_backend = :currency MoneyRails.configure do |config| # To set the default currency # config.default_currency = :usd # Set default bank object # # Example: # config.default_bank = EuCentralBank.new # Add exchange rates to current money ba...
29.77551
115
0.556888
ab75fab17982f1c10d6366a83bdcaf140fba0724
423
# 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...
42.3
69
0.782506
79852ce1890ab62c42888f3dc39aefc6d23cae0b
23
# typed: true foo < 1
5.75
13
0.565217
b96f93f8e4a584fea48ad947cee149821df60f60
3,109
class Pdnsd < Formula desc "Proxy DNS server with permanent caching" homepage "http://members.home.nl/p.a.rombouts/pdnsd/" url "http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-1.2.9a-par.tar.gz" version "1.2.9a-par" sha256 "bb5835d0caa8c4b31679d6fd6a1a090b71bdf70950db3b1d0cea9cf9cb7e2a7b" license "...
37.457831
109
0.651656
f71adba20b6736879da486a97ceabad794e1df03
101
$LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "cashify" require "minitest/autorun"
20.2
54
0.762376
f7a038302a3c0baff5b8dc607057d7bf2f925d71
1,281
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE Gem::Specification.new do |spec| spec.name = 'aws-sdk-applicationauto...
40.03125
123
0.679938
4a0af6ef7757bb4b9b12de0a75fd2efbec47b59c
278
def require_rel(path) require File.expand_path(File.dirname(__FILE__) + path) end require_rel '/../../../config/environment' desc "remove collusion changes from database" task "collude:remove" do require_rel '/../app/migrations/add_collusions' AddCollusions.new.down end
25.272727
57
0.76259
91f8dc9891c828af15311a966938b12155cca74a
1,103
# frozen_string_literal: true module Cocina module ToFedora # This transforms the DRO.type attribute to the process tag value class ProcessTag # TODO: add Software def self.map(type, direction) tag = case type when Cocina::Models::Vocab.image 'Image' ...
30.638889
72
0.516772
1a67f33a1ff09325caa9377fb2c8d34e490cae38
604
# frozen_string_literal: true class VhaCamoInProgressTasksTab < QueueTab validate :assignee_is_organization attr_accessor :show_reader_link_column, :allow_bulk_assign def label COPY::ORGANIZATIONAL_QUEUE_PAGE_IN_PROGESS_TAB_TITLE end def self.tab_name Constants.QUEUE_CONFIG.IN_PROGRESS_TASKS_TAB_N...
21.571429
97
0.807947
ed2db7437acf479caca2bfd145451771259ce6a2
29,051
require 'test_helper' class ProjectTest < ActiveSupport::TestCase fixtures :projects, :institutions, :work_groups, :group_memberships, :people, :users, :publications, :assets, :organisms # checks that the dependent work_groups are destroyed when the project s def test_delete_work_groups_when_project_deleted ...
32.278889
180
0.73161
eda890b1a1a0e9b532ea43cd1ffd610a9a002aa0
1,500
require 'test_helper' require 'authorize/graph/fixtures' class ControllerTest < ActionController::TestCase fixtures :all tests WidgetsController def setup ::Authorize::Graph::Fixtures.create_fixtures end test 'predicate not stuck on false when permitted' do assert @controller.permit?({:list => wid...
32.608696
116
0.684667
ac4b8626af912db3add837b947205ba1d7ecf23f
1,081
module Bot::DiscordCommands # Adds an arbitrary amount of "wokes" which count against "Yikes" # This command can only be used by the Woke Bloke module Woke extend Discordrb::Commands::CommandContainer command :woke do |event, id, amount = 1| x = event.author.roles.find { |role| role.name...
43.24
158
0.604995
1a5b1cf9ff90eecd20d77d0f3a216d4fd95083bd
1,650
require 'pry' class FoodFinder::CLI def call FoodFinder::API.recipes introduction end def introduction puts "Are you hungry? Enter Y to continue or N to quit" input = gets.chomp.downcase if input == "y" display_recipes elsif input == 'n' goodbye_1 else puts "...
23.913043
144
0.611515
5dae7caf7fb5a615cbcae47649e2f200916807bc
1,530
# frozen_string_literal: true module FrontendHelpers module FormBuilderHelpers module SwitchField def switch_field_group(method, options = {}, checked_value = '1', unchecked_value = '0', &block) control_class = options.delete(:control_class) label_class = option...
31.875
90
0.568627
9107fd1e4381c1ceb3492360e51572e9289aeb89
377
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Web::Mgmt::V2018_02_01 module Models # # Defines values for AccessControlEntryAction # module AccessControlEntryAction ...
22.176471
70
0.702918
6229554e708f4e963b383fb44d581c19f883b898
1,423
# -*- encoding: utf-8 -*- # stub: jekyll-readme-index 0.1.0 ruby lib Gem::Specification.new do |s| s.name = "jekyll-readme-index".freeze s.version = "0.1.0" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.autho...
37.447368
112
0.653549
acf076bbc6aad69ef6461f2315fb50f06c33e61f
1,100
# -*- coding: binary -*- require 'strscan' module Postgres::Conversion def decode_array(str, delim=',', &conv_proc) delim = Regexp.escape(delim) buf = StringScanner.new(str) return parse_arr(buf, delim, &conv_proc) ensure raise ConversionError, "end of string expected (#{buf.rest})" unle...
22.916667
91
0.531818
ac2cbd280048fea0c0053bd730955ca41780988c
382
# frozen_string_literal: true module Travis module Yml module Schema module Def module Deploy # docs do not mention catalyze class Datica < Deploy register :datica def define map :target, to: :str map :path, to: :str ...
18.190476
40
0.497382
1802d45145335f1541804b269967cbd59c88ed55
1,151
# # Cookbook Name:: oracle # Recipe:: client # # Copyright 2010, Eric G. Wolfe # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
23.979167
74
0.730669
bfed88605e0ff7fb5dcfb1e6b7d2c7515fff5c2e
9,393
# frozen_string_literal: true module SuperSettings # Cache that stores the settings in memory so they can be looked up without any # network overhead. All of the settings will be loaded in the cache and the database # will only be checked every few seconds for changes so that lookups are very fast. # # The c...
30.596091
118
0.635473
eddeefee83f82506894bdac20e4767e83d08cdc4
733
# frozen_string_literal: true require "spec_helper" require "stringio" module Capybara::Cuprite describe Browser do it "logs requests and responses" do logger = StringIO.new browser = Browser.new(logger: logger) browser.body expect(logger.string).to include("return document.documentEle...
27.148148
83
0.698499
39e9f627631aaef17aaf3bcefd8e0507d5a30080
76
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'enigma'
25.333333
58
0.723684
1abb73056ee77315ecb0c4831423dae2f6ff3955
1,427
require 'open3' Puppet::Type.type(:configvault_write).provide(:standard, :parent => Puppet::Provider::Package) do def create run_cmd('write', false, expected) end def destroy run_cmd('delete') end def exists? current = run_cmd('read', true) return false if current.nil? return current ==...
24.186441
151
0.623686
ac738882296d7d8f3834fc0cacbf6027deee8455
5,004
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...
44.283186
114
0.76239
016e2aeb6f429f814f8065669940e5922426dec8
6,257
require 'spec_helper' RSpec.describe NgrokAPI::Services::EdgesTLSClient do let(:base_url) { 'https://api.ngrok.com' } let(:path) { '/edges/tls' } let(:not_found) do NgrokAPI::Errors::NotFoundError.new(response: tls_edge_result) end before(:each) do @client = class_double("HttpClient") @edges_tls...
33.281915
97
0.619946
5d787cbcf201d7569c2bd225b3e2b037bfc67c7e
1,103
Pod::Spec.new do |s| s.name = "practice123" s.version = "0.0.1" s.summary = "A marquee view used on iOS." #s.description = <<-DESC # It is a marquee view used on iOS, which implement by Objective-C. # DESC s.homepage ...
40.851852
110
0.55485
f8618d17ed36f507b0aba98b704fa70fdb41e037
1,474
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'aws-sdk-core' require 'aws-sigv4' require_relative 'aws-sdk-lookout...
27.296296
94
0.75848
ffddb8b9c22fd1306e6d544aceccf40d2710c0a7
4,557
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...
37.975
102
0.749397
f8f9933f7b365fd2b1d842bb99a035740a3143c7
635
# == Schema Information # # Table name: users # # id :bigint not null, primary key # display_name :string not null # email :string not null # photo_url :string # created_at :datetime not null # updated_at :datetime not null # # Indexes # # ind...
26.458333
83
0.640945
e9ed7df125565dcb772b32ae8a8f3bfcfa431f08
2,467
require 'minitest/autorun' require_relative './common_setup_and_teardown.rb' class StaffDataTest < Minitest::Test include CommonSetupAndTeardown def setup @staff_data_1 = { staff_id: 300, code: 'QUALIFICATION', value: 'TOEIC', start_timestamp: '2016-01-01', no_finish_timestamp: '...
34.263889
130
0.692339
bbca45fb86a9c030d6d090d8ddbb71fa024b244f
1,233
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 g...
39.774194
99
0.746959
113ef2bd7b2665ea30cdb0aae5c98674c96aad29
651
require File.dirname(__FILE__) + '/../../spec_helper' describe "IO#rewind" do before :each do @file = File.open(File.dirname(__FILE__) + '/fixtures/readlines.txt', 'r') @io = IO.open @file.fileno end after :each do @file.close end it "positions the instance to the beginning of input" do ...
24.111111
78
0.625192
edaaf3a3819466a310f7d32b34fafdc3d27b5ebc
19,076
# frozen_string_literal: true require "logger" require "traject" require "traject/nokogiri_reader" require "traject_plus" require "traject_plus/macros" require "arclight/level_label" require "arclight/normalized_date" require "arclight/normalized_title" require "active_model/conversion" ## Needed for Arclight::Reposit...
41.290043
173
0.742661
28c58879cfe3379c800f99cecbf0f9da672e56a3
18,753
require 'spec_helper' require 'stringio' describe 'MessageBuilder attribute readers' do it 'should be readable' do @mb_obj = Mailgun::MessageBuilder.new() expect(@mb_obj).to respond_to(:message) expect(@mb_obj).to respond_to(:counters) end end describe 'The instantiation of MessageBuilder' do befo...
31.255
133
0.694396
b97e2e42d8bc87571220c4abf5937886b648a98a
1,241
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
44.321429
86
0.719581
e8ac9cc60a00047299b6022108d8b95e96c3fb63
82
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'omniscientjs'
27.333333
58
0.743902
e9a6a099df15993a7a48c72d15286ac635dc493f
2,381
# frozen_string_literal: true require_relative '../../../lib/smartcar' require 'selenium-webdriver' require 'securerandom' require 'cgi' class AuthHelper SCOPE = ['required:read_vehicle_info', 'required:read_location', 'required:read_odometer', 'required:control_security', ...
33.535211
91
0.656867
6a3ed6436dc548d40e898fcecd117316f99790d3
1,505
=begin #Kubernetes #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.4 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.2.3 =end require 'spec_helper' require 'json' require 'date' # Unit te...
27.363636
103
0.750166
08a33dcc1843908ce53a4df7862e97c47665bc9c
14,256
=begin -------------------------------------------------------------------------------------------------------------------- Copyright (c) 2021 Aspose.PDF Cloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in th...
30.924078
293
0.603676
b9bb796e98a7a97a754997d1647a5dd6d3f8b3e0
149
class AddConvertedColumnToWebhookBlobs < ActiveRecord::Migration[5.2] def change add_column :webhook_blobs, :converted_at, :datetime end end
24.833333
69
0.791946
871eda0948aa01759753f2729777670828964579
571
# encoding: utf-8 module WorldDb module Model ############################################################# # collect depreciated or methods for future removal here # - keep for now for commpatibility (for old code) class Lang ##################################################### # alias for name (remove! a...
23.791667
69
0.513135
870896a0db37592789f306ca39523c843537e5ac
769
require_relative "../canvas_base_resolver" module LMSGraphQL module Resolvers module Canvas class RedirectToAssignmentOverrideForGroup < CanvasBaseResolver type Boolean, null: false argument :group_id, ID, required: true argument :assignment_id, ID, required: true def resolv...
32.041667
96
0.625488
0877fc447c5fdd918558f1ffd35af2e95bafc4ff
5,597
require 'spec_helper' describe Shoulda::Matchers::Independent::DelegateMatcher do it 'supports chaining on #to' do matcher = delegate_method(:method) matcher.to(:another_method).should == matcher end it 'supports chaining on #with_arguments' do matcher = delegate_method(:method) matcher.with_arg...
30.418478
122
0.689477
ac2b36142d9c5f2ebb527dd9a296549f18a27480
2,591
require "spec_helper" describe "generating a Rails app with the beard builder" do it "has the generated files" do app.should have_structure { file ".gitignore" file "Gemfile" do contains %{gem "beard"} contains %{gem "dm-sqlite-adapter"} end file "Rakefile" directo...
20.728
59
0.519876
39cd28df3b07f9e73d7b7f5de78da773687cd780
555
Pod::Spec.new do |s| s.name = "react-native-youtube-player" s.version = "0.0.1" s.license = "MIT" s.homepage = "https://github.com/eaceto/react-native-youtube-player" s.authors = { 'Ezequiel Aceto' => 'ezequiel.aceto@gmail.com' } s.summary = "A React Native module that allows...
39.642857
105
0.614414
1dd8fddd5fa0daf83ddcb86bc308293678f4c677
7,536
# frozen_string_literal: true RSpec.describe RuboCop::Cop::Naming::BlockForwarding, :config do context 'when `EnforcedStyle: anonymous' do let(:cop_config) { { 'EnforcedStyle' => 'anonymous' } } context 'Ruby >= 3.1', :ruby31 do it 'registers and corrects an offense when using explicit block forwardin...
28.224719
122
0.527335
03bd65995881652b63a33399fc7e8c251f5a071b
738
# encoding: UTF-8 Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = 'spree_mailchimp_gibbon' s.version = '0.0.8' s.summary = 'Mail Chimp subscriptions for Spree using gibbon Mailchimp API wrapper' s.required_ruby_version = '>= 1.8.7' s.author = 'Jerrold Th...
29.52
89
0.617886
01ba5e35fa1e4857ac6a3f1bf3a2cda602d5ba18
2,624
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::Remote::Tcp def initialize(info = {}) super(update_info(info, 'Name' ...
29.155556
89
0.563262
d5358c218442d2cbae93165b6d5dd949147aaebf
131
Errbit::Application.config.secret_token = '<%= ENV['SECRET_TOKEN'] %>' Devise.secret_key = Errbit::Application.config.secret_token
43.666667
70
0.770992
6afc68c8cf04d7d79df8f11c03561a9bd17b157a
2,785
# frozen_string_literal: true module Curator class Filestreams::FileSetsController < ApplicationController include Curator::ResourceClass include Curator::ArkResource def index file_sets = resource_scope.order(created_at: :desc).limit(25) multi_response(serialized_resource(file_sets)) en...
42.846154
185
0.567325
e87acf09d63f15f259e6e22c492f890a1a19c699
284
require_relative "boot" sns = AWS::SNS.new opts = Trollop::options do opt :email, "Email Address", :short => "e", :type => String opt :snsarn, "Arn for AWS SNS topic", :short => "a", :type => String end topic = sns.topics["#{opts[:snsarn]}"] topic.subscribe("#{opts[:email]}")
23.666667
70
0.633803
b9553a253ad53b6996711b21b07795ff9e8617a2
557
execute 'test prep' do command <<COMMAND mkdir -p /etc/conf.d touch /etc/conf.d/a ln -nsf /etc/profile.d/.bashrc /etc/conf.d/b mkdir -p /etc/conf.d/c COMMAND end zap_directory '/etc/conf.d' link '/etc/conf.d/link' do to '/etc/skel/.bash_logout' link_type :hard end link '/etc/conf.d/symlink' do to '/etc/issue...
15.472222
44
0.698384
4abb23c69ea7ed391088abdb7cfb75f4041e9420
338
# frozen_string_literal: true module Thredded # Previews for the PrivateTopicMailer class RelaunchUserMailerPreview < BaseMailerPreview def new_relaunch_user RelaunchUserMailer.new_relaunch_user( '10', 'christl@brickboard.com', 'christl_bricki', 'asdasd343sds2sd4' ) ...
21.125
53
0.692308
6a40f00733f6bce92f1736579054f3828ca3b49e
151
class RemoveEndDateFromRecordingSessions < ActiveRecord::Migration[6.1] def change remove_column :recording_sessions, :end_date, :date end end
25.166667
71
0.794702
380460b03cbdab68eb804ef448ecf54e7b68bb73
2,523
module Exlibris module Aleph require 'marc' # ==Overview # Provides access to the Aleph Record REST API. class Record < Rest::Base attr_accessor :bib_library, :record_id def initialize(*args) super end # Returns a MARC::Record that contains the bib data # Every ...
43.5
128
0.661514
7aaa71a4afc4007a3ee6c16cf02eeffd3553069f
1,340
require 'minitest/autorun' require_relative 'crypto_square' # Common test data version: 3.1.0 e937744 class CryptoSquareTest < Minitest::Test def test_empty_plaintext_results_in_an_empty_ciphertext # skip plaintext = '' assert_equal "", Crypto.new(plaintext).ciphertext end def test_lowercase ski...
27.916667
116
0.752985
5dbef5521acdef0489e77a51070a39115f8d9b1a
326
require "spec_helper" feature "Process Page" do background do @p1_id = ::Yawl::Process.insert(:name => "p1", :desired_state => "test1") end scenario "javascript uses correct process url" do visit yawl_rails.yawl_process_path('p1') expect(page.source).to include("/yawl_rails/processes/p1/steps") en...
25.076923
77
0.708589
8738bc64c3a21345369d69271832135761dfd756
1,664
# # log_table.rb # Copyright (C) 2015 Daisuke Shimamoto <diskshima@gmail.com> # # Distributed under terms of the MIT license. # require 'log_table/version' require 'hairtrigger' require 'log_table/railtie' if defined?(Rails::Railtie) module LogTable STATUS_COLUMN_NAME = 'log_table_status' def self.included(base)...
23.43662
85
0.634014
bb0a9dcf6aa58cce39c06126943f2a8959147a12
26
require "rubysl/tempfile"
13
25
0.807692
116b4cde9b4245aad244d312c8dd2d80d435635b
2,086
# # DOPi Plugin: Deploy File # require 'pathname' require "base64" module Dopi class Command class Ssh class FileDeploy < Dopi::Command include DopCommon::HashParser include Dopi::Connector::Ssh include Dopi::CommandParser::ExitCode public def validate vali...
28.972222
115
0.600671
62e88585160c1b4d4f210b40324f5bf737b4b9a8
277
Deface::Override.new( :virtual_path => "spree/admin/return_authorizations/index", :name => "add_tracking_label_to_return_authorization", :insert_top => "[class='actions actions-2']", :partial => "spree/admin/return_authorizations/customer_return_tracking" )
34.625
76
0.732852
ed670d8d0c537b0b6852dfc9002e76d18aef0f89
5,334
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
36.786207
105
0.686352
3928c5124a415a2d1d0ce75d7fbe814c0659c999
596
require 'test_helper' class UsersProfileTest < ActionDispatch::IntegrationTest include ApplicationHelper def setup @user = users(:chidozie) end test "profile display" do get user_path(@user) assert_template 'users/show' assert_select 'title', full_title(@user.name) assert_select 'h1', tex...
25.913043
59
0.72651
bb45485a5a14761ce89ce5cb30025875f7d7a8d0
193
class AddPublishedIdToPagina < ActiveRecord::Migration def self.up add_column :paginas, :published_id, :integer end def self.down remove_column :paginas, :published_id end end
19.3
54
0.751295