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
1a90b9f187c134a20a2382d06653f66f1a4e4c92
811
class BoostBuild < Formula desc "C++ build system" homepage "https://www.boost.org/build/" url "https://github.com/boostorg/build/archive/2014.10.tar.gz" sha256 "d143297d61e7c628fc40c6117d0df41cb40b33845376c331d7574f9a79b72b9f" head "https://github.com/boostorg/build.git" bottle do cellar :any_skip_re...
36.863636
95
0.782984
39ad4562cb858a15993cb512085884c1a4c6b286
2,005
# This file was automatically generated for SMASH by SMASH v2.0 # ( https://smashlabs.io ). module Smash # UserCustomUpdateModel Model. class UserCustomUpdateModel < BaseModel # TODO: Write general description for this method # @return [String] attr_accessor :uid # TODO: Write general description ...
27.465753
64
0.57606
ed5ca2ae2ec3a25b420fedf242975a14c6ba9c96
578
# frozen_string_literal: true require 'test_helper' module Archimate module Svg module Entity class ApplicationComponentTest < Minitest::Test def setup @model = build_model( diagrams: [ build_diagram ] ) @child = @model.diagrams.f...
22.230769
96
0.600346
bb231c3b77bb6ca006542380a19dfde014cb2ee4
106
module ModelCoder class Constants ID_FIELD = :token EXTERNAL_NAMESPACE = 'ModelCoder' end end
15.142857
37
0.726415
87be69f1eb03dc74d08b3dd0e004e1ae4668511e
1,763
require 'spec_helper' include WebMock::API include Tootsie::API describe V1 do include Rack::Test::Methods def app V1 end before :each do Tootsie::Configuration.instance.update( aws_access_key_id: "KEY", aws_secret_access_key: "SECRET", paths: { dustin_hoffman: {} })...
26.313433
93
0.584231
bf2fed9307c92546a2654fbb278b75b19b59a313
658
module Puffer module OrmAdapter module Base def columns_hash raise ::OrmAdapter::NotSupportedError end def reflection name raise ::OrmAdapter::NotSupportedError end def filter scope, fields, options = {} raise ::OrmAdapter::NotSupportedError end ...
19.352941
56
0.636778
d591d139dc43ebc0aa5ffd28e89220751397641f
221
# typed: true class AddEpicGamesStoreIdToGames < ActiveRecord::Migration[6.0] def change add_column :games, :epic_games_store_id, :text, null: true add_index :games, :epic_games_store_id, unique: true end end
27.625
63
0.755656
e875acb046a340beda5ab7e581dfdc4811b64eec
195
require "bundler/setup" Bundler.require(:default) require "museums/cli" require "museums/attraction" require "museums/scraper" require 'open-uri' require 'nokogiri' require "museums/cli/version"
21.666667
29
0.794872
03df9441f8abfdcb65355cee640d9118d1022078
5,839
=begin #Hydrogen Nucleus API #The Hydrogen Nucleus API OpenAPI spec version: 1.9.5 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.19 =end require 'date' module NucleusApi class StatisticResourceVO attr_accessor :description ...
27.804762
107
0.609522
6a30d410a5a9ea2ac9c85835a24fa9a75b3ef777
2,642
require 'rspec' require 'rails_helper' require_relative '../query_lib/06_joins_warmup.rb' describe "JOIN warmup" do describe "films_from_sixty_two" do it "selects films from the year 1962" do expect(films_from_sixty_two.conform).to contain_exactly( ["121", "To Kill a Mockingbird"], ["479",...
28.408602
66
0.591597
6aea552e75328c8ef230df38dfe66ef4c5c16ce7
117
class AddDetailToGenres < ActiveRecord::Migration[5.2] def change add_column :genres, :name, :string end end
19.5
54
0.735043
339263b1ffb4495ca24f9b9b6c308882e9dc1185
781
require_relative 'test_model' require_relative 'test_enum' class TestClassWithAttributes include Riveter::Attributes attr_string :string, :default => 'A' attr_text :text, :default => 'b' attr_integer :integer, :default => 1 attr_decimal :decimal, :default => 9.998 attr_date :date, :default => Date.new(201...
33.956522
87
0.691421
6a06485e09935ca5787df601c0e899b2e6a7c3f4
1,138
begin require 'rcov/rcovtask' namespace :test do targets = ['unit', 'functional', 'integration'] namespace :rcov do desc "Delete aggregate rcov data." task :clean do rm_rf "reports/rcov" mkdir_p "reports/rcov" end desc "Open code rcov reports in a br...
25.863636
69
0.543937
2629938c989e7f6921e0adb88f9c52ad3e564785
281
ENV['RAILS_ENV'] ||= 'test' require_relative '../config/environment' require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.yml for all tests in abc order. fixtures :all # Add more helper methods to be used by all tests here... end
25.545455
73
0.733096
79b21bac527e4868a52299fa2514904e3023d08b
2,024
require "logger" require "savon/soap" module Savon module Global # Sets whether to log HTTP requests. attr_writer :log # Returns whether to log HTTP requests. Defaults to +true+. def log? @log != false end # Sets the logger to use. attr_writer :logger # Returns the logger. D...
23.811765
100
0.659585
e9b97c0b7c0786717e0bd8e1820af9d37b6500e9
5,927
class Global < Formula include Language::Python::Shebang desc "GNU Global source code tag system, installed with Universal Ctags" homepage "https://www.gnu.org/software/global/" url "https://ftp.gnu.org/gnu/global/global-6.6.7.tar.gz" mirror "https://ftpmirror.gnu.org/global/global-6.6.7.tar.gz" sha256 "69...
41.447552
144
0.697824
ede77fbbae670ef6c8198f205cd1e2811c82ca61
851
cask "visual-paradigm-ce" do version "16.3,20211114" sha256 "3c3757e52e0ffdb04ce31687e3fd6d45b16085bf75dab81d61a6590c7e875293" url "https://www.visual-paradigm.com/downloads/vpce/Visual_Paradigm_CE_#{version.before_comma.dots_to_underscores}_#{version.after_comma}_OSX_WithJRE.dmg" name "Visual Paradigm Communi...
37
156
0.726204
188c77adfe6cee76899d6b077e9c25aaea4d862e
304
require_relative 'shared/a_predicate_ast_node' module Alf class Predicate describe Factory, 'not' do include Factory subject{ self.not(true) } it_should_behave_like "a predicate AST node" it{ should be_a(Not) } it{ should eql([:not, tautology]) } end end end
19
50
0.664474
bb46bfe65c7c06f8569afc957d527579452c4207
6,769
# frozen_string_literal: true require 'securerandom' require 'rspec/retry' require 'simp/beaker_helpers' include Simp::BeakerHelpers # rubocop:disable Style/MixinUsage require_relative '../../spec_helper_tls' require_relative '../../spec_utilities' require_relative '../../../lib/puppet_x/elastic/deep_to_i' require_r...
30.628959
102
0.62476
917642972541b3ad3c95abb23491b23d8d139d5a
796
# frozen_string_literal: true require 'rugged' require 'tmpdir' require 'logger' require 'yaml' require 'time' lib_dir = __dir__ $LOAD_PATH << lib_dir require 'miq_flow/pluggable/provider_docker' require 'miq_flow/pluggable/provider_local' require 'miq_flow/pluggable/provider_noop' require 'miq_flow/pluggable/method_...
24.121212
44
0.797739
ac89a25fefc9061a0a85c2d61ab5954d290545bd
1,416
class Compose2kube < Formula desc "Convert docker-compose service files to Kubernetes objects" homepage "https://github.com/kelseyhightower/compose2kube" url "https://github.com/kelseyhightower/compose2kube/archive/0.0.2.tar.gz" sha256 "d09b86994949f883c5aa4d041a12f6c5a8989f3755a2fb49a2abac2ad5380c30" revisio...
41.647059
107
0.787429
086680568c29b5bd3ea5af9c6bcd7dfbdce4e080
1,985
require 'spec_helper' module Codebreaker describe Game do context "#start" do let(:game) {Game.new "User"} let(:secret_code) {game.instance_variable_get(:@secret_code)} before do game.start end it "generates secret code" do expect(secret_code).not_to be_empty end it "saves 4 number ...
18.904762
64
0.631738
e29743b791d222e737d2cf22d3cb5fae6db8b0fa
54
100000.times { Marshal.load(Marshal.dump(Time.now)) }
27
53
0.740741
79e684075353a12203ee3b3359989606b0c260bf
373
class ChangeOrderSubtotalAndTax < ActiveRecord::Migration[5.0] def change change_column :orders, :subtotal, "numeric USING CAST(subtotal AS numeric)" change_column :orders, :subtotal, :decimal, precision: 9, scale: 2 change_column :orders, :tax, "numeric USING CAST(tax AS numeric)" change_column :orde...
41.444444
79
0.731903
ff126c3880ecf156b4a1b9259d4b3083367ee989
1,044
# This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] ||= 'test' require File.dirname(__FILE__) + "/../config/environment" unless defined?(Rails.root) require 'rspec/rails' # Requires supporting files with custom matchers and macros, etc, # in ./s...
28.216216
85
0.730843
381ad0812bf712e4a9ed08ba7f6580cbb1339d69
594
class FontGensekigothic < Formula version "1.501" sha256 "d4baad35c36428fe355648615c30bfb5f74bc1d4eca12e88af664a83fb7c7d6a" url "https://github.com/ButTaiwan/genseki-font/releases/download/v#{version}/GenSekiGothic.zip" desc "GenSekiGothic" homepage "https://github.com/ButTaiwan/genseki-font" def install ...
34.941176
97
0.742424
01ad9bbaa160fca781f1a78440acf326a4734c49
97
class Bootstrap::BreadcrumbsController < Bootstrap::BaseBootstrapController def index; end end
24.25
75
0.835052
bbec2714889d7d265b731570c2ef18a8ad97c756
3,575
require "shellwords" module VagrantPlugins module GuestLinux module Cap class MountSMBSharedFolder def self.mount_smb_shared_folder(machine, name, guestpath, options) expanded_guest_path = machine.guest.capability( :shell_expand_guest_path, guestpath) mount_commands...
33.726415
99
0.56979
5de785c07a68dab68ecee2bca4f6edec79fa9bde
208
module Jekyll module Placeholders class Generator < Jekyll::Generator attr_accessor :site def generate(site) Jekyll::Placeholders::Collections.new(site) end end end end
17.333333
51
0.668269
4ad0936a7a40c8f5c34cc6fc27b0774c570d3297
117
class <%= file_name_camel %>Controller < ApplicationController <%= controller_methods "actions/#{file_name}" %> end
39
62
0.752137
0897ea9cd157fccc1352c455a62145319f78d8da
2,751
require 'models/runtime/domain' module VCAP::CloudController class SharedDomain < Domain set_dataset(shared_domains) add_association_dependencies routes: :destroy export_attributes :name, :internal, :router_group_guid, :router_group_type import_attributes :name, :internal, :router_group_guid st...
25.472222
108
0.656125
380cd5d77038c13bb76316faa81ffa542f0f2586
2,353
require 'spec_helper' describe 'Admin::RequestsProfilesController' do before do FileUtils.mkdir_p(Gitlab::RequestProfiler::PROFILES_DIR) sign_in(create(:admin)) end after do Gitlab::RequestProfiler.remove_all_profiles end describe 'GET /admin/requests_profiles' do it 'shows the current prof...
33.614286
116
0.685083
bb9ba1f39d3ade851caf9f15f86f196af6d4e356
2,896
module Recurly class Subscription < AccountBase self.element_name = "subscription" def self.known_attributes [ "plan_code", "coupon_code", "unit_amount_in_cents", "quantity", "trial_ends_at" ] end # initialize associations def initialize(attrib...
35.753086
202
0.691989
ffc5cf844021acbac4c4c244b349290b1367ee13
335
class CreateConfigurationScript < ActiveRecord::Migration def change create_table :configuration_scripts do |t| t.belongs_to :configuration_manager, :type => :bigint t.string :manager_ref t.string :name t.string :description t.text :variables t.timestamps :null => false ...
22.333333
59
0.680597
62fdfedbeffb82b710767a33531c9c2935edf2f5
6,192
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.222222
104
0.665536
e95b60092603cfd54c1153c5b90502054251573c
5,120
require "spec_helper" describe Clickmeetings::PrivateLabel::Conference do context '::by_account' do context "without block" do before { described_class.by_account(account_id: 1) } after(:all) { described_class.by_account(account_id: nil) } subject { described_class.account_id } specify ...
31.411043
112
0.64082
2807867d4b608513afae2fddfaa1695bce8edf62
404
class AchievementPolicy < ApplicationPolicy def show? create? || !user.blocked_by?(record.user) && !user.blocked?(record.user) end def index? show? end def create? record.user_id == user.id end def update? create? end def destroy? create? end def next_id? show? end ...
11.542857
76
0.621287
0163939b08df8848a9029f60be97e806126c349f
1,260
require 'formula' require File.expand_path("../../Requirements/php-meta-requirement", __FILE__) class Phppgadmin < Formula homepage 'http://phppgadmin.sourceforge.net/' url 'https://downloads.sourceforge.net/project/phppgadmin/phpPgAdmin%20%5Bstable%5D/phpPgAdmin-5.1/phpPgAdmin-5.1.tar.gz' sha1 'ef90fc9942c67ab9...
34.054054
123
0.736508
6a29066f8c3246571b01eb30f99878f5d0439aca
895
# == Schema Information # # Table name: categories # # id :integer not null, primary key # name :string not null # slug :string not null # created_at :datetime not null # updated_at :datetime not null # description :text # class CategoriesCont...
19.042553
55
0.651397
5d174005297c155a4224802dbe97d6cca7c247a6
90
require 'rails_helper' RSpec.describe CalorieCountsController, type: :controller do end
15
60
0.822222
bf465f8eec8414f371e6c4c3a79189063fdb5bcb
6,680
require "uri" module Bundler class Settings BOOL_KEYS = %w(frozen cache_all no_prune disable_local_branch_check ignore_messages gem.mit gem.coc).freeze NUMBER_KEYS = %w(retry timeout redirect).freeze DEFAULT_CONFIG = { :retry => 3, :timeout => 10, :redirect => 5 } def initialize(root = nil) @r...
25.30303
111
0.591916
ac1120901c4f4305ad5b3f9bffe1d584e4fca83d
608
# coding: utf-8 require "erb" module Reink module Epub class TocXhtml include ERB::Util def initialize @items = [] @template = File.open(File.join(File.dirname(__FILE__), "toc.xhtml.erb"), "rb:utf-8") { |file| file.read } end attr_accessor :items def to_s ...
19.612903
114
0.595395
ffc6b0862b0c6397ae938292228a73437dedef11
124
# frozen_string_literal: true class PostsController < WulinMaster::ScreenController controller_for_screen PostScreen end
20.666667
53
0.854839
ab4cabe9a6f0c7e68bee180d967a726b3e976ce6
471
cask 'font-oleo-script' do version :latest sha256 :no_check # github.com/google/fonts was verified as official when first introduced to the cask url 'https://github.com/google/fonts/trunk/ofl/oleoscript', using: :svn, revision: '50', trust_cert: true name 'Oleo Script' homepage 'ht...
26.166667
86
0.694268
b973bd8f1568732f2095c028df0f53ed27c62ba7
835
require 'reading_time/version' require 'reading_time/core_ext' require 'reading_time/time' require 'sanitize' module ReadingTime AVG_WORDS_PER_MIN = 200 ACCURACY_IN_SECONDS = 5 def self.word_count(text) words(text).count end def self.parse(text, opts = {}) avg_words_per_min = opts[:words_per_min] ...
18.977273
65
0.682635
26243ff35bc75147ceda1eb8e6b59da74680c490
1,417
require 'test_helper' class FollowingTest < ActionDispatch::IntegrationTest def setup @user = users(:samrood) log_in_as(@user) @other = users(:micheal) end test 'following page' do get following_user_path(@user) assert_not @user.following.empty? assert_match @user.following.count.to_s, r...
26.240741
76
0.693719
1dabaabc72b5102309e92608157def4def303a96
3,760
require 'messages/deployments_list_message' require 'messages/deployment_create_message' require 'messages/deployment_update_message' require 'fetchers/deployment_list_fetcher' require 'presenters/v3/deployment_presenter' require 'actions/deployment_create' require 'actions/deployment_update' require 'actions/deploymen...
40.430108
163
0.767021
6213f9ba434761fb0f2ee4058f3cc310e7385eac
1,032
# frozen_string_literal: true require 'rails_helper' RSpec.describe Shared::Utils::Normalizer do subject(:normalizer) { described_class.new } describe '#normalize_url' do it 'converts nil-value to empty string' do expect(normalizer.normalize_url(nil)).to eq('') end it 'removes spaces from the ...
28.666667
100
0.696705
5d6b1a5320b2072fd11dd7b30e46bdc2bd625e2f
1,224
# frozen_string_literal: true require 'erb' require_relative 'template' # All things required to generate the ModelPages class ModelPages def initialize(works) @works = works end def generate(template) models.each_with_object({}) do |model, collection| template_values = { title: model, ...
23.09434
87
0.623366
7944c5e0a016cc69b73206a0c1456a4a2691985c
1,067
# 在数据库中的配置信息 # 这里有存放首页,Wiki 等页面 HTML # 使用方法 # SiteConfig.foo # SiteConfig.foo = "asdkglaksdg" class SiteConfig include Mongoid::Document field :key field :value index key: 1 validates :key, presence: true, uniqueness: true def self.method_missing(method, *args) method_name = method.to_s super(me...
20.921569
63
0.651359
ff2a813973451ae17994a6d4b48e84a2971c0c8a
908
cask 'gitkraken' do version '0.8.3' sha256 'af48b91889f6473ad2a8b5a17ee9badf69526a145c91d3da7640bfa257ecc6aa' url "http://release.gitkraken.com/darwin/v#{version}.zip" appcast 'https://release.gitkraken.com/darwin/RELEASES', checkpoint: '0ab458302fdfe2cdc8f005a0eb3e196c365427376ba75022f66ce9b229505d9...
34.923077
88
0.659692
337764fc61e346d356e7309835cf39c23e3af826
2,287
class GenTrackerHistoryDeleteTrigger < ActiveRecord::Migration def change reversible do |dir| dir.up do execute <<EOF DROP TRIGGER IF EXISTS tracker_record_delete ON tracker_history; DROP FUNCTION IF EXISTS handle_delete(); CREATE FUNCTION handle_delete() RETURNS trigger LANGUAGE plpgsql ...
30.092105
118
0.661128
ac3164a4ff11cffac6f9bc4c708df7a3a01a5e61
212
class TestRoutingController < ApplicationController def routed_action render_class_and_action end def test_named_routes_from_plugin render :text => plugin_route_path(:action => "index") end end
23.555556
57
0.778302
61cc5724ad96727e398c2c3f5c842eee0fa1a4dd
24,322
# frozen_string_literal: true require "spec_helper" require "dependabot/dependency" require "dependabot/dependency_file" require "dependabot/composer/file_updater/lockfile_updater" RSpec.describe Dependabot::Composer::FileUpdater::LockfileUpdater do let(:updater) do described_class.new( dependency_files: ...
31.022959
80
0.546994
1c7630094e50525fee31f53460136211b2b3174e
518
cask 'zeplin' do version '2.5,717' sha256 '39c4d60e605a4a5ae72d72ccc308bfefec4333e780b4e8d16c25d3d9f03422ed' url 'https://api.zeplin.io/urls/download-mac' appcast 'https://rink.hockeyapp.net/api/2/apps/8926efffe734b6d303d09f41d90c34fc' name 'Zeplin' homepage 'https://zeplin.io/' auto_updates true app...
25.9
82
0.658301
e8409c787f0851417b338e046ebabed835a67ed9
441
#! /usr/bin/ruby system("rm -rf api-doc") File::open("tkrzw-doc.rb") { |ifile| File::open("tkrzw.rb", "w") { |ofile| ifile.each { |line| line = line.chomp line = line.sub(/# +@param +(\w+) +/, '# - <b>@param <i>\\1</i></b> ') line = line.sub(/# +@(\w+) +/, '# - <b>@\\1</b> ') ofile.print...
24.5
76
0.489796
914807b01c7a09a42c09ef1f4c56aecf2bb282cd
186
# frozen_string_literal: true class AddRightsToUser < ActiveRecord::Migration[6.0] def change add_column :users, :rights, :string, array: true, null: false, default: [] end end
23.25
78
0.725806
3890546875fe215b737944bce9426ff71b7e5507
19,881
require 'spec_helper' describe 'openstack::all' do # minimum set of default parameters let :params do { :public_address => '10.0.0.1', :public_interface => 'eth0', :admin_email => 'some_user@some_fake_email_address.foo', :admin_password => 'ChangeMe', ...
37.796578
152
0.548212
ed81908628446c58d1267e983707f2fd1d6c3c91
61
class NericaRiceInputsController < ApplicationController end
20.333333
56
0.901639
b970618d245bcec6ef195bea9334e8fd126e4a3e
335
require 'spec_helper' describe OptaSD::Soccer::TournamentSchedule do before do @tournament_id = "bnni2f2e6ii20b1wmzcsbpj2o" end it "get match_facts by resource" do ranking = OptaSD::Soccer::TournamentSchedule.new.resource(@tournament_id)#.get # sdapidocumentation Account not Authorised for this req...
23.928571
82
0.767164
e2babbdd6096e1002f08513c6de1c10d364c0dd0
524
# == Schema Information # # Table name: assets # # id :integer not null, primary key # theme_id :integer # content_type :string # public_url :string # size :integer # key :string # created_at :datetime not null # updated_at :datetime not null # file...
20.96
55
0.616412
acc915939faf599c5063a48f8e4375eb4d673a33
1,191
# encoding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'activejob/workers_lock/version' Gem::Specification.new do |s| s.name = "activejob-workers-lock" s.version = Activejob::WorkersLock::VERSION s.authors = ["jpatters"] ...
36.090909
72
0.639798
626d2813a9de7780198288023e2b7baa8d75a661
559
cask 'shortcat' do version '0.7.10' sha256 '02744ac4837cf50aee8a2441c660ea65cea21fd6740006dbd13e5ca27c70ec6b' url "https://files.shortcatapp.com/v#{version}/Shortcat.zip" appcast 'https://shortcatapp.com/updates/appcast.xml' name 'Sproutcube Shortcat' homepage 'https://shortcatapp.com/' app 'Shortcat.ap...
31.055556
75
0.685152
ed0a305e0ce63da95ac9b2c533db5d7e4495011b
163
json.extract! bar_code, :id, :asn, :part_code, :qty, :date, :lot_size, :target, :location, :created_at, :updated_at json.url bar_code_url(bar_code, format: :json)
54.333333
115
0.730061
e9e0f07c3aa4c7a186db8493d394fb19bfe8d413
348
Sequel.migration do up do alter_table(:govt_inspection_sheets) do add_column :tripsheet_loaded_at, DateTime add_column :tripsheet_offloaded, :boolean, default: false end end down do alter_table(:govt_inspection_sheets) do drop_column :tripsheet_loaded_at drop_column :tripsheet...
23.2
63
0.738506
e2095135932b4e9e83099d57ba32ae4ebd8583e4
747
require 'spec_helper' describe 'security_tidy_all_files' do let(:msg) { 'Purging all files, be warned!' } context 'with fix disabled' do context 'code having unspecific tidy' do let(:code) { " tidy { '/usr/local': } " } it 'should detect a single problem' do expect(problems).to have(1).pr...
20.189189
73
0.598394
622cf21d7bfb19465d979397d5f29ec305ca41cd
7,646
# 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::ApiManagement::Mgmt::V2017_03_01 module Models # # Request Report data. # class RequestReportRecordContract include M...
31.081301
79
0.485352
f7ab9506bbf2bcd4016868629d83cb90e273fa02
559
require 'spec_helper' describe ActsAsTenant::Configuration do describe 'no configuration given' do before do ActsAsTenant.configure end it 'provides defaults' do expect(ActsAsTenant.configuration.require_tenant).not_to be_truthy end end describe 'with config block' do after do ...
19.275862
72
0.699463
b93c9a9fb5d89782205117eb06edbe0b3d8d340a
252
class CreateMeasurements < ActiveRecord::Migration[6.1] def change create_table :measurements do |t| t.integer :value t.timestamp :date t.references :measure, null: false, foreign_key: true t.timestamps end end end
21
59
0.678571
bf1798175e661a4e8b98b74ae25c920d87bb83ae
659
module Shaf module Tasks class RoutesTask extend Rake::DSL desc 'List path helpers' task :routes do require 'shaf/utils' require 'config/database' extend Shaf::Utils bootstrap Shaf::ApiRoutes::Registry.controllers.each do |controller| puts "\n...
24.407407
89
0.561457
08d47ccd1d610adbe6ca74e73115cec44eae7b05
993
ENV['RAILS_ENV'] ||= 'test' require_relative '../config/environment' require 'rails/test_help' require 'minitest/reporters' Minitest::Reporters.use! class ActiveSupport::TestCase # Run tests in parallel with specified workers parallelize(workers: :number_of_processors) # Setup all fixtures in test/fixtures/*.y...
27.583333
82
0.676737
87d616fdba200351f9c20d11fa908db75882af79
851
Pod::Spec.new do |s| s.name = "MaterialComponentsCatalog" s.version = "35.3.0" s.authors = "The Material Components authors." s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." s.homepage = "https://github.com/material-components/mater...
53.1875
124
0.670975
b9fae129a6214138ed7bac3386605953b993e289
862
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "devise_activity/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "devise-activity" s.version = DeviseActivity::VERSION s.authors = ["M Shahzad Tariq"] s.email ...
35.916667
108
0.683295
f86ee8d7f83f5f94284c840114080ebb704af393
3,295
class Tm < Formula desc "TriggerMesh CLI to work with knative objects" homepage "https://triggermesh.com" url "https://github.com/triggermesh/tm/archive/v1.4.0.tar.gz" sha256 "b1828e354d1e50de6529506b4403ddc44df7620ff75b4a8d8fa63e44816e8778" license "Apache-2.0" head "https://github.com/triggermesh/tm.git" ...
35.815217
122
0.691047
f83164171b7863bdb4c347f0d462e47c12148536
163
require 'nokogiri' require 'pry' require 'open-uri' require_relative "daily_deal/version" require_relative "./daily_deal/cli" require_relative "./daily_deal/deal"
23.285714
37
0.803681
79c38cdf8e5b4bed06a69270b21f6c8410b864ca
102
require 'spec_helper_acceptance' # Ensure IPv6 router advertisements are not accepted - Section 3.3.1
34
68
0.813725
33e0f150fe14445f6a5e8e2a10764e1553f903da
730
# # Transcript.rb # briquette # # Created by Dominic Dagradi on 7/31/11. # Copyright 2011 Bearded. All rights reserved. # class Transcript attr_accessor :room attr_accessor :date attr_accessor :site attr_accessor :controller def initialize _room, _date, sender @room = _room @date = Time.par...
22.8125
104
0.69589
03ee69b2399f215615ef287172868e8e0fd334d4
469
module ReverseMarkdown module Converters class Strong < Base def convert(node) content = treat_children(node) if content.strip.empty? || already_strong?(node) content else "**#{content}**" end end def already_strong?(node) node.ancesto...
21.318182
73
0.573561
edf4122b4c09ccc833f1dd4d845b28d8f5245338
228
class Tapaal < Cask url 'http://www.tapaal.net/fileadmin/download/tapaal-2.4/tapaal-2.4.2-mac.dmg' homepage 'http://www.tapaal.net' version '2.4.2' sha1 '5590ebea1dee27d43ef1268f98c1e8683e64658b' link 'Tapaal.app' end
28.5
80
0.736842
d5db1c900575c4372d685bd0cc634a78b2b62ff7
640
cask 'devonthink' do version '2.11.2' sha256 'd1ba068f0830e85457eedcf53f8c6843182fc3446d5de27b6f3cff8c2204ebfd' # amazonaws.com/DTWebsiteSupport was verified as official when first introduced to the cask url "https://s3.amazonaws.com/DTWebsiteSupport/download/devonthink/#{version}/DEVONthink_Personal.app.zip" ...
40
113
0.801563
d5f5b7eb7e03e70501ca3cc48379cd56fa0c3b1e
24,401
require 'test_helper' class OracleCloudDNSTest < Minitest::Test def setup super @zone_name = 'test.recordstore.io' @oracle_cloud_dns = Provider::OracleCloudDNS end def test_zones VCR.use_cassette('oracle_get_zones') do zones = @oracle_cloud_dns.zones assert_includes(zones, @zone_name...
33.243869
118
0.66821
e2548909426b43e25cbc165c1d408ba38ff3fc1e
9,960
# frozen_string_literal: true module RuboCop module Cop module Layout # Check that the keys, separators, and values of a multi-line hash # literal are aligned according to configuration. The configuration # options are: # # * key (left align keys, one space before hash rockets and v...
27.213115
79
0.5
383286b5ad4f90e86d0df8e9d934e12496a14ee7
16,788
# Copyright 2016, BlackBerry Limited # # 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 required by applicable law or agreed to in wri...
46.893855
177
0.600071
91e588a7930a577436b34fabf0b3d806a27e83dd
597
desc 'Set up a dev instance of the Pact Broker' task 'pact_broker:dev:setup' do puts "Copying example directory" FileUtils.cp_r 'example', 'dev' gemfile_contents = File.read('dev/Gemfile') puts "Changing source of pact_broker gem from rubygems.org to local file system" new_gemfile_contents = gemfile_conten...
29.85
106
0.700168
e9b26b67db968a548df456db2dc01ec5ca7f984d
2,291
require "spec_helper" describe BetterErrors do context ".editor" do it "defaults to textmate" do subject.editor["foo.rb", 123].should == "txmt://open?url=file://foo.rb&line=123" end it "url escapes the filename" do subject.editor["&.rb", 0].should == "txmt://open?url=file://%26.rb&line=0" ...
30.959459
100
0.601048
b9288afd8061eb963c8ee4f4eac963e3e096fc9b
1,654
# This file has been automatically generated from a template file. # Please make modifications to # `templates/gRPC-RxLibrary.podspec.template` instead. This file can be # regenerated from the template by running # `tools/buildgen/generate_projects.sh`. # Copyright 2015 gRPC authors. # # Licensed under the Apache Lice...
31.807692
74
0.698912
f7f9059e7ef9c53a373d3076676118c16993aa63
82
class Salesforce::NewsFeed < Salesforce::SfBase set_table_name 'news_feeds' end
20.5
47
0.804878
0325a8274bb8e562a11493c7e2e8c67c1f7faedb
3,897
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'uri' require 'msf/core' class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Report def initialize(info = {}) super...
27.0625
110
0.606107
ac819bd29fbfaa81fcdee03bd54c5065b5ab60ee
5,851
require 'spec_helper' describe 'sudo' do context 'with class default options' do it do should contain_package('sudo-package').with({ 'ensure' => 'present', 'name' => 'sudo', }) should contain_file('/etc/sudoers.d').with({ 'ensure' => 'present', 'owner' => 'ro...
34.017442
172
0.519398
bf28b738af2eb9e1fff72cd95bfb7c9d6ab6e5c5
433
module GeoPattern class ColorPreset attr_accessor :color, :base_color, :mode def initialize(color: nil, base_color: nil) @color = color @base_color = base_color end # Return mode # # @return [Symbol] # The color mode def mode if color.nil? || color.empty? ...
16.037037
47
0.551963
1d27b507a7c2368f9d3b8190a88d531055602336
2,268
module Fastlane module Actions class GitPullAction < Action def self.run(params) commands = [] unless params[:only_tags] command = "git pull" command << " --rebase" if params[:rebase] commands += ["#{command} &&"] end commands += ["git fetch --...
34.892308
200
0.474868
bb08d6b6c1471df75bd7a32c0421005c5fdd8fef
423
module EmergencyBanner class Deploy def run(campaign_class, heading, short_description = "", link = "", link_text = "") redis = Redis.new redis.hmset(:emergency_banner, :campaign_class, campaign_class, :heading, heading, :short_description, short_d...
30.214286
87
0.565012
f78425dd3fbbc4447d9c43de5efeb30685eeadab
14,457
# frozen_string_literal: true # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render inv...
48.19
154
0.751262
b92395c6bc35fee44ee2864ef5ec0ca0373c6060
861
# frozen_string_literal: true $LOAD_PATH.push File.expand_path('lib', __dir__) # Maintain your gem's version: require 'active_storage_validations/version' # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = 'active_storage_validations' s.version = ActiveStorageVali...
33.115385
83
0.70964
e2f25c02d256bc06255bf0be2b13a7c55635f4ba
1,585
module Peatio module Paycentralservice module Hooks BLOCKCHAIN_VERSION_REQUIREMENT = "~> 1.0.0" WALLET_VERSION_REQUIREMENT = "~> 1.0.0" class << self def check_compatibility unless Gem::Requirement.new(BLOCKCHAIN_VERSION_REQUIREMENT) .satisfied...
36.860465
106
0.606309
087883320805aca5867ae0ad51ae7d0c9a12a62a
30,086
require 'spec_helper' describe 'rsyslog' do describe 'rsyslog_config' do let :facts do { :osfamily => 'RedHat', :lsbmajdistrelease => '6', :domain => 'defaultdomain', } end context 'attributes' do context 'with default params' do it {...
37.281289
155
0.571262
f7e52d29d0b35007255508fd8dc819d378773b92
716
cask "zettlr" do arch = Hardware::CPU.intel? ? "x64" : "arm64" version "2.1.2" if Hardware::CPU.intel? sha256 "c16ef93a6de8b1857704346954beb8cdfb9629e8f773dcd5588d3a67b8f32a8c" else sha256 "098330ea9c1848acd202c299e3b1c4f8a309745c33d34c5c1bced24f5be7f48e" end url "https://github.com/Zettlr/Zettlr...
27.538462
100
0.72067
ed10cbbd2f282500a08292934a846466bf3f4dce
2,211
# frozen_string_literal: true module Torque module PostgreSQL class AuxiliaryStatement class Settings < Collector.new(:attributes, :join, :join_type, :query, :requires, :polymorphic, :through) attr_reader :base, :source alias_method :select, :attributes alias_method :cte,...
28.346154
87
0.588422
2142836a83133a61512208d26d89d86bf1011f37
1,257
# # Cookbook Name:: redisio # Resource::configure # # Copyright 2013, Brian Bianco <brian.bianco@gmail.com> # Copyright 2013, Rackspace Hosting <ryan.cleere@rackspace.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
31.425
74
0.755768
62b8047de8565cbf1ac998441e66a85576efcff0
857
require "css_media/version" module CssMedia autoload :Sprockets, 'css_media/sprockets' # Add prefixes to `css`. See `Processor#process` for options. def self.process(css, opts = { }) params = { } # params[:browsers] = opts.delete(:browsers) if opts.has_key?(:browsers) Processor.new(params).process(c...
27.645161
76
0.738623