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
03dd276e2aec13fad3012e81a67c059be55b274c
3,006
require "notiffany/notifier/base" module Notiffany class Notifier # System notifications using the # [growl](https://github.com/visionmedia/growl) gem. # # This gem is available for OS X and sends system notifications to # [Growl](http://growl.info) through the # [GrowlNotify](http://growl.in...
36.216867
78
0.643047
28231729568bf789a4d516cb25322360afde6741
5,341
# # Be sure to run `pod spec lint InformSDK.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.c...
36.834483
109
0.599888
abf44c724e75b765e08b0ea3991cee0a368a5cdb
4,303
require 'spec_helper' describe 'datadog_agent::integrations::postgres' do let(:facts) {{ operatingsystem: 'Ubuntu', }} let(:conf_dir) { '/etc/dd-agent/conf.d' } let(:dd_user) { 'dd-agent' } let(:dd_group) { 'root' } let(:dd_package) { 'datadog-agent' } let(:dd_service) { 'datadog-agent' } let(:conf...
36.466102
119
0.5868
084a008fd2087696d6e091261871b1af66e43afd
1,896
Shindo.tests("Fog::Network[:openstack] | lb_health_monitor", ['openstack']) do tests('success') do before do @lb_pool = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id', :protocol => 'HTTP', ...
36.461538
99
0.41192
f72018465fbfcce6a5bc4dff5ba6eaf052d19308
5,007
class ProtobufAT32 < Formula desc "Protocol buffers (Google's data interchange format)" homepage "https://github.com/google/protobuf/" url "https://github.com/google/protobuf/archive/v3.2.0.tar.gz" sha256 "2a25c2b71c707c5552ec9afdfb22532a93a339e1ca5d38f163fe4107af08c54c" revision 2 head "https://github.com/...
39.117188
145
0.724386
870b6bb93267fc8375a069648328b8fd22e3610f
31,037
module Components module Appointments module Doctors class Index < RW expose def self.wdays ["sun", "mon", "tue", "wed", "thur", "fri", "sat" ] end def get_initial_state { date: Moment.new.startOf('day'), current_controll_componen...
37.988984
263
0.4706
39adcede25d29fc88a1820d22b9899f6c332f865
10,553
#encoding: us-ascii =begin Copyright (C) 2007 Stephan Maka <stephan@spaceboyz.net> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opt...
28.912329
111
0.604188
d585a00e1bc6c83c23d161fec50ed4f350bfc421
358
require 'fileutils' include FileUtils require 'rubygems' %w[rake hoe newgem rubigen madeleine chronic].each do |req_gem| begin require req_gem rescue LoadError puts "This Rakefile requires the '#{req_gem}' RubyGem." puts "Installation: gem install #{req_gem} -y" exit end end $:.unshift(File.join...
22.375
63
0.709497
01230512c11e33a781565a76ee2d7849655dc143
1,286
class Links < Formula desc "Lynx-like WWW browser that supports tables, menus, etc." homepage "http://links.twibright.com/" url "http://links.twibright.com/download/links-2.18.tar.bz2" sha256 "678cc1ab347cc90732b1925a11db7fbe12ce883fcca631f91696453a83819057" bottle do root_url "https://linuxbrew.bintray....
30.619048
94
0.722395
03db0faefffd25fb76fe2c82f9712e7f24f3585a
1,820
module Voltron module Upload module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path("../../../templates", __FILE__) desc "Add Voltron Upload initializer" def inject_initializer voltron_initialzer_path = Rails.root.join("config", ...
31.929825
154
0.669231
1d9193dcabb69719a5b63651fc02c0955ac1dc8e
38,757
# typed: false # frozen_string_literal: true require "formula" require "keg" require "tab" require "utils/bottles" require "caveats" require "cleaner" require "formula_cellar_checks" require "install_renamed" require "sandbox" require "development_tools" require "cache_store" require "linkage_checker" require "install...
30.589582
115
0.673685
ab51412e6ba44fddcd2f2605477e3d80480d39b9
397
#!/usr/bin/env ruby # This script simulates a flaky test by randomly # "failing" approximately 1/8th of the time. puts puts 'Running test!' def test_ok puts 'Test OK!' exit 0 end def test_fail puts 'The test failed! All is lost!' exit 1 end test_ok if ENV['ALWAYS_PASS'] == 'true' test_fail if ENV['AL...
14.703704
48
0.68262
bf647ddd2f0cd57abdb576e801056dc66eef75c6
2,725
# 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::Signalr::Mgmt::V2018_03_01_preview module Models # # Object that describes a specific usage of SignalR resources. # class Si...
28.385417
77
0.502385
03ce489028b0b955a1e047d411036ae7e76bb772
1,298
# # a language data file for Ruby/CLDR # # Generated by: CLDR::Generator # # CLDR version: 1.3 # # Original file name: common/main/vi_VN.xml # Original file revision: 1.23 $ # # Copyright (C) 2006 Masao Mutoh # # This file is distributed under the same license as the Ruby/CLDR. # private def init_data @format ...
24.490566
67
0.622496
ab361e20526d65dda19dde5c23cb0e8d90873fbd
6,947
module ModuleSpecs CONST = :plain_constant class Subclass < Module end class SubclassSpec end class RemoveClassVariable end module LookupModInMod INCS = :ethereal end module LookupMod include LookupModInMod MODS = :rockers end class Lookup include LookupMod LOOKIE = :l...
16.86165
83
0.685188
f79ae55ba15b8f884b2753be7835863ace44dda2
585
module Admin class DegreesController < Admin::ApplicationController # To customize the behavior of this controller, # you can overwrite any of the RESTful actions. For example: # # def index # super # @resources = Degree. # page(params[:page]). # per(10) # end # De...
26.590909
85
0.663248
1cd107b501b12ac242dbbe6d3262c60265247cbe
263
module Fitbark module Data # Defines structure for dog medical condition. # # Original attribute names from source API: # - *id* # - *name* class MedicalCondition < StrictOpenStruct include Fitbark::Data::Shared end end end
20.230769
50
0.653992
39081a19f35c32ebabe51936005fcba0b5ccee93
749
# frozen_string_literal: true module Api class RatesController < ::ApplicationController def historical dates = (params.require(:start_date).to_date..params.require(:end_date).to_date).to_a return unless stale? CityHash.hash32([dates.first, dates.last]), template: false rates = FetchHistorical...
32.565217
91
0.720961
21af81093f8bb2884fb188160cd5c343c29fa65d
1,957
# coding: utf-8 lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "metanorma/iso/version" Gem::Specification.new do |spec| spec.name = "metanorma-iso" spec.version = Metanorma::ISO::VERSION spec.authors = ["Ribose Inc."] spec.email ...
36.924528
69
0.677568
03152f11c88fafd806ee8d7acac9d9847a005d55
206
class User < ApplicationRecord has_secure_password validates :username, :email, presence: true validates :username, :email, uniqueness: true has_many :lost_pets has_many :found_pets end
25.75
49
0.742718
011ed1f0d2a9daea4d4798fb570570180229bf89
35,009
require 'test_helper' class PersonTest < ActiveSupport::TestCase fixtures :users, :people # Replace this with your real tests. def test_work_groups p=Factory(:person_in_multiple_projects) assert_equal 3,p.work_groups.size end test "registered user's profile can be edited by" do admin = Factor...
31.9134
177
0.712731
6231da4f833e0e5708f8debb3ee9734786c5371d
3,591
# frozen_string_literal: true module Blacklight class Install < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :model_name , type: :string , default: "user" argument :controller_name, type: :string , default: "catalog" argument :document_...
29.677686
122
0.674742
1a20968614b7a479ede2cd70df9ebc1b9703a9c0
499
module Cms class PanelTag < Liquid::Block def initialize(tag_name, markup, tokens) super @header = markup end def render(context) if @header "<div class=\"panel panel-default\"><div class=\"panel-heading\">#{@header}</div><div class=\"panel-body\">#{super}</div></div>" e...
26.263158
136
0.607214
610de4ccafebe818c8c34b1222113ad5923e1688
715
# frozen_string_literal: true module Html2Text module Parsers class Html # Parses an an image node, returning the supplied output # including the text class ImageNode < NodeParser def call image_text end # Parses the supplied node as arguments, and returns ...
23.833333
62
0.54965
33d63b3bac976354319216c69f76f69a739829ee
172
class CreateConnections < ActiveRecord::Migration def change create_table :connections do |t| t.string :facebook_page_url t.timestamps end end end
17.2
49
0.709302
621d0edcc4cba9d36487200bd5377129039877f0
1,056
class SdlRtf < Formula desc "Sample library to display Rich Text Format (RTF) documents" homepage "https://www.libsdl.org/projects/SDL_rtf/" url "https://www.libsdl.org/projects/SDL_rtf/release/SDL_rtf-0.1.0.tar.gz" sha256 "3dc0274b666e28010908ced24844ca7d279e07b66f673c990d530d4ea94b757e" head "https://hg.lib...
42.24
93
0.789773
219dd6ff593ae1051f8c82a40306f49b7dbe6ea4
349
module LapisConstants class ErrorCodes UNAUTHORIZED = 1 MISSING_PARAMETERS = 2 ID_NOT_FOUND = 3 INVALID_VALUE = 4 UNKNOWN = 5 AUTH = 6 WARNING = 7 MISSING_OBJECT = 8 DUPLICATED = 9 ALL = %w(UNAUTHORIZED MISSING_PARAMETERS ID_NOT_FOUND INVALID_VALUE UNKNOWN AUTH WARNING MISSING_...
23.266667
119
0.710602
f7cd2c189cbcf4a3f89797ee5f7ce3a4a84f562f
1,373
# frozen_string_literal: true # Copyright 2015 Australian National Botanic Gardens # # This file is part of the NSL Editor. # # 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 # # ht...
36.131579
76
0.747269
d59067219c5324295f792f034a18c307bd8c3801
1,639
module Services class Payment < Base def initialize(order_id, url) @order_id = order_id @return_url = url end def fetch! connection = Faraday.new @payment_params = set_payment_params checksum = generate_checksum response = connection.post do |req| req.url URI.e...
28.258621
115
0.625991
8774cf904f0ad7d94719a62372eaecb0d5a0544e
13,837
# frozen_string_literal: true module Types class ProjectType < BaseObject graphql_name 'Project' authorize :read_project expose_permissions Types::PermissionTypes::Project field :id, GraphQL::ID_TYPE, null: false, description: 'ID of the project' field :full_path, GraphQL::ID_TYPE, ...
41.930303
201
0.674135
33ea670d192f3a4523bb414f7318b0ccb1d04635
273
cask 'container-rar' do version '1.2.3' sha256 '419af7864c0e1f125515c49b08bd22e0f7de39f5285897c440fe03c714871763' url "file://#{TEST_FIXTURE_DIR}/cask/container.rar" homepage 'https://example.com/container-rar' depends_on formula: 'unar' app 'container' end
22.75
75
0.761905
287e05d2760304e5ead552a87866651c613bfa83
448
require 'rails_helper' # Specs in this file have access to a helper object that includes # the Students::CompletedLessonPartsHelper. For example: # # describe Students::CompletedLessonPartsHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("this...
29.866667
71
0.741071
d5ea491496bfd20692b1af1360bc11769d718b5a
4,387
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') module Beetle class RedisAssumptionsTest < Minitest::Test def setup @r = DeduplicationStore.new.redis @r.flushdb end test "trying to delete a non existent key doesn't throw an error" do assert !@r.exists?("hahahaha")...
34.273438
127
0.682243
bb27aa32075c75a465b0b71f9abe974468ab7f42
1,220
class ThemesController < ApplicationController before_action :set_theme, only: [:show, :edit, :update, :destroy] # GET /themes def index @themes = Theme.all end # GET /themes/1 def show end # GET /themes/new def new @theme = Theme.new end # GET /themes/1/edit def edit end # POST...
19.0625
73
0.659836
f7d2a683059851ae115efae02341db6a7bdf863f
2,320
# frozen_string_literal: true require_relative "helper" require "rack" class TestRackServer < Minitest::Test parallelize_me! class ErrorChecker def initialize(app) @app = app @exception = nil end attr_reader :exception, :env def call(env) begin @app.call(env) res...
18.412698
91
0.602586
03e9b047691f3c4b48813a135c4c4e23f69739d1
485
# 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::V2019_12_01 module Models # # Defines values for AuthorizationMethod # module AuthorizationMethod HEAD = "HEAD" ...
22.045455
70
0.63299
0847d8ece9fecba5a14e0242fb28bf57845505e8
186
Delayed::Web::Engine.routes.draw do root to: 'jobs#index' resources :jobs, only: [:destroy, :index, :show] do put :queue, on: :member post :batch, on: :collection end end
20.666667
53
0.650538
ed5c72adead0b658e90e4da4e341630ef7d17553
925
Pod::Spec.new do |spec| spec.name = 'YFTestKit' spec.version = '1.0' spec.summary = 'Guide:' spec.description = <<-DESC Guide for private pods DESC spec.homepage = 'https://github.com/yfGit/' spec.license = { :type =>...
34.259259
113
0.603243
1a568ef69393d0e0a11a9cde1385324055c8ff4c
1,676
# encoding: utf-8 # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require '../azure_mgmt_bot_service/lib/module_...
40.878049
94
0.681981
084cef0b0b1a8ec94e1b57e54f4cc37b6f21d6b8
496
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
62
171
0.832661
7a1bb7efdc95ee300b60b07db1ddd9a59a93615f
2,574
# frozen_string_literal: true require "rails/generators/active_record" module ActiveRecord module Generators # :nodoc: class ModelGenerator < Base # :nodoc: argument :attributes, type: :array, default: [], banner: "field[:type][:index] field[:type][:index]" check_class_collision class_option...
35.75
135
0.662005
b91919a5fc4edd0615580ad579e5032b640228d6
203
# frozen_string_literal: true module Works # Draws a popup for selecting work type and subtype class WorkTypeModalComponent < ApplicationComponent def types WorkType.all end end end
18.454545
53
0.748768
1a8586f96eb478bea516342bb37b1850c47cc78e
4,878
module Slack module Presenters module Formatting def render_id(id) = "<@#{id}>" def render_quote(text) = text.each_line.map { |line| "> #{line.strip}" }.join("\n") def one_or_many(quantity, one_val) # TODO: Maybe a slightly better error? raise ArgumentError, "Error: `one_or_ma...
29.385542
189
0.575236
91855708f0049f50019c7cdff2dedf3b6b5334c2
3,576
# frozen_string_literal: true module Parslet module Atoms class Infix < Parslet::Atoms::Base attr_reader :element, :operations, :reducer def initialize(element, operations, &reducer) super() @element = element @operations = operations @reducer = reducer || ->(left, o...
28.608
98
0.555089
0131f7297ff902df1688edfbfe1269af5b6569c5
1,335
require "speed_read/version" require "colorize" module SpeedRead ORP_VISUAL_POS = 20; class << self trap("INT") { puts "\nGoodbye!"; exit;} def start(words_per_minute) puts " " * ORP_VISUAL_POS + "v".colorize(:red) ARGF.each do |line| words = tokenize(line) words.each do |w...
27.244898
99
0.570787
61e6aea72074e51b65cbededf589f6059e84566b
241
# -*- coding: utf-8 -*- require "sixarm_ruby_markdown_test" describe SixArm::Markdown::String do describe "#new" do it "ok" do expect(SixArm::Markdown::String.new).must_be_kind_of(SixArm::Markdown::String) end end end
16.066667
84
0.680498
e224a6dbb418980eb0a3851488ca2e037ae270d2
1,311
# encoding: utf-8 require 'spec_helper' require 'eval_helper' describe 'EvalHelper' do context :if_code_after do class EvalHelperAfterTest include EvalHelper def hoge(hash) msg = hash[:input] code = if_code_after(hash[:if_cond], hash[:if_proc]) ret = 'dafault' instanc...
20.169231
66
0.505721
39aeca196a6693f869edbc0f9fab4ec419a8ad50
977
require 'test_helper' class UsersSignupTest < ActionDispatch::IntegrationTest test "invalid signup information" do get signup_path assert_no_difference 'User.count' do post users_path, params: { user: { name: "", email: "user@invalid", ...
32.566667
78
0.501535
79a1cbb2bc2c3223252da47d65e72d0b8ef09c19
1,948
# frozen_string_literal: true namespace :jobs do desc 'Import USAJobs XML file' task :import_usajobs_xml, [:filename] => :environment do |_t, args| if args.filename.nil? puts 'usage: rake jobs:import_usajobs_xml[filename.xml]' else importer = UsajobsData.new(args.filename) importer.import...
34.175439
100
0.685832
ed0a8a43d0e0fe4c879819e9f75d6d34f1eac3b4
7,820
if defined?(Wice::Defaults) # Default number of rows to show per page. Wice::Defaults::PER_PAGE = 20 # Default order direction Wice::Defaults::ORDER_DIRECTION = 'asc' # Default name for a grid. A grid name is the basis for a lot of # names including parameter names, DOM IDs, etc # The shorter the name...
44.942529
142
0.685806
ff18da69e897f82cc88c1abffe4dcc200acdb814
986
# -*- encoding: utf-8 -*- $:.push File.expand_path('../lib', __FILE__) require 'whois/parser/version' Gem::Specification.new do |s| s.name = 'whois-parser' s.version = Whois::Parser::VERSION s.authors = ['Simone Carletti'] s.email = ['weppos@weppos.net'] s.homepage = 'https://whoisrb....
35.214286
138
0.64503
1d719b68858e2efb08e7ed6d816023a1fe53f92d
480
class CompanyMailer < ApplicationMailer def company_registered(company) @company = company mail(to: "info@upstagecommunity.com", subject: "Company Registration Request") end def company_approved(company) @company = company mail(to: @company.email, subject: "#{@company.name} is live on UpStage Communi...
24
62
0.725
9152e04fe4cdfe6f6ec4d13f06fc66b1fbbc74a0
1,129
require 'spec_helper_acceptance' broken = false if fact('osfamily') == 'windows' puts "Not implemented on Windows" broken = true elsif fact('osfamily') == 'RedHat' docker_args = "repo_opt => '--enablerepo=localmirror-extras'" end describe 'docker network', :win_broken => broken do command = 'docker' befo...
23.520833
81
0.632418
edb82f8343d8142b56212df2cc8e1bc324ffeeaa
1,691
require File.expand_path('../../../spec_helper', __FILE__) ruby_version_is "1.8.7" do require 'securerandom' describe "SecureRandom.hex" do it "generates a random hex string of length twice the specified argement" do (1..64).each do |idx| hex = SecureRandom.hex(idx) hex.should be_kind_of...
29.666667
93
0.655825
f84e6e26a8c8d52240ead8fd69d47293db15b6f2
5,780
require 'spec_helper' module Bosh::Director describe Jobs::Helpers::StemcellDeleter do let(:blobstore) { instance_double(Bosh::Blobstore::BaseClient) } let(:cloud) { instance_double(Bosh::Clouds::ExternalCpi) } let(:cloud_factory) { instance_double(BD::CloudFactory) } let(:stemcell_deleter) { Jobs::H...
40.41958
130
0.669377
1defdef5ce5e73abb890505355e3dd2e136e3f37
45
fput "go glowing exit" move "go glowing exit"
22.5
22
0.755556
01324a7ae9a0e5a89e7894aaf8aa5df03975ed2a
195
require 'test_helper' class SomethingWrongControllerTest < ActionDispatch::IntegrationTest test "should get index" do get something_wrong_index_url assert_response :success end end
19.5
68
0.8
5dcedaa6d9567e7acda24e878c8f06a0b0301cc9
196
class MadlibsController < ApplicationController # INDEX -- index route for all completed mad libs (stories) get '/madlibs' do @madlibs = Madlib.all erb :'madlibs/madlibs' end end
21.777778
61
0.704082
03177d9954276aedcaf27fb75b3a043f177ee7c8
171
desc "Restart app by touching tmp/restart.txt" task :restart do verbose(false) do mkdir_p "tmp" touch "tmp/restart.txt" rm_f "tmp/pids/server.pid" end end
19
46
0.690058
2841f47b7ccb85dae666acf2bf4a2270b38a4523
2,585
# frozen_string_literal: true module RuboCop module Cop module Lint # This cop checks for nested method definitions. # # @example # # # bad # # # `bar` definition actually produces methods in the same scope # # as the outer `foo` method. Furthermore, the `bar...
24.386792
76
0.494778
1d6acc72bfa709de2acf5c0326ff7e2d42d15e9b
1,769
=begin Swagger Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git License: Apache 2.0 http://www.apache.org...
28.079365
130
0.726399
8753e083e8791014b32a6e92acba33419830cca2
71
class Author include MongoMapper::Document key :handle, String end
14.2
31
0.774648
1c48e48d7a85288f5b1a9b19b57b62d38db139a3
1,068
require File.expand_path('../../spec_helper', __FILE__) describe RightApi::Client, :unit=>true do context 'when the RightScale API misbehaves by sending empty bodies with 200 response' do before(:each) do given_user_facing_client @result = Net::HTTPOK.new('1.1', '200', 'OK') @result.set_content...
44.5
113
0.683521
2184a550a5466e86350999f1159e35550ccf1974
15,066
Sketchup::require "geores_src/geores_import/geores_rexml/validation/validation.rb" Sketchup::require "geores_src/geores_import/geores_rexml/parsers/baseparser.rb" module REXML module Validation # Implemented: # * empty # * element # * attribute # * text # * optional # * choice # * one...
26.903571
139
0.484601
bf9d675c3cb8bc125b093bff002cce915464943b
4,337
require "spec_helper" require "sauce/connect" Sauce.config do |c| c[:start_tunnel] = false end describe "Sauce::Utilities::Connect" do before :each do @mock_tunnel = double() end after :each do Sauce::Utilities::Connect.instance_variable_set(:@tunnel, nil) end describe "##start" do it "shou...
31.656934
83
0.677427
39ef9d23b5014db32369057c1442f43bc0348972
162
# frozen_string_literal: true folders = %w[config infrastructure domain application workers] folders.each do |folder| require_relative "#{folder}/init.rb" end
23.142857
62
0.783951
f7892bae49cfb43d6a1f7641802fab1a7bff3cc9
3,113
module Kzen module DbHelpers def self.included(base) #:nodoc: super(base) base.extend ClassMethods end module ClassMethods end private #### DB SQLITE HELPERS def db_sqlite? confs.fetch('db.type') === 'sqlite' end alias_method :sqlite?, :db_sqlit...
28.559633
127
0.578542
08a0ca98ec87a3776f1e2746805c01c8bd115b8c
984
# -*- encoding : utf-8 -*- require 'active_support/core_ext/module/aliasing' module ActiveResource class Connection attr_reader :response def handle_response_with_response_capture(response) @response = handle_response_without_response_capture(response) end def request_with_detailed_log_subsc...
29.818182
94
0.74187
abcd2cac3511e9fed6bf694633269c2b14b51582
1,255
class GstLibav < Formula desc "GStreamer plugins for Libav (a fork of FFmpeg)" homepage "https://gstreamer.freedesktop.org/" url "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.8.2.tar.xz" sha256 "b5f3c7a27b39b5f5c2f0bfd546b0c655020faf6b38d27b64b346c43e5ebf687a" bottle do sha256 "bee838b91f4...
29.880952
92
0.717928
f7aa6fd63c832e4c342d33ce93405b72d06b64eb
769
# frozen_string_literal: true require 'archival' RSpec.describe Archival::Config do context 'init' do it 'inits with defaults when not provided a config' do config = Archival::Config.new expect(config).to be_a(Archival::Config) expect(config.pages_dir).to be_a(String) expect(config.objec...
29.576923
58
0.685306
d50d0b5a6580a5516cf20f1febcd31461cadba31
8,782
module TrackerApi class Client USER_AGENT = "Ruby/#{RUBY_VERSION} (#{RUBY_PLATFORM}; #{RUBY_ENGINE}) TrackerApi/#{TrackerApi::VERSION} Faraday/#{Faraday::VERSION}".freeze # Header keys that can be passed in options hash to {#get},{#paginate} CONVENIENCE_HEADERS = Set.new([:accept, :content_type]...
34.439216
152
0.629583
1d1472b17e94f550fd9a9afc1732096bb37c9885
2,825
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level 2 -*- # Copyright (c) 2015 Urabe, Shyouhei # # 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...
36.217949
79
0.697345
03ee0c604e6d987c4361f5e834d0e7c489c388b4
1,914
# frozen_string_literal: true require_relative '../lib/eiscp/dictionary' require 'minitest/autorun' class TestDictionary < MiniTest::Test def test_zone_from_command assert_equal(EISCP::Dictionary.zone_from_command('PWR'), 'main') assert_equal(EISCP::Dictionary.zone_from_command('ZPW'), 'zone2') assert_e...
41.608696
113
0.768025
87cc89ac406c2919b8ab4e7ef909c281d3dc7d8f
451
# frozen_string_literal: true # This is a Rack middleware that we use in testing. It injects headers # that simulate mod_shib so we can test. # This is certainly not thread safe as it uses class level variables class TestShibbolethHeaders class_attribute :user, :groups def initialize(app) @app = app end ...
23.736842
70
0.718404
1d7b9ce84dbaf80c51e8cfe68a50b5040b1dee9b
1,560
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: MIT # DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN. # appliance - The vCenter Server Appliance is a preconfigured Linux-based virtual machine optimized for running vCenter Server and associated services. re...
30
151
0.740385
035fd1a968b1b17f9e5d760facd305f5a734fdb9
182
class AddClassToUsers < ActiveRecord::Migration def change change_table :users do |t| t.boolean :guide, default: false t.boolean :admin, default: false end end end
20.222222
47
0.708791
e8255c65373fc15d98326ebd02026d29aaadd8ad
248
require 'rom/sql/extensions/postgres/commands' require 'rom/sql/extensions/postgres/types' require 'rom/sql/extensions/postgres/type_builder' require 'rom/sql/extensions/postgres/type_serializer' require 'rom/plugins/relation/sql/postgres/explain'
41.333333
53
0.834677
ac0c8d3f071aef941780bc8d8cfe85b47085d56f
157
# frozen_string_literal: true class LabelComponent < ViewComponent::Base def initialize(form:) @form = form end private attr_reader :form end
13.083333
42
0.726115
d5ff44d6d0fe22ef22e1b2fd743c54482cc37692
1,876
benefit_sponsorships = BenefitSponsors::BenefitSponsorships::BenefitSponsorship.where( :"source_kind" => :mid_plan_year_conversion, :"benefit_applications.aasm_state" => :imported ) benefit_sponsorships.each do |sponsorship| myc_application = sponsorship.benefit_applications.where(aasm_state: :active).first im...
48.102564
173
0.765458
e2e0588266ffcdfc1c883d43e60f2f45ef953b33
978
# # Be sure to run `pod spec lint WSTwo_Category.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://git...
25.736842
104
0.637014
2112c63cb8764c84c253c974998db1566c6dde64
348
require "rubocop/extension/generator/version" require "rubocop/extension/generator/cli" require "rubocop/extension/generator/generator" require 'active_support' require 'active_support/core_ext/string/inflections' require 'optparse' require 'pathname' require 'fileutils' module RuboCop module Extension module ...
19.333333
52
0.804598
7937157cd65ca089530a944907774adb6e32a497
2,979
# 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. # # This file is the source Rails uses to define your schema when running `rails #...
39.197368
96
0.713998
1d54c66425ca0e9faa87da860a77fc55837fc2be
7,238
# coding: utf-8 require 'rails_helper' RSpec.describe Reward, type: :model do let(:reward){ create(:reward, description: 'envie um email para foo@bar.com') } describe "Log modifications" do describe "when change something" do before do reward.update_attributes(description: 'foo') end ...
33.665116
109
0.690799
ac3ac0e9f1a6eb49d7e50e3b5e1e14a5613bc42b
133
class ChangeTeacherIndexToString < ActiveRecord::Migration[5.1] def change change_column :users, :teacher_id, :string end end
22.166667
63
0.774436
bfb30f4a99cdbf3031510f3d182fe15bd27ca9d0
6,060
require_relative '../../test_helper' require 'cqm/models' module QRDA module Cat1 class PatientRoundTripTest < MiniTest::Test include QRDA::Cat1 def setup @importer = Cat1::PatientImporter.instance bd = 75.years.ago @patient = QDM::Patient.new(birthDatetime: bd, givenNames: %...
48.870968
196
0.670462
b99d2e4e347cdd4035b3c6265e0b644aef655eb6
1,393
require 'rubygems' require 'bundler' Bundler.setup require "minitest/autorun" require 'kyotocabinet_ffi' require 'tempfile' class FileHashTest < Minitest::Test def test_paths file = Tempfile.new(['db', '.kch']) begin db = KyotoCabinet::Db::FileHash.new file.path, :writer, :create assert db.file...
24.875
90
0.642498
7a093faadd7e971423f4d1486baddbee93a362c8
1,257
#!/usr/bin/env ruby require 'json' require 'yaml' require 'plist' require 'fog-aws' # # Interfacing with the builds bucket on S3 # def fog @fog ||= Fog::Storage.new({ provider: 'AWS', aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'] }) ...
16.539474
81
0.680191
018aa1db2be0a066c31425af1b765ff514f303e1
969
# frozen_string_literal: true FactoryBot.define do factory :access_grant, class: "Doorkeeper::AccessGrant" do sequence(:resource_owner_id) { |n| n } application redirect_uri { "https://app.com/callback" } expires_in { 100 } scopes { "public write" } end factory :access_token, class: "Doorkee...
29.363636
77
0.705882
0194ef1aabc07fef16f404d4144cbf5167d1643e
247
require File.dirname(__FILE__) + '/../../spec_helper' require File.dirname(__FILE__) + '/fixtures/classes' require File.dirname(__FILE__) + '/shared/find_all' describe "Enumerable#select" do it_behaves_like(:enumerable_find_all , :select) end
30.875
53
0.757085
282fdddc24964ead4a2de7188a3bc19cd9613686
4,605
#-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2021 the OpenProject GmbH # # 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 ...
30.496689
115
0.681216
d5fe549845c6ae0b5849c24095e8606b7d5f1fbb
17,317
# frozen_string_literal: true module Jekyll class Document include Comparable extend Forwardable attr_reader :path, :site, :extname, :collection, :type attr_accessor :content, :output def_delegator :self, :read_post_data, :post_read YAML_FRONT_MATTER_REGEXP = %r!\A(---\s*\n.*?\...
31.774312
98
0.618525
4ad087bb53c4ce0b3aad8b37dd989c77ed466571
1,473
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'icharger/log/version' Gem::Specification.new do |spec| spec.name = 'icharger-log' spec.version = ICharger::Log::VERSION spec.authors = ['Nick Veys'] spec.email ...
42.085714
74
0.718262
1822475d5d1477a8d6755aa84934dc88465746ea
442
# frozen_string_literal: true # :nocov: class MyUniqueJobWithFilterMethod include Sidekiq::Worker sidekiq_options backtrace: true, lock: :until_executed, queue: :customqueue, retry: true, unique_args: :filtered_args def perform(*) # NO...
20.090909
45
0.61086
ede02d820c94f995280307c6193a467883df012e
233
RSpec.describe TestGem do it "has a version number" do expect(TestGem::VERSION).not_to be nil end describe '#greet' do it 'returns "Hello World!"' do expect(TestGem.greet).to eq('Hello World!') end end end
19.416667
49
0.660944
613ab3bad2a5dad0088399e4e0a189e37752bc4c
417
# 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::Compute::Mgmt::V2020_09_30 module Models # # Defines values for NetworkAccessPolicy # module NetworkAccessPolicy Allow...
23.166667
70
0.702638
ff871b477a1694a4c074a455d36acc3413034713
16,492
require 'rubygems' require 'pathname' module HgtClusPar def init puts "in HgtParClus init" #active record object initialization super end def initialize() puts "in HgtParClus initialize" #initialize included modules end def scan_hgt_par_fens() puts "in scan_hgt_par_fens(...
24.28866
186
0.588952
6a25f59497058c90bec934f5c71c2698e1db8fc6
352
Spree::Core::Engine.routes.draw do namespace :blog do get '/', to: 'contents#index', as: 'index' get '/:slug', to: 'contents#show', as: 'content' end namespace :api do resources :posts resources :tags end namespace :admin do resources :authors resources :categories resources :post...
18.526316
52
0.647727
62449d27c3fec4823a24ce1d2548de9f3e0784c2
267
require 'spec_helper' describe RubyAck::Invoker do it "should invoke ack with --column as a default for the given parameter" do IO.should_receive(:popen).with("ack jackpot --column") invoker = RubyAck::Invoker.new invoker.invoke("jackpot") end end
22.25
78
0.719101
7a4d32973f861a08a6c8a0e6cf1aecc2d36e66cc
1,428
# mundi_api # # This file was automatically generated by APIMATIC v2.0 ( # https://apimatic.io ). module MundiApi # Response model for listing subscription items class ListSubscriptionItemsResponse < BaseModel # The subscription items # @return [List of GetSubscriptionItemResponse] attr_acces...
27.461538
82
0.59944
acd68e165c072bc87fcd16248b5fe3dbb631ace0
1,008
class Popt < Formula desc "Library like getopt(3) with a number of enhancements" homepage "http://rpm5.org" url "http://rpm5.org/files/popt/popt-1.16.tar.gz" sha256 "e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8" bottle do rebuild 1 sha256 "ceae94fc8e588309670a7a045186eee8ff3a9966a...
43.826087
95
0.774802