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
e25932cda5a8dbe021fd8e78e672564908d38c8b
4,849
require 'digest/sha1' module GitHubLOD ## # Base class for GitHub shims class Base include RDF::Enumerable def self.properties; @properties; end def self.references; @reference; end # Defines property relationships # # @param [Symbol, Object] accessor # If a symbol, the attrib...
26.938889
77
0.616622
ac18a3fa36f165da31b55240c279dd64e1fe2c92
32,978
# frozen_string_literal: true # Notes: # # Written by Sam # # Lithium are quite protective of data, there is no simple way of exporting # If you have leverage you may get a data dump, in my case it was provided in XML # format # # First step is to convert it to db format so you can import it into a DB # that was done ...
31.588123
194
0.617654
18f1792107081c086818294d7935c66f11b43d19
2,888
module SungradeRailsToolkit module Sunnova class V0 extend ApiRequestHelper class << self def create_lead(params:) params = params.is_a?(String) ? params : params.to_json post( url: File.join(SungradeRailsToolkit.config.api_gateway_base_url, "/internal_api/v0/s...
30.4
122
0.536704
bb0808732c71b2a60f8533daad1f2450fd6095fd
992
require File.expand_path('../../helper', __FILE__) describe 'Zen::Markup' do WebMock.allow_net_connect! it 'Convert Markdown to HTML' do html = Zen::Markup.convert(:markdown, 'hello **world**').strip html.should == '<p>hello <strong>world</strong></p>' end it 'Convert Textile to HTML' do html = ...
24.8
68
0.643145
389f8ef2ad031ca782c41e90318369eba0443b01
23,829
class AnsibleAT20 < Formula desc "Automate deployment, configuration, and upgrading" homepage "https://www.ansible.com/" url "https://releases.ansible.com/ansible/ansible-2.0.2.0.tar.gz" sha256 "373a2e50319d90da50948e3faf1c033464b7302200e0199da8981d24646d4387" head "https://github.com/ansible/ansible.git", :...
38.809446
160
0.777498
5da61e5c3fdeefb47c8ca72a58fa14a743651691
54
json.extract! @current, :id, :created_at, :updated_at
27
53
0.740741
e23e49cfcf2af62013ee44624ca45a34be27a62a
1,217
=begin #Flip API #Description OpenAPI spec version: 2.0.1 Contact: cloudsupport@telestream.net Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.3.1 =end require 'spec_helper' require 'json' require 'date' # Unit tests for TelestreamCloud::Flip::UpdateEncodingBody # Automa...
24.836735
103
0.74281
08d4420c112e4a4bb7ef8185e081c0397bc66072
6,019
require File.dirname(__FILE__) + '/test_helper' class SnailTest < Snail::TestCase def setup @us = {:name => "John Doe", :line_1 => "12345 5th St", :city => "Somewheres", :state => "NY", :zip => "12345", :country => 'USA'} @ca = {:name => "John Doe", :line_1 => "12345 5th St", :city => "Somewheres", :state =>...
35.405882
137
0.654262
38dc7be0014650d4610a22079b9fa026b6fae3ae
514
# frozen_string_literal: true module Sanity module Http class Results class << self def call(result) new(result).call end end attr_reader :raw_result def initialize(result) @raw_result = result end # TODO: parse the JSON and return what the...
19.037037
67
0.605058
d5fc1645f6da49b09e188bd67caa2999f2d6d0bd
11,937
require 'active_support/core_ext/hash/conversions' module Azure module Armrest # Base class for services that need to run in a resource group class ResourceGroupBasedService < ArmrestService # Used to map service name strings to internal classes SERVICE_NAME_MAP = { 'availabilitysets' ...
37.303125
107
0.620843
1841413b3deca6211c5e6780eaddad7b43c384a6
1,621
# snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] # snippet-sourceauthor:[Doug-AWS] # snippet-sourcedescription:[Lists the security groups for you RDS instances.] # snippet-keyword:[Amazon Relational Database Service] # snippet-keyword:[db_instances method] # snippet-keyword:...
34.489362
89
0.723627
ac18929b578da0dfada9248077997f90bf8dc2b2
403
cask 'prizmo' do version '3.7.2' sha256 '6f811c4eb7b2f08f212749b615c3ad2587a610278fb5ca761d43710ecf962d6c' url "https://www.creaceed.com/downloads/prizmo#{version.major}_#{version}.zip" appcast "https://www.creaceed.com/appcasts/prizmo#{version.major}.xml" name 'Prizmo' homepage 'https://creaceed.com/prizm...
26.866667
80
0.746898
e92acaab57bbb7d50f89b5a21e511465e31b04bf
2,326
module PaymentService def self.authorize_charge(credit_card:, buyer_amount:, seller_amount:, merchant_account:, currency_code:, description:, metadata: {}) charge = Stripe::Charge.create( amount: buyer_amount, currency: currency_code, description: description, source: credit_card[:external...
46.52
204
0.745056
d5c665ee5cd0f384fbd08970c18ac1c1f11598bb
2,147
# resources/admin.rb # # Author: Simple Finance <ops@simple.com> # License: Apache License, Version 2.0 # # Copyright 2013 Simple Finance Technology Corporation # # 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 ...
29.410959
97
0.751281
f7077af9789fa4f389e48b50a2a8b38ddf011598
433
cask 'unity-download-assistant@2018.2.0f2' do version '2018.2.0f2,787658998520' sha256 '75baf4f0ff48b4d5ab2d021f654388a444abcfe420685fec49980cf5ff192c15' url "http://download.unity3d.com/download_unity/#{version.after_comma}/UnityDownloadAssistant-#{version.before_comma}.dmg" name 'Unity' homepage 'https://u...
33.307692
124
0.785219
1861b68b9e67ef420bac1b40a2c93be13353773a
6,086
module Allens class Interval # Regarding the clock ticks mentioned below, e.g. timestamps could profitably use: # chronon = 0.000001 (find out what Ruby's granularity is for timestamp) # clocktick = 0.000001 (choose your preference, multiple of chronon) # forever = "999/12/31 23:59:59.99999...
43.471429
178
0.532369
212771208db7498e312de1db800b238761acf661
1,144
Puppet::Type.newtype(:celebrer_config) do ensurable newparam(:name, :namevar => true) do desc 'Section/setting name to manage from celebrer.conf' newvalues(/\S+\/\S+/) end newproperty(:value) do desc 'The value of the setting to be defined.' munge do |value| value = value.to_s.strip ...
22
107
0.637238
bf6b55f4d2a028a1dba25783c37525979390d91f
3,564
#-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2015 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject, which is a fork of ...
28.97561
95
0.673962
bb226caf95a82b7f9598eb7fd2a9dddf064e6c09
73,551
require File.expand_path('../../../spec_helper', __FILE__) module Pod describe Installer::Analyzer do describe 'Analysis' do before do repos = [Source.new(fixture('spec-repos/test_repo')), MasterSource.new(fixture('spec-repos/master'))] aggregate = Pod::Source::Aggregate.new(repos) ...
42.962033
268
0.603201
b92b8b4bdb82d4503843513d975f692674b8f860
5,517
require 'test_helper' class CanadaPostTest < Minitest::Test include ActiveShipping::Test::Fixtures def setup login = { login: 'CPC_DEMO_XML' } @carrier = CanadaPost.new(login) @french_carrier = CanadaPost.new(login.merge(french: true)) @request = xml_fixture('canadapost/example_request') ...
38.048276
134
0.730651
e98bfee0732c15b3d11049125ac575c31a32273d
883
# Configure Rails Environment ENV['RAILS_ENV'] = 'test' require File.expand_path('../test/dummy/config/environment.rb', __dir__) ActiveRecord::Migrator.migrations_paths = [File.expand_path('../test/dummy/db/migrate', __dir__)] ActiveRecord::Migrator.migrations_paths << File.expand_path('../db/migrate', __dir__) requir...
44.15
97
0.798414
e9d81ab0c75d9826a08cd7bd8639310c656ca950
75
require 'sergio_torres_gem/version' require 'sergio_torres_gem/renderer'
15
36
0.84
87d1a7cc72c65f9af27c3617f387e0ae5a7a9a5e
518
# frozen_string_literal: true # Serializer to expose attributes for Vector Features. class VectorFeatureSerializer < ActiveModel::Serializer attributes :id, :tmp_type, :properties, :geojson, :filters, :name, :description, :ima...
23.545455
55
0.480695
5d9109fa662adad63624337fca128172f6c74adb
604
Pod::Spec.new do |s| s.name = "RNXendit" s.version = "1.0.0" s.summary = "RNXendit" s.description = <<-DESC RNXendit DESC s.homepage = "" s.license = "MIT" # s.license = { :type => "MIT", :file => "FILE_LICENSE" } s.author ...
25.166667
89
0.495033
18504c01819a63f709b0f55af6465f2acc631072
863
module DeviseHelper # A simple way to show error messages for the current devise resource. If you need # to customize this method, you can either overwrite it in your application helpers or # copy the views to your application. # # This method is intended to stay simple and it is unlikely that we are going to...
34.52
89
0.66628
38ed1367c5b013ab5056bc4e3c188257f9edca67
5,552
module Tmuxinator class Project include Tmuxinator::Util include Tmuxinator::Deprecations include Tmuxinator::WemuxSupport RBENVRVM_DEP_MSG = <<-M DEPRECATION: rbenv/rvm-specific options have been replaced by the pre_tab option and will not be supported in 0.8.0. M TABS_DEP_MSG = <<-M...
22.297189
77
0.605548
1dc080dc3d5359ba7f44eafade4ede8b06d8a4e8
80
module Rmp class Engine < ::Rails::Engine isolate_namespace Rmp end end
13.333333
32
0.7125
01e663853bada7488d30f8c50e9eb6a286d9f037
4,742
######################################################################################################################## # OpenStudio(R), Copyright (c) 2008-2017, Alliance for Sustainable Energy, LLC. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitt...
39.516667
120
0.654154
26c68e3770d15968afa6d462abe21646f2a32382
845
class User < ActiveRecord::Base # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable has_many :articles before_save { self.email = emai...
31.296296
62
0.672189
abc8e9649016a6a8a46466b7ab6347b26f976914
338
class OrganizationResource < JSONAPI::Resource include ResponseEncryption::EncryptAttributes # # Attribtues # attribute :tax_number attribute :name attribute :address attribute :post_code attribute :phone_number attribute :email encrypted_attrs :tax_number, :name, :phone_number, :post_code, :em...
19.882353
81
0.763314
5de5d2dbd450f9bca58ba9930953f070564ecf56
1,696
describe 'Superhosting::Controller::Admin (cli)' do include SpecHelpers::Controller::User include SpecHelpers::Controller::Container include SpecHelpers::Controller::Admin def add_admin admin_add_with_exps(name: @admin_name, generate: true) end def add_admin_container add_admin container_add(n...
28.745763
107
0.668632
11308a6d6c802e0c9ff4d7428c9eb50b4c46a368
2,358
# encoding: utf-8 module CodeAnalyzer # A checker class that takes charge of checking the sexp. class Checker # interesting nodes that the check will parse. def interesting_nodes self.class.interesting_nodes end # interesting files that the check will parse. def interesting_files se...
25.630435
93
0.617472
bf95bfe811ffefc238485cb3181d7a8687fbecdf
382
cask "isabelle" do version "2020" sha256 "bd0353ee15b9371729e94548c849864d14531eb2e9125fde48122b4da32bd9e9" url "https://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle#{version}_macos.tar.gz" appcast "https://mirror.cse.unsw.edu.au/pub/isabelle/dist/" name "Isabelle" homepage "https://www.cl.cam.ac.u...
31.833333
91
0.756545
ffd6a5dee9cb5dc98468af414f45abfd5070bbd0
1,355
shared_context "schools_requiring" do before(:each) do controller.should_receive(:require_current_school).any_number_of_times.and_return(true) end end shared_context "authenticated" do before(:each) do controller.stub!(:check_domain=> true) controller.should_receive(:authenticate_user!).any_number_o...
30.795455
130
0.787454
62d4ef30c5d0c365332a310f744e434380b38340
5,104
# # Author:: Daniel DeLeo (<dan@chef.io>) # Copyright:: Copyright 2011-2016, Chef Software 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 # # ...
31.9
113
0.610697
8766e480eaaeaa9781b6dbe17f81d7437c9ffba4
155
require File.expand_path('../../../../spec_helper', __FILE__) describe "OpenSSL::ASN1.IA5String" do it "needs to be reviewed for spec completeness" end
25.833333
61
0.722581
bf88c6f576c9e6afe3d51734aca90a97b8c39958
376
# frozen_string_literal: true # == Schema Information # # Table name: availabilities # # id :bigint(8) not null, primary key # user_id :bigint(8) # shift_id :bigint(8) # created_at :datetime not null # updated_at :datetime not null # class Availability < ApplicationRecord b...
19.789474
53
0.659574
388638f417bb6b50098f26468293f4f3cea27d57
1,473
# frozen_string_literal: true module RuboCop module Cop module Style # This cop checks for usage of the %Q() syntax when %q() would do. class PercentQLiterals < Cop include PercentLiteral include ConfigurableEnforcedStyle LOWER_CASE_Q_MSG = 'Do not use `%Q` unless interpolati...
27.792453
79
0.581806
b9b86ee775001bad4817630656fbb67b859fde87
1,486
class MoonBuggy < Formula desc "Drive some car across the moon" homepage "https://www.seehuhn.de/pages/moon-buggy.html" url "https://m.seehuhn.de/programs/moon-buggy-1.0.tar.gz" sha256 "f8296f3fabd93aa0f83c247fbad7759effc49eba6ab5fdd7992f603d2d78e51a" license "GPL-3.0" bottle do sha256 "f4b3e7e9c36f357...
40.162162
93
0.720054
f7590d973a0105b097360c1a7a043e15b7a732ed
783
cask 'avocode' do version '3.6.2' sha256 'c7e091dc501bcef409682defcf489f4c7948e345be1214e781525969073ec69c' url "https://media.avocode.com/download/avocode-app/#{version}/Avocode-#{version}-mac.zip" name 'Avocode' homepage 'https://avocode.com/' auto_updates true app 'Avocode.app' zap trash: [ ...
34.043478
92
0.646232
211078f669f5e5a6a650407a0980d397b0701e34
776
require 'rails_helper' describe Country do subject { build(:country) } it('has many Districts') { assoc(:districts, :has_many) } it('has many Funds') { assoc(:funds, :has_many, through: :geo_areas) } it('has many Funders') { assoc(:funders, :has_many, through: :funds) } it('HABTM GeoAreas') { assoc(:geo_...
24.25
72
0.671392
396a60850202736aeb51a0bd0691a3d578c188e8
8,325
# -*- encoding : utf-8 -*- require File.expand_path('../spec_helper', __FILE__) describe Cequel::Type do describe 'ascii' do subject { Cequel::Type[:ascii] } its(:cql_name) { should == :ascii } its(:internal_name) { should == 'org.apache.cassandra.db.marshal.AsciiType' } describe '#cast' do ...
33.979592
80
0.609129
1a801051defacf81491b297aa08a1f19214f3c66
630
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. class SSLTest < Minitest::Test include MultiverseHelpers def setup # Similar to how jruby 1.6.8 behaves when jruby-openssl isn't installed Net::HTT...
30
80
0.75873
5d2295cb55d4b344da8243ebb1efaf88698e612d
1,494
class Ape < Formula desc "Ajax Push Engine" homepage "https://web.archive.org/web/20200810042306/www.ape-project.org/" url "https://github.com/APE-Project/APE_Server/archive/v1.1.2.tar.gz" sha256 "c5f6ec0740f20dd5eb26c223149fc4bade3daadff02a851e2abb7e00be97db42" license "GPL-2.0" bottle do sha256 cella...
40.378378
134
0.751673
39532363b4b208796c42e197e1b0156f46e23599
2,034
require 'active_record' require 'active_record/connection_adapters/sqlite3_adapter' require 'logger' RAILS_ROOT = File.join(File.dirname(__FILE__), '..') unless defined?(RAILS_ROOT) RAILS_ENV = 'test' unless defined?(RAILS_ENV) module ActsAsFu class Connection < ActiveRecord::Base cattr_accessor :connected ...
24.804878
92
0.692724
019b8cbfe96132c17ff28a8e25c15fba2d2197f5
466
require "bundler/setup" require "noclist" ENV['GEM_ENV']='TEST' 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` config.disable_monkey_patching! ...
22.190476
66
0.755365
1816acc5e16cce0e5967408566a8f4a67338ae2e
297
desc "Userにtokenを追加します。" task "onetime:add_token_to_user" => :environment do strings = [('a'..'z'), ('A'..'Z'), ('0'..'9')].map { |i| i.to_a }.flatten User.all.each do |user| random_token = (0...24).map { strings[rand(strings.length)] }.join user.update(token: random_token) end end
33
75
0.626263
6185c99e7594f6660116e4020768d003cafdf9ce
806
class Mpop < Formula desc "POP3 client" homepage "https://marlam.de/mpop/" url "https://marlam.de/mpop/releases/mpop-1.4.10.tar.xz" sha256 "9e9b6523f08df50a3d3eec75d94d4c0104ee016c0c913baaf8fbf178bf828388" license "GPL-3.0" bottle do sha256 "4d62437fccd5d773e888126e465f1cea07fdcbdc7f0b5fb826267d78747cf...
31
93
0.753102
edf20b6aebee07fa96f07c0bc1be90968df812c7
14,317
# frozen_string_literal: true # Conan Package Manager Client API # # These API endpoints are not consumed directly by users, so there is no documentation for the # individual endpoints. They are called by the Conan package manager client when users run commands # like `conan install` or `conan upload`. The usage of th...
38.694595
159
0.623804
e2df0b186d54c8968c591a6b74dda3650c45cb1d
215
require_relative 'app/lib/mars_explore' if ARGV.count != 1 puts 'Usage: ruby mars_explore_cli.rb <world_description_file>' exit(1) end file_name = ARGV[0] file = File.open(file_name) MarsExplore.explore(file)
19.545455
65
0.762791
1cc457f36c40216b94492a224b6e66ddd3a91ae2
90
class Comment::Confirmed < Comment default_scope { where(:content => 'something') } end
22.5
50
0.722222
bbf33a8deb817476761f0fc697759e9191b2c5ac
98
# desc "Explaining what the task does" # task :validates_decency_of do # # Task goes here # end
19.6
38
0.714286
3315e7c766fef0b99122c70cb3c5e86845775a2e
1,132
# encoding: utf-8 module DataMapper module Is module Sluggable ## # fired when your plugin gets included into Resource # def self.included(base) end ## # Methods that should be included in DataMapper::Model. # Normally this should just be your generator, so that t...
26.952381
75
0.620141
f7301d0c547bc86faff0cb36ef3192b6d8745264
1,950
namespace :db do desc 'Imports all data in correct order, replaces non-dictionary data' task import: [ 'locations:import', 'location_members:import', 'ndcs:full:import', 'ndcs:full:index', 'sdgs:import', 'ndc_sdg_targets:import', 'indc:import', 'historical_emissions:import', 'ada...
32.5
159
0.692821
f8ee3d4b2f8cff2f9878ae56356e89e89edf1ce0
259
puts "*** RUNNING bundle-apache-java-tomcat-example default.rb" # Reload bundle-apache-java-jboss::default attributes to reset var's depending on apache_docroot value node.from_file(run_context.resolve_attribute( "bundle-apache-java-tomcat", "default" ) )
37
102
0.787645
281377527b33cb105ae358be01db04e7f995bd0b
9,551
module EE module Gitlab module Auth module LDAP module Sync class Group attr_reader :provider, :group, :proxy class << self # Sync members across all providers for the given group. def execute_all_providers(group) return ...
38.204
128
0.529683
214235f857616ce91c460b3d144f0a2a91b7d917
363
module Sunspot module Query class FieldJsonFacet < AbstractJsonFieldFacet def initialize(field, options, setup) super end def field_name_with_local_params { @field.name => { type: 'terms', field: @field.indexed_name, }.merge!(init_par...
18.15
49
0.556474
5d9aa2df1d0d9dfbf5293360ebc80b8f98d8213c
3,647
require 'spec_helper' describe KPM::Inspector do before(:each) do @logger = Logger.new(STDOUT) @logger.level = Logger::INFO tmp_bundles_dir = Dir.mktmpdir @bundles_dir = Pathname.new(tmp_bundles_dir).expand_path @plugins_dir = @bundles_dir.join('plugins') FileUtils.mkdir_p(@plugins_dir) ...
36.47
154
0.679737
1d3fceb6538356795d981222a12674bc10a033d0
2,516
require 'spec_helper' REPLICATION_PRIVATE_KEY_PATH = File.join DOCKERFILE_ROOT, 'spec', 'ssh_keys', 'id_rsa' describe "replication" do before :all do @master = Docker::Container.create( 'Image' => 'klevo/test_mysql_master', 'Detach' => true ) @master.start @slave = Docker::Container...
34
91
0.619634
acbebb6c0543cbec7c6fe0c7683130c5758d0c2b
520
class SecondaryContentLink < ApplicationRecord belongs_to :step_by_step_page validates :step_by_step_page, presence: true validates :title, :base_path, :content_id, :publishing_app, :schema_name, :step_by_step_page_id, presence: true validates :base_path, uniqueness: { scope: :step_by_step_page_id, case_sensit...
43.333333
144
0.782692
91d794f339ce8d603687cece2280fb7810cbe216
1,623
# encoding: utf-8 # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # /spec/fixtures/responses/whois.nic.hn/status_available.expected # # and regenerate the tests with the following rake task # # $ rake spec:generate # require 'spec_helper' require 'whois...
21.355263
74
0.663586
2671678f86cdaf17587535cca8ccf5c54003635d
1,406
UNIVERSALIS_BASE_URL = 'https://universalis.app/api/v2'.freeze namespace :prices do desc 'Sets the latest known market board prices for items by data center' task cache: :environment do item_ids = Item.where(tradeable: true).where.not(unlock_id: nil).pluck(:id) item_ids << 32830 # Add "Paint It X" which is...
39.055556
103
0.625889
e8d2673c0bb9f12c226ab51c5e6fb1bbe0bb11d7
583
class Types::BaseObject < GraphQL::Schema::Object include Authorization::ControllerHelpers def self.authorized?(object, context) return true unless object.is_a? ApplicationRecord super && Authorization.dictator.authorized?(object, :read) end def self.scope_items(items, context) items.select do |it...
20.821429
62
0.698113
61252549413fbfc9b685f818701ec7da3c986bb7
480,660
# 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 module Aws::IoT module Types # Details of abort criteria to abort the job. # # @note When making ...
31.036353
217
0.57755
8709393aa1cce3c26de533d725e4cf9643e3aa5a
1,590
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::NetApp::Mgmt::V2019_11_01 module Models # # One property of operation, include metric specifications. # class ServiceSpecification incl...
28.392857
72
0.530189
1a9ee54506744143605367bdbc39f4806b265a89
29
require 'mongoid_userstamp'
9.666667
27
0.827586
e87422d33ae8d351c25d4dc0d475f4466032261b
202
require File.join(File.dirname(__FILE__), '..', 'helper') class TestHarvestor < Test::Unit::TestCase context "an initialized harvestor" do should "test" do assert false end end end
16.833333
57
0.678218
26dae0d24bb17ff7f36ca75e4ecb42b8bd0e576d
1,120
# typed: true module Kuby module CertManager module DSL module Acme module V1 class ChallengeSpecSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions < ::KubeDSL::DSLObject value_field ...
33.939394
196
0.639286
3943f56997fa4c2a1bfacfc63865dc2dafbd6a81
1,188
# 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
86
0.71633
218cc7121745ff3161b85411dd6c3e4fed20bc71
636
# This migration comes from phcdevworks_press (originally 20200708231351) class CreatePhcdevworksPressReviewPostVersions < ActiveRecord::Migration[6.0] TEXT_BYTES = 1_073_741_823 def change create_table :phcdevworks_press_review_post_versions do |t| t.string :item_type, {:null=>false} t.in...
31.8
110
0.698113
796464b7b372e33081dc2c647022f4071d19f306
1,041
# 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::Network::Mgmt::V2019_08_01 module Models # # Reference to container resource in remote resource provider. # class Container ...
23.659091
70
0.533141
62327f64e5099b69ae63d73105c1162227afc897
8,000
require 'spec_helper' describe API::API, api: true do include ApiHelpers let(:user) { create(:user) } let!(:project) { create(:empty_project, namespace: user.namespace ) } let!(:closed_milestone) { create(:closed_milestone, project: project) } let!(:milestone) { create(:milestone, project: project) } bef...
35.874439
101
0.67425
ac1b8a587277591a522d5f7cecab22ae17fd1706
1,845
class PrescriptionsController < ApplicationController before_action :set_prescription, only: [:show, :destroy] def show end def index end def new @prescription = Prescription.new @medication = Medication.new end def create @prescription = Prescription.new(prescription_params) add_t...
27.954545
122
0.726287
21126b1da03f2972956da65d61e655cad83c42b2
2,501
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
33.797297
87
0.768493
e8901cb9c48f078d53c2a4a0b2929d913b3656cf
594
class Bd < Formula homepage "https://github.com/vigneshwaranr/bd" head "https://github.com/vigneshwaranr/bd.git" depends_on "gnu-sed" => :optional def install bin.install "bd" bash_completion.install "bash_completion.d/bd" end def caveats; <<-EOS.undent Case-insensitive directory matching (us...
22.846154
71
0.666667
d52034ee1568300751863ad664a90e28b0e6a79c
569
require 'spec/spec_helper' describe "Premade Rake Tasks" do before :all do @file_name ="./lib/taglob/rake/tasks.rb" @rake = Rake::Application.new Rake.application = @rake end after :all do Rake.application = nil end it "should create a rake task to run test unit tests marked with tags" do ...
24.73913
75
0.702988
1c6f632e7cceadfc228cf5b66810863dc1d2467e
3,246
require 'sssd_conf/common' module MiqConfigSssdLdap class DomainError < StandardError; end class Domain < Common attr_accessor :active_directory def initialize(initial_settings) self.active_directory = determine_if_active_directory_configured(initial_settings) super(%w[entry_cache_timeout ...
22.699301
102
0.637092
7a98f79b1c188e0b8e6616f58cf598f7dedc5896
419
class CopyLessonNameToKeyTake2 < ActiveRecord::Migration[5.0] # We are doing this a second time because new lessons were created between the time the last # one was run and when we figured out there was another change we need to make to make # sure new lessons got their key value set. def up Lesson.all.each...
27.933333
94
0.71599
bf56c3d9d96524a51623ee2cb49feefd1ab4a63f
3,822
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'jenkins::job' do let(:test_build_job) do example = <<~'EOS' <?xml version='1.0' encoding='UTF-8'?> <project> <actions/> <description>test job</description> <keepDependencies>false</keepDependencies> ...
30.094488
136
0.611983
f74444bb1aaaed532237945e1cfe09b045725c72
5,231
# frozen_string_literal: true class User < ApplicationRecord # Include default devise modules. Others available are: # :lockable, :timeoutable, :trackable and :omniauthable devise :invitable, :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :validatable acts_as_commo...
26.553299
81
0.682852
b9690bd0ad5d411047921a80b5711620cf8db25a
1,855
=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.686567
103
0.735849
61e34633b27b62d968e3c22359a883219d703d63
1,602
class PictureUploader < CarrierWave::Uploader::Base # Include RMagick or MiniMagick support: # include CarrierWave::RMagick include CarrierWave::MiniMagick process resize_to_limit: [400, 400] if Rails.env.production? storage :fog else storage :file end # Choose what kind of storage to use ...
28.105263
112
0.698502
7a361da4898dba65b88bd5c5011bfb622b6311fe
756
require 'spec_helper' describe HeadChef::List do describe 'ClassMethods' do let(:environment_name) { 'environment' } let(:environment_resource) { double('Ridley::EnvironmentResouce') } let(:environment) { double('Ridley::EnvironmentObject') } before(:each) do HeadChef.stub_chain(:chef_server, ...
28
86
0.703704
2629839c87f5bffecb9871c7f22ccada845b1b30
830
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 require 'rspec' require_relative '../object_get_encryption' describe ObjectGetEncryptionWrapper do let(:object) { Aws::S3::Object.new('test-bucket', 'test-key', stub_responses: true) } let(:wrapper) { Object...
36.086957
87
0.753012
e9d4f2de8a0c9598ea6bbb09612b69dd564d64d1
1,849
# coding: utf-8 lib = File.expand_path('../lib/', __FILE__) $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib) require 'spree_i18n/version' Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = 'spree_i18n' s.version = SpreeI18n.version s.summary = 'Provides locale info...
34.886792
65
0.736614
6231e3da25fde633f367a01d390a61abc05be61d
765
# frozen_string_literal: true require "spec_helper" describe "remove external ids" do let(:external_ids) { {external_ids: ["abc"]} } subject(:remove_external_ids) do api.remove_external_ids(external_ids) end context "with success", vcr: true do it "responds with created" do expect(remove_exter...
22.5
62
0.660131
e982e4a240f0c45c2384df1f8a4d86556874110b
964
# typed: strict require 'sqlite3' require 'active_record' require 'bundler/setup' require 'camerata' require 'faker' require 'pry' require './examples/minimum/spec/support/factory_bot' require 'simplecov' SimpleCov.start ActiveRecord::Base.logger = Logger.new('./log/test.log') ActiveRecord::Base.establish_connection...
24.717949
81
0.741701
f8163ce425aec30865358702d8861618caaaf650
160
class CommentTaskSerializer < ActiveModel::Serializer attributes :id, :name, :description, :due_date, :status, :created_at, :updated_at, :owner, :project end
40
101
0.76875
7a79fce9514000a8a3b55749d077a6d74c0f5b4d
2,417
# --- Part Two --- # As the door slides open, you are presented with a second door that # uses a slightly more inspired security mechanism. Clearly unimpressed # by the last version (in what movie is the password decrypted in order?!), # the Easter Bunny engineers have worked out a better solution. # Instead of sim...
36.074627
111
0.720728
261164cc36241882107ee66a084c7b7f21e522dc
17,900
class Order < ActiveRecord::Base has_friendly_id :number, :use_slug => false has_many :order_items has_many :shipments has_many :invoices has_many :completed_invoices, :class_name => 'Invoice', :conditions => ['state = ? OR state = ?', 'authorized', 'paid'] has_many :authorized_invoices, :class_...
34.291188
141
0.651508
ff57a7c3323d3077fe5c17d2ce2ad72c0ee71d2a
126
require 'test_helper' class AssemblyPartTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
15.75
48
0.714286
ed6409b4fb03bc0f270fbc2efe0349f3efea5781
920
RSpec.shared_examples 'fails to send verification for' do |attribute| it { expect(sent).to be_falsy } it "doesn't generate an #{attribute} verification token for the model" do expect(verification.model).to_not have_received(:"generate_#{attribute}_verification_token!") end it "doesn't send a message with ...
35.384615
99
0.759783
1894aba7dc0bf49fe9dc9fea02727d8030457c8c
5,267
# frozen_string_literal: true module EnvironmentsHelper include ActionView::Helpers::AssetUrlHelper def environments_list_data { endpoint: project_environments_path(@project, format: :json) } end def environments_folder_list_view_data { "endpoint" => folder_project_environments_path(@...
41.472441
148
0.721663
263e32ef47dcbfdf444fa1d8de972e7f1cfaec6c
1,333
require 'rspec' require_relative 'plan' describe Plan do let (:plan) { Plan.new([ 'Step C must be finished before step A can begin.', 'Step C must be finished before step F can begin.', 'Step A must be finished before step B can begin.', 'Step A must be finished before step D can begin.',...
27.770833
74
0.654164
1c26184f921487f4f1426a7d7a3422316114712a
410
cask 'font-envy-code-r' do version 'PR7' sha256 '9f7e9703aaf21110b4e1a54d954d57d4092727546348598a5a8e8101e4597aff' url "http://download.damieng.com/fonts/original/EnvyCodeR-#{version}.zip" name 'Envy Code R' homepage 'http://damieng.com/blog/tag/envy-code-r' font 'Envy Code R PR7/Envy Code R Bold.ttf' f...
31.538462
75
0.741463
034af2c9f9d93bea1f2154d1baea2c46f16f1777
3,312
class ApachePulsar < Formula desc "Cloud-native distributed messaging and streaming platform" homepage "https://pulsar.apache.org/" url "https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-2.9.1/apache-pulsar-2.9.1-src.tar.gz" mirror "https://archive.apache.org/dist/pulsar/puls...
41.924051
130
0.71256
1dd72f349aa81555b97b54cec260742e58583b2e
6,779
require 'rbconfig' require 'digest/md5' require 'rails_generator/secret_key_generator' class AppGenerator < Rails::Generator::Base DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) DATABASES = %w(mysql oracle postgresql sqlite2 sqlite3 frontb...
37.661111
192
0.64449
019a7a79b62b07006aae1d54059623524186a348
28,810
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'nokogiri' require 'metasploit/framework/login_scanner/glassfish' require 'metasploit/framework/credential_collection' class MetasploitModule < Msf::Exploit::Remote Rank ...
34.42055
119
0.633842
edae45c1ae2e0f9d20a8d2f4378e4fa780e5797f
800
class Vote < ActiveRecord::Base belongs_to :user belongs_to :solution before_save do |vote| check_status(vote.solution.idea.status,'app.error.vote.voting') end before_destroy do |vote| check_status(vote.solution.idea.status,'app.error.vote.voting') end after_save do |vote| Solution.update_p...
22.857143
67
0.7325
9116a4b165a8b3c12e96f93e3ae9b493d52dcfd5
1,228
class SpatialiteTools < Formula desc "CLI tools supporting SpatiaLite" homepage "https://www.gaia-gis.it/fossil/spatialite-tools/index" url "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz" sha256 "f739859bc04f38735591be2f75009b98a2359033675ae310dffc3114a17ccf89" revis...
34.111111
96
0.726384