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
6102238cfa2515bab34b035951c4fed7d3daba81
5,418
module Echosign class Client # Creates an agreement # # @param agreement [Echosign::Agreement] # @return [String] Agreement ID def create_agreement(agreement) agreement_response = request(:create_agreement, agreement, agreement.user_id, agreement.user_email) return agreement_response['...
43
119
0.700074
ff053484276f6639551a23da6d63c5e8b8ca2347
899
require 'simplecov' require 'coveralls' SimpleCov.formatter = Coveralls::SimpleCov::Formatter SimpleCov.start do add_filter 'app/secrets' end Coveralls.wear! # This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. #...
32.107143
77
0.760845
b96d5085de0fa94c99a91280b36f2b010328a998
2,290
class UserUpdateWorker include Sidekiq::Worker sidekiq_options throttle: { threshold: 5000, period: 1.hour } def perform(login, include_repo=false) return if BlacklistedUser.where(username:login.downcase).count > 0 user = User.where(login: login.downcase).first_or_initialize github_token = user.tok...
31.369863
89
0.675546
33a545104de3bfd27c1884a632b002c2b502d745
3,235
require 'fog' module Salt module Commands class Launch < BaseCommand def run(args=[]) if launch_plan if config[:plans] && config[:plans][launch_plan.to_sym] plan = config[:plans][launch_plan.to_sym] plan.each do |mach| mach.each do |name, custom_opts|...
34.414894
119
0.524884
79c6846c51582680a2c5efb8361f6fc148afa3e6
793
require 'spec_helper' require 'repo_manager/views/view_helper' include RepoManager::ViewHelper describe RepoManager::ViewHelper do context ":repo_manager files" do before :each do @root = File.expand_path('../../../../', __FILE__) @file = File.join(@root, 'lib/repo_manager/app.rb') File.exist...
27.344828
82
0.674653
bf686f7e422e6924777221e455e87edb400b4f73
31,555
# frozen_string_literal: true # Copyright 2020 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 applicabl...
43.226027
263
0.731041
6a07f62ecd04a9eb34f1abb6db151db4aaf54ffe
268
events = %w(render_template render_partial) events.each do |name| ActiveSupport::Notifications.subscribe "#{name}.action_view" do |*args| event = ActiveSupport::Notifications::Event.new(*args) gauge = Harness::Gauge.from_event event gauge.log end end
26.8
73
0.735075
1aabc0d6b84ab5406f6b11e509a96f7410ea3a64
726
require 'test_helper' require "helpers/network_helper" describe 'Fog::OpenStack::Network | subnet_pools' do describe 'success' do before do @subnet_pool = network.subnet_pools.create( :name => 'fog_subnetpool', :prefixes => ['10.0.0.0/16'], :description =...
22.6875
59
0.590909
7930f652cb792086dff50c1a94cb7337c7d84d36
113
class AddNameToTrips < ActiveRecord::Migration[5.2] def change add_column :trips, :name, :string end end
18.833333
51
0.725664
21a8fcfadce73b072c3b7b2ce97b05a14d578334
282
require 'initializer/controls/clean' require 'initializer/controls/included' require 'initializer/controls/extended' require 'initializer/controls/proof' require 'initializer/controls/attributes' require 'initializer/controls/initialized' require 'initializer/controls/visibility'
31.333333
42
0.847518
ff3e7be567f9ff2580917399f5e7580302cad434
1,714
# frozen_string_literal: true require 'logger' module Gitlab module Metrics module Samplers class BaseSampler < Daemon attr_reader :interval # interval - The sampling interval in seconds. def initialize(interval = self.class::SAMPLING_INTERVAL_SECONDS) interval_half = in...
23.162162
97
0.565344
3394f5a15e06fa597050b7ce526699ecdabd5b35
2,425
# Copyright (c) 2005 David Heinemeier Hansson # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, pub...
38.492063
128
0.739381
abbb56ad2e75da925aa7dbf6c7675de8b3210ba2
35,565
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::IotHub::Mgmt::V2018_01_22 # # Use this API to manage the IoT hubs in your Azure subscription. # class Certificates include MsRestAzure # # ...
49.190871
211
0.710249
7aaec9ccbb4644286026f0986e23b29abfddb4a8
1,468
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "pragmatic_ql/version" Gem::Specification.new do |spec| spec.name = "pragmatic_ql" spec.version = PragmaticQL::VERSION spec.authors = ["Tomas Valent", "Charlie Tarr", "Rene Ivanov", "A...
47.354839
177
0.677793
91b5d71e41d5ada7e5e0b870973c97746205904c
43
module Representer VERSION = "0.1.1" end
10.75
19
0.697674
3396dfadb4e91a1bc93ba25fb7b3536f7ad3369e
586
class CreateActiveAdminComments < ActiveRecord::Migration[4.2] def self.up create_table :active_admin_comments do |t| t.string :namespace t.text :body t.string :resource_id, null: false t.string :resource_type, null: false t.references :author, polymorphic: true t.timestamp...
29.3
68
0.715017
214fcabb20a363dd63b16943adb3d8153dee83b2
364
require "bundler/setup" require "mlit_api" 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! config.expect_with :rs...
24.266667
66
0.752747
e822875fddbc51470058fcc903813b379950372d
273
=begin Someone needs to fix the broken code below! <emphasis>Any code here is commented out</emphasis> =end __END__ # =begin This used to begin a comment. Now it is itself commented out! <emphasis>The code that goes here is no longer commented out</emphasis> # =end
39
75
0.747253
1a190aeb468ae30e52634129fbba5474e435def2
5,428
require 'pact/mock_service/session' module Pact::MockService describe Session do let(:logger) { double('Logger').as_null_object } describe "set_expected_interactions" do let(:interaction_1) { InteractionFactory.create } let(:interaction_2) { InteractionFactory.create } let(:interactions...
37.694444
146
0.700995
4ae01b5171663cd8edd5bad90ff9c76549e30ca7
2,360
# frozen_string_literal: true require "spec_helper" describe "ZabbixManager::ValueMaps" do let(:valuemaps_mock) { ZabbixManager::ValueMaps.new(client) } let(:client) { double } describe ".method_name" do subject { valuemaps_mock.method_name } it { is_expected.to eq "valuemap" } end describe ".ide...
25.376344
113
0.652542
bb26c4cea20ab8fb1427b6b75bbb0884b4735fdc
483
FactoryGirl.define do factory :organisation, class: Drs::AuthClient::Models::Organisation do skip_create uid { SecureRandom.uuid } tel { Faker::PhoneNumber.phone_number} name { Faker::Company.name } type { %w(custody_suite law_firm call_centre).sample } trait :custody_suite do type "cu...
21
72
0.664596
bfc11256283fde2043f5638b7b277fcd2686548f
243
#!/usr/bin/env ruby namespace :metric do desc "Run metric fu for project" # {{{ task :metric do |t| puts "(--) Running metric fu" system "metric_fu" end # }}} end # of namespace :metric # vim:ts=2:tw=100:wm=100:syntax=ruby
15.1875
40
0.621399
e999deccd9d9f788ec642381324352e52e52c0f5
282
module Flash def flash results = all(:css, 'div#flash p') if results.empty? return 'none' end if results.count > 1 texts = results.map { |r| r.text } fail "One flash expected, but we had #{texts.inspect}" end results.first.text end end
20.142857
60
0.599291
08d60327e5abb72566d1aafa01f7f5cfef5dc22d
2,934
# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Sieve < RegexLexer title "Sieve" desc "mail filtering language" tag 'sieve' filenames '*.sieve' id = /:?[a-zA-Z_][a-zA-Z0-9_]*/ # control commands (rfc5228 § 3) def self.controls ...
29.938776
88
0.545671
110f1643b96b207bd44c0aa719775c37f003f66e
720
# typed: true module KubeDSL::DSL::Flowcontrol::V1beta1 class LimitedPriorityLevelConfiguration < ::KubeDSL::DSLObject value_field :assured_concurrency_shares object_field(:limit_response) { KubeDSL::DSL::Flowcontrol::V1beta1::LimitResponse.new } validates :assured_concurrency_shares, field: { format: :...
31.304348
101
0.736111
ff448e4748d92f28b408af56c6af4bcc05d081fb
212
require "test_helper" class BlackvueRubyTest < Minitest::Test def test_that_it_has_a_version_number refute_nil ::BlackvueRuby::VERSION end def test_it_does_something_useful assert false end end
17.666667
39
0.792453
bf36c721d1761c08fc66e3f541e89017d89d8158
3,236
# frozen_string_literal: true module V0 # Application for the Program of Comprehensive Assistance for Family Caregivers (Form 10-10CG) class CaregiversAssistanceClaimsController < ApplicationController AUDITOR = ::Form1010cg::Auditor.new skip_before_action :authenticate before_action :record_submissi...
34.795699
112
0.716316
62569e313e4b2fbfa05d0601a21145ecb6d862be
3,312
namespace :cms do namespace :es do es_validator = proc do |site| if site.elasticsearch_client.nil? puts 'elasticsearch was not configured' return false end true end task feed_all: :environment do ::Tasks::Cms::Base.with_site(ENV['site']) do |site| break unl...
33.454545
132
0.622886
e841fab25524a29392198955fbf917bcf3ff049a
784
module Teamocil module Tmux def self.option(option, default: nil) command = Teamocil::Command::ShowOptions.new(name: option) value = Teamocil.query_system(command).chomp value.empty? ? default : value.to_i end def self.window_option(option, default: nil) command = Teamocil::Comman...
30.153846
70
0.6875
110872a8d04baed940eb7a4a94d92eb6f3279747
2,570
# encoding: utf-8 module L module Generators require 'rails/generators/active_record' require 'l/generators/actions' # Generator tworzący moduł stron stałych. # # Tworzona jest migracja dla modelu Page. Kopiowane są widoki modułu, # dodawany jest routing. Dodawane jest szukanie stron w akcji...
30.963855
87
0.599611
ff54ebca30455f55daafcc0ce1a23b7f8ff5a72f
75
class ArtistViewModel < Yuba::ViewModel property :form, public: true end
18.75
39
0.773333
3340a7be4fe2678e0de9b4bb03fe0fde2b35522b
441
class DeleteUserWorker include Sidekiq::Worker include DedicatedSidekiqQueue def perform(current_user_id, delete_user_id, options = {}) delete_user = User.find(delete_user_id) current_user = User.find(current_user_id) Users::DestroyService.new(current_user).execute(delete_user, options.symbolize_ke...
31.5
88
0.764172
1c65f10628fb65164419c8ccfe427f719f4d802c
146
class ApplicationController < ActionController::Base protect_from_forgery with: :exception def hello render html: "IdeaTracker" end end
20.857143
52
0.780822
f7dae3be72e95b285cd4f637307c5877f4fb70e8
149
require File.expand_path('../spec_helper', __FILE__) describe "Rubinius::Actor.unregister" do it "needs to be reviewed for spec completeness" end
24.833333
52
0.771812
79461c58cbeef4538a486d8abfd61e17b2bb2b7c
1,970
require 'puppet' require 'puppet/type/oslo_config' describe 'Puppet::Type.type(:oslo_config)' do before :each do @oslo_config = Puppet::Type.type(:oslo_config).new(:name => 'DEFAULT/foo', :value => 'bar') end it 'should require a name' do expect { Puppet::Type.type(:oslo_config).new({}) }.to ra...
30.307692
95
0.671066
e2f57f87383b2ec9f3d0c99a7202baeddb0dec88
568
name 'database' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' description 'provides LWRPs for common database tasks' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '5.0.0' %w(amazon arch centos fedora freebsd oracle redhat scientific suse u...
33.411765
90
0.772887
0895362b62ec77f104be557ad2a9714d8238aade
1,611
# Define when school years start and end. See also schoolYear.js. class SchoolYear # date: A JS date object or Moment object. # returns: Integer representing what the calendar year was in the fall of date's school year. def self.first_day_of_school_for_year(year) DateTime.new(year, 8, 15) end # year: An...
36.613636
95
0.705773
39975e86348a1c24a2e9924a17d2cd747f9a07cf
3,385
RSpec.describe HrrRbSsh::Transport::EncryptionAlgorithm::Aes256Ctr do let(:name){ 'aes256-ctr' } let(:cipher_name){ "AES-256-CTR" } let(:block_size){ 16 } let(:iv_length){ 16 } let(:key_length){ 32 } let(:iv){ [Array.new(iv_length){ |i| "%02x" % i }.join].pack("H*") } let(:key){ [Array.new(key_length){ |i...
31.055046
85
0.660857
f8ff865a8565372ed974a3b02b084d9b5dfd7418
93
# desc "Explaining what the task does" # task :activity_stream do # # Task goes here # end
18.6
38
0.698925
61a9f76448ce2d598d08b7a353c27c645eb00982
7,850
#!/usr/bin/env ruby # Define a task library for running RSpec contexts. require 'rake' require 'rake/tasklib' module Spec module Rake # A Rake task that runs a set of specs. # # Example: # # Spec::Rake::SpecTask.new do |t| # t.warning = true # t.rcov = true # end # ...
34.888889
158
0.591338
8745bd3f2b5ec1462f13ee5dcc31d4676c3c7b74
10,287
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: # require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" if defined?(Bundler) # If you precompi...
42.508264
119
0.683387
1de1ca85640e5e947c1c4891248cffe06874e50c
744
require 'chefspec' describe 'script::run_ruby' do let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) } it 'runs a ruby script with the default action' do expect(chef_run).to run_ruby('default_action') expect(chef_run).to_not run_ruby('not_default_action') end it 'runs a ruby script with...
31
78
0.741935
79c06c151312b589fd2e323c337300a76badb343
746
cask 'monodraw' do version '1.4,b103' sha256 'a3a61a256908741c7da879726940e27f0b246400c7abe8e862e477db790d3a12' url "https://updates.helftone.com/monodraw/downloads/Monodraw-#{version.after_comma}.zip" appcast 'https://updates.helftone.com/monodraw/appcast-beta.xml' name 'Monodraw' homepage 'https://monodr...
35.52381
121
0.693029
1cb29f6fd3ebb712e13f27a699f9509097e3ea73
5,160
# # Be sure to run `pod spec lint LuBottomAlertView.podspec' to ensure this is a # valid spec and to remove all comments including this before submitting the spec. # # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html # To see working Podspecs in the CocoaPods repo see https://...
35.833333
104
0.592829
089abafc80ccca45ef9f308861f46bae9002f1ec
437
# Encoding: UTF-8 require 'rubygems' require 'dicebag' module DiceBag # Module for standard polyhedral dice types. module Standard # Models a single, simple die. class Die < Roll def initialize(sides) super("1d#{sides}") end end D4 = Die.new(4) D6 = Die.new(6) D8 ...
17.48
46
0.578947
26c79ddab42321520572151091cdc7c749caff3b
620
require 'rails_helper' feature 'User signup', type: :feature do scenario 'Valid user information' do sign_up_with('First', 'Last', 'test@example.com', 'password', 'password') expect(page).to have_content('Welcome! You have signed up successfully.') end scenario 'Passwords do not match' do sign_up_w...
32.631579
78
0.698387
bb313288a8a536f5ca86a337bf1cadba9f0a80ab
339
require 'sucker_punch' module Rollbar module Delay class SuckerPunch def self.handle(payload) @@sucker_punch_worker ||= self.new @@sucker_punch_worker.async.perform payload end include ::SuckerPunch::Job def perform(*args) Rollbar.process_payload(*args) end...
17.842105
51
0.646018
f8dac2d2ff32429430c58c76e7b7214677ef7587
367
class MailersController < ApplicationController # layout "mailers" init_gettext "rails_test" def index end def singlepart Mailer.deliver_singlepart render :text => Mailer.create_singlepart.encoded, :layout => true end def multipart Mailer.deliver_multipart render :text => Mailer.creat...
19.315789
69
0.73297
6a805b08cd6dfacfe11035664f68550206e585e4
1,407
# -*- coding: utf-8 -*- # Copyright 2014 TIS 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 a...
27.057692
92
0.625444
2660a876bd8b253624a90785bc58ce6f18162e8a
2,019
class DocumentsController < ApplicationController before_action :set_document, only: [:show, :edit, :update, :destroy] before_action :logged_in_user, only: [:new, :create, :edit, :update, :destroy] # GET /documents # GET /documents.json def index @documents = Document.all end # GET /documents/1 # ...
26.565789
95
0.669638
281fa10d4210cbd007a44517e013528ddb726af8
814
$: << File.dirname(__FILE__) $: << File.join(File.dirname(__FILE__), '..', 'lib') require 'thin' require 'lib/fake_async_middleware' require 'message_bus' require 'minitest/autorun' require 'minitest/spec' backend = (ENV['MESSAGE_BUS_BACKEND'] || :redis).to_sym MESSAGE_BUS_CONFIG = {:backend=>backend} require "messag...
27.133333
134
0.712531
082ecbe3200380f54c87e6ca39f6418c809feb72
423
class CreateWorkHasTitles < ActiveRecord::Migration def change create_table :work_has_titles do |t| t.integer :id, null: false t.integer :title_id, null: false t.integer :title_type_id, null: false t.integer :work_id, null: false t.integer :position, null: false t.timestamp :cr...
26.4375
51
0.673759
6aeb38ef1683f357429b0218fdfa05f19759ae1f
478
require_relative 'test_base' class KataForkTest < TestBase def self.id58_prefix 'Rg3' end #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - versions_test '860', %w( |kata_fork succeeding ) do kid = kata_fork('5rTJv5', 1) assert kata_exists?(kid) end #- - - - - - - - - -...
17.703704
68
0.468619
334212b076179a1887ba5311806b7156bb4f6165
452
cask 'robofont' do version '1.8.1,1612102134' sha256 '923b0d7f72a4e155e86fc9afa1e657dc240662d7470f5d93162b13c2359dd936' url "http://robofont.com/downloads/RoboFont_#{version.after_comma}.dmg" appcast 'http://robofont.com/downloads/', checkpoint: '7aedb4426631691f11efb84e3bd2169e6bff8eebaffa3d33d2ddc7...
30.133333
88
0.765487
62bd7542bd8358ea5576a1b3c50914a80671066e
917
Pod::Spec.new do |spec| spec.platform = :ios spec.ios.deployment_target = '13.6' spec.name = "PushNotificationCocoaPod" spec.version = "0.0.9" spec.summary = "It helps you enable Push Notifications in iOS app using Firebase." spec.homepage = "https://github.com/jainhrishbha/Push...
22.925
124
0.634678
e81418986e9de6e0d19934dc156ef188ab4a13ad
515
module SpreeStockLocationInternal class Engine < Rails::Engine require 'spree/core' isolate_namespace Spree engine_name 'spree_stock_location_internal' # use rspec for tests config.generators do |g| g.test_framework :rspec end def self.activate Dir.glob(File.join(File.dirname...
24.52381
88
0.679612
ac053e8083fa2cebb43d36454d873f3ec6207ed6
2,008
Pod::Spec.new do |s| s.name = "M13ProgressSuite" s.version = "1.2.4" s.summary = "A suite containing many tools to display progress information on iOS." s.description = <<-DESC M13ProgressSuite includes many diffrent of styles of progress views: bar, ring, pie, etc. It als...
52.842105
460
0.712151
bb913b6f2b3432ad865c71ccabded1a65ab3d577
289
class CreateManifestationRelationshipTypes < ActiveRecord::Migration[5.1] def change create_table :manifestation_relationship_types do |t| t.string :name, null: false t.text :display_name t.text :note t.integer :position t.timestamps end end end
22.230769
73
0.698962
f8e76b5439100b7a90b6351f06aa63a6c136b8e0
553
module ProjectEpicsHelper CLUBHOUSE_TEMPLATE_API_TOKEN = ENV["CLUBHOUSE_TEMPLATE_API_TOKEN"] def get_selected_project_epics(project_ids_array) all_epics = self.class.get("/epics", body: { token: CLUBHOUSE_TEMPLATE_API_TOKEN }) # puts('epic 0', all_epics.select { |epic| (epic['project_ids'] - project_ids_a...
39.5
106
0.735986
b9ccb8b41bf3112b148ab7292002ca5c5fa0461b
2,703
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. # It is recommended to regenerate this file in the future when you upgrade to a # newer version of cucumber-rails. Consider adding your own code to a new file # instead of editing this one. Cucumber will automatically load all features/**/*...
43.596774
113
0.764336
08f3536b364d6238a3183c1a76983859b10849c8
106
json.extract! cinema, :id, :location, :created_at, :updated_at json.url cinema_url(cinema, format: :json)
35.333333
62
0.754717
e2f893a5959764beede6b8050f19dbd832b1a5b8
464
class UsersController < ApplicationController def new @user = User.new end def create @user = User.new(user_params) if @user.save session[:user_id] = @user.id flash[:success] = "Successfully signed up!" redirect_to root_path else flash[:error] = "There was an error while ...
18.56
60
0.644397
e812dd4fdda80c3028a24e4cabc2d063ce79bad5
53,385
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'seahorse/client/plugins/content_length.rb' require 'aws-sdk-core/plug...
48.051305
659
0.640236
acd8d523a2d151360eb43c12ea806ec6a9fadac1
208
# frozen_string_literal: true class DeleteEventByAttributeJob < ApplicationJob queue_as :lupo_background def perform(id, options = {}) Event.where({ uuid: id }.merge(options)).destroy_all end end
20.8
56
0.75
1a5fb4fc38e59c215b3a87439db525d969fc128e
3,848
module Dhl::Bcs::V2 class ExportDocument include Buildable PROPERTIES = %i(invoice_number export_type export_type_description terms_of_trade place_of_commital additional_fee permit_number attestation_number with_electronic_export_notification export_doc_positions).freeze attr_accessor(*PROPERTIES) E...
45.270588
216
0.72843
393ae00fc77eecd1d8e0206fcc9d20b29d23d063
7,091
class BulkUpdateRequest < ApplicationRecord attr_accessor :reason, :skip_secondary_validations, :skip_forum belongs_to :user belongs_to :forum_topic, optional: true belongs_to :forum_post, optional: true belongs_to :approver, optional: true, class_name: "User" validates :user, presence: true validates :...
27.484496
144
0.65294
bf8eee98747f78fcf58928d5ed5fffe92e09eeef
1,705
require_dependency 'project' module RedmineGitHosting module Patches module ProjectPatch def self.included(base) base.send(:include, InstanceMethods) base.class_eval do unloadable # Add custom scope scope :active_or_closed, -> { where("status = #{Project::STA...
29.912281
123
0.664516
1d1e219962ac77253e3aa21dde501e7fe75adfba
991
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/google_ads/v1/errors/keyword_plan_negative_keyword_error.proto require 'google/protobuf' require 'google/api/annotations_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v1.errors.KeywordPla...
49.55
240
0.843592
1169938b80ca7cece2295c824d558406b3f358c5
10,151
require 'fast_spec_helper' require_dependency 'active_model' describe Gitlab::Ci::Config::Entry::Job do let(:entry) { described_class.new(config, name: :rspec) } describe '.nodes' do context 'when filtering all the entry/node names' do subject { described_class.nodes.keys } let(:result) do ...
27.214477
87
0.566151
e8fce5c3772c58b82759a77bb9732759d2515c10
275
class AllGames::Games attr_accessor :name, :platform, :release, :url @@all = [] def initialize(name, platform, release, url) @name = name @platform = platform @release = release @url = url @@all << self end def self.all @@all end end
13.75
48
0.596364
5d3119426b9167979b3bd2d70fe44507eb01538a
137
class ApplicationController < ActionController::Base protect_from_forgery with: :exception def index render "/index" end end
17.125
52
0.759124
5d3646c0375b28ee43cc1f3bbd7bb76ed97eee8f
20,373
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic...
44.677632
322
0.692142
ac06740016c68341a9b5f598e095f1a8e7d5cb86
676
Pod::Spec.new do |s| s.name = 'AKPickerView-Swift' s.version = '2.0.3' s.summary = 'A simple yet customizable horizontal picker view.' s.description = 'A simple yet customizable horizontal picker view. Works on iOS 8' s.license = 'MIT' s.homepage = 'https://github.com/Akkyie/AKPickerView-Sw...
27.04
96
0.636095
61faa564a822198b86ca9cae7409d9de5f625232
758
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 require_relative '../dynamodb-ruby-example-add-item-users-table' describe '#item_added_to_table?' do let(:table_item) do { table_name: 'Users', item: { 'ID': 123456, 'FirstName'...
21.657143
73
0.580475
11309aab03af1b664ec9428d298fd6ea4ec65ad4
47
module Jekyll VERSION = '3.0.0-beta1' end
11.75
26
0.638298
6115cab8df0419f9bf53c2229ebb4f6ab9e2fd3e
1,714
module ShopifyApp class ScripttagsManager class CreationFailed < StandardError; end def self.queue(shop_name, token) ShopifyApp::ScripttagsManagerJob.perform_later(shop_name: shop_name, token: token) end def initialize(shop_name, token) @shop_name, @token = shop_name, token end ...
24.84058
98
0.697783
e87d62fa8955015f14af5c6153fa2567e5a38104
5,442
# # Be sure to run `pod spec lint framework_ios_module_login_extension.podspec' to ensure this is a # valid spec and to remove all comments including this before submitting the spec. # # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html # To see working Podspecs in the CocoaPod...
37.791667
123
0.600882
185fceeb8333c15dc308f5e206d65475268e33e1
141
# Be sure to restart your server when you modify this file. SOSWeb::Application.config.session_store :cookie_store, key: '_SOS-Web_session'
35.25
79
0.794326
1129f154bba8ad662466238cf41a2c6baedf77f6
1,387
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'lib/version' Gem::Specification.new do |spec| spec.name = "popular_moocs" spec.version = PopularMoocs::VERSION spec.authors = ["'Seb Gertz'"] spec.email = ["'...
38.527778
110
0.671954
62b05e7d1814443ed1350ea00327f1f2b97fa4aa
153
# frozen_string_literal: true RSpec.describe TraceLocation do it 'has a version number' do expect(TraceLocation::VERSION).not_to be nil end end
19.125
48
0.764706
267e15277e8a13cc0cb56b0fa7e9b6dfeaf57d20
451
class CreateTables < ActiveRecord::Migration def change create_table :teams do |t| t.string :name t.string :location t.timestamps end create_table :players do |t| t.string :name t.string :position t.integer :number t.timestamps end create_table :game...
17.346154
45
0.596452
edf9168979379d611713f2b0192d21166bea23f0
522
module Mercadolibre module Core module Apps def get_application_info get_request("/applications/#{@app_key}", { access_token: @access_token }).body end def revoke_application_permissions(user_id, application_id) delete_request("/users/#{user_id}/applications/#{app_id}?access_tok...
29
103
0.683908
8790f7e8aad6ba25113cb2c1af86d791ba57921c
18,322
describe Fastlane do describe Fastlane::FastFile do describe "#initialize" do it "raises an error if file does not exist" do expect do Fastlane::FastFile.new('./fastlane/spec/fixtures/fastfiles/fastfileNotHere') end.to raise_exception("Could not find Fastfile at path './fastlane/sp...
44.470874
203
0.650911
2865a2253c04b563cf1f552f81dc34d950dd64bc
615
Pod::Spec.new do |s| s.name = "3dScrollview" s.version = "0.0.3" s.summary = "A short description of 3dScrollview." s.platform = :ios s.ios.deployment_target = '9.0' s.description = "jiaforios@163.com" s.homepage = "https://github.com/jiaforios/3dScrollview" s.license ...
21.206897
98
0.595122
ab833a0f9bb035e4cb5f746a78197fd8a8211ec3
166
class AddValidLifetimeToGlobalOptions < ActiveRecord::Migration[6.0] def change add_column :global_options, :valid_lifetime, :integer, unsigned: true end end
27.666667
73
0.789157
03d81214ff68fbfa6b6745e394c7b191fb253c7e
87
module OmniAuth module QuickbooksOauth2 VERSION = '0.2.0.alpha'.freeze end end
14.5
34
0.724138
bb40d1cf02ef5503c916aa279505ee43149070fb
3,566
CollectionGuides::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # config.action_controller.relative_url_root = "/findingaids" # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most o...
39.186813
104
0.751542
bfbc2a6fa112d5c48e8169ad9585131a665d623f
868
# # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. # Run `pod lib lint canon_ccapi.podspec` to validate before publishing. # Pod::Spec.new do |s| s.name = 'canon_ccapi' s.version = '0.0.1' s.summary = 'A new flutter plugin project.' s.description...
36.166667
105
0.586406
e996c932eb9ba89dc2765411d6899598541230c0
1,968
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Security::Mgmt::V2015_06_01_preview module Models # # Describes the Network Security Groups effective on a network interface # class Effective...
29.818182
76
0.537093
7a8f4337dfdaef6f127985bd3697c28c4934b077
153
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'jekyll' require 'jekyll_kip' require 'minitest/autorun' require 'webmock/minitest'
19.125
58
0.75817
ed7652d312b46ac13f172c3b99989aae0a243e24
354
# encoding: UTF-8 # # Copyright (c) 2010-2015 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. module GoodData module Mixin module ContentGetter def content data && data['cont...
22.125
71
0.70339
f749ed24ad5b4510f48d57dca70cf2af5eb5f15e
2,480
require 'spec_helper' describe 'cis_hardening::setup::accessctl' do on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } # Check for default class it { is_expected.to contain_class('cis_hardening::setup::accessctl') } # Configure SELinux - ...
28.181818
84
0.546371
b9e99c5d094b69d713dd219a0f8dcb8dee878f7f
2,534
# # Copyright:: Copyright (c) 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 # # http://www.apache.org/licenses/LICENSE-2.0 #...
28.155556
74
0.697711
621ba2eb88042b9309f21d80ffbe02f64c141077
3,071
require 'puppet/provider/nameservice/objectadd' require 'puppet/util/libuser' Puppet::Type.type(:group).provide :groupadd, :parent => Puppet::Provider::NameService::ObjectAdd do desc "Group management via `groupadd` and its ilk. The default for most platforms. " commands :add => "groupadd", :delete => "groupde...
27.419643
151
0.647346
61c35e2db72f189b57deedfe4b5edceead4cbebb
335
require 'test_helper' class ErrorsControllerTest < ActionDispatch::IntegrationTest test "should get not_found" do get "/404" assert_response(404) end test "should get unacceptable" do get "/422" assert_response(422) end test "should get internal_error" do get "/500" assert_response(...
17.631579
60
0.704478
8777cafe499eb9d6517b94e2edb975cdcf102289
365
# encoding: utf-8 RSpec.describe TTY::Spinner::Multi, '#on' do let(:output) { StringIO.new('', 'w+') } it 'fails to register a callback with invalid event name' do spinners = TTY::Spinner::Multi.new(output: output) expect { spinners.on(:unknown_event) { } }.to raise_error(ArgumentError, /The ev...
26.071429
77
0.671233
610ad37420adc1283e413517224ecfb8ccc4af5a
1,909
# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/ids/v1/ids.proto for package 'Google.Cloud.IDS.V1' # Original file comments: # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License...
36.711538
127
0.677842
792b2db50276949737410d20157785c4b0b8f300
3,252
class Auditbeat < Formula desc "Lightweight Shipper for Audit Data" homepage "https://www.elastic.co/products/beats/auditbeat" url "https://github.com/elastic/beats.git", tag: "v7.12.1", revision: "651a2ad1225f3d4420a22eba847de385b71f711d" license "Apache-2.0" head "https://github.com/elastic...
32.52
122
0.639606
1d286a5076ec1b1deb743e164e305bac8788a238
1,448
require 'test_helper' class SurveysControllerTest < ActionDispatch::IntegrationTest include Devise::Test::IntegrationHelpers include ActiveModelSerializers::Test::Schema include ActiveModelSerializers::Test::Serializer setup do @survey = surveys(:one) sign_in users(:admin) end test 'api should ge...
29.55102
67
0.746547
288e0769830f4abb483d5c2035d60f2c0ee49b1b
12,976
require "rspec" require "rspec/its" require 'flexyear' describe FlexYear do before do allow(Date).to receive(:today) { Date.parse("2016-11-07") } end [FlexYear, FlexYear::Historical].each do |flexyear_class| context "given a blank string" do subject { flexyear_class.new("") } its(:year_low) ...
33.529716
107
0.559032