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
d593099238bbdc0f4aeef04bb5732cda152a63a3
2,890
require 'test_helper' class InclineTest < ActiveSupport::TestCase test 'modules and classes loaded' do assert Object.const_defined? :Incline assert Incline.const_defined? :NotLoggedIn assert Incline.const_defined? :NotAuthorized assert Incline.const_defined? :InvalidApiCall assert Incline.cons...
44.461538
71
0.794464
e8176c3cafdd2a0c0d0a4d007e209dfb18e5804f
1,255
class Bibliografia include Comparable attr_accessor :autor, :titulo, :fecha def initialize(autor, titulo, fecha) @autor = autor @titulo = titulo @fecha = fecha end def <=> (other) if @autor == other.autor @titulo <=> other.titulo ...
19.307692
73
0.58247
7a45e8eed21375bba389e25a7f6b6eb5688ed0de
140
require 'test_helper' class MemoriesControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
17.5
62
0.742857
79dee93ab6192de35e09a8ba14d569ff38853eba
605
# frozen_string_literal: true module Cucumber class Runtime class AfterHooks def initialize(hooks, scenario) @hooks = hooks @scenario = scenario end def apply_to(test_case) test_case.with_steps( test_case.test_steps + after_hooks(test_case.source).reverse ...
22.407407
85
0.598347
0807c8e5c2f11e7cf57fed41c19382b940d268f0
1,123
# -*- encoding: utf-8 -*- # stub: latex-decode 0.3.2 ruby lib Gem::Specification.new do |s| s.name = "latex-decode".freeze s.version = "0.3.2" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Sylvest...
46.791667
238
0.69813
bb394f6faa811aad1210e2a6ec12b31ca4c85432
44
module DynamicLinks VERSION = '0.1.0' end
11
19
0.704545
3977db0520c9b05503ecb09ea4fc82000a21a547
209
class AddMaterialsTimestamps < ActiveRecord::Migration def change change_table :material_folders do |t| t.timestamps end change_table :materials do |t| t.timestamps end end end
19
54
0.698565
6ac7723e18e59ca93472426665ca6a5696d6d99b
3,945
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true config.assets.enabled = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, a...
41.09375
102
0.754626
d5cb3fc9893c5289839662e4cf6a846cebf6c72f
365
class User class NotificationPresenter < BasePresenter presents :notification def link(options = {}) link_to notification.message, notification_path(notification), options end def created_at notification.created_at.strftime('%c') end def created_at_in_words time_ago_in_wor...
20.277778
76
0.723288
5d605dd811b095f96a96a508972aec0956595350
3,808
# frozen_string_literal: true shared_context 'with storage' do |store, **stub_params| before do subject.object_store = store end end shared_examples "migrates" do |to_store:, from_store: nil| let(:to) { to_store } let(:from) { from_store || subject.object_store } def migrate(to) subject.migrate!(to...
27.79562
99
0.693015
ff07cc5baacbb449b4a3fbb34357ce8c9cfd8a5f
1,019
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__) class Php54Swoole < AbstractPhp54Extension init homepage "http://pecl.php.net/package/swoole" url "http://pecl.php.net/get/swoole-1.7.17.tgz" sha256 "e4d3c2466aa1e1c99750ec5497445bde8ef775fd0b304d11016e6df363cc7ec0" head "https://git...
31.84375
95
0.758587
bba3789a0cd34173ddd519f3ce3664468aaf6c25
3,460
class ApplicationController < ActionController::Base # require 'will_paginate/array' protect_from_forgery before_filter :set_locale # before_filter :is_browser_supported? before_filter :is_ie? before_filter :initialize_gon unless Rails.application.config.consider_all_requests_local rescue_from Exception, ...
29.827586
112
0.701445
39525d7ac35ba43a3b985783b0052b363dfcb157
2,303
require 'spec_helper' describe 'is_ip_address' do it { is_expected.not_to eq(nil) } it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } it { is_expected.to run.with_params([], []).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } it { is_e...
56.170732
113
0.719931
625af6da4206437e3242e103979e913659c7bd65
1,045
require 'rails_helper' describe SlackUtils::TextDecoder do describe '.decode' do subject do SlackUtils::TextDecoder.decode(text) end let :text do 'Hello!' end it 'decode' do expect(subject).to eq('Hello!') end context 'When include user' do let :text do ...
20.9
101
0.606699
0136e5f5cfe85d054c950bac50fd20df23f7bca6
50
require "extpp" create_makefile("define_method")
12.5
32
0.8
793613ded61bd5d14b027338b1b28953d97ba6e8
5,361
# encoding: utf-8 require 'test_helper' class RemoteIridiumTest < Test::Unit::TestCase def setup @gateway = IridiumGateway.new(fixtures(:iridium)) @amount = 100 @credit_card = credit_card('4976000000003436', {:verification_value => '452'}) @declined_card = credit_card('4221690000004963') our_a...
32.295181
95
0.721694
1877e1c8dafa0f2cd4dec90c541f07886d180c84
603
maintainer "Gerhard Lazu" maintainer_email "gerhard@lazu.co.uk" license "Apache 2.0" description "Installs and maintains php and php modules" version "2.0.1" depends "build-essential" depends "xml" depends "mysql" supports "debian" supports "ubuntu" supports "centos" supports "redhat...
26.217391
77
0.716418
031e16af08338e357855235157001485194d2c21
55
require_relative "../lib/predictor" require 'ostruct'
13.75
35
0.763636
ab5d7d4fbcb3f1062fbfc6eccff014cb80d8b844
71
module Fastlane module DingtalkRobot VERSION = "0.1.4" end end
11.833333
22
0.690141
e9f8add20278d6bef957e782b96c14589c8c5e82
1,674
RSpec.describe Service, type: :model do before(:each) do create(:service) end it { is_expected.to validate_presence_of(:lgsl_code) } it { is_expected.to validate_presence_of(:label) } it { is_expected.to validate_presence_of(:slug) } it { is_expected.to validate_uniqueness_of(:lgsl_code) } it { is_ex...
29.368421
64
0.680406
081751c0b51ded5ce581058f4a01cbcea24c9516
3,441
require 'spec_helper' require 'r10k/action/puppetfile/install' describe R10K::Action::Puppetfile::Install do let(:default_opts) { { root: "/some/nonexistent/path" } } let(:puppetfile) { R10K::Puppetfile.new('/some/nonexistent/path', {:moduledir => nil, :puppetfile_path => nil, :force =...
32.158879
101
0.642255
ab18cea08c35164209897c7ad7275f89f87767d6
160
class AddEmbargoTypeToStashEngineEmbargoes < ActiveRecord::Migration[4.2] def change add_column :stash_engine_embargoes, :embargo_type, :string end end
26.666667
73
0.80625
61814e26c0239d3ff43ecf88e520f3057c927ba0
2,168
describe Fastlane do describe Fastlane::FastFile do describe "App Store Connect API Key" do let(:fake_api_key_p8_path) { File.absolute_path("./spaceship/spec/connect_api/fixtures/asc_key.p8") } let(:fake_api_key_json_path) { "./spaceship/spec/connect_api/fixtures/asc_key.json" } let(:fake_api_ke...
31.42029
118
0.587638
d592379f497a4bce9b8be02599d837323240376c
1,735
# create module module RedshiftConnector module Importer end end require 'redshift_connector/importer/upsert' require 'redshift_connector/importer/insert_delta' require 'redshift_connector/importer/rebuild_rename' require 'redshift_connector/importer/rebuild_truncate' require 'redshift_connector/logger' module Re...
29.40678
124
0.674928
ff44c8edefbf01295cac5a62639061feb5a91f25
624
Pod::Spec.new do |s| s.name = "MobileRTCSDK" s.version = "5.2.4" s.summary = "Mobile Real-Time Communication SDK" s.homepage = "https://github.com/ChaneyLau/MobileRTCSDK" s.license = 'MIT' s.author = { "Chaney Lau" => "1625977078@qq.com" } s.sourc...
32.842105
106
0.572115
4aab9166121d238c7e16e4e6dcfa225a34331b25
398
class ImageSweeper < ActionController::Caching::Sweeper include ::BaseSweeper observe Image def after_create(image) expire_cache_for(image) end def after_update(image) expire_cache_for(image) end def after_destroy(image) expire_cache_for(image) end private def expire_cache_for(image)...
16.583333
55
0.728643
87235a271501aba50176984d58321cc3d37f5100
150
json.extract! purchase, :id, :item_id, :price, :shipping, :tax, :qty, :notes, :created_at, :updated_at json.url purchase_url(purchase, format: :json)
50
102
0.726667
01d02398f9a86f1c36dd64c8d44daa5e91b49c8f
8,426
require 'spec_helper' describe "exchanges:charge_unreturned_items" do include_context( 'rake', task_name: 'exchanges:charge_unreturned_items', task_path: Spree::Core::Engine.root.join('lib/tasks/exchanges.rake'), ) subject { task } describe '#prerequisites' do it { expect(subject.prerequisite...
38.474886
162
0.667695
bb2e1014abb100a8ad09c52c5dbc164e01a56878
3,721
## # Creates methods on object which delegate to an association proxy. # see delegate_belongs_to for two uses # # Todo - integrate with ActiveRecord::Dirty to make sure changes to delegate object are noticed # Should do # class User < Spree::Base; delegate_belongs_to :contact, :firstname; end # class Contact < Spree::B...
39.168421
191
0.723193
bbca18aafc53dfe8ce71badb9c85d846383822cf
941
# # Cookbook Name:: aws-proftpd # Recipe:: ec2 # # Author:: Kinesis Pty Ltd (<devs@kinesis.org>) # # Copyright (C) 2014, Kinesis Pty Ltd # # 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.366667
74
0.737513
f70d2cb01385eb0ef5966c8b3d29bf95f5c251d1
1,247
# -*- encoding: utf-8 -*- require File.expand_path('../lib/arison/version', __FILE__) Gem::Specification.new do |gem| gem.name = "arison" gem.version = Arison::VERSION gem.summary = %q{activerecord-import by jsonl, command line interface} gem.description = %q{activerecord-import by json...
37.787879
78
0.681636
39c9782477b6be348114ca3f04919ff8d7590abc
900
def add(a, b) # return the result of adding a and b return a + b end def subtract(a, b) # return the result of subtracting b from a return a-b end def multiply(a, b) # return the result of multiplying a times b return a * b end def divide(a, b) # return the result of dividing a by b return a/b end d...
20
75
0.71
f7ef0cfd0d8c2eab51ebd547c0b3a611a38e8207
3,266
# frozen_string_literal: true module API class GroupBoards < Grape::API include BoardsResponses include PaginationParams prepend_if_ee('EE::API::BoardsResponses') # rubocop: disable Cop/InjectEnterpriseEditionModule before do authenticate! end helpers do def board_parent ...
27.216667
98
0.585732
5daaf221ef2044122de49459ab1a7eb1127a86ff
2,073
module Spree module Core module ControllerHelpers module Locale extend ActiveSupport::Concern included do before_action :set_locale helper_method :supported_locales helper_method :supported_locales_for_all_stores helper_method :current_locale ...
32.904762
132
0.547033
5d93d0ab565ae41abe57498af48e98d09ddc515a
4,491
# frozen_string_literal: true require 'opal' require 'opal/builder' require 'opal/cli_runners' module Opal class CLI attr_reader :options, :file, :compiler_options, :evals, :load_paths, :argv, :output, :requires, :gems, :stubs, :verbose, :runner_options, :preload, :filename, :debug, :no_exit, :lib_o...
29.741722
117
0.599644
18085b4ef6578c3e77097495ef100d1fee95a4b6
4,660
class Mavsdk < Formula include Language::Python::Virtualenv desc "API and library for MAVLink compatible systems written in C++17" homepage "https://mavsdk.mavlink.io" url "https://github.com/mavlink/MAVSDK.git", tag: "v1.3.1", revision: "22168e71f1d0fd41dbe2e1c16fbf613f7e7851fe" license "BS...
35.846154
140
0.668455
793b3440337ea1b832850f36d0750d7bbc5690be
80
# frozen_string_literal: true json.array! @ddcs, partial: 'ddcs/ddc', as: :ddc
20
48
0.7125
ff1b0b017c15c208dc1b507c81231c6a16fde1bb
1,844
# # Be sure to run `pod lib lint face-SDK.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'face-SDK' ...
38.416667
115
0.654555
ac5d9d7673d2a00dc8e92c24f367f06e3f7244f9
2,649
# frozen_string_literal: true module Stupidedi include Refinements module Values # # @see X222.pdf B.1.1.3.2 Repeating Data Elements # class RepeatedElementVal < AbstractElementVal # @return [CompositeElementDef, SimpleElementDef] def_delegators :@usage, :definition # @return...
22.836207
79
0.510381
03ce633632c8f82677023c452b89d2963e6cd009
33,948
# 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::ACM # @api private module ClientApi include Seahorse::Model AddTagsToCertificateReques...
67.896
209
0.767262
abe812a6264e06323cdac47f067823bf8372c37d
5,356
# # Be sure to run `pod spec lint mvc-base.podspec' to ensure this is a # valid spec and to remove all comments including this before submitting the spec. # # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html # To see working Podspecs in the CocoaPods repo see https://github.co...
36.937931
156
0.603062
217eb5b13a53b4660edb7b20e79e8617f56fc911
277
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password] Rails.application.config.filter_parameters += [:session] if Rails.env.production?
39.571429
81
0.794224
01da43e9425e7a3a897cc30414ade12bbbcc8ccb
1,232
require 'polevault/migration' require 'erb' class NewMigration < Polevault::Migration def migrate # NOTE: Within this class you have access to the following variables: # # vault: Vault::Client instance configured with config # This which will have access to setup your # Vault node through the...
41.066667
108
0.719156
03ace7e80573ebd3a595445ff3e21b93f4d7f2ff
379
# frozen_string_literal: true class ForkProjectsFinder < ProjectsFinder # rubocop: disable CodeReuse/ActiveRecord def initialize(project, params: {}, current_user: nil) project_ids = project.forks.includes(:creator).select(:id) super(params: params, current_user: current_user, project_ids_relation: project...
34.454545
88
0.781003
4a0816c543ae59cd9cf7b2b071b6e9e6815185b4
112
class TripSerializer < ApplicationSerializer attributes :id, :headsign, :shape_id, :block_id, :remote_id end
22.4
61
0.785714
ed9c590102b58fc87a08932fe3a17de4e4e70913
4,189
#windows用 ::RBNACL_LIBSODIUM_GEM_LIB_PATH = "c:/msys64/mingw64/bin/libsodium-23.dll" require 'discordrb' require 'dotenv' #require 'rest-client' #require 'json' ### Google Cloud Platform APIs require 'googleauth' require 'googleauth/stores/file_token_store' require 'google/apis/compute_v1' require 'pp' Dotenv.load s...
27.559211
112
0.707806
b9e0e2078caaf4e30b5862657d0f010863d57873
38,627
##########################GO-LICENSE-START################################ # Copyright 2018 ThoughtWorks, 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/li...
81.663848
386
0.749191
2138f649127e8c55e15fbf45d2a211b228c86e80
5,354
#------------------------------------------------------------------------- # # Copyright (c) Microsoft and contributors. All rights reserved. # # The MIT License(MIT) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files(the "Software"), to...
41.503876
125
0.665671
398b6dbd3f734b87c3874b7ede76a0f57c4d2e88
321
require 'spec_helper' describe BinaryChecker do context "accepts a command" do it "knows that 'ls' _probably_ exists" do BinaryChecker.new("ls").should be_exist end it "knows that 'boooganone' _probably_ doesn't exists" do BinaryChecker.new("boooganone").should_not be_exist end end end...
22.928571
61
0.713396
b90d0b527624caf1930f61cdec224544a0f2d802
7,075
# frozen_string_literal: true # # Uncomment this and change the path if necessary to include your own # components. # See https://github.com/plataformatec/simple_form#custom-components to know # more about custom components. # Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f } # # Use this setup blo...
39.088398
132
0.727774
6ad09d7ca996b76e400aa0cf3451f2b6d587c802
790
require 'selenium-webdriver' driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" # スクレイピング driver.navigate.to(ENV['URL']) list_table = driver.find_element(:class => "list_table") dates = list_table.find_elements(:class => "date") urls = list_table...
28.214286
122
0.678481
18e528b7256e58c8007976487141edfc3b9deab9
6,859
=begin #Xero Payroll NZ #This is the Xero Payroll API for orgs in the NZ region. The version of the OpenAPI document: 2.6.0 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 =end require 'time' require 'date' module XeroRuby::PayrollNz require 'bigdecimal' cla...
29.692641
212
0.623706
ffdccb5faa073c64d753019b8843c2b7a3705a0b
1,455
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'aws-sdk-core' require 'aws-sigv4' require_relative 'aws-sdk-appregi...
26.944444
100
0.753265
1c08b801425dd90bc04649ef067195ea4e581de9
2,108
# frozen_string_literal: true module SoftDestroyable extend ActiveSupport::Concern included do scope :kept, -> { where(deleted_at: nil) } scope :only_deleted, -> { where.not(deleted_at: nil) } define_model_callbacks :soft_destroy define_model_callbacks :restore end module ClassMethods def...
26.683544
110
0.711575
112406aab0c86dbf6945292777a198f3e8c39671
1,106
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'uri_scanner/version' Gem::Specification.new do |spec| spec.name = "uri_scanner" spec.version = URIScanner::VERSION spec.authors = ["Stas Kobzar"] spec.email =...
39.5
137
0.676311
ab9c9d7f49aebc7ec1ab4563e520f4005be682cb
143
# frozen_string_literal: true require 'yaml' require 'yamlm/version' require 'yamlm/cli' module YAMLM class Error < StandardError; end end
14.3
34
0.769231
872d2fed6adce6bb5e8b190e088ecfd47ff04718
8,778
require 'spec_helper' module Pageflow describe EntryRoleQuery do describe EntryRoleQuery::Scope do describe '.with_role_at_least' do it 'includes entries with entry membership with required role' do user = create(:user) entry = create(:entry, with_editor: user) result...
34.559055
96
0.649465
61e0a08dbee8bee7a344fdce06f60d30056c473c
279
class Engine def results result = (1..100).map do |number| if (number % 35) == 0 'Nama Team' elsif (number % 7) == 0 'Team' elsif (number % 5) == 0 'Nama' else number end end result.join(', ') end end
17.4375
38
0.455197
5dd926ed9e373a72bbd038f88c3325d41f2b5167
3,565
# Copyright 2020 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. # frozen_string_literal: true require "test_helper" require "models/firm" require "models/account" require "models/transaction" require "mode...
29.957983
90
0.686676
bf28b7d90b1be8b7a98dbe184aa970a7a9604f71
598
require './config/environment' require 'rack-flash' require 'date' class ApplicationController < Sinatra::Base use Rack::Flash register Sinatra::ActiveRecordExtension enable :sessions set :session_secret, "my_application_secret" configure do set :public_folder, 'public' set :views, 'app/views' end ...
19.933333
49
0.662207
287464e94cf4e85d84080f74de19610ebf5d5302
1,000
require 'azure_generic_resources' class AzureSQLManagedInstances < AzureGenericResources name 'azure_sql_managed_instances' desc 'Verifies settings for a collection of Azure SQL Managed Instances' example <<-EXAMPLE describe azure_sql_managed_instances(resource_group: 'migrated_vms') do it { should e...
27.777778
99
0.726
1cc012fc403e79b67c43d49bef213fc6a61b0bed
2,281
# -*- encoding: utf-8 -*- # stub: omniauth 1.9.0 ruby lib Gem::Specification.new do |s| s.name = "omniauth" s.version = "1.9.0" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Michael Bleigh", "Erik Michaels-...
51.840909
608
0.658922
7a316518b079d5ed32ac6bfefd11ca4844d2a881
320
object @user node(:url) { |user| username_url(user) } attributes :username child @background => :background do attributes :title, :body, :id node(:url) { |fact| username_fact_url(@user, fact) } end child @recent => :recent do attributes :title, :body, :id node(:url) { |fact| username_fact_url(@user, fact) } end
29.090909
54
0.690625
b92b4b9679aad4b8ecc8b79e01a4801ff4eb00f6
1,635
# frozen_string_literal: true # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0...
30.277778
67
0.69419
01f2a43c37ab3bd777d21008c01b970d8151e427
33,821
require_relative "test_helper" class ArraySingletonTest < Test::Unit::TestCase include TypeAssertions testing "singleton(::Array)" def test_new assert_send_type "() -> ::Array[untyped]", Array, :new assert_send_type "(Array[Integer]) -> ::Array[Integer]", Array...
35.41466
133
0.494013
d586af9c2c162ffa0b2b9b3a6359b0212ca634ec
2,356
class Libass < Formula desc "Subtitle renderer for the ASS/SSA subtitle format" homepage "https://github.com/libass/libass" url "https://github.com/libass/libass/releases/download/0.14.0/libass-0.14.0.tar.xz" sha256 "881f2382af48aead75b7a0e02e65d88c5ebd369fe46bc77d9270a94aa8fd38a2" revision 1 bottle do ...
30.597403
109
0.657895
626ffa31b078aad19d798dfbc27ae742225c5b56
5,487
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ContainerInstance::Mgmt::V2017_08_01_preview # # A service client - single point of access to the REST API. # class ContainerInstanceManagementClient < ...
40.051095
154
0.698742
f76d645c16e0e04397efeef0fe3cfeac1fa00381
75,434
# 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,...
63.711149
181
0.682424
edd93bc5bcd15c558694a0053d93d4172b1b20a7
964
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/google_ads/v2/enums/conversion_adjustment_type.proto require 'google/protobuf' require 'google/api/annotations_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "google.ads.googleads.v2.enums.ConversionAdjustmentT...
43.818182
211
0.820539
388c1daddebee178412bfaf1c5295ee66c5f6400
1,512
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__) class Php54Intl < AbstractPhp54Extension init homepage "http://php.net/manual/en/book.intl.php" url PHP_SRC_TARBALL sha256 PHP_CHECKSUM[:sha256] version PHP_VERSION bottle do root_url "https://homebrew.bintray.com/bott...
30.24
95
0.672619
5d3d60e0d502737d59a3e36d2431145487090911
648
source 'https://rubygems.org' gemspec path: '../' gem 'activerecord', '~> 5.1.0' gem 'railties', '~> 5.1.0' # Database Configuration group :development, :test do platforms :jruby do gem 'activerecord-jdbcmysql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: 'master' gem 'active...
23.142857
122
0.66821
21419ce5de9b496bec1d957b8649bb4673a8d485
1,160
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v5/errors/ad_sharing_error.proto require 'google/protobuf' require 'google/api/annotations_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_file("google/ads/googleads/v5/errors/ad_sharing_error.proto", :syntax ...
35.151515
182
0.750862
e23f1e12f4a7e9ad200f80b99b248620d9d8463e
310
class FixEmergColumn < ActiveRecord::Migration def up remove_column :reports, :emergency_arrival_id add_column :reports, :emergency_arrival_time_id, :integer end def down remove_column :reports, :emergency_arrival_time_id add_column :reports, :emergency_arrival_time, :integer end end
25.833333
61
0.777419
ab80662d03d3e47e681710746844601d6ce3a5ce
404
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::CostManagement::Mgmt::V2019_03_01_preview module Models # # Defines values for FunctionType # module FunctionType None = "None" Al...
22.444444
70
0.678218
0387fa341334cd630b567e3cf47fc17283581b59
2,777
# # TestRail API binding for Ruby (API v2, available since TestRail 3.0) # # Learn more: # # http://docs.gurock.com/testrail-api2/start # http://docs.gurock.com/testrail-api2/accessing # # Copyright Gurock Software GmbH. See license.md for details. # require 'net/http' require 'net/https' require 'uri' require 'json' ...
24.359649
74
0.559957
f83c91082a369caea05c4087d130052d88cb11b4
15,323
require "helper" require "inspec/profile_context" require "inspec/runner_mock" require "inspec/resource" require "inspec/resources/command" require "inspec/profile" describe Inspec::Profile do let(:logger) { Minitest::Mock.new } let(:home) { MockLoader.home } describe "with an empty profile" do let(:profile...
40.861333
203
0.651961
33552b6980019b627fe286ba203051d0595d0f84
2,208
module AsposeWordsCloud # class DocumentPropertyResponse < BaseObject attr_accessor :document_property, :status, :code # attribute mapping from ruby-style variable name to JSON key def self.attribute_map { # :'document_property' => :'DocumentProperty', #...
35.612903
838
0.631793
5d0a85926982c1fd7213e37172d1aa59c9a89c9b
783
# # Author:: Adam Jacob (<adam@chef.io>) # 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://...
30.115385
74
0.742018
089a04d8df850af0d9f51e1250241664f498bef1
842
# -*- encoding: utf-8 -*- # stub: yell 2.0.7 ruby lib Gem::Specification.new do |s| s.name = "yell".freeze s.version = "2.0.7" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Rudolf Schmidt".freeze]...
40.095238
183
0.71734
4a86a5805a2d9ba69bf49aa81a78c8e19bf37b2d
5,083
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
44.2
114
0.763329
b9ef7f4616d7e3a08dc72254a54aea878b00887c
674
module Shorti RSpec.describe FindShortenUrlByUrlService do context 'Normal cases' do describe 'shorten url exist' do it 'should fetch record correctly' do shorten_url = FactoryBot.create(:shorten_url) fetched_shorten_url = described_class.run(url: shorten_url.url) exp...
25.923077
73
0.642433
bb4c3c3449f2a34a190a54b85de70957fd48fdce
529
class TopupPriceCalculator attr_reader :pluie_fee, :fixed_prices def self.default_instance @default ||= TopupPriceCalculator.new end def initialize(prices= {}, pluie_fee= 1.1) @fixed_prices = (((10..50).step(5).map { |a| [ a, (a * pluie_fee).round(1)] }).to_h).merge(prices) @fixed_prices.freeze ...
24.045455
102
0.706994
bff14490d6babc520e34f5c13757510a6b8f8529
1,559
class GtkChtheme < Formula desc "GTK+ 2.0 theme changer GUI" homepage "http://plasmasturm.org/code/gtk-chtheme/" url "http://plasmasturm.org/code/gtk-chtheme/gtk-chtheme-0.3.1.tar.bz2" sha256 "26f4b6dd60c220d20d612ca840b6beb18b59d139078be72c7b1efefc447df844" revision 3 livecheck do url :homepage re...
38.975
106
0.750481
ed2f2b6f101305c84758337ab1f68846e0f00917
1,656
# This example tries Nokogiri (used in Shoes 4), but falls back to # Hpricot for Shoes 3 compatibility begin require 'nokogiri' rescue Exception => e require 'hpricot' end class Comic attr_reader :rss, :title def initialize(body) @rss = defined?(Nokogiri) ? Nokogiri::XML(body) : Hpricot(body) @title =...
26.709677
83
0.618961
626c4b8f5ee56a7d28edd8dec895114e353aae33
8,496
require 'concurrent/map' require 'active_support/core_ext/module/remove_method' require 'active_support/core_ext/module/attribute_accessors' require 'action_view/template/resolver' module ActionView # = Action View Lookup Context # # <tt>LookupContext</tt> is the object responsible for holding all information ...
30.234875
109
0.630885
d5fc29bfc0cde36ca62ad467b20d73bec1f72b51
1,263
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ApiManagement::Mgmt::V2018_01_01 module Models # # Tenant access information update parameters of the API Management # service. # class Ac...
26.3125
73
0.584323
bffd2bed7636aeee389277b579171d85717e74c5
2,768
class EmailParser attr_reader :sender, :recipient, :email_text, :email def initialize(sender, recipient, email_text) @sender = sender @recipient = recipient @email_text = email_text.forcibly_convert_to_utf8 @email = nil begin Utils.silence_stream(STDERR) do @email = Mail.read_fr...
25.163636
99
0.611272
e97c076cd0eeb2910d9b79078247c1a36c46c603
1,283
# 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,...
35.638889
91
0.749026
62f0616f2f2402250d2bd241cdf5054b40ae8716
6,779
# frozen_string_literal: true require 'spec_helper' RSpec.describe SystemNotes::EpicsService do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, :repository, group: group) } let_it_be(:author) { create(:user) } let(:noteable) { create(:issue, project: project) } let(:issu...
33.559406
120
0.636525
e8f84ebbd9f0a5d4c509fe1ee390d57df3edf73b
3,744
# frozen_string_literal: true require "net/http" require "cmd/home" module Homebrew module_function def changelog_args Homebrew::CLI::Parser.new do description <<~EOS Open a <formula> or <cask>'s changelog in a browser, or open Homebrew's own release notes if no argument is provided. ...
33.132743
109
0.633013
b9805e4b99d620072f9d83ba70d8a1616f356762
142
require 'test_helper' class ShortLinksControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
17.75
64
0.746479
79a25ba84a272fd05b68a59e0d2e31728e53f191
2,724
require "logstash/codecs/edn_lines" require "logstash/event" require "logstash/json" require "insist" require "edn" describe LogStash::Codecs::EDNLines do subject do next LogStash::Codecs::EDNLines.new end context "#decode" do it "should return an event from edn data" do data = {"foo" => "bar", "b...
36.810811
123
0.555066
283099db7593389dc80dce2428375ddfa18d645e
42
module CodePoetry VERSION = "0.4.0" end
10.5
19
0.690476
6a1e5883de3ede8a213648b1b0962011bcedeb0c
8,502
require 'thor' require 'gogetit' require 'gogetit/util' module Gogetit class CLI < Thor include Gogetit::Util package_name 'Gogetit' @result = nil class << self attr_accessor :result end attr_reader :config, :logger, :lxd, :libvirt, :providers def initialize(*args) super ...
37.289474
84
0.589979
21bafe5383171003ab175c833ce4572c1a9e282b
243
class RenameChallengesSolveShares < ActiveRecord::Migration[5.2] def change rename_column :challenges, :solve_share_decrement, :solved_decrement_shares add_column :challenges, :solved_decrement_period, :integer, default: 1 end end
34.714286
79
0.802469
3890b8c4a28d06a3fcc340c2360a3d81afdd6233
917
# frozen_string_literal: true require_relative 'boot' require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module App class Application < Rails::Application # Initialize configuration defaults for o...
27.787879
82
0.695747
1d49b6d1aca3c23907d3e5ece49b15e928818a7e
9,037
require 'erb' require 'fileutils' require 'optparse' require 'rollbar' require 'singleton' require 'yaml' require 'json' # CLI runner class PushmiPullyu::CLI include Singleton include PushmiPullyu::Logging COMMANDS = ['start', 'stop', 'restart', 'reload', 'run', 'zap', 'status'].freeze def initialize Pu...
31.820423
115
0.636937
1ded1542d0f4c401c58a8f0062f284795f05f7a5
2,169
### # This Ruby source file was generated by test-to-ruby.xsl # and is a derived work from the source document. # The source document contained the following notice: =begin Copyright (c) 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Auto...
28.539474
117
0.710466
398a19c11eeccb7a1d342a35f2cc9ee8ce8b600e
2,246
# # Copyright (C) 2010-2016 dtk contributors # # This file is part of the dtk project. # # 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 # # Unles...
34.553846
95
0.710597
1c05145a6521949889ece4bcfdf11ac2c094b238
42
module Dissect VERSION = "0.2.1pre" end
10.5
22
0.690476