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
1108f763e84b1614659b350781b8916677a3cfe1
877
cask 'omnigraffle' do if MacOS.release <= :snow_leopard version '5.4.4' sha256 '7bcc64093f46bd4808b1a4cb86cf90c0380a5c5ffffd55ce8f742712818558df' url "http://www.omnigroup.com/ftp1/pub/software/MacOSX/10.6/OmniGraffle-#{version}.dmg" elsif MacOS.release <= :mavericks version '6.0.5' sha256 'a2ef...
36.541667
92
0.759407
2677a8a4939cec67a536f2f7a1296012413771a8
151
class CreateWeapons < ActiveRecord::Migration def change create_table :weapons do |t| t.string :name t.timestamps end end end
15.1
45
0.668874
03c9602b6d500f821b2322709be204fb56316510
579
# frozen_string_literal: true require 'rails_helper' RSpec.describe Screening::SendFollowupMailer, type: :mailer do describe 'notify' do let(:role) { create(:role) } let(:mail) { Screening::SendFollowupMailer.notify(role.id) } it 'renders the subject' do expect(mail.subject).to eq(I18n.t('dashboa...
25.173913
92
0.683938
bb33dbdb8eafab7c9c61fee78287370baa5724ca
1,642
# frozen_string_literal: true module ElasticAPM module Transport RSpec.describe Headers do let(:config) { Config.new } subject { described_class.new(config) } describe 'to_h' do it 'constructs the default headers from config' do expect(subject.to_h).to match('User-Agent': Str...
27.830508
70
0.563337
5d73bc4de795754c02307036857bbc0e9ab0aa88
1,880
require "spec_helper" describe Mongoid::Relations::Builders::Referenced::One do let(:base) do stub(:new_record? => false) end describe "#build" do let(:criteria) do Post.where("person_id" => object) end let(:metadata) do stub( :klass => Post, :name => :post, ...
17.090909
57
0.559043
62dbb2d06d6d3f3a56716141f3b48f048d760e7a
231
# frozen_string_literal: true Rails.application.routes.draw do resources :organizations root to: 'organizations#index' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end
25.666667
101
0.78355
61d5445b3bfc3531eae9e252574d22c76df772db
43
module SinkUtility VERSION = "0.1.2" end
10.75
19
0.697674
2669adb8455cc9d17de5df05bb92f2436e96f90c
4,724
# frozen_string_literal: true module Gitlab class ProjectSearchResults < SearchResults attr_reader :project, :repository_ref def initialize(current_user, project, query, repository_ref = nil, per_page: 20) @current_user = current_user @project = project @repository_ref = repository_ref.pre...
26.689266
126
0.671677
f752426972e698ea6da32165a528a98481b499a7
254
module Theblog class ContentNodesController < Theblog::ApplicationController skip_before_action :authenticate_user!, only: [:show] def show @node = ContentNode.by_parent(params[:category]).find_by!(slug: params[:slug]) end end end
25.4
84
0.732283
bb551bf856a320eddc60dccfc8159e920766127e
594
require 'auth' module API module ApiHelper include Auth def warden env['warden'] end def session env['rack.session'] end def authenticated return true if warden.authenticated? return if headers['Access-Token'].blank? payload = decode_jwt(headers['Access-Token...
17.470588
85
0.617845
081683916f3f766a7b05a548dd277404ef0d9fb5
418
class Group attr_reader :string, :individuals def initialize(string) @string = string.gsub(/\s+/, '') @individuals = string.split(/\s+/) end def unique string.split('').to_set.count end def every letters = individuals[0].split('') individuals[1...(individuals.size)].each do |individual| letters =...
17.416667
58
0.655502
335954be87dd56f954e24111d07c1104d152df9b
400
require 'spec_helper' require './libraries/default' describe Ark::GeneralOwner do let(:subject) { described_class.new(resource) } let(:resource) do double(owner: 'owner', group: 'group', path: '/resource/path') end it 'generates the correct command for windows file ownership' do ...
23.529412
72
0.6775
ff48a3532ab8990cef3dbcccdebe90b6689d3b18
309
json.officials @officials do |official| json.(official, :id, :name, :title, :image, :city_id, :bio, :street, :city_code, :state, :zip, :phone, :fax, :email, :facebook) json.staff_members official.staff_members do |staff_member| json.(staff_member, :id, :official_id, :name, :email, :title) end end
38.625
129
0.695793
1aa49d7a6af9bcb3f7d518e6805f9b3a967d762d
725
Rails.application.routes.draw do root 'static_pages#home' get '/help', to: 'static_pages#help' get '/about', to: 'static_pages#about' get '/contact', to: 'static_pages#contact' get '/signup', to: 'users#new' post '/signup', to: 'users#create' get '/login', to: 'sessions#new' post '/...
30.208333
71
0.634483
1a4b7641549f68743670bddcc060a04ab0d66581
3,377
# 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: 'Emanuel...
64.942308
186
0.752739
ab4628bedb4256fd6529ffd48ddc31a593a82677
977
Rails.application.configure do config.cache_classes = true config.eager_load = true config.exceptions_app = routes config.consider_all_requests_local = false config.action_controller.perform_caching = true config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? config.assets.js_compre...
34.892857
78
0.781986
ed966c804e41e274c137d0df502a02a9d6c63b63
418
OFFICIAL_TAPS = %w[ nginx php science ].freeze OFFICIAL_CASK_TAPS = %w[ cask versions ].freeze OFFICIAL_CMD_TAPS = { "homebrew/bundle" => ["bundle"], "homebrew/test-bot" => ["test-bot"], "homebrew/services" => ["services"], }.freeze DEPRECATED_OFFICIAL_TAPS = %w[ apache binary completions dev...
12.294118
38
0.655502
08f381a4c8b06fa17529fb321df50454c07dba12
2,644
# encoding: UTF-8 require "forwardable" module Spontaneous class Error < StandardError; end class UnknownTypeException < Error def initialize(parent, type) super("Unknown content type '#{type}' requested in class #{parent}") end end class UnknownStyleException < Error def initialize(style_...
28.12766
135
0.722769
ed92e20e36b4d7c7074d05a8708863c0a8814f14
1,808
require 'spec_helper' describe Tile do it 'is initializable' do expect(Tile.new).not_to be_nil end describe '#text' do it 'is equal to what it was initialized with' do expect(Tile.new('abc').text).to eq 'abc' end end describe '#x' do it 'defaults to 0' do expect(Tile.new.x).to b...
22.6
73
0.576881
6ad76693bb53f5f8fbdeac7497e7c4dbd86107a3
3,122
# encoding: UTF-8 # 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 sou...
35.477273
119
0.665279
615775283fa76ba7566669ffb13a2abdb73604d1
128
class AddNameEnToCategories < ActiveRecord::Migration[4.2] def change add_column :categories, :name_en, :string end end
21.333333
58
0.757813
b95e3ee9c47a34d898c19fc5266be466c954d202
1,108
module Concurrent module Synchronization # @!visibility private module MriAttrVolatile def self.included(base) base.extend(ClassMethods) end module ClassMethods def attr_volatile(*names) names.each do |name| ivar = :"@volatile_#{name}" ...
24.622222
108
0.535199
285368552fc761a9c3eeeed5125202ed51e10664
2,297
require 'bundler' if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("3.2.0") require 'pry' end require 'rspec-parameterized' require 'simplecov' require 'psych' SimpleCov.start do add_filter 'spec' end SimpleCov.minimum_coverage 99 require 'openapi_parser' RSpec.configure do |config| # Enable flags l...
22.742574
114
0.77057
e22c0cfcc25566742999a696166afb4db87b5670
1,967
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "coindcx/version" Gem::Specification.new do |spec| spec.name = "coindcx" spec.version = Coindcx::VERSION spec.authors = ["Snm Maurya"] spec.email = ["snmmaurya@gmail.com"] ...
45.744186
114
0.685816
ffc87e4412de9828194d133e99711644b66f3218
7,461
# == Schema Information # # Table name: claims # # id :integer not null, primary key # additional_information :text # apply_vat :boolean # state :string # last_submitted_at :datetime # case_number :string # advocate_category ...
29.144531
120
0.596703
1a6aa88fb04d20fd85acb12573e98b48d4dcb33d
836
# (c) Copyright 2020 Hewlett Packard Enterprise Development LP # # 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...
39.809524
94
0.77512
39f63cac6c78caf57eefabb0859624ca40b9ba2c
1,276
# frozen_string_literal: true module HTTPX module Loggable COLORS = { black: 30, red: 31, green: 32, yellow: 33, blue: 34, magenta: 35, cyan: 36, white: 37, }.freeze def log(level: @options.debug_level, color: nil, &msg) return unless @options.debug ...
25.52
122
0.607367
01c666639a447b8eff8e5de9653f35ad49748396
5,599
describe Hubspot::Utils do describe ".properties_to_hash" do let(:properties) do { "email" => { "value" => "email@address.com" }, "firstname" => { "value" => "Bob" }, "lastname" => { "value" => "Smith" } } end subject { Hubspot::Utils.properties_to_hash(properties)...
33.933333
133
0.616539
08af51dbe7c4b5207bce315be91028c9f588408d
3,619
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Protected Environments' do let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:environments) { %w(production development staging test) } before do stub_licensed_features(protected_environments: true) en...
28.273438
133
0.688035
f8d725abe2cd59aa78ab57141da39068a6f6230f
1,039
require 'paypalhttp' require "base64" module PayPal SANDBOXAPI = 'https://api.sandbox.paypal.com' LIVEAPI = 'https://api.paypal.com' SANDBOXWEB = 'https://sandbox.paypal.com' LIVEWEB = 'https://paypal.com' class PayPalEnvironment < PayPalHttp::Environment attr_accessor :client_id, :client_secret, :web_...
27.342105
77
0.715111
b9f7256b938ac0664711e7a7c7e2e98b73f580fb
358
module Ecm::Contact # Preview all emails at http://localhost:3000/rails/mailers/ecm/contact/contact_request_mailer class ContactRequestMailerPreview < ActionMailer::Preview # Preview this email at http://localhost:3000/rails/mailers/ecm/contact/contact_request_mailer/notify def notify ContactRequestM...
29.833333
105
0.784916
e8efcf7bca95fc6c50789f55aafdd59281f3a098
164
class CreateCollections < ActiveRecord::Migration[6.0] def change create_table :collections do |t| t.string :name t.timestamps end end end
18.222222
54
0.676829
1d0991b5f8cb468015ab0590a3ae882b9e0ea0eb
452
module SwellMedia class MediaPolicy < ApplicationPolicy def admin? user.admin? end def admin_create? user.admin? end def admin_destroy? user.admin? or record.user == user end def admin_edit? user.admin? or record.user == user end def admin_empty_trash? user.admin? end def ...
14.125
38
0.676991
b99ba93384b603efd3ea9de115a77b31d2bb87dc
6,597
require "cgi" module BrowseHelper def printable_name(object, version = false) id = if object.id.is_a?(Array) object.id[0] else object.id end name = t "printable_name.with_id", :id => id.to_s name = t "printable_name.with_version", :id => name, :version => object.ve...
34.359375
144
0.610884
28343b2b8687f41a1035c77eaf0c49419e479e88
848
require 'rip/version' Gem::Specification.new do |s| s.name = "rip" s.version = Rip::Version s.date = Time.now.strftime('%Y-%m-%d') s.summary = "Take back your $LOAD_PATH" s.homepage = "http://hellorip.com" s.email = "chris@ozmm.org" s.aut...
32.615385
62
0.522406
87aa9ababd0eae71931a0e82578c3b8a9b692f14
9,005
module ActiveMerchant #:nodoc: module Billing #:nodoc: class SecureNetGateway < Gateway API_VERSION = "4.0" TRANSACTIONS = { :auth_only => "0000", :auth_capture => "0100", :prior_auth_capture => "0200", :void ...
34.109848
138
0.6
d50389f9fd60a8c3a2e948f27fdf71112866da28
114
class AddTokenToTickets < ActiveRecord::Migration def change add_column :tickets, :token, :string end end
19
49
0.754386
08ad7737e529397e08c0d191683d9bd52f50ffe2
1,366
class Cig < Formula desc "CLI app for checking the state of your git repositories" homepage "https://github.com/stevenjack/cig" url "https://github.com/stevenjack/cig/archive/v0.1.5.tar.gz" sha256 "545a4a8894e73c4152e0dcf5515239709537e0192629dc56257fe7cfc995da24" license "MIT" head "https://github.com/steve...
35.025641
93
0.732796
f80bb4ce71375c66b7e6605ade79b379776a1350
228
class UserToken < ActiveRecord::Base after_create :generate_token private def generate_token self.token = Digest::SHA1.hexdigest("--#{self.user_id}-mmmm-salty-#{self.created_at.to_s}--") self.save end end
17.538462
97
0.701754
7aa8199f27ab82d794796976323354338b82d109
533
# encoding: utf-8 # frozen_string_literal: true module ProxyPacRb module Cli # Shared methods for all cli commands module Shared # Enable debug mode def enable_debug_mode ProxyPacRb.enable_debug_mode if options[:debug_mode] == true end # Remove proxy variables def remove...
20.5
68
0.60788
f8329da4f2b5289a604f92b02881abbd0657be08
190
# frozen_string_literal: true FactoryBot.define do factory :pdf_template, class: "CscCore::PdfTemplate" do name { FFaker::Name.name } language_code { "km" } program end end
19
57
0.7
f7deafe69242d97954cb17f0d10f52e36541ef20
968
class Zsdx < Formula desc "Zelda Mystery of Solarus DX" homepage "http://www.solarus-games.org/games/zelda-mystery-of-solarus-dx/" url "https://github.com/christopho/zsdx/archive/zsdx-1.11.0.tar.gz" sha256 "05a5d220bbf2439c9da2e71cd9d104240878123fff5bc702e2405d6d0712f0dc" head "https://github.com/christopho/z...
34.571429
92
0.757231
5dd312c35f7c5f4fe159b589428b9c5eab4b7498
1,241
# frozen_string_literal: true module AbideDevUtils module Files class Writer MSG_EXT_APPEND = 'Appending %s extension to file' def write(content, file: nil, add_ext: true, file_ext: nil) valid_file = add_ext ? append_ext(file, file_ext) : file File.open(valid_file, 'w') { |f| f.write...
25.854167
70
0.587429
b969a0d80ae04d1572035bb771ca23a4a3b02f08
108
# frozen_string_literal: true module Admin class KidHerosController < Koi::AdminCrudController end end
15.428571
53
0.805556
5d79f247424284b4534b89247d8a1272e418c121
891
require_relative '../spec_helper' describe FoodCritic::Review do it "is instantiable with no warnings" do FoodCritic::Review.new('example', [], false) end describe "#cookbook_paths" do it "returns the cookbook paths provided" do FoodCritic::Review.new(['example'], [], false).cookbook_paths.must_equ...
35.64
114
0.694725
3809cd675ba0a1a26b089b733d008e5da9c78a61
1,311
require "language/node" class GulpCli < Formula desc "Command-line utility for Gulp" homepage "https://github.com/gulpjs/gulp-cli" url "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz" sha256 "0a5a76e5be9856edf019fb5be0ed8501a8d815da1beeb9c6effca07a93873ba4" license "MIT" livecheck do url :st...
29.133333
93
0.715484
2124849dc5c18f9493bbeeca935a51674af59b43
3,217
module TZInfo # A proxy class standing in for a {Timezone} with a given identifier. # {TimezoneProxy} inherits from {Timezone} and can be treated identically to # {Timezone} instances loaded with {Timezone.get}. # # {TimezoneProxy} instances are used to avoid the performance overhead of # loading time zone...
33.863158
79
0.692882
1d0d203b51dd48a53ea35bc783e74db29dc1bab5
1,306
module Msf module Util module DotNetDeserialization module Assemblies # see: # * https://docs.microsoft.com/en-us/dotnet/standard/assembly/ # * https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies # * https://docs.microsoft.com/en-us/dotnet/standard/assembly/referen...
24.185185
99
0.661562
7a6f020ca23b2e60be39fe3ca6a9e8753755823d
11,792
require 'core_extensions/string/permit' class ApplicationController < ActionController::Base String.include CoreExtensions::String::Permit include VerifyProfileConcern include LocaleHelper include VerifySpAttributesConcern include EffectiveUser FLASH_KEYS = %w[error info success warning other].freeze FL...
30.005089
100
0.745166
018e5e1d74fff8e9192b79e821b0409e159951c5
1,171
# -*- encoding: utf-8 -*- $:.push File.expand_path('../lib', __FILE__) require 'redis-rails/version' Gem::Specification.new do |s| s.name = 'redis-rails' s.version = Redis::Rails::VERSION s.authors = ['Luca Guidi', 'Ryan Bigg'] s.email = ['me@lucaguidi.com', 'me@ryanbigg.com'] s.homepage...
36.59375
83
0.625961
87f71222d832197e0b4e5515f0858a81b702e777
1,029
class ConsolidatedBagpipesMigration < ActiveRecord::Migration def self.up create_table :members do |t| t.string :name t.boolean :administrator, :default => false t.datetime :created_at t.datetime :updated_at t.integer :user_id, :null => false t.stri...
27.078947
76
0.613217
010e2810f19facaa378c1c95f59a39d65b5dbe70
123
RSpec.describe Msf::Exploit::SQLi::MySQLi::TimeBasedBlind do it_should_behave_like 'TimeBasedBlind', described_class end
30.75
60
0.829268
b9e1df9a31a461806b51256ebcb425d37517dc0f
4,094
require 'spec_helper' require 'trice_controller_method_test_controller' describe 'TriceControllerMethodTestController E2E', type: :request do scenario 'hi' do get '/bang' expect(response.status).to eq 400 end end if defined?(ActionController::API) describe 'TriceApiControllerMethodTestController E2E', ...
26.24359
228
0.65022
ffcf9b72701237b0b682741d3bf6586fa95a60bb
76
class Photo < ActiveRecord::Base mount_uploader :image, ImageUploader end
19
38
0.802632
4a0ed2da210a0e2a2eb159784de32a0901cba088
1,173
Pod::Spec.new do |s| s.name = "Horadric" s.version = "0.0.5" s.summary = "Combine your development skills to build something great" s.description = <<-DESC A longer description of Horadric in Markdown format. * Think: Why did you write this? What is th...
35.545455
95
0.584825
bf85c6ddebb4d820a2a06af4ef48717d7f5e3051
744
cask "canva" do version "1.14.0" sha256 "04595dce762c2613efc28fdc0f8a15ca78149e912ceef4724f6eadec697a530b" url "https://desktop-release.canva-deploy.com/Canva-#{version}.dmg", verified: "desktop-release.canva-deploy.com/" appcast "https://desktop-release.canva-deploy.com/latest-mac.yml" name "Canva" ...
29.76
75
0.719086
1d512e5492090036dac21b3dec0099bfdfe17ab3
332
module Ipaymu class SignatureService attr_reader :key def initialize(key, digest=Ipaymu::SHA256Digest) @key = key @digest = digest end def sign(data) str_to_sign = DataSign.signature(data) hash(str_to_sign) end def hash(data) @digest.hexdigest(@key, data) e...
17.473684
52
0.635542
abed8216f45e056e2cc712b8de6132833402566f
1,251
module Rules ## # Tests that all GitHub email addresses match the # {GithubConnector::Settings#rule_email_regex} setting. If # no `rule_email_regex` setting exists, this rule always # returns `true`. class Email < Base # Returns true if this rule is enabled. # # @return [Boolean] def self....
24.057692
105
0.647482
91e1e924f1661314007a7b397b46818e0ad7a0e2
224
require 'rails_helper' RSpec.describe Steps::Abduction::RiskDetailsController, type: :controller do it_behaves_like 'an intermediate step controller', Steps::Abduction::RiskDetailsForm, C100App::AbductionDecisionTree end
37.333333
118
0.830357
ff50f4210d6d6be3439710ca581887133d7c0860
28,889
# Copyright 2015 Google, Inc. # # 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 writing,...
48.552941
537
0.69272
26945a8f2334d2a10c21a5b5a1e237839d2b4eff
2,868
# == Schema Information # # Table name: users # # id :integer not null, primary key # access_state :string(255) # activation_state :string(255) # activation_token :string(255) # activation_token_expires_at :datetime # crypt...
31.516484
94
0.624128
11603e8423d57d153195ca3b1ac2772bbaf96da4
121
class AddlowaccountToUsers < ActiveRecord::Migration def change add_column :users, :low_account, :string end end
20.166667
52
0.768595
bbb035a491164a66522d6831fee0ecf73f1b1c99
41
module Fabricate VERSION = "0.0.1" end
10.25
19
0.682927
39796f0d998df2b8e264ad9e19a1187cd3d1dbfc
1,324
module AnchorCookbook class AnchorServiceManagerUpstart < AnchorServiceBase use_automatic_resource_name provides :anchor_service, platform: 'ubuntu' property :anchor_home, String, default: '/opt/anchor/current' property :anchor_venv, String, default: '/opt/anchor/.venv' property :username, Strin...
25.461538
65
0.641994
bff97842ce578fbd3da5faadddea93d5bf305f0e
6,319
class Keg def fix_install_names options={} mach_o_files.each do |file| install_names_for(file, options) do |id, bad_names| file.ensure_writable do install_name_tool("-id", id, file) if file.dylib? bad_names.each do |bad_name| new_name = fixed_name(file, bad_name) ...
33.433862
98
0.651685
d588e4d94c561d9878def97dc241b62c13e2626e
16,662
require File.expand_path("../test_helper", File.dirname(__FILE__)) require "rails_erd/diagram/graphviz" class GraphvizTest < ActiveSupport::TestCase def setup RailsERD.options.filetype = :png RailsERD.options.warn = false end def teardown FileUtils.rm Dir["erd*.*"] rescue nil end def diagra...
35.151899
129
0.691634
6ae0b313dd9dec34ca20ca33db601bf41b39157d
260
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone Mime::Type.register "application/vnd.ms-excel", :xls
28.888889
59
0.738462
e23c9c15960e3cabf0135ce8376a7dcc8c519e84
629
class FontD2coding < Formula version "1.3.2,20180524" sha256 "0f1c9192eac7d56329dddc620f9f1666b707e9c8ed38fe1f988d0ae3e30b24e6" url "https://github.com/naver/d2codingfont/releases/download/VER#{version.to_s.sub(/,.*/, "")}/D2Coding-Ver#{version.to_s.sub(/,.*/, "")}-#{version.to_s.sub(/.*,/, "")}.zip" desc "D2 C...
44.928571
175
0.655008
b9c445981fee14e7879c609e349e6e39369840fc
970
class Detekt < Formula desc "Static code analysis for Kotlin" homepage "https://github.com/detekt/detekt" url "https://jcenter.bintray.com/io/gitlab/arturbosch/detekt/detekt-cli/1.9.1/detekt-cli-1.9.1-all.jar" sha256 "42937cb0284e2b8af99901bd9debde0c15899c06732cb350f0617885f445b5dd" bottle :unneeded depen...
28.529412
105
0.651546
1c4a347a24cb29a7ae821c565dab53dff0f26594
1,703
# frozen_string_literal: true # Cloud Foundry Java Buildpack # Copyright 2013-2018 the original author or authors. # # 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....
28.864407
81
0.715208
ed61266a9ecdd8c5e59757e0d7bf43ea7cbe22e6
668
module Gridinit module Jmeter class DSL def simple_config_element(params={}, &block) node = Gridinit::Jmeter::SimpleConfigElement.new(params) attach_node(node, &block) end end class SimpleConfigElement attr_accessor :doc include Helper def initialize(params...
24.740741
121
0.655689
1c7e1bbaa35b5fa08b4b851013b9f884d790ada9
3,247
# frozen_string_literal: true # See LICENSE.txt at root of repository # GENERATED FILE - DO NOT EDIT!! require 'ansible/ruby/modules/base' module Ansible module Ruby module Modules # Manages BIG-IQ applications used for load balancing an HTTPS application on port 443 with SSL offloading on BIG-IP. cl...
61.264151
344
0.724361
28eefcd4fb22c2cb67b7c3836c0a490a64cd6dca
121
class PfeedDelivery < ActiveRecord::Base belongs_to :pfeed_receiver, :polymorphic => true belongs_to :pfeed_item end
24.2
50
0.793388
abd8b1182ef6c7806dbc7e08f719d93df440dfd5
254
# typed: true class CreateWizards < ActiveRecord::Migration[6.0] def change create_table :wizards do |t| t.string :name t.integer :house t.string :parent_email t.text :notes t.timestamps null: false end end end
18.142857
50
0.641732
f8f550e79b252dcf885926c0bee643ddb41f078f
1,754
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suit...
40.790698
85
0.775371
28fe6033851945b7f4a5d2f75815780a3737ebda
338
class CreateTowingTractorDockerContainers < ActiveRecord::Migration[5.1] def change create_table :towing_tractor_docker_containers do |t| t.integer :image_id t.integer :server_id t.string :container_id t.text :env t.text :cmd t.timestamp :last_keepalived_at t.timestamps ...
22.533333
72
0.695266
61a68e5b5e35f177a237891e65400f4317c9bfed
3,474
## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # web site for more information on licensing and terms of use. # http://metasploit.com/ ## require 'msf/core' require 'yaml' require 'net/dns/packet' class Metasploit3 < M...
28.243902
133
0.64882
d58fce28b1d961572bb649f790bac376d470db39
137
# frozen_string_literal: true # :nodoc: class ApplicationController < ActionController::Base before_action :authenticate_account! end
19.571429
52
0.817518
3363bf1a4d498244eabb9d5e13bd491a56029b1b
103
$LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "tictactoe" require "minitest/autorun"
20.6
54
0.76699
1cec3374f7aba915205157aeb4a39688fc03bc42
117
Rp::AvailableReport.seed(:id, {id: 1, code: 'report 1'}, {id: 2, code: 'report 2'}, {id: 3, code: 'report 3'} )
23.4
29
0.555556
bf9f376cd9622ba1b24aca1e03999512938e468e
791
Pod::Spec.new do |s| s.name = 'ZLPhotoBrowser' s.version = '2.5.1' s.summary = 'A simple way to multiselect photos from ablum, force touch to preview photo, support portrait and landscape, edit photo, multiple languages(Chinese,English,Japanese)' s.homepage = 'https://github.com/longitachi...
39.55
186
0.656131
e9b8cf26861fa2af333f7320227dea33dd81d56f
449
# frozen_string_literal: true require 'simplecov' SimpleCov.start do add_filter '/test/' enable_coverage :branch end $LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'hollaback' require 'minitest/autorun' class Callbacker attr_reader :name def initialize(name) @name = name end def s...
13.205882
54
0.701559
5d78b794e59ec4192dea7e2a5bd8eaf162f1e2fa
172
# frozen_string_literal: true require "rails_helper" RSpec.describe ApplicationBatch, type: :batch do it { is_expected.to inherit_from BatchProcessor::BatchBase } end
19.111111
62
0.796512
e22d33941533ef79058c630e9f723ca2ac9fb44d
2,316
require File.expand_path('../helper', __FILE__) begin require 'coffee-script' require 'execjs' begin ExecJS.compile '1' rescue Exception raise LoadError, 'unable to execute JavaScript' end class CoffeeTest < Test::Unit::TestCase def coffee_app(options = {}, &block) mock_app do set :views, File.dirnam...
23.876289
81
0.639465
b98ff0bf53a1294747d27d39732d6450ccda69bd
1,059
require 'json' require 'octokit' module Gitload module Sources class GitHub include Source def initialize config, options = {} @config = config ::Octokit.configure do |c| c.auto_paginate = true c.access_token = options.fetch :access_token, ENV['GITLOAD_GITHUB_TOK...
23.021739
83
0.574127
79f6a05e88405cf6121c4c58434dec7e3d7e174e
466
cask 'folx' do version '4.2.13332' sha256 '5664c147dc0b848a2705659a206b02293e4b97f13dc1b5976a6e3435f1c41708' url "http://www.eltima.com/download/folx-update/downloader_mac_#{version}.dmg" appcast 'http://mac.eltima.com/download/folx-updater/folx.xml', :checkpoint => '5842b05fba51144ad903c431987cb91de...
33.285714
91
0.76824
f8f26bcb47ec8030dd4f789e45aa74f0ade99f17
442
# frozen_string_literal: true module RDF module Serializers class ListSerializer include RDF::Serializers::ObjectSerializer def hextuples_for_collection @resource.map do |resource| RDF::Serializers.serializer_for(resource).record_hextuples(resource, nil, @includes, @params) ...
22.1
103
0.676471
1a9b354fbc5894669cfab1f8ead7a35146358390
659
# frozen_string_literal: true class Reviewable < ActiveRecord::Base class Collection class Item include ActiveModel::Serialization attr_reader :id def initialize(id) @id = id end end def initialize(reviewable, guardian, args = nil) args ||= {} @reviewable, @...
15.690476
64
0.564492
39a04162d9f9f79adefe31b8efef9d7e6093e5eb
503
require 'spec_helper' describe 'Google Chrome' do before(:all) do @selenium = Selenium::WebDriver.for(:remote, url: "http://localhost:4444/wd/hub", desired_capabilities: :chrome) end after(:all) do @selenium.quit end res = '1366 x 768' it "should return display resolution of #{res}" do @sele...
25.15
116
0.695825
8776861672b168aa9f17ca356d60fb871547f2f5
376
module Intouch::Protocols class Base def handle_update(update) raise NotImplementedError end def send_regular_notification(issue, state) raise NotImplementedError end protected def need_group_message?(journal) journal.blank? || (journal.details.pluck(:prop_key) & %w[priori...
20.888889
106
0.712766
f8e56b5ac4b4a4adbf2225c49ee3570539723b60
851
require_relative 'conway_cubes' describe 'ConwayCube', :day17 do def with_data(file_path) cur_dir = File.dirname(__FILE__) f = File.open(File.join(cur_dir, file_path)) lines = f.readlines.map(&:strip) ConwayCube.new(lines) end it 'should be able to handle example data for part one' do ex =...
25.787879
60
0.696827
112a8c985f34edec7e89aa08dba69eb599114c78
515
name 'php' maintainer 'Sous Chefs' maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Installs and maintains php and php modules' source_url 'https://github.com/sous-chefs/php' issues_url 'https://github.com/sous-chefs/php/issues' chef_version '>= 14.0' version '8.0.0' depends 'yum-epel' support...
25.75
56
0.68932
e29c7b33d09088e8f93e4268b93444f2a8cffcf8
6,477
# 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::TrafficManager::Mgmt::V2018_02_01 module Models # # Class representing a Traffic Manager endpoint. # class Endpoint < ProxyR...
34.269841
79
0.515825
799a602ed66d46e73d5913c53e40c84135cb673c
662
Pod::Spec.new do |spec| spec.name = 'Tweaks' spec.version = '1.1.0' spec.license = { :type => 'BSD' } spec.homepage = 'https://github.com/facebook/Tweaks' spec.authors = { 'Grant Paul' => 'tweaks@grantpaul.com', 'Kimon Tsinteris' => 'kimon@mac.com' } spec.summary = 'Easily a...
41.375
102
0.625378
bfedb6757399ab10fc01b09d7874485e6deb5f93
607
# Copyright (c) Universidade Federal Fluminense (UFF). # This file is part of SAPOS. Please, consult the license terms in the LICENSE file. # Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do factory :accomplishment do phase enrollment after_build do |obj| if...
27.590909
98
0.68369
1166f38962ea5801e26e168b03c10ae19aeea386
2,028
require 'rails_helper' feature 'Twilio' do let(:message_params) { twilio_new_message_params } let(:status_params) { twilio_status_update_params from_number: message_params['From'], sms_sid: message_params['SmsSid'] } before do userone = create :user clientone = create :client, user: userone, phone_numbe...
31.6875
124
0.667653
91282fca0a88149bd3dbeba070d593913b1a8567
1,929
require 'cj4r/drivers/daily_publisher_commission_driver' module Cj4r class DailyPublisherCommission class << self # Class methods def find(*args) options = args.extract_options! options[:developer_key] ||= Cj4r.config[:developer_key] options[:date] = options[:date...
31.112903
130
0.554692
f7e789362c317c60c0fed994910d709e99965b2b
187
class CreateWeixinimgs < ActiveRecord::Migration[5.1] def change create_table :weixinimgs do |t| t.references :weixin, foreign_key: true t.timestamps end end end
18.7
53
0.695187
5d98a1d601eaf627f71b3dfd4bb60a2e39a55c3f
1,467
# frozen_string_literal: true require 'spec_helper' shared_examples 'a method to squash a hash' do |joiner = '.'| let(:hash) { { a: { b: 1, c: { d: 2 } } } } context 'with hash values' do let(:key1) { %w[a b].join(joiner) } let(:key2) { %w[a c d].join(joiner) } it 'flattens the hash' do expect...
21.26087
61
0.483299
e8d65769366db596444462dd5f9f3530b9911b50
2,045
module BaseObjects def create_base_objects @prog = FactoryGirl.create(:program, :title => 'Program') @opt_reg = FactoryGirl.create(:option, :title => 'Regulation', :role => 'directive_kind') @opt_com = FactoryGirl.create(:option, :title => 'Company Policy', :role => 'directive_kind') @creg = FactoryGi...
40.9
125
0.649389