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
7ab2b9fdf16cd760622fc5191f1aabbb5a5cabc5
778
# frozen_string_literal: true # RSpec example that tests usage of `#warn` # # class Klass # include Technologic # # def initialize(user) # @user = user # end # # def do_a_thing # warn :thing_being_done, user: @user # end # end # # RSpec.describe Klass do # ...
23.575758
90
0.604113
01cbd0c678d082c89b2748462a899fe17b854bc5
165
class ShowsController < ApplicationController post '/shows' do name = params["name"] @shows = Show.search_shows_by_name(name) erb :index end end
13.75
45
0.684848
26b5599af33a34b37e22b89cbac23c018cfd9cb0
1,223
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper')) describe AlchemyAPI, 'concept_extraction' do before do AlchemyAPI::Config.apikey = API_KEY end subject { AlchemyAPI::ConceptTagging.new } describe '#search' do { text: 'Google is a large company', html: '<html><bod...
28.44186
78
0.600981
ff318475d131b4e98d9048af78e1a2aa202a0650
977
class RequestResetsController < AccountUsers::ControllerBase helper_method :request_reset_presenters_path def show @request_reset_presenter = RequestResetPresenter.new end def create @request_reset_presenter = RequestResetPresenter.new params_permit if @request_reset_presenter.invalid? rende...
27.138889
107
0.733879
edf4575f9630fff4c08e240303d22f0964d34f59
1,143
class Csvtomd < Formula include Language::Python::Virtualenv desc "CSV to Markdown table converter" homepage "https://github.com/mplewis/csvtomd" url "https://files.pythonhosted.org/packages/9d/59/ea3c8b102f9c72e5d276a169f7f343432213441c39a6eac7a8f444c66681/csvtomd-0.3.0.tar.gz" sha256 "a1fbf1db86d4b7b62a75d...
27.878049
135
0.733158
ab39d4b3b52d11a1b347ff6b5a4876690acb892b
349
json.array! @likers do |liker| json.id liker.id json.username liker.username json.avatar_image_tag avatar_for(liker, size: 50) json.description liker.description json.urlPath user_path(liker) json.following current_user.following?(liker) json.isSelf current_user?(liker) json.currentPage @current_page ...
29.083333
51
0.7851
28c6515c5208ffff4ca11e6f30056e7ac7f081c2
1,463
# frozen_string_literal: true require "spec_helper" describe Onebox::Engine::GithubFolderOnebox do context 'without fragments' do before(:all) do @link = "https://github.com/discourse/discourse/tree/master/spec/fixtures" @uri = "https://github.com/discourse/discourse/tree/master/spec/fixtures" ...
31.804348
195
0.684211
f84250496c4504b9e8895cf351a4da5ad46c7af5
1,414
class BoshCli < Formula desc "Cloud Foundry BOSH CLI v2" homepage "https://bosh.io/docs/cli-v2/" url "https://github.com/cloudfoundry/bosh-cli/archive/v6.4.4.tar.gz" sha256 "2410c243046fd9bc748257add8cee4b250e8973ffb45474e8a0ac7f83822eb97" license "Apache-2.0" head "https://github.com/cloudfoundry/bosh-cli....
44.1875
122
0.745403
03079d0cb6062bbc3a0394eb4cc8bff30010857b
286
# name: more-privacy # about: Hide some information from Discourse user profiles # version: 0.0.3 # authors: Joerg Seyfried (JSey) # url: https://github.com/JSey/more-privacy register_asset "javascripts/discourse/templates/user/user.hbs" enabled_site_setting :more_privacy_enabled
26
62
0.783217
b99f0e6af068e4e37799a4eacfffd72d1ae717b0
894
# frozen_string_literal: true describe DependentClaimant, :postgres do let(:participant_id) { "pid" } let(:file_number) { "vfn" } let(:claimant) do create(:claimant, type: "DependentClaimant", participant_id: participant_id, decision_review: build(:appeal, veteran_file_number...
29.8
84
0.689038
6152914bab9b4c7f8e26309b887c5d7929040f40
2,014
module CorreiosSigep module LogisticReverse class RequestCollectNumber < BaseClient def initialize(logistic_reverse) @logistic_reverse = logistic_reverse super() end def process xml = Builders::XML::RequestCollectNumber.build_xml(@logistic_reverse) response = inv...
35.333333
113
0.695134
1824577c0b4b7941faf0b5970d13492391e280a8
2,936
require "language/node" class GatsbyCli < Formula desc "Gatsby command-line interface" homepage "https://www.gatsbyjs.org/docs/gatsby-cli/" # gatsby-cli should only be updated every 10 releases on multiples of 10 url "https://registry.npmjs.org/gatsby-cli/-/gatsby-cli-4.11.0.tgz" sha256 "cd4d8d680e666af8099e...
40.219178
123
0.704019
6a149edd59c30152159c61b33cf4858d01d92119
138
require "test_helper" class TopicsControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
17.25
60
0.73913
0333ed02da17aab8b21a1163ba433b8bc996e979
1,208
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "mobile-fu/version" Gem::Specification.new do |s| s.name = "mobile-fu" s.version = MobileFu::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Brendan Lim", "Ben Langfeld"] s.email = ["brendangl@gmail....
43.142857
300
0.690397
33a6c043382b9e33958675b9a5b7bf8257d52cef
383
class FoodItem < ApplicationRecord belongs_to :section validates :name, :price, presence: true has_many :orders, dependent: :destroy has_many :reviews, dependent: :destroy is_impressionable def self.search(search) where("name ILIKE ?", "#{search}") end def image_url_or_default image_url.presen...
23.9375
72
0.720627
182ed0596d915ac8569261b3899b4f6d5acd0cbc
5,118
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'opscode/expander/vnode_supervisor' describe Expander::VNodeSupervisor do before do @log_stream = StringIO.new @local_node = Expander::Node.new("1101d02d-1547-45ab-b2f6-f0153d0abb34", "fermi.local", 12342) @vnode_supervisor = E...
40.619048
114
0.719812
269707516d507ea262354394c8c6ade01224c542
2,834
# frozen_string_literal: true require "bcdiceCore" require "diceBot/DiceBot" require "diceBot/DiceBotLoader" class BCDice DICEBOTS = ([DiceBot.new] + DiceBotLoader.collectDiceBots). map { |diceBot| [diceBot.id, diceBot] }. to_h. freeze SYSTEMS = DICEBOTS.keys. sort. freeze NAMES = DICEBOTS....
25.531532
73
0.693719
7a49825f245b50ca7eaa99e730109af8885e78ea
479
require "spina" module Spina module Articles class Engine < ::Rails::Engine config.before_initialize do ::Spina::Plugin.register do |plugin| plugin.name = 'articles' plugin.namespace = 'articles' end end config.generators do |g| g.test_framework :rsp...
21.772727
65
0.609603
bf8d456d9d5fcbeb15eeb82a06cef0bb56fcc2c8
145
# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_figure-server_session'
36.25
83
0.806897
eda1bb9cd0313c3118ae78b41ea1ce740f880bd2
57
ActiveRecord::Base.class_eval { include HasCalculator }
19
55
0.807018
bba2c5b9cb33b999a8e039599217a7a12d70dd7e
740
Pod::Spec.new do |spec| spec.name = 'ULID.swift' spec.version = '1.1.0' spec.license = { :type => 'MIT' } spec.homepage = 'https://github.com/yaslab/ULID.swift' spec.authors = { 'Yasuhiro Hatta' => 'hatta.yasuhiro@gmail.com' } spec.summary = 'Universally Unique Lexicographica...
38.947368
98
0.631081
e90818524ed680d86a6da10552b730a73c6b2315
2,879
namespace "modules" do def unpacker(src_file, dest_dir) puts "Reading #{src_file}" array = JSON.load(IO.read(src_file)) if !array.is_a?(Array) raise "#{src_file} does not contain a JSON array as the first object" end array.each do |hash| values = hash.values_at("_id", "_type", "_sou...
35.109756
138
0.688086
d53efa8b19acdf111ba2368529164049a898669c
206
class Message include ActiveModel::Model include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :name, :email, :content validates_presence_of :name, :email, :content end
20.6
47
0.781553
79915208086299c9a36d73b395d74377bd1c66ef
669
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 HelloBootstrapRuby class Application < Rails::Application # Initialize configuration defaults for originally genera...
33.45
82
0.768311
91fcfcdbc99b46b07e6caabcdea9a0b31f77b044
4,896
# # Be sure to run `pod spec lint NatAccelerometer.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://g...
36
105
0.588031
6ab008816029dbd94ef9b1f467c3caa5f73f9776
3,240
require 'pstore' require 'fileutils' module Moneta module Adapters # PStore backend # @api public class PStore include Defaults include NilValues supports :create, :increment, :each_key attr_reader :backend # @param [Hash] options # @option options [String] :file PSt...
24.179104
106
0.54321
e8b7461c942f1eb67f71fee455aa73edd0358b01
415
p1 = lambda {} p2 = lambda { } p3 = lambda { puts "hallo" } p4 = lambda do # hello end p5 = lambda do puts "hallo" end [p1, p2, p3, p4, p5].each do |p| path, line = *p.to_s.match(/[\d\w]+@(.+):(\d+).*>/)[1..2] puts line end def Given(re, &p) path, line = *p.to_s.match(/[\d\w]+@(.+):(\d+...
10.921053
59
0.496386
28006909ec384ab378dd16968e2e6b7daee01102
717
require 'rails_helper' RSpec.describe Product, type: :model do it { should be_a PgSearch } describe '.search_by' do let(:relation) { double } before { expect(Product).to receive(:page).with(1).and_return(relation) } context do it { expect { Product.search_by 'page' => 1 }.to_not raise_error } ...
26.555556
90
0.62622
26a09e7d6675b7a698aa3dfa721d75e5577c34fe
715
Pod::Spec.new do |s| s.name = 'AWSTranscribe' s.version = '2.9.9' s.summary = 'Amazon Web Services SDK for iOS.' s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.' s.homepage = 'htt...
39.722222
157
0.613986
380e1df46bd7aff3344e0611e5a271dc4e75443a
2,772
# Generated by the asset_copier plugin # http://github.com/pelargir/asset_copier require 'find' require 'digest/md5' module TextileToolbar class AssetCopier @source = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'files')) @destination = RAILS_ROOT @deleted_files = File.expand_path(File...
30.461538
101
0.593074
e82023ad2a02b3748398abb2205ba670f34513d4
785
# frozen_string_literal: true require 'unit/unit_spec_helper' require_relative '../../../app/models/null_time' describe NullTime do let(:nt) { described_class.new } describe '#<=>' do context 'when given a time' do it 'returns -1' do expect(nt.<=>(Time.new(2000, 1, 1, 0, 0, 0))).to eq -1 ...
21.216216
62
0.588535
ed233fa4e532309239b968124c68217c4cbe9e7d
130
module ResourceMonitor class ApplicationController < ActionController::Base protect_from_forgery with: :exception end end
21.666667
54
0.815385
e2e69ceb8ffa352c370df9fbb5893d645e640b73
230
class ChangeOrderItemsCountDefaultInOrders < ActiveRecord::Migration[5.0] def change change_column_null :orders, :order_items_count, false, 0 change_column_default :orders, :order_items_count, from: nil, to: 0 end end
32.857143
73
0.782609
d5558552402f7225be2134cdade212daf5974ccf
222
require 'docx_generator/word/base' require 'docx_generator/word/extensions' require 'docx_generator/word/formatting' module DocxGenerator # Namesapce for all XML Elements defined in the standard. module Word end end
24.666667
59
0.810811
b954e69f93c61b494a3a68c6fe4a1874e93c7661
1,164
# frozen_string_literal: true RSpec.describe Faulty::Events::Notifier do let(:listener_class) do Class.new do attr_reader :events def initialize @events = [] end def handle(event, payload) @events << [event, payload] end end end let(:failing_class) do ...
23.755102
70
0.649485
f8e13a708d284781ab7f5524da3743aa15fceece
1,487
require_relative 'mcp3208' require_relative 'kty81' # This class reads the temperature from a KTY81 chip. # The KTY81 is a resistor with a temperature dependent resistance. # The circuit consist of a constant resistor R in line with the temperature sensor T. # With the measurement of the voltage over T (Ut) the resist...
23.983871
89
0.594486
62208cbefc8a84d9a7529b5b50afe7ef0248dc9b
2,415
# Encoding: utf-8 # Cloud Foundry Java Buildpack # Copyright 2013 the original author or authors. # # 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/LICEN...
28.411765
108
0.743685
f841f809f872512ef6d726051f19f330093a6361
651
require 'test_helper' require 'fixtures/rails_mail_plugin' class ComplianceTest < ActiveSupport::TestCase include ActiveModel::Lint::Tests def setup @model = SampleMail.new end test "model_name exposes singular and human name" do assert_equal "sample_mail", @model.class.model_name.singular assert_...
24.111111
66
0.72043
1c11567c2cf6e65429648bad006419d853fc0757
1,059
class Libical < Formula desc "Implementation of iCalendar protocols and data formats" homepage "https://libical.github.io/libical/" url "https://github.com/libical/libical/releases/download/v2.0.0/libical-2.0.0.tar.gz" sha256 "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da" bottle do sh...
39.222222
92
0.7356
333fb742e484b37173d9b8a9185317b2bdf25d56
22,656
require 'stringio' require 'uri' module ActionController module Integration #:nodoc: # An integration Session instance represents a set of requests and responses # performed sequentially by some virtual user. Becase you can instantiate # multiple sessions and run them side-by-side, you can also mimic (to...
36.076433
166
0.616879
e9f13a0ef352df4ac1738abef7af63c1f4ddbb56
1,741
# Copyright (c) 2021-2022 Andy Maleh # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # d...
34.137255
72
0.698449
08dbeb6fa3272a66ff76d5456cabf49b5ae93810
1,136
require 'spec_helper' RSpec.describe RenderWithView do describe "#render_with_view" do it "calls render with template and assigned view" do user = { id: 1 } ctrl = FakeController.new ctrl.render_with_view :index, user: user tmpl, args = ctrl.calls.last expect(tmpl).to eq :index ...
22.72
56
0.623239
d58180c3b8b18a80b32627d5b739157713c714c2
1,721
require 'test_helper' class UsersSignupTest < ActionDispatch::IntegrationTest def setup ActionMailer::Base.deliveries.clear end test "invalid signup information" do get signup_path assert_no_difference 'User.count' do post users_path, params: { user: { name: "", ...
34.42
78
0.61011
1807be0c452fae905cd83d6913af3d7c1ca222af
1,502
class PostsController < ApplicationController before_action :set_post, only: [:show, :edit, :update, :destroy] def index @posts = Post.all end def show end def new @post = Post.new end def edit end def create @post = Post.new(post_params) ...
23.84127
89
0.577896
ed9c3e2216fad74073cc5621a860a45a8bb89d88
926
# coding: utf-8 require File.expand_path('../lib/styledown/source/version', __FILE__) Gem::Specification.new do |spec| spec.name = 'styledown2-source' spec.version = Styledown::Source::VERSION spec.authors = ['Rico Sta. Cruz'] spec.email = ['rstacruz@users.noreply.github.com'] s...
38.583333
106
0.638229
1af9c1c2822cff33ed32b9e3248f9a5953f8e2aa
553
module Rubillow module Models # Chart for a property class PropertyChart < Chart # @return [String] url for chart attr_accessor :graphs_and_data # Returns HTML for the chart. # @return [String] chart HTML. def to_html "<a href='#{@graphs_and_data}'>" + super + "</a>"...
21.269231
73
0.553345
7a7f1e0831e183c6138eba3decc2f2b817bd0872
9,153
# # Author:: AJ Christensen (<aj@hjksolutions.com>) # Copyright:: Copyright 2008-2016, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License ...
43.174528
164
0.713427
ab64b6e6150452e17de1555819824b2ba453626f
4,306
#!/usr/local/bin/ruby # frozen_string_literal: true require 'fluent/plugin/filter' module Fluent::Plugin require 'logger' require 'yajl/json_gem' require_relative 'oms_common' require_relative "ApplicationInsightsUtility" Dir[File.join(__dir__, './health', '*.rb')].each { |file| require file } ...
40.242991
112
0.595216
1dc2b602eee18486a5fad1d498897f2643a18e49
301
require 'forked/version' require 'forked/worker' require 'forked/retry_strategies/always' require 'forked/retry_strategies/exponential_backoff' require 'forked/retry_strategies/exponential_backoff_with_limit' require 'forked/process_manager' require 'forked/with_graceful_shutdown' module Forked end
27.363636
64
0.860465
1dffa2dae7421d7257c2180936280c750ea03e0b
53,893
# frozen_string_literal: true require "active_record/migration/join_table" require "active_support/core_ext/string/access" require "digest/sha2" module ActiveRecord module ConnectionAdapters # :nodoc: module SchemaStatements include ActiveRecord::Migration::JoinTable # Returns a hash of mappings fr...
38.577666
155
0.615423
916e85acb1ffb46d59f142b94fe2ecc52e919a4c
3,233
require 'rails_helper' RSpec.describe PrisonerDetailsController, type: :controller do render_views let(:prisoner_hash) do { prisoner: { first_name: 'Jimmy', last_name: 'Harris', date_of_birth: { day: '20', month: '04', year: '1986' }, ...
29.126126
93
0.637488
6251272e4e58d149967cef056e06df69cfbd2d80
1,240
class Tcptraceroute < Formula desc "Traceroute implementation using TCP packets" homepage "https://github.com/mct/tcptraceroute" url "https://github.com/mct/tcptraceroute/archive/tcptraceroute-1.5beta7.tar.gz" version "1.5beta7" sha256 "57fd2e444935bc5be8682c302994ba218a7c738c3a6cae00593a866cd85be8e7" bott...
37.575758
92
0.720161
1c1d19b30e3641be9d862a9865c1297bf7c2d0f1
208
require "pathname" require "erb" module Dklet class << self def lib_path Pathname(__dir__) end end end require "dklet/version" require 'dklet/util' require 'dklet/dsl' require 'dklet/cli'
13
23
0.697115
032a6d5d4a70e7966691a94dcb0dba92f426bae6
1,895
class Treefrog < Formula desc "High-speed C++ MVC Framework for Web Application" homepage "http://www.treefrogframework.org/" url "https://github.com/treefrogframework/treefrog-framework/archive/v1.22.0.tar.gz" sha256 "0b9d79d0e17266ff603c1ff812289e8d2500d8f758d3c700ccc3aaad51e3751d" head "https://github.com/...
32.672414
93
0.709763
08223013808c246d563535792406464420516f0b
1,380
# frozen_string_literal: true module GraphQL module StaticValidation # Implement validate_node class ArgumentsValidator include GraphQL::StaticValidation::Message::MessageHelper def validate(context) visitor = context.visitor visitor[GraphQL::Language::Nodes::Argument] << ->(node,...
28.75
73
0.597101
b92bce0b88d5c0f9a2e73cf5581d6227d5419ec8
1,927
class UserMailer < ApplicationMailer default from: "Feedbin <#{ENV["FROM_ADDRESS"]}>", skip_premailer: true include ApplicationHelper helper ApplicationHelper def payment_receipt(billing_event) @billing_event = BillingEvent.find(billing_event) @user = @billing_event.billable mail to: @user.email, s...
31.590164
92
0.714063
38c587284c2b6e972491e6b548659512dce9642f
2,236
require 'spree_core' require 'spree_multi_tenant/engine' require 'multitenant' module SpreeMultiTenant def self.tenanted_models [ Spree::Activator, Spree::Address, Spree::Adjustment, Spree::Asset, Spree::Calculator, Spree::Configuration, Spree::Country, Spree::Cred...
24.304348
50
0.639088
e2dba0286fa4396c6c83cfca85f0deeb5d884543
924
require 'rails_helper' describe CompanyRegistrationDataCorrection do it_behaves_like 'a basic data correction presenter', :company_registration, '654321', nil, { legal_form_id: LegalForm::PLC.id } describe "validations" do subject(:data_correction) { FactoryGirl.build(:company_registration_data_correction, lo...
40.173913
129
0.729437
1ceed2d40c27c59c8811028bc5c51b1780461449
18,270
# frozen_string_literal: true require "spec_helper" require_relative './copyable_spec_models' describe Mongoid::Copyable do [ :clone, :dup ].each do |method| describe "##{method}" do let(:person) do Person.new( title: "Sir", version: 4, created_at: Time.now, ...
26.062767
111
0.548823
d5b2528ab8801e1d51d49f6fd5653e03bf0f8790
1,369
require 'ebay/types/item' require 'ebay/types/member_message' require 'ebay/types/message_media' module Ebay # :nodoc: module Types # :nodoc: # == Attributes # object_node :item, 'Item', :class => Item, :optional => true # object_node :question, 'Question', :class => MemberMessage, :optional => true ...
44.16129
94
0.688093
5d364999ba292454f9479d1ed6735e2859b1d4d4
1,010
require 'sinatra' require 'open-uri' require 'digest/sha1' require 'haml' def heroku_url "https://#{params[:app]}.herokuapp.com/" end def badge(status_code) case status_code when '200' then 'heroku-up-brightgreen' when '503' then 'heroku-down-red' else 'heroku-unknown-orange' end rescue => e 'heroku...
19.803922
60
0.70495
011e38d4293492e5d92edbd03290a0699ee8ddbf
3,708
module CustomValidators class Emails # please refer to : http://stackoverflow.com/questions/703060/valid-email-address-regular-expression def self.email_validator /\A(|(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,15})\z/i ...
38.226804
305
0.540992
28ff7ea5e61e13b1e3ed40e769132cd18cc9e0c4
1,669
class Docker2aci < Formula desc "Library and CLI tool to convert Docker images to ACIs" homepage "https://github.com/appc/docker2aci" url "https://github.com/appc/docker2aci/archive/v0.17.2.tar.gz" sha256 "43cb18a3647ca8bae48a283fa3359e9555ab7a366c7ee9ef8a561797cebe2593" license "Apache-2.0" bottle do ...
46.361111
138
0.769323
7ac3d8a3f459a80971ef428a27536f31680600dc
462
class Balloonfs < Formula desc "balloonfs (FUSE) for OS X" homepage "https://github.com/gyselroth/balloon-client-fuse" url "https://github.com/gyselroth/tubee-client-cli/releases/download/v1.0.0-alpha5/balloonfs-osx-x64" sha256 "adedb4efe8affb669da567138f4faa342df3d759587faa1777d90018e17bc9f5" version "v1.0.0...
30.8
103
0.757576
4a40d5b51abdbd76d17d46e68c2e45b4c8aa149c
1,190
class Docker2aci < Formula desc "Library and CLI tool to convert Docker images to ACIs" homepage "https://github.com/appc/docker2aci" url "https://github.com/appc/docker2aci/archive/v0.17.2.tar.gz" sha256 "43cb18a3647ca8bae48a283fa3359e9555ab7a366c7ee9ef8a561797cebe2593" bottle do cellar :any_skip_reloca...
38.387097
93
0.753782
39d5c33b685985f58b6a779c082e33cd599220f8
310
require 'overcommit/hook/shared/yarn_install' module Overcommit::Hook::PostMerge # Runs `yarn install` when a change is detected in the repository's # dependencies. # # @see {Overcommit::Hook::Shared::YarnInstall} class YarnInstall < Base include Overcommit::Hook::Shared::YarnInstall end end
25.833333
69
0.741935
ffa814dbbe8feb2e8eb0ccb548b694f769c5935c
7,617
require 'rails/generators' require 'highline/import' require 'bundler' require 'bundler/cli' require 'active_support/core_ext/string/indent' module Spree class InstallGenerator < Rails::Generators::Base class_option :migrate, type: :boolean, default: true, banner: 'Run Spree migrations' class_option :seed, t...
31.870293
109
0.63122
4a2d2d29d1c59b07daf4b9061e8825f71d6d84e1
3,050
require 'formula' # Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! class Clippoly < Formula homepage 'http://clippoly.sourceforge.net/' url 'http://downloads.sourceforge.net/project/clippoly/clippoly/clippoly-pl11/c...
29.326923
123
0.707869
791e42e644fd9c48002bc93739fd8996063997e7
9,002
# frozen_string_literal: true require 'base64' require 'saml/url_service' require 'saml/responses/login' require 'saml/responses/logout' module V1 class SessionsController < ApplicationController REDIRECT_URLS = %w[signup mhv dslogon idme mfa verify slo ssoe_slo].freeze STATSD_SSO_NEW_KEY = 'api.auth.new' ...
38.306383
116
0.670629
013fbcc5e2efa7649ff46708869d96fd1329d82b
1,465
# -*- encoding: utf-8 -*- # stub: jekyll-commonmark-ghpages 0.1.6 ruby lib Gem::Specification.new do |s| s.name = "jekyll-commonmark-ghpages".freeze s.version = "0.1.6" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freez...
38.552632
112
0.672355
1d1e4c105e5b63e3b064d261f5eda02255458de5
260
module Hedgehog module BinaryInPathFinder class Ruby def call(binary) binary = Regexp.escape(binary) Hedgehog::Environment::Path .binaries .find { |path| path.match(/\/#{binary}$/) } end end end end
18.571429
53
0.576923
e2cc4b7e4e69dc1c18278a7017dc5aa0a5770175
2,338
require_relative '../../../test_helper' module Troo describe List do let(:described_class) { List } let(:described_instance) { Fabricate.build(:list) } subject { described_instance } context 'attributes' do it 'should have a name attribute' do subject.name.must_equal 'My Test List' ...
22.921569
68
0.631737
384a02c43bfe8ed7b7b60544957888c4a624ee8c
2,674
# A bullet MUST be a duck-typed renderable. # SimpleCircleBullet is an example of a sprite bullet, while # SimpleBoxBullet is an example of a solid bullet. class AbstractBullet attr_accessor :damage # @return [GeoGeo::Shape2D] attr_accessor :collider # @return [Integral] attr_accessor :x, :y # @return [nil...
21.564516
118
0.588257
ff9c5cebfd015f8e817461d3d1933940f21af71e
5,641
require 'time' require 'date' require 'active_merchant/billing/expiry_date' module ActiveMerchant #:nodoc: module Billing #:nodoc: # == Description # This credit card object can be used as a stand alone object. It acts just like an ActiveRecord object # but doesn't support the .save method as its not bac...
33.378698
115
0.616912
e84a3032361e5782990f40525dcdf23bfcada58b
625
Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html root to: 'pages#home' resources :sessions, only: [:create] resources :games #USER ROUTES get 'user/collections', to: 'users#collection' # get 'user/collections/:id', to: '...
29.761905
102
0.7072
0125a69d0e2c82101ece5ce19a456e711f6149f9
13,069
module Git class Base @working_directory = nil @repository = nil @index = nil @lib = nil @logger = nil # opens a bare Git Repository - no working directory options def self.bare(git_dir, opts = {}) default = {:repository => git_dir} git_options = default.merge(opts) ...
26.780738
112
0.610605
e8e3b0041d423361f46502b6dfb6e98286105f2b
3,073
class Boost < Formula desc "Collection of portable C++ source libraries" homepage "https://www.boost.org/" url "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.bz2" sha256 "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778" head "https://github.com/boostorg/boost.git" ...
28.719626
93
0.632281
1d8e0b8b77e1741557749b02999e6c2867c5930e
542
class Acorn::AuthorizeUserService prepend SimpleCommand def initialize(token) @token = token end def call authorized? end private attr_accessor :token def authorized? decoded_auth_token.present? || errors.add(:token, "Invalid token") && false end def decoded_auth_token @decoded...
15.941176
79
0.678967
ac496cd3ce0f1ec72cb97544a3e8ed5ae52103ef
2,749
# # Copyright 2012-2014 Chef Software, 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 ...
28.936842
127
0.636959
e212e8b44a71e2307cbf69b21de93b288a9953b4
690
require 'formula' class Predictionio < Formula homepage 'http://prediction.io/' url 'http://download.prediction.io/PredictionIO-0.9.0.tar.gz' sha1 'e5724b637382a06c098bbb3617b35f5bcff1b469' depends_on 'elasticsearch' depends_on 'hadoop' depends_on 'hbase' depends_on 'apache-spark' depends_on :java => ...
25.555556
97
0.686957
1855d4cfa1468b3f933d0f17f1121f85bec6431b
353
ActionController::Routing::Routes.draw do |map| map.resources :jobs map.logout '/logout', :controller => 'sessions', :action => 'destroy' map.login '/login', :controller => 'sessions', :action => 'new' map.resource :session map.namespace :admin do |admin| admin.home 'home', :controller => :home end ma...
23.533333
71
0.668555
03029a934e04cb58ea6c34b2a8f21ca7620a1693
707
class ApplicationController < ActionController::Base # Redirects to 'Edit User Features' page if questions haven't been answered def after_sign_in_path_for(resource) if current_user.speed == nil || current_user.guide == nil "/user_features/#{current_user.id}/edit" else root_url end e...
32.136364
113
0.695898
e8430060648786d38a6e18291bafdfac7a787673
1,430
RSpec.describe PokerInputParser, '#parse' do shared_examples_for PokerInputParser do |players_expected_cards| before(:each) do parser = PokerInputParser.new subject @players = parser.players end it "has #{players_expected_cards.count} players" do expect(@players.count).to eq(play...
26
76
0.586014
e858f2a4542756b66b2c3e4d4079031e7858f512
1,068
require 'test_helper' class ArticlesControllerTest < ActionDispatch::IntegrationTest setup do @article = articles(:one) end test 'should get index' do get articles_url assert_response :success end test 'should get new' do get new_article_url assert_response :success end test 'shoul...
21.795918
83
0.713483
ac3ea702efd6ff69548cb33614400c001477b40f
35,560
require File.join(File.dirname(File.expand_path(__FILE__)), 'spec_helper.rb') describe "Database schema parser" do before do @iom = DB.identifier_output_method @iim = DB.identifier_input_method @qi = DB.quote_identifiers? end after do DB.identifier_output_method = @iom DB.identifier_input_met...
42.485066
189
0.673003
873b1c0944d9cab302a0129389c080b5289fd907
634
# # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'sms_otp_reader' s.version = '0.0.6' s.summary = 'SMS library' s.description = <<-DESC SMS library DESC s.homepage = 'http://e...
28.818182
83
0.5347
4a1ca661a63f1df5cf9a12cf3e8167fdb4776ff7
126
MyEngine::Engine.routes.draw do root :to=>'auth#index' match 'facebook/callback' => 'auth#callback' , :via => 'get' end
25.2
63
0.65873
7a6d933edd8ed2b424c6c429e922f06ba7a77941
99
require 'number_words' require 'minitest/autorun' require 'minitest/unit' require 'minitest/pride'
19.8
26
0.808081
bb8216fb6dcf00e3a0c1dae500e0daa5178c9684
137
class AddDescriptionToCharacters < ActiveRecord::Migration[5.1] def change add_column :characters, :description, :string end end
22.833333
63
0.773723
8744a12cff311ca8440100b7202b6591a758d93c
1,588
require 'spec_helper' describe Starcraft2::Member do describe '.initialize' do let(:member) { Starcraft2::Member.new(@options) } before do @options = { 'character' => { 'id' => 333319, 'realm' => 1, 'displayName' => 'NajM', 'clanName' => '', 'c...
31.137255
71
0.586272
bf9d44ce969689419d3d193c27426dd5efece15c
2,224
# coding: utf-8 module Pod class Command class ListPods < Command include Config::Mixin self.summary = 'Check if the latest version of a pod is up to date' self.arguments = [['NAME', :required]] def initialize(argv) @name = argv.shift_argument super end def v...
27.121951
89
0.583183
bb9f0220671cc2cac923277a742295753dcdae8f
9,026
require 'helper' require 'inspec/resource' require 'resources/aws/aws_iam_users' require 'resource_support/aws' require 'resources/aws/aws_iam_users' # Maiusb = Mock AwsIamUsers::BackendFactory # Abbreviation not used outside of this file class AwsIamUsersTestConstructor < Minitest::Test def setup AwsIamUsers:...
32.584838
104
0.580324
1df445197f3682869b9de64d0a116adf46bfb071
1,605
require File.expand_path('../../../test_helper', __FILE__) module Etsy class AboutTest < Test::Unit::TestCase context "An instance of the About class" do setup do data = read_fixture('about/getAbout.json') @about = About.new(data.first) end should "have a shop id" do @a...
36.477273
404
0.646106
089c54cffd3b9894599f39d78ec5f5364c6efe0d
702
require 'rails_helper' require 'shoulda/matchers' describe Contact do it "should have valid factory" do expect(FactoryGirl.create(:contact)).to be_valid end it "should be invalid without name" do expect(FactoryGirl.build(:contact, name: nil)).not_to be_valid end it "should be invalid without sur...
23.4
72
0.740741
e8926c124b38e434dc741516296177f09167b8e8
121
class AddOrderQuantity < ActiveRecord::Migration[5.1] def change add_column :orders, :quantity, :integer end end
20.166667
53
0.743802
f7d80c50876555de2ec760ad4216f35e68ef0ee5
98
name 'ripple-authd' description 'peer-assisted key derivation for ripple wallets' version '0.0.1'
24.5
61
0.785714
4a33f4873ae385038ff4af1af804eac8db571a85
1,976
module Steep class Project class FileLoader attr_reader :project def initialize(project:) @project = project end def each_path_in_patterns(patterns, ext) patterns.each do |path| absolute_path = project.base_dir + path if absolute_path.file? ...
30.875
107
0.55668
260d20ddf4178c7e1ebe776d4bc619412ea463fd
133
module Admin class DashboardController < Admin::BaseController def index redirect_to [:admin,:vendors] end end end
16.625
51
0.706767
4a8af55945262d9b5c33962c73e51ef8e84b216e
932
# This class replicates the behaviour of a `ActionController::TestCase` to allow # us to test the minitest helpers, in RSpec. class FakeMinitestControllerTestCase def initialize @request = FakeRequestResponseObject.new @response = response end def assert(*); end def assert_equal(*); end def assert_...
16.642857
80
0.660944
3363f290e779fcfec356654a50a83c7bf0030d8c
1,159
# # Copyright 2022 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
37.387097
224
0.749784