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
39af844f97f21fb772d5101833359ebabbe61486
113
module RatingsHelper def all_rating_type Rating.where(status: true).collect {|r| [r.value, r.id]} end end
18.833333
59
0.716814
bb6bc8b530560baac0cce4febdf827c69ec3c785
157
module TreeNode class Service < Node set_attribute(:image) { @object.picture ? "/pictures/#{@object.picture.basename}" : '100/service.png' } end end
26.166667
107
0.694268
267ee9d0f07c13bc6d438aa33a529bedbedb1dde
135
Analytics = Segment::Analytics.new({ write_key: ENV['segment_write_key'], on_error: Proc.new { |status, msg| print msg } })
27
51
0.659259
1ab7ba45bac1c61b7e20b88cf573017c5141cf96
13,760
# frozen_string_literal: true # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render inv...
48.967972
154
0.751744
26c6b1038df9d3146912bb0c0c0440b00d09f1a5
1,616
# frozen_string_literal: true require 'telegram/core_ext' module Telegram module API module Bot module Types # See the {https://core.telegram.org/bots/api#callbackquery official documentation}. # # @!attribute [rw] id # @return [String] # @!attribute [rw] from ...
26.933333
92
0.502475
bb9d2ea082851bbee721d870095e00bcd5b66c83
434
require 'puppet/module_tool' require 'puppet/util' module Puppet::ModuleTool::Tar require 'puppet/module_tool/tar/gnu' require 'puppet/module_tool/tar/mini' def self.instance if Puppet.features.minitar? && Puppet.features.zlib? Mini.new elsif Puppet::Util.which('tar') && ! Puppet::Util::Platform.w...
24.111111
72
0.705069
9162a18f11b919f8c3ac678e9bd0027a89450f97
1,016
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__) class Php56Pspell < AbstractPhp56Extension init homepage "http://php.net/manual/en/book.pspell.php" url PHP_SRC_TARBALL sha256 PHP_CHECKSUM[:sha256] version PHP_VERSION bottle do revision 2 sha256 "8184fcaaa58fef7646e98655...
29.882353
92
0.69685
33a9c845b55143a98e8ab2ec70e1057e907d5641
491
FactoryBot.define do factory 'Post' do _id { BSON::ObjectId.new } created_at { Faker::Time.between_dates(from: Date.today.ago(1.year), to: Date.today, period: :all) } updated_at { Faker::Time.between_dates(from: Date.today.ago(1.year), to: Date.today, period: :all) } name { Faker::String.random(length...
37.769231
104
0.651731
26b7102a700517256c1ac1e17fef947db78def28
14,877
#-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2018 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject, which is a fork of ...
32.768722
113
0.640384
abf4fed236a3b25b41d33353d48db2b7221cc78c
913
# This is a test for a bug that was happening when the JUnit Reporter was # creating filenames from `describe`s that contained slashes, which would crash # since it was trying to create directories then. require 'bundler/setup' require 'minitest/autorun' require 'minitest/reporters' Minitest::Reporters.use! Minitest:...
21.738095
79
0.668127
28db61e67d530b13db1f667755b3f41859a67ea4
2,402
namespace :comatose do # # Data Migration Tasks # namespace :data do def page_to_hash(page) data = page.attributes.clone # Pull out the specific, or unnecessary fields %w(id parent_id updated_at author position version created_at full_path).each {|key| data.delete(key)} if !page...
30.025
108
0.598251
abb77083331fee0fdec53301ebbc744a5ab2e663
8,088
# Copyright (c) 2016, 2021, 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...
43.251337
274
0.700915
61dc877333583d79dcfed2640724d3a30abf7198
2,837
class Cronbox class CliWrapper def initialize(app) @app = app end def report(type=nil, include_only=nil) if include_only include_ids = include_only.map(&:to_i) include_labels = include_only.map(&:to_s) end any_output = false report = @app.report(type.eql? '...
25.106195
88
0.478322
18869c0a21fe9429a1e1969146b0591b6b80c0a6
2,638
class Stunnel < Formula desc "SSL tunneling program" homepage "https://www.stunnel.org/" url "https://www.stunnel.org/downloads/stunnel-5.53.tar.gz" sha256 "80439896ee14269eb70bc8bc669433c7d619018a62c9f9c5c760a24515302585" bottle do root_url "https://linuxbrew.bintray.com/bottles" cellar :any sha...
35.173333
107
0.634193
6161bd6c5e44a4b399b566530e4885baabf197cb
1,768
require "test_helper" class FollowingTest < ActionDispatch::IntegrationTest def setup @user = users(:raymond) @other = users(:yasmin) log_in_as(@user) end test "following page" do get following_user_path(@user) assert_not @user.following.empty? assert_match...
30.482759
82
0.636878
624e6aeeec63e390a26015297718d87be91c03b6
438
cask 'acorn' do version '5.6.5' sha256 '6209061f5c0b443bca6061644a92553d71e15c2e8be59ba6ad4dbafb5000c747' url 'https://secure.flyingmeat.com/download/Acorn.zip' appcast "http://www.flyingmeat.com/download/acorn#{version.major}update.xml", checkpoint: 'c867ac62b7ddd8e1903123feabe869a3960ac1d696caed0ee...
29.2
88
0.771689
7ab0645fb0e8ae2c76aca9778b45d3eaf956c5c8
169
class CreateFormats < ActiveRecord::Migration def change create_table :formats do |t| t.string :name t.timestamps null: false end end end
16.9
45
0.650888
288e9c8c6a83632ce69fc6492368de247afd13aa
979
require File.expand_path('../boot', __FILE__) require 'rails/all' # Assets should be precompiled for production (so we don't need the gems loaded then) Bundler.require(*Rails.groups(assets: %w(development test))) module Dummy4 class Application < Rails::Application # Settings in config/environments/* take prec...
42.565217
99
0.724208
ed1f707e13e106f62f84ac3ed5290a0bddf811de
1,582
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
42.756757
141
0.762958
f77747aa57183edd2e17e9c1247cea66483287d3
1,077
# frozen_string_literal: true require 'spec_helper' describe 'cis_hardening::logaudit::journald' 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::logaudit::journald') } #...
29.108108
83
0.600743
1db2d4b4b273a1d3130223326b1bab5bbf3e571f
5,166
require 'google/api_client' require 'google/api_client/client_secrets' require 'google/api_client/auth/installed_app' require 'securerandom' require 'cgi' require 'rexml/document' require 'uri' require 'net/http' require 'net/https' require 'json' class Googl API_VERSION = 'v1' CACHED_API_FILE = "urlshortener-#{AP...
33.545455
125
0.573751
ab83aa15fae398c159ca9caec9fde302744afbff
372
cask 'logitech-myharmony' do version '1.0' sha256 'de3c4d3a6d71dcccf45acf92fca496558bab95f70461c8466ba4ade3f5986740' url "https://app.myharmony.com/prod/mac/#{version}/MyHarmony-App.dmg" name 'MyHarmony' homepage 'https://setup.myharmony.com/' pkg 'MyHarmonySetup.pkg' uninstall quit: 'org.logitech.M...
26.571429
75
0.731183
21d402519ef2e96a810f0d2ef09fbaefbcb8ee4a
817
# -*- encoding: utf-8 -*- lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'ip_reverse/version' Gem::Specification.new do |gem| gem.name = "ip_reverse" gem.version = IpReverse::VERSION gem.authors = ["chad_lwm"] gem.email = ...
37.136364
75
0.637699
b9181e5d8694c1bb5fdb1b4ec63ed015b3e8b660
1,327
class IgnitionLaunch3 < Formula desc "Launch libraries for robotics applications" homepage "https://github.com/ignitionrobotics/ign-launch" url "https://osrf-distributions.s3.amazonaws.com/ign-launch/releases/ignition-launch3-3.1.0.tar.bz2" sha256 "3b5937ba5c59d64c89225c0830a71419b8b2151c4471a29b95eadec912f20c7...
31.595238
102
0.743029
79cc50abb41d8d6486732e48284bb32fd6c146c6
2,639
module Tarona class Action # Command which gives player ability to move his entities # # It mobilizes only entities with tags `:movable` and `:user_controlled`. # `:movable` entities must be {Workable}. # # It moves entities when it is requested through `io` event `:move_request` # with ar...
33.833333
79
0.614627
1cdeec65b3727c239e685573461f2ed4a93d745f
2,272
class Wownero < Formula desc "Official wallet and node software for the Wownero cryptocurrency" homepage "https://wownero.org" url "https://git.wownero.com/wownero/wownero.git", tag: "v0.8.0.2", revision: "7d1693b1601cb4b3d56191953f403c92a1c51f64" license "BSD-3-Clause" bottle do rebuild 1 ...
33.910448
113
0.6875
5d941f950ff0e1d1efe7e39f4cc246ea4506adc3
1,250
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "saml/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "libsaml" s.version = Saml::VERSION s.authors = ["Benoist Claassen"] s.email = ["bclaassen@...
44.642857
344
0.656
f79df6eb0e7859829559b25d2a9afa2a3c3a296d
2,852
#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 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 ChiliProje...
34.780488
113
0.66094
038b50d1c2ae30aa76f8568ac93e7a3a0148631d
160
# frozen_string_literal: true module NXT module Connector # Holds implementations of connectors that are input based. module Input end end end
16
63
0.7375
03f812ce83a0b004a4b84d1f353026f479270df6
2,685
require 'rack/cache' # So we can subclass the storage types require 'rack/cache/storage' require 'rack/cache/metastore' require 'rack/cache/entitystore' module Radiant module Cache mattr_accessor :meta_stores, :entity_stores, :use_x_sendfile, :use_x_accel_redirect self.meta_stores ||= [] self.entity_stor...
31.22093
105
0.652886
3903f71fdd95e5a595968411f93ef52da2cc829b
4,910
require 'vcap/component' require 'vcap/ring_buffer' require 'vcap/rest_api' require 'vcap/request' require 'presenters/error_presenter' require 'sinatra/reloader' require 'securerandom' require 'steno' module Sinatra module VCAP module Helpers def varz ::VCAP::Component.varz[:vcap_sinatra] en...
31.075949
84
0.625051
ffd7b457e48fa4ab6345dfecaa5f6973a2a06195
4,789
# stolen wholesale from capistrano, thanks Jamis! class Git # Performs a clone on the remote machine, then checkout on the branch # you want to deploy. def initialize(opts={}) @configuration = opts end def configuration @configuration end def git res = configuration[:git_ssh_wrapper]...
31.506579
263
0.648361
bb63ecc1f311e15603e7a83173b7567334b7aaea
370
# frozen_string_literal: true module AwsRekognitionClient class ImageValidator class BaseValidator def initialize(image) @image = image @valid = false end def validate raise NotImplemented end def valid? validate end def message ...
14.8
29
0.6
1a92bbfacb3b23fcfa504013096180b21658d76d
1,981
module Tarona # It is container class for different useful objects. It is easier to pass # these objects to methods when they are in the container. What is more, it # also acts as a dependency injection container for some of these tools. # @!attribute [r] settings # @return [Tardvig::HashContainer] hash con...
35.375
80
0.660273
e955e4b7d377fc45c2f9a2863f37c8253d608969
971
require "carrierwave" require "carrierwave/ffmpeg/audio/version" require "carrierwave/ffmpeg/audio/processor" module CarrierWave module Ffmpeg module Audio extend ActiveSupport::Concern module ClassMethods def convert options={} process convert: [ options ] end def...
25.552632
70
0.659114
bf2a23367657599568b8d197877d5ad4983e49ec
2,827
# frozen_string_literal: true require "rails_helper" describe "mailing lists", js: true do let!(:group) { create(:group, name: "Knitting Club", availability: "open", kind: "club") } let(:actor) { create(:admin) } before do use_user_subdomain(actor) login_as(actor, scope: :user) end context "with n...
34.060241
107
0.614079
ff90db6dbb0ba4148371ff5e50dd784dbff624bf
253
# typed: strict # frozen_string_literal: true require "sorbet-runtime" require_relative "struct" module LunchMoney extend T::Sig class Tag < T::Struct prop :id, Integer prop :name, String prop :description, T.nilable(String) end end
16.866667
40
0.715415
d52a240eaa0a289bd2c689607b982a39a69547c8
672
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 AdminBryankroesbeekNl class Application < Rails::Application # Initialize configuration defaults for originally gen...
33.6
82
0.769345
1c1f3ada2c4cd798ab0a07bc218dce8519638660
495
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2018_04_01 module Models # # Defines values for PcError # module PcError InternalError = "InternalErro...
24.75
70
0.70101
e842aefd14cd4e0e4a117110f9061269a8f4c820
2,632
class PollsController < ApplicationController include AutoCompleteFor::BusinessUnit before_action :load_privileges, :auth, except: [:edit, :update, :show] before_action :check_privileges, except: [:edit, :update, :show] before_action :set_poll, only: [:show, :edit, :update, :destroy] before_action :set_quest...
24.146789
112
0.663754
1806b7eebf49279727300a54a7e3b47455cb75f6
1,186
class SurveysController < ApplicationController admin_tab :all before_action :authenticate_user! before_action :check_acting_as, except: :complete before_action :init_current_facility before_action :init_service before_action :init_survey, only: [:activate, :deactivate] load_and_authorize_resource c...
22.807692
110
0.724283
39a7d029496b64adf28db509ac7fa741a98fcdad
5,553
require 'fog/identity/openstack' module Fog module Identity class OpenStack class V3 < Fog::Service requires :openstack_auth_url recognizes :openstack_auth_token, :openstack_management_url, :persistent, :openstack_service_type, :openstack_service_name, :openstack_tenant, ...
34.067485
112
0.627949
873e5480b283bd1024ac46d960f399549dc461c1
1,118
# Encoding: UTF-8 [{content: "for {${1:set i 0}} {${2:\\$i < \\$n}} {${3:incr i}} {\n\t${4}\n}\n", name: "for...", scope: "source.tcl", tabTrigger: "for", uuid: "35FD4583-34CA-446A-958B-D6446220B2BF"}, {content: "foreach ${1:var} ${2:\\$list} {\n\t${3}\n}\n", name: "foreach...", scope: "source.tcl", ...
31.942857
95
0.567979
2679bac3769fac1953c73df8f9b3bfae757af4d0
507
# frozen_string_literal: true class Tramway::Core::ExtendedApplicationForm < Tramway::Core::ApplicationForm class << self def properties(*args) @@extendable_properties ||= [] @@extendable_properties += args super(*args) end end def initialize(model) @@extendable_properties.each do ...
21.125
77
0.658777
089cf46f1fdcd75a4ad792a5afed62c94a129799
1,322
class Xhyve < Formula desc "Lightweight macOS virtualization solution based on FreeBSD's bhyve" homepage "https://github.com/machyve/xhyve" url "https://github.com/machyve/xhyve/archive/v0.2.0.tar.gz" sha256 "32c390529a73c8eb33dbc1aede7baab5100c314f726cac14627d2204ad9d3b3c" head "https://github.com/machyve/xh...
38.882353
104
0.760968
5d928d87dcef92ddadb9b26aa79d374dfe55e6d3
3,517
Dummy::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 thread web server...
40.895349
104
0.75917
d5f215b3adf89bb9ebb8f3e43df3fa18a3e0dd1c
59
ActiveRecord::Base.send :include, AirBlade::ActsAsParentOf
29.5
58
0.830508
0395f1469cebfc8db1f9ad288840f661c79a7d14
397
# frozen_string_literal: true require "active_analysis/version" require "active_analysis/engine" module ActiveAnalysis extend ActiveSupport::Autoload autoload :FixtureSet mattr_accessor :logger mattr_accessor :image_library mattr_accessor :image_analyzer mattr_accessor :audio_analyzer mattr_accessor ...
18.904762
33
0.823678
d57e488fb8ab802838eadbf1ec5b390740913090
420
module Rmega module Nodes class File < Node include Deletable include Downloadable def storage_url @storage_url ||= begin query_params = data["__n"] ? {n: data["__n"]} : {} data['g'] || request({a: 'g', g: 1, n: handle}, query_params)['g'] end end ...
17.5
76
0.502381
1ce8feac4ab03a2575a868c86bbbbf0e5037e418
695
# frozen_string_literal: true module API class UsageDataQueries < ::API::Base before { authenticated_as_admin! } feature_category :service_ping namespace 'usage_data' do before do not_found! unless Feature.enabled?(:usage_data_queries_api, default_enabled: :yaml, type: :ops) end ...
24.821429
103
0.677698
87f0ef569c4745273b82621ec483911675bfd2ea
57
# encoding: utf-8 module Backup VERSION = '4.1.2' end
9.5
19
0.649123
bb999a10865db82cffc6568446fd44bd1a7fd03d
11,805
class StringTest < MrubycTestCase description "String.new with arg" def string_new_with_arg str = String.new("a string instance") assert_equal "a string instance", str end description "String.new without arg" def string_new_without_arg str = String.new assert_equal "", str end descript...
23.993902
69
0.591105
7af76edadf577f50bac5aac145dbfb4f4084add6
1,164
# frozen_string_literal: true require "rails_helper" describe SignOutController, type: :controller do include DfESignInUserHelper let(:user) { create(:user) } let(:dfe_sign_in_user) do { "email" => user.email, "last_active_at" => Time.zone.now, "id_token" => "id_token", "provider" ...
21.163636
73
0.642612
61fc18ef57c13b7df647c78de421fd9444695c18
7,142
module Fog module Compute class ProfitBricks class Real # Creates a volume within the data center. This will NOT attach the volume to a server. # # ==== Parameters # * datacenter_id<~String> - Required, UUID of virtual data center # * options<~Hash>: # * nam...
53.298507
126
0.512882
bbeb29b6aed6029046f74d3ebe43ff9aee751fb0
1,293
class Libsndfile < Formula desc "C library for files containing sampled sound" homepage "http://www.mega-nerd.com/libsndfile/" url "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz" sha256 "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9" bottle do cellar :any sha25...
36.942857
93
0.755607
bfd4b2c068cb8354334e701e4dbf6e9e19baeb33
162
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run CruiseControl::Application
40.5
67
0.783951
5df7fc7952527d8bf107372b0cae151c195a3a20
3,893
require File.dirname(__FILE__) + '/exceptions' require File.dirname(__FILE__) + '/identity' module Authorization module ObjectRolesTable module UserExtensions def self.included( recipient ) recipient.extend( ClassMethods ) end module ClassMethods def acts_as_authorized_user(ro...
33.560345
162
0.621629
61f56b92854edb50e816a5f6c4c1698c8e6b2a8f
344
module UsersHelper # Returns the Gravatar for the given user. def gravatar_for(user, options = { size: 80}) gravatar_id = Digest::MD5::hexdigest(user.email.downcase) size = options[:size] gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}" image_tag(gravatar_url, alt: user.name, class...
34.4
70
0.712209
7a8dcc7789070d950160181b89a3f4dd60b19b38
815
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) require "no_password" module Dummy class Application < Rails::Application config.load_defaults Rails::VERSION::STRING.to_f...
30.185185
79
0.727607
217bfa33a0180330b3956ffa72eed869b0d01cbe
1,233
module WNS module Abbreviations INNER_DOTS_EXPRESSION = /([a-zA-Z]\.)([a-zA-Z]\.)([a-zA-Z]\.|)([a-zA-Z]\.|)([a-zA-Z]\.|)(,|) / INNER_DOTS_REPLACEMENT = "\\1&#8239;\\2&#8239;\\3&#8239;\\4&#8239;\\5&#8239;\\6&nbsp;" TITLE_EXPRESSION = /(Mr|Ms|Mrs|Messrs|Mmes|Msgr|Prof|Rev|Dr|Sr|St|[A-Z][a-z]|[A-Z][a-z][a-z...
41.1
125
0.650446
f713e4af36c30df5abeea1085a7324d1dc96fd02
276
require 'spec_helper' describe NYNY do it 'root points to pwd' do NYNY.root.should == Pathname.pwd end it 'has the correct env' do NYNY.env.should be_test end it 'root can join a path' do NYNY.root.join("foo").should == Pathname.pwd + "foo" end end
17.25
56
0.663043
26f7bb2904909c5e45e38415e98777c0738c8fb4
2,778
class Pushpin < Formula desc "Reverse proxy for realtime web services" homepage "https://pushpin.org/" url "https://dl.bintray.com/fanout/source/pushpin-1.17.2.tar.bz2" sha256 "f30c12b147d39c52617403b40f11737a14020dc93f223faa7214d73db8af1d77" head "https://github.com/fanout/pushpin.git" bottle do sha25...
31.213483
177
0.666307
1d561b2dcb1cc89672a7980d2d52203e788f14da
110
class DeleteTypeColumn < ActiveRecord::Migration[6.1] def change remove_column :sports, :type end end
18.333333
53
0.745455
f8d794194c1c61976623c77351bc1fa8b33cff75
958
require File.expand_path('../boot', __FILE__) 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 DummyApp class Application < Rails::Application # Settings in config/environments/* take prec...
50.421053
204
0.746347
61672df33b0038026e476ad2aa10b88a33f29a0c
34,958
# # a language data file for Ruby/CLDR # # Generated by: CLDR::Generator # # CLDR version: 1.3 # # Original file name: common/main/en_MT.xml # Original file revision: 1.30 $ # # Copyright (C) 2006 Masao Mutoh # # This file is distributed under the same license as the Ruby/CLDR. # private def init_data @languag...
36.376691
103
0.586161
2855dc924345720f8ad7ddb35ab8d8d519d7f3b6
1,034
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) require "trado_pdf_invoice_module" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into f...
38.296296
99
0.73501
5d57ea0ba6f065d95934ce14d011cca5ff6b574f
135
class StaticPagesController < ApplicationController def home end def about end def help end def contact end end
9.642857
51
0.696296
18b5860760b319a62eeedb3dc44dfd761447d53d
6,703
require "eventmachine" require "json" require "mail" require "sqlite3" module MailCatcher::Mail extend self def db @__db ||= begin SQLite3::Database.new(":memory:", :type_translation => true).tap do |db| db.execute(<<-SQL) CREATE TABLE message ( id INTEGER PRIMARY KEY ASC, ...
35.84492
200
0.676563
bbdcd307bd68cd0e472a64010ed1f99f39973b09
150
module GchartInfo #:nodoc: module VERSION #:nodoc: MAJOR = 1 MINOR = 4 TINY = 0 STRING = [MAJOR, MINOR, TINY].join('.') end end
15
43
0.573333
1d71e51e83851e4487ad5e2e052d4225683e065b
679
cask "kext-updater" do version "3.7.2" sha256 "c11a4c66ede5cc41c4e8c3a9b987ec752e05da9edd83d26c618e10b1602eab3e" url "https://update.kextupdater.de/kextupdater/kextupdaterng.zip" appcast "https://update.kextupdater.de/kextupdater/appcastng.xml" name "Kext Updater" desc "Automatic updater for kernel extensi...
33.95
75
0.756996
e9e6d8f0e144184533ed554e46a9ed47a6d6d7ed
2,459
class Stubby < Formula desc "DNS privacy enabled stub resolver service based on getdns" homepage "https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby" url "https://github.com/getdnsapi/stubby/archive/v0.3.0.tar.gz" sha256 "b37a0e0ec2b7cfcdcb596066a6fd6109e91a2766b17a42c47d3703d9be41d000" head "...
31.935065
108
0.650264
0149ad717fb3e0e87f03687926c7f42164435e3c
1,877
module Byebug begin require 'methodsig' have_methodsig = true rescue LoadError have_methodsig = false end # Implements byebug's 'method sig' command. class MethodSigCommand < Command def regexp /^\s* m(?:ethod)? \s+ sig(?:nature)? \s+ (\S+) \s*$/x end def execute obj = b...
24.064103
78
0.564198
79996d0f407ec1074afc4d2f457f94a28471ae52
1,836
# This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'spec' require 'spec/rails' ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate") #############...
37.469388
132
0.6939
0156abf21c8901e5f2383d3819d28334a9cfb9de
955
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.931034
74
0.736126
1a637a3257eca7a5ed4d98b094e94d99309c8ab2
655
# name: category # about: Category list # version: 0.0.1 # authors: Evg register_asset "stylesheets/portal.scss" after_initialize do # add info category add_to_serializer(:basic_category, :categorization, false) { object.custom_fields['categorization'] } add_to_serializer(:basic_category, :categorqa, false) { ...
36.388889
103
0.770992
e8255a0e5a7e1e07e570ceecbe3288308ecfecca
5,089
#!/usr/bin/env ruby module SOACSV2MT940 ## # Represents a Statement Of Account (SOA) file in the SWIFT mt940[https://de.wikipedia.org/wiki/MT940] format for 1822direktBank. # - TODO: ERB template for the mt940 file? Or objects (for the records?)? class SOAMT9401822 def initialize(csv_data, filename_mt940, ...
33.480263
138
0.630576
3314722c7ad8a73ac58000c88cd4097e8d294345
578
Rails.application.configure do config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = false config.assets.js_compressor = :uglifier config.assets.compile = false config.assets.dige...
34
58
0.778547
ab670a65d8a1e0dd36cfb6d13984bc18b980d2cb
546
require "rest_client" module MetricsSatellite class Reporter attr_reader :host, :service, :section def initialize(host, service, section) @host = host @service = service @section = section end def report(summaries) summaries.each do |key, count| post(key, count) ...
18.2
57
0.60989
f84f09aebd408eee1de1f4619a88d9af453ce829
2,863
# frozen_string_literal: true module Capybara::Cuprite class Browser class Targets def initialize(browser) @mutex = Mutex.new @browser = browser @_default = targets.first["targetId"] if !targets.empty? @browser.subscribe("Target.detachedFromTarget") do |params| pa...
24.681034
123
0.587496
6ab36bff6c46d53374b52aa24ee258501015b8d5
316
require_relative '../../../spec_helper' require 'net/http' describe "Net::HTTPFatalError" do it "is a subclass of Net::ProtoFatalError" do Net::HTTPFatalError.should < Net::ProtoFatalError end it "includes the Net::HTTPExceptions module" do Net::HTTPFatalError.should < Net::HTTPExceptions end end
24.307692
53
0.731013
4a79d9a70b5f1ee2857839c20811ca7e70e38695
72
# frozen_string_literal: true module TodoAgent VERSION = "0.1.0" end
12
29
0.736111
18358b738261849f54d09e253fca4ed889716394
474
cask 'actotracker' do version :latest sha256 :no_check # dropboxusercontent.com is the official download host per the vendor homepage url 'https://dl.dropboxusercontent.com/u/7614970/ActoTracker.zip' name 'ActoTracker' appcast 'https://onflapp.appspot.com/actotracker', :sha256 => '0d79b9232c6a184...
31.6
87
0.767932
1c9d9dc2be22e87011e498ca94b88c3010cc1883
410
class MakeOldRecurringTodosValidate < ActiveRecord::Migration def self.up RecurringTodo.all.each do |rt| # show_always may not be nil rt.show_always = false if rt.show_always.nil? # start date should be filled rt.start_from = rt.created_at if rt.start_from.nil? || rt.start_from.blank? ...
25.625
81
0.687805
1a63257fb3cf98a9326ce6a4895163955dfeddb0
173
# frozen_string_literal: true module Stupidedi module TransactionSets module Validation # # # class Implementation end end end end
13.307692
29
0.624277
112cb789f2aa785c5f9988de8d2d0c47ec972c85
317
# frozen_string_literal: false # # [incr Tk] support # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # # call setup script for general 'tkextlib' libraries require 'tkextlib/setup.rb' # call setup script require 'tkextlib/itk/setup.rb' # load library require 'tkextlib/itk/incr_tk.rb'
21.133333
75
0.678233
ed6f33861b17cc25cfd32d6749b2508ec82c1223
2,602
project 'pdk-runtime' do |proj| # Used in component configurations to conditionally include dependencies proj.setting(:runtime_project, "pdk") platform = proj.get_platform proj.inherit_settings 'pdk', 'git://github.com/puppetlabs/pdk-vanagon', 'master' proj.version_from_git proj.generate_archives true p...
29.908046
109
0.720215
bb1a669f647739b7827cb7a4cef203867c74c228
5,461
# Code we only want to run when in the Rails console. # This needs to be required in your console starter (.irbrc or .pryrc). # eg.: # # console_init = File.join Dir.getwd, 'config', 'console.rb' # if File.exist?(console_init) # puts "Loading #{console_init}" # require console_init # end # For pry console, inclu...
25.050459
98
0.59403
010eba2fbec25e1b31f22952fc3c2c1fd727e595
881
require 'helper' class PwnedTest < Test::Unit::TestCase #Minitest::Test def test_abc123_is_found assert_equal true, HaveIBeenPwned.pwned('abc123') end def test_password_timeout starting = Time.now result = HaveIBeenPwned.pwned('abc123', timeout: 1) ending = Time.now elapsed = (ending - start...
25.171429
137
0.76504
d5c6bfe9b746d2a235d521b6a9cec3adc4472935
356
describe "Vanguard" do include_context "db", "pvan", "pmoa" it "Vanguard cards" do "t:*" .should equal_search "t:vanguard" "layout:vanguard".should equal_search "t:vanguard" "sakashima" .should return_cards "Sakashima the Impostor Avatar" "sakashima t:*" .should return_cards "Sakas...
32.363636
73
0.679775
1a0e04016743304a251f78d4522d8b1bbe6c1aff
666
# -*- coding: utf-8 -*- module Jekyll class RTLifyTag < Liquid::Tag def initialize(tag_name, variable, tokens) super if match = variable.match(/{{\s*(.*)\s*}}/) @variable, = match.captures else raise 'invalid variable' end end def render(context) html = con...
24.666667
79
0.540541
879489a5214477e38cd5609546ef8ca1fe5916ce
520
require 'test_helper' class OpenTSDBBackendTest < Minitest::Test def setup StatsD.stubs(:backend).returns(@backend = StatsD::Instrument::Backends::OpenTSDBBackend.new) @backend.stubs(:rand).returns(0.0) UDPSocket.stubs(:new).returns(@socket = mock('socket')) @socket.stubs(:connect) @socket.stubs...
28.888889
96
0.703846
7a21cf3e168fa98f517fe4890c642465644e2840
988
module People class HousesController < ApplicationController before_action :data_check, :build_request ROUTE_MAP = { index: proc { |params| ParliamentHelper.parliament_request.person_houses.set_url_params({ person_id: params[:person_id] }) }, current: proc { |params| ParliamentHelper.parliament...
29.939394
139
0.665992
61ccdf30aa23dba1ee858d3212af863d5807785a
1,378
# Encoding: utf-8 require 'rspec/expectations' require 'chefspec' require 'chefspec/berkshelf' require 'chef/application' require 'json' Dir['./test/unit/spec/support/**/*.rb'].sort.each { |f| require f } # use node.default to put stub data for every node in every test # could also use this method to stub other node...
32.809524
79
0.733672
0189a76c71e3b4c291e3972b15ad58bf84d6c6de
772
cask 'gogs' do version '0.11.43' sha256 'cdb4e2178d0e0a4f2ef79c31326150c7cbd9a029cc4fa565a12a5e3c67292a41' # github.com/gogits/gogs was verified as official when first introduced to the cask url "https://github.com/gogits/gogs/releases/download/v#{version}/darwin_amd64.zip" appcast 'https://github.com/gogits...
32.166667
88
0.724093
d5d3e6fa850b741171957665683d428c1a0cbf21
1,634
# # Be sure to run `pod lib lint RLNetworking.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 = 'BJNetw...
37.136364
105
0.640759
ffe6175f1b1ce46b7cbe8cbe108617badc38a9a1
1,544
class EmailAddress < ApplicationRecord # https://www.regular-expressions.info/email.html EMAIL_REGEX = /\A[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\z/ belongs_to :user, inverse_of: :email_address validates :address, presence: true, confirmation: true, format: { with: EMAIL_REGEX } validates :normalized...
25.311475
133
0.700777
1cdf590388e0cb301b97cd53afe4119d7a71c9a9
229
require 'quovo/api' module Quovo module Resources class Base class << self # Proxy for resource classes. def request(*args) Quovo::API.request(*args) end end end end end
15.266667
37
0.567686
6aa55e3355bf24b5a175797a6735cf47b636c283
1,693
# 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::AlertsManagement::Mgmt::V2019_05_05_preview module Models # # Suppression logic for a given action rule # class SuppressionC...
27.754098
78
0.551683
edfa3c077f4e7e828cb256cc01fdb84ecb9b57e3
2,783
# frozen_string_literal: true class ClaimEventValidator < ActiveModel::Validator MAXIMUM_CLAIM_COUNT_PER_IP_PER_DAY = 8 MAXIMUM_PAYMENT_AMOUNT_PER_DAY = 4_000_000 * 10**8 MINIMUM_ADDRESS_HASH_LENGTH = 40 def validate(record) record.errors.add(:address_hash, "Address is invalid.") && (return) if record.add...
44.174603
161
0.765361
08c1214881e9efc0c6ed64e8694ec7ab1ce0bf05
720
Deface::Override.new( virtual_path: 'spree/shared/_order_details', name: 'add_digital_downloads_to_invoice', insert_bottom: '[data-hook="order_item_description"]', text: <<-HTML <% if @order.state == 'complete' && @order.paid? && item.variant.digital? %> <div data-hook='download_links'> ...
37.894737
171
0.543056