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
38cef1d21b0ef2232cbd9c3556892d0ea1f2f86b
340
module SkipMongoidQueryCache private def system_collection? return true if cache_skip? super end def cache_skip? return true if selector.reject { |k, v| k == '_id' }.present? return true if options.reject { |k, v| k == 'limit' }.present? end end Mongo::Collection::View.__send__(:include, Ski...
22.666667
66
0.697059
012f9eb11b7110e01fd0c8dbe8b2dd220faa4a21
1,813
# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don...
33.574074
85
0.760618
ed9e70270a67221a2c10f55c5ba69f7ee6867366
2,180
require 'formula' class Gpsim < Formula homepage 'http://gpsim.sourceforge.net/' url 'http://downloads.sourceforge.net/project/gpsim/gpsim/0.26.0/gpsim-0.26.1.tar.gz' sha1 '7e1c3cc5a821b3458717a94a09bc484bf6937b25' head 'svn://svn.code.sf.net/p/gpsim/code/trunk' depends_on 'pkg-config' => :build depends_...
31.142857
87
0.652294
1c325aa9dcc8e1c641b3c1d049e678a2c55fe72d
1,039
# frozen_string_literal: true require "se_providers_api_client/dsl" module SeProvidersApiClient module DSL module LineItems # GET /api/providers/v1/line_items # Get line_items. See https://demo.scienceexchange.com/api-docs/providers#/line_items/getProvidersV1LineItems # @return [Array]. ...
37.107143
119
0.682387
e26c46b2efd56151d78aeea9e53bdedf44f14155
11,566
# Copyright: Copyright (c) 2012 Opscode, Inc. # License: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
34.320475
104
0.604617
abaa21f2bdc7c423b08899a960d213f144a5b232
1,718
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{acts_as_amazon_product} s.version = "2.1.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Scott Nedderman", "Chris Beck"] s.date = %q{2009-07-21} s.email = %q{scott@n...
30.140351
105
0.662398
e80cb18c055a3ce4c49b70e34e8ad5a2549125ef
254
class AddFirstNameLastNameAndImageUrlToUser < ActiveRecord::Migration[5.1] def change add_column :users, :first_name, :string, null: false add_column :users, :last_name, :string, null: false add_column :users, :image_url, :string end end
31.75
74
0.744094
7a1562e329c91c51387762025f729d01fa0e55ef
443
# require 'hanami/model' # require 'hanami/mailer' # Dir["#{ __dir__ }/static_assets_app/**/*.rb"].each { |file| require_relative file } # Hanami::Model.configure do # adapter type: :file_system, uri: ENV['STATIC_ASSETS_APP_DATABASE_URL'] # mapping do # end # end.load! # Hanami::Mailer.configure do # root "#{...
23.315789
85
0.663657
ab80fb99cf938a37d857c1fb8da81c3d7c681105
2,893
# 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 source for your # dat...
40.746479
94
0.718977
87d00c1a1063d7b927c22fadbbc3b7844d960557
595
class SessionsController < ApplicationController before_filter :signed, only: [:new, :create] def new end def create user = User.find_by_email(params[:session][:email]) if user && user.authenticate(params[:session][:password]) sign_in user redirect_back_or user else flash.now[:er...
20.517241
81
0.678992
ac8197e6c5471f3a2f46d667d26cf4b43ca26464
1,314
Pod::Spec.new do |s| s.name = 'JSQMessagesViewController' s.version = '7.3.4' s.summary = 'An elegant messages UI library for iOS.' s.homepage = 'http://jessesquires.github.io/JSQMessagesViewController' s.license = 'MIT' s.platform = :ios, '7.0' s.author = 'Jesse Squires' s.social_media_url = 'https://twitter....
48.666667
131
0.734399
912944065bd988a6359e396d15ec0a6498b134cd
848
class Bcal < Formula desc "Storage conversion and expression calculator" homepage "https://github.com/jarun/bcal" url "https://github.com/jarun/bcal/archive/v1.9.tar.gz" sha256 "5d075deaef087680ea4c153ed5f0696f8be149a59ce0e5aaeb3f5b1180b2ec81" bottle do cellar :any_skip_relocation # sha256 "7e4e6c646d...
36.869565
93
0.775943
8713ddc34f401763651b95181a04f4225b973bce
6,062
# # Cookbook Name:: cpe_nudge # Resources:: cpe_nudge_install # # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 # # Copyright (c) 2019-present, Uber Technologies, Inc. # All rights reserved. # # This source code is licensed under the Apache 2.0 license found in the # LICENSE file in the root directory...
26.942222
77
0.605246
d5edda62f499b9370ea3b487d32db5399d8512e6
32
module LedgerAccountsHelper end
10.666667
27
0.90625
b988de3d9c358eb1158864f477f9375f9aaa6c48
6,272
# Copyright (C) 2009-2013 MongoDB, 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 ...
34.651934
129
0.685906
5d0d35291eb7f383c0b5dfdb992525dddcb4e5ea
1,658
class ApplicationController < ActionController::Base SECRET_KEY = Rails.application.secrets.secret_key_base.to_s def hello # render html: "Hello, world from Azure App Service on Linux! Render User json" render file: 'public/index.html' end def ping render json: {message:"Farm Juan Api is up...
30.703704
155
0.664656
bf0e592a9773102a9cfeae640f1f45410ba5422a
2,034
class Gopass < Formula desc "The slightly more awesome Standard Unix Password Manager for Teams" homepage "https://www.justwatch.com/gopass" url "https://github.com/justwatchcom/gopass/releases/download/v1.6.10/gopass-1.6.10.tar.gz" sha256 "2b481d0847abb2cb2446dfca6533c2e051b976011f42745c1ab1abbbf0bbdc8b" hea...
34.474576
93
0.681416
ffc0c98434c7dc4c6923722bfb3b0af59cced2d3
895
module Spree class StockMovement < Spree::Base QUANTITY_LIMITS = { max: 2**31 - 1, min: -2**31 }.freeze belongs_to :stock_item, class_name: 'Spree::StockItem', inverse_of: :stock_movements belongs_to :originator, polymorphic: true after_create :update_stock_item_quantity with_op...
22.948718
88
0.686034
5d47b7ae8766300b530115d24658999b17351f3e
4,039
module Supply class Setup def perform_download UI.message("🕗 Downloading metadata, images, screenshots...") if File.exist?(metadata_path) UI.important("Metadata already exists at path '#{metadata_path}'") return end client.begin_edit(package_name: Supply.config[:package...
33.380165
112
0.649913
623f57231e6e9f8b62a4eb342c1a8987a1cf40b4
506
module SessionsHelper # Logs in the given user. def log_in(user) session[:user_id] = user.id end # Returns the current logged-in user (if any). def current_user @current_user ||= User.find_by(id: session[:user_id]) end # Returns true if the user is logged in, false otherwise. def logged_in? ...
18.071429
59
0.679842
38e38c54546f4632cb094f0cbea61b0e743c9000
885
class SiteAnnouncement < ActiveRecord::Base class BodyHelper include ActionView::Helpers::TextHelper include ActionView::Helpers::TagHelper include ActionView::Helpers::UrlHelper end belongs_to :site_announcement_category belongs_to :announcer,:polymorphic=>true scope :headline_announcements,:c...
24.583333
136
0.729944
032c8b38d663460448ec8d1df30191e128c0b478
14,381
require 'open-uri' require 'nokogiri' require 'base64' require_relative 'register' DIRECTIVE_CODE = /\d+\/\d+(\/[A-Z]+)?/ WHITESPACE_WITH_NBSP = /\s|\u00A0/ RSFs = FileList[ 'legislation.rsf', 'product.rsf', 'procedure.rsf', 'body-type.rsf', 'body.rsf' ] CACHE = './cache/' STORE = 'nando.catalogue.sqlite' ...
46.691558
383
0.697378
bbd6b103ef118490dcd33828bf0cc6417ec86d25
180
require_dependency 'support/application_record' module Support module Common class Program < ApplicationRecord self.table_name = 'commonx.programs' end end end
18
47
0.75
ff398f269be6c5db1810ca125b9dc361e8b63735
7,094
require File.join(File.dirname(__FILE__), 'spec_helper') class TestPacket < Nanite::Packet @@cls_attr = "ignore" def initialize(attr1) @attr1 = attr1 end end describe "Packet: Base class" do before(:all) do end it "should be an abstract class" do lambda { Nanite::Packet.new }.should raise_error(...
32.099548
122
0.693544
0115d75d09ae222de9b05c2a647a5d8b1914b432
442
# # Cookbook Name:: build # Spec:: default # # Copyright (c) 2015 The Authors, All Rights Reserved. require 'spec_helper' describe 'build::lint' do context 'When all attributes are default, on an unspecified platform' do let(:chef_run) do runner = ChefSpec::ServerRunner.new runner.converge(describ...
18.416667
74
0.69457
ab1f966e13b2bb8b9bb62d4e979b4511f2452ccf
71
class ContentsController < ApplicationController def index end end
14.2
48
0.816901
acf6c3fd6e9a3b20a1ba1dc449773be81358d9a6
3,323
# Copyright (C) 2016 Colin Fulton # All rights reserved. # # This software may be modified and distributed under the # terms of the three-clause BSD license. See LICENSE.txt # (located in root directory of this project) for details. require_relative './each_works' require_relative './match_result_basics' def expressi...
27.92437
89
0.631959
6172da6e43edf4d0960c36931c5649c07a503f39
947
$:.push File.expand_path("../lib", __FILE__) require "r509/validity/redis/version" spec = Gem::Specification.new do |s| s.name = 'r509-validity-redis' s.version = R509::Validity::Redis::VERSION s.platform = Gem::Platform::RUBY s.has_rdoc = false s.summary = "A Validity::Writer and Validity::Checker for r509,...
36.423077
103
0.715945
61f696c47abed49211698b118cc88d6172ecb2e2
417
# == Schema Information # # Table name: list_subscribers # # id :integer not null, primary key # email :string not null # subscribed :boolean default(TRUE) # user_id :integer # created_at :datetime not null # updated_at :datetime not null # ...
26.0625
55
0.580336
0826fb80fd34441bfc110aadd41e6eef27f9a3e1
1,678
require 'rails_helper' RSpec.describe Task, type: :model do let(:user) {FactoryBot.create(:user)} let(:project) {FactoryBot.create(:project, user: user)} let(:task) {FactoryBot.create(:task, project: project)} it 'user after Factory valid with valid attributes' do expect(task).to be_valid end describ...
25.424242
87
0.628129
d5d01a6bc6d463d96506e824ed189f955d217c74
468
module Locomotive module SitesHelper def ordered_current_site_locales current_site.locales + (Locomotive.config.site_locales - current_site.locales) end def options_for_site_locales Locomotive.config.site_locales.map do |locale| [I18n.t("locomotive.locales.#{locale}"), locale] ...
22.285714
84
0.681624
384f4886d05cf6d7a45960480b7f9cce33317f8e
1,514
class Admin::ReviewsController < Admin::ApplicationController before_action :current_paper, if: -> { params.has_key?(:paper_id) } def approve review = @paper.reviews.create(user: current_user, reviewed: "approve") review.approve! @paper.activity.notify("paper_status_changed", @paper) redirect_to ad...
32.913043
103
0.754293
1d05f534685db310e3eca08a43cbbc93918acb43
230
class Fix2014BExamDates < ActiveRecord::Migration def change Semester.find_all_by_exams_end(DateTime.new(2014, 8, 1)).each do |s| s.update_attributes :exams_end => DateTime.new(2014, 8, 8) s.save end end end
25.555556
74
0.708696
386996161cd3e1231ba4f5c73d30842d17cde37a
6,676
require 'test_helper' module Rails3JQueryAutocomplete module Orm class ActiveRecordTest < Test::Unit::TestCase include Rails3JQueryAutocomplete::Orm::ActiveRecord context "#get_autocomplete_order" do context 'order is specified' do should 'returns that order option' do ...
34.95288
148
0.579688
b9debf643b3db54dcf8cdd2b302a134a2edfc52b
1,947
module Seed class ExperimentSeeder include ActiveSupport::Benchmarkable class << self delegate :transaction, to: ActiveRecord::Base end def self.create_current_experiment(start_time:, end_time:, experiment_name:, max_patients_per_day:) transaction do Experimentation::Experiment.c...
41.425532
110
0.709296
bfdf5e2e9492b808ae60df08db652a477f4ed4c2
47
module ArelTransformer VERSION = "0.1.0" end
11.75
22
0.723404
081adaf702f06bb9df11905f7d1b963cf4d36b17
1,756
# # Authors:: AJ Christensen (<aj@chef.io>) # Richard Manyanza (<liseki@nyikacraftsmen.com>) # Copyright:: Copyright (c) Chef Software Inc. # Copyright:: Copyright 2014-2016, Richard Manyanza. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may...
32.518519
101
0.68451
01d63d34f4c71c8a60b68cb86fa37c5f138ee4b4
228
json.id service.id json.channel service.channel json.on_post service.on_post json.on_comment service.on_comment json.type service.type json.webhook_url service.webhook_url json.name service.name json.icon_name service.icon_name
25.333333
36
0.859649
1c91ca0eb99751822034f6fb9fbe1e96cfc9edf1
467
require 'rails_helper' RSpec.describe 'Webhooks::LineController', type: :request do describe 'POST /webhooks/line/{:line_channel_id}' do it 'call the line events job with the params' do allow(Webhooks::LineEventsJob).to receive(:perform_later) expect(Webhooks::LineEventsJob).to receive(:perform_later...
35.923077
73
0.72591
269fbd66bccc021d0444f5c638ba80fe7864fd44
1,997
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum, this matches ...
41.604167
85
0.767151
ed99f5afa4cc2fc2af20460cbc634e9485861486
1,397
# Set up gems listed in the Gemfile. # See: http://gembundler.com/bundler_setup.html # http://stackoverflow.com/questions/7243486/why-do-you-need-require-bundler-setup ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) # Require ge...
29.104167
89
0.724409
91e1ba4a7ee818e604250adddade5643febc17f3
3,885
# encoding: utf-8 require "logstash/inputs/base" require "logstash/namespace" require "socket" # for Socket.gethostname require "stud/interval" require "rufus/scheduler" # Periodically run a shell command and capture the whole output as an event. # # Notes: # # * The `command` field of this event will be the command r...
30.116279
128
0.651223
e9c4ae1618715c84ecf7e2ae66692253367f45db
1,458
require File.expand_path('../../env', __FILE__) task :doc_prep do output_dir = "#{RESULTS}/doc" manifest_dir = "#{RESULTS}/manifests" if File.directory?(output_dir) FileUtils.rm_r output_dir end if File.directory?(manifest_dir) FileUtils.rm_r manifest_dir end FileUtils.mkdir_p manifest_dir ...
30.375
103
0.66941
5d8739916f58b9ffba701993d71b465c07f04b16
35
module MemberMfaSessionsHelper end
11.666667
30
0.914286
7a896b42a598a95862b7b92362ebdab18ff663a3
123
require 'test_helper' class UserMailerTest < ActionMailer::TestCase # test "the truth" do # assert true # end end
15.375
45
0.707317
d5dbb8bcd05182741fe415a81280d26e4e6dc2e5
6,906
# Copyright (C) 2014-2015 MongoDB, 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 ...
26.561538
85
0.576166
e20ea4674b4846d4639773249fdf8999e08e1d4a
3,083
# Generated by jeweler # DO NOT EDIT THIS FILE DIRECTLY # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "devise-i18n-views" s.version = "0.2.8" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :require...
32.797872
105
0.636393
1d7fc508d58909af66c7443175d2d6f4fc7b2415
6,004
# frozen_string_literal: true require "bundler/vendored_thor" unless defined?(Thor) require "bundler" module Bundler class GemHelper include Rake::DSL if defined? Rake::DSL class << self # set when install'd. attr_accessor :instance def install_tasks(opts = {}) new(opts[:dir], op...
29.576355
148
0.624584
8752592f21b91cea65ca5f2b81d9fc55bb1a0ebd
290
# frozen_string_literal: true RSpec.describe StoryKey::Generator do subject(:call) { described_class.new(bitsize:, format:).call } let(:bitsize) { StoryKey::DEFAULT_BITSIZE } let(:format) { :bin } it 'generates a binary string' do expect(call).to match(/[01]{256}/) end end
24.166667
64
0.696552
18cff8f880ff42095de46c0f9e1462735401666a
246
# frozen_string_literal: true require 'spec_helper' describe 'profile::database_server' do on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } it { is_expected.to compile } end end end
17.571429
40
0.674797
b9a0f3b5e3c9bc35a2c4ac9fc453213384c5abb0
3,969
module Console::ModelHelper def gear_group_states(states) return states[0].to_s.humanize if states.uniq.length == 1 "#{states.count{ |s| s == :started }}/#{states.length} started" end def gear_group_state(states) css_class = if states.all? {|s| s == :started} 'state_started' elsif states...
31.007813
164
0.657848
6a6c2bcb30a47b83c77754ac5a48df8be463fb89
5,756
require 'spec_helper' describe GroupsController do before do Feature.activate(:collaborator_groups) end describe 'GET #index' do let(:group1) { create(:group) } let(:group2) { create(:group) } before do expect(Group.all).to include(group1, group2) end it 'assigns groups' do ...
27.150943
96
0.587735
e81437da002d9a8ef4485087ef963d098c41cc84
1,803
# frozen_string_literal: true module Solargraph # The namespace for pins used in maps. # module Pin autoload :Common, 'solargraph/pin/common' autoload :Conversions, 'solargraph/pin/conversions' autoload :Base, 'solargraph/pin/base' autoload :BaseMethod, 'solargrap...
47.447368
71
0.672768
871091044764c8639a7b23af4e17e067140d8b67
453
require 'stylus' require 'stylus/tilt' module Middleman module Renderers # Sass renderer module Stylus # Setup extension class << self # Once registered def registered(app) # Default less options app.set :styl, {} app.before_configuration do ...
15.62069
45
0.567329
0110f8a4f34fb683e362cafb4ddb8e6d0a08628b
208
desc 'qlvideo' do latest = github('Marginal', 'QLVideo').first version = latest.name.gsub(/Release/, '').strip url = latest.assets.first.browser_download_url Latest.new version: version, url: url end
29.714286
49
0.721154
e200835053d6372492ffdfd7d70051e14bdd1847
248
# frozen_string_literal: true module ActsAsTaggableOnMongoid module Models # A class representing all tags that have ever been set on a model. class Tag include ActsAsTaggableOnMongoid::Models::Concerns::TagModel end end end
22.545455
71
0.754032
4a49e05aed5d2026b44bfa5043c726888acb095d
2,066
# frozen_string_literal: true require 'test_helper' class TimelinesControllerTest < ActionDispatch::IntegrationTest setup do @timeline = timelines(:timeline_1) @user = users(:users_1) sign_in @user end test 'should get index' do get timelines_url assert_response :success end test 'shou...
25.195122
112
0.712972
acaff90e6f831b2ebec85fb1fdd4512a150ab71d
32
module PortfolioNamesHelper end
10.666667
27
0.90625
288b64fee74201a353f1069ba00d7adf9149e3fe
4,208
module ApiaiResponses def simple_apiai_response { id: "93ae6b04-9f27-496d-a135-1863384fad4c", timestamp: "2017-09-27T19:14:04.693Z", lang: "it", result: { source: "agent", resolvedQuery: "ciao!", action: "input.welcome", actionIncomplete: false, para...
24.323699
63
0.469582
bf82037007b5d1bb8054ea2f4c0b15f2632ab7d8
13,521
=begin #OpenAPI Extension with dynamic servers #This specification shows how to use dynamic servers. The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech OpenAPI Generator version: unset =end require 'date' require 'json' require 'logger' require 'tempfile' require 'time' require...
34.669231
118
0.632128
f755b0ad2edb65347888a5ebe35599a7678c1a13
11,030
require 'fluent/plugin/output' require 'fluent/timezone' require 'fog/openstack' require 'zlib' require 'time' require 'tempfile' require 'open3' module Fluent::Plugin class SwiftOutput < Output Fluent::Plugin.register_output('swift', self) helpers :compat_parameters, :formatter, :inject def initialize...
35.352564
206
0.64379
edf3ff93c98762a1ef5763e6873317c262c3c456
388
require 'spec_helper' describe Order do describe 'schema' do it { expect(subject).to have_db_column(:user_name).of_type(:string) } it { expect(subject).to have_db_column(:user_email).of_type(:string) } it { expect(subject).to have_db_column(:user_phone).of_type(:string) } end describe 'associations'...
27.714286
74
0.716495
bf78b900b3ba8d70aede2505b84d82f7f0f8d64d
13,169
RSpec.describe Mdm::Workspace, type: :model do subject(:workspace) do FactoryBot.build(:mdm_workspace) end let(:default) do 'default' end it_should_behave_like 'Metasploit::Concern.run' context 'factory' do it 'should be valid' do workspace = FactoryBot.build(:mdm_workspace) expec...
26.285429
125
0.601336
ed4f54cdcdf486c3c932e3416dc28f3f84a67f03
545
test_name "group should not create existing group" name = "test-group-#{Time.new.to_i}" step "ensure the group exists on the target node" on(agents, puppet_resource('group', name, 'ensure=present')) step "verify that we don't try and create the existing group" on(agents, puppet_resource('group', name, 'ensure=presen...
34.0625
63
0.73211
4acf27e10ab6d3994a740fcfcff102eb36eb3505
2,019
class Harfbuzz < Formula desc "OpenType text shaping engine" homepage "https://github.com/harfbuzz/harfbuzz" url "https://github.com/harfbuzz/harfbuzz/releases/download/2.6.8/harfbuzz-2.6.8.tar.xz" sha256 "6648a571a27f186e47094121f0095e1b809e918b3037c630c7f38ffad86e3035" bottle do cellar :any sha256 ...
31.546875
161
0.718177
0852eba1c905d34c7a45858fdfeb51c1e8718d67
1,205
module Patterns # Doctors -> Object # # Acts as a single object containing multiple other objects that it manages. (This is an example of the Component pattern, or Object Composition) class Doctors # The surgeon object attr_accessor :surgeon # The oncologist object attr_accessor :oncologist ...
32.567568
147
0.718672
4a4800863562674d15560d69857188e0a13fcfc3
283
cask 'terraform-0.13.2' do version '0.13.2' sha256 '7af2f9c03e8687c87e7798178a2dac9a3061955eb19f0f69501475e017b8d8f6' url "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_darwin_amd64.zip" name 'Terraform' homepage 'https://www.terraform.io/' end
31.444444
97
0.777385
ac7393337a3be6bc0c6356cfa4894a8ba74e5b54
33
require "middleman-critical_css"
16.5
32
0.848485
08d1d88fcdafecc3148ef5450ed5cd05db212633
53,901
# frozen_string_literal: true require('spec_helper') RSpec.describe ProjectsController do include ExternalAuthorizationServiceHelpers include ProjectForksHelper using RSpec::Parameterized::TableSyntax let_it_be(:project, reload: true) { create(:project, :with_export, service_desk_enabled: false) } let_it_b...
30.906537
150
0.63355
61dce278119011da792c40b68f867ea19a364579
1,797
# frozen_string_literal: true class UserLettersController < ApplicationController respond_to :html, :xml, :json before_action :authenticate_user!, only: %i[new create destroy] def show @user_letter = UserLetter.find(params[:id]) redirect_to(letter_path(@user_letter.letter_id)) && return end def new...
33.277778
114
0.708403
2138c292c52cfef438af4687944fdee82646ab23
9,110
# frozen_string_literal: true require 'cancancan' require 'ethereum_api' require 'info_api' class Kyc < ApplicationRecord MAX_BLOCK_DELAY = Rails.configuration.ethereum['max_block_delay'].to_i MINIMUM_AGE = 18 VERIFICATION_PATTERN = /\A(\d+)-(\h{2})-(\h{2})\Z/.freeze IMAGE_SIZE_LIMIT = 10.megabytes IMAGE_F...
30.986395
109
0.632602
1de4c1f279225462af726d0863e4bca083173450
1,513
# # Cookbook Name:: openpds # Recipe:: default # # Copyright (C) 2015 Patrick Connolly (patcon) # # 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 limi...
32.891304
72
0.758096
4a5ef4260a466ffc95cbb647ce5c303ff3db19cf
657
module Markety # Types of keys that can be used to look up a lead. # (Other key types exist, but Markety only supports these at this time.) module LeadKeyType IDNUM = "IDNUM" EMAIL = "EMAIL" COOKIE = "COOKIE" # LEADOWNEREMAIL = "LEADOWNEREMAIL" # SFDCACCOUNTID = ...
27.375
74
0.637747
08c598a0f8294decec6b43a97cf3f135742f4c09
2,353
module Sessions class AccountsController < BaseController rescue_from ActionController::ParameterMissing, with: :handle_missing_params before_action :set_user, only: :create def new return redirect_to(user_path) if logged_in? example_key = 'request_body_example' @message = { ...
23.29703
180
0.626434
1aa9dce017fce84bbea87408f23969ba8518e77f
426
cask "flic" do version "2.1.0" sha256 "8fceaa6d5eedf4a3013519c9e372e3c640419abc28a2dafc00f0219094933309" url "https://misc-scl-cdn.s3.amazonaws.com/Flic.#{version}.zip", verified: "misc-scl-cdn.s3.amazonaws.com/" name "Flic" desc "Driver for the Flic bluetooth button" homepage "https://flic.io/mac-ap...
23.666667
75
0.678404
bb262241403312e27789c9d0bc91fcbb43036b51
602
require 'linguist/blob_helper' require 'rugged' module Linguist class LazyBlob include BlobHelper MAX_SIZE = 128 * 1024 attr_reader :repository attr_reader :oid attr_reader :name attr_reader :mode def initialize(repo, oid, name, mode = nil) @repository = repo @oid = oid ...
15.842105
84
0.607973
28897b5f53a321e2be27b5e4c636a1621158faa6
1,271
require "language/node" class Eslint < Formula desc "AST-based pattern checker for JavaScript" homepage "https://eslint.org" url "https://registry.npmjs.org/eslint/-/eslint-7.28.0.tgz" sha256 "8c4078e6527e35556cc7392e4cc6b7e65e5fd63641ee3618689c42531a015374" license "MIT" bottle do sha256 cellar: :any...
39.71875
122
0.759245
f88b79dc59c1d1828421d41ed38043fbe86709b2
825
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'An interactor with .after_rollback callbacks', type: :integration do let(:interactor_class) do build_interactor do after_rollback :test_after_rollback def perform context.fail! end private def test_after...
23.571429
84
0.738182
d5fcef1246f2808f382379b7320630b53e7245e2
2,472
require 'spec_helper' describe ImportExportCleanUpService do describe '#execute' do let(:service) { described_class.new } let(:tmp_import_export_folder) { 'tmp/project_exports' } context 'when the import/export directory does not exist' do it 'does not remove any archives' do path = '/inv...
30.146341
96
0.633091
267ca6300a96643f6932aa69c849b56cd86b88e2
1,774
module Elasticsearch module Model module Response # Encapsulates the "hit" returned from the Elasticsearch client # # Wraps the raw Hash with in a `Hashie::Mash` instance, providing # access to the Hash properties by calling Ruby methods. # # @see https://github.com/intridea/h...
27.71875
115
0.563698
bbfa5f9f5eca2ad8ffa6af4cd503cd1a090e3e07
1,203
module Bigid module Bgcheck module Auth class Authentication def initialize(connection: Connection.new, username: Bigid::Bgcheck.configuration&.username, password: Bigid::Bgcheck.configuration&.password, token_expiration_time_in_secon...
31.657895
86
0.60266
038db4e66c25bd1ff5a45fcb90f1a626762f5363
243
class CreateBootsyImages < ActiveRecord::Migration[5.1] def change create_table :bootsy_images do |t| t.string :image_file t.references :image_gallery, index: {name: "bootsy_img_gallery"} t.timestamps end end end
24.3
70
0.703704
38d68d2f65c3916735b77d84d75e267f9822eba4
156
# frozen_string_literal: true class SpreadsheetController < ApplicationController def index send_file Modsulator.template_spreadsheet_path end end
19.5
51
0.833333
bffa46d7bfcd345a4244a0d7a32ddc57cbd3cb4e
1,650
# frozen_string_literal: true module RSpec module Oj module Matchers class BeJsonEql include RSpec::Oj::Helpers include RSpec::Oj::Exclusion include RSpec::Oj::Messages attr_reader :expected, :actual def diffable? true end def initialize(...
22.60274
85
0.583636
f82eada869a802cbb956649970aca35fe51a8459
64,508
# frozen_string_literal: true require "abstract_unit" class Map < Hash def category "<mus>" end end class CustomEnumerable include Enumerable def each yield "one" yield "two" end end class FormOptionsHelperTest < ActionView::TestCase tests ActionView::Helpers::FormOptionsHelper silence_w...
44.396421
351
0.633937
f887e40f6e5916f08c57de8f179c88b42edae07d
712
set :rails_env, 'production' server 'dash1.code.org', :app, :web, :db, :primary => true server 'dash5.code.org', :app, :web server 'dash6.code.org', :app, :web server 'dash7.code.org', :app, :web server 'dash8.code.org', :app, :web server 'dash9.code.org', :app, :web server 'dash10.code.org', :app, :web server 'dash11....
35.6
58
0.672753
e834525cb2a3c52365c0dfe1e48fd3ecc5f9a27e
534
module SlackSupport class Emoji def initialize(client) @client = client end def get(name) list[name] end alias [] get def list @list ||= Rails.cache.fetch('slack_support__emoji#list', expires_in: 30.minutes) do resp = @client.emoji_list return {} unless res...
19.777778
89
0.552434
bb5faea885835fd53924aa32ee65b0d81340a02b
906
class Wiki < Formula desc "Fetch summaries from MediaWiki wikis, like Wikipedia" homepage "https://github.com/walle/wiki" url "https://github.com/walle/wiki/archive/v1.4.1.tar.gz" sha256 "529c6a58b3b5c5eb3faab07f2bf752155868b912e4f753e432d14040ff4f4262" license "MIT" bottle do cellar :any_skip_relocati...
33.555556
98
0.754967
6299c114467040835b7893d9371d032ea705d5ef
1,040
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
33.548387
69
0.735577
91a10778636a50f02beb76b17310a0d87cc249a2
14,382
# frozen_string_literal: true require 'spec_helper' describe SFRest::Update do before :each do @conn = SFRest.new "http://#{@mock_endpoint}", @mock_user, @mock_pass end describe '#status_info' do path = '/api/v1/status' it 'can get status' do stub_request(:any, /.*#{@mock_endpoint}.*#{path}/...
39.95
115
0.606383
2643ebc98c366e17d54859059b7ea799cb1f71a6
1,012
# frozen_string_literal: true require 'rails_helper' RSpec.describe Spree::Tax::OrderAdjuster do subject(:adjuster) { described_class.new(order) } describe 'initialization' do let(:order) { Spree::Order.new } it 'sets order to adjustable' do expect(adjuster.order).to eq(order) end ...
28.111111
122
0.684783
ff21452067f509d7fc5669e14c33ec10ada9207c
5,335
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your applica...
44.090909
114
0.765323
4a2fe6053b1475fed83d0a51322a6d5b6f3cb973
8,048
require 'test_helper' describe BrNfe::Product::Gateway::WebServiceSVAN do subject { BrNfe::Product::Gateway::WebServiceSVAN.new(env: :test) } it "deve herdar da class base" do subject.class.superclass.must_equal BrNfe::Product::Gateway::Base end describe 'STATUS SERVIÇO' do describe '#wsdl_status_servico' do...
33.256198
135
0.769384
edde019e6a93554837a7ccc9d0ede656c710fb11
24,782
# encoding: utf-8 ### # # for latest updates on new fancies/exclusives see: # https://updates.cryptokitties.co (official latest updates/timeline) # # or see # https://blog.kotobaza.co/timeline/ # # or see # https://kittyhelper.co/price-floor/exclusive/ # https://kittyhelper.co/pric...
44.412186
202
0.459003
1cf142041595411fcb670aa36f84027c218fce64
4,395
require 'spec_helper' describe 'User updates wiki page' do let(:user) { create(:user) } before do project.add_master(user) sign_in(user) end context 'when wiki is empty' do before do visit(project_wikis_path(project)) end context 'in a user namespace' do let(:project) { creat...
28.354839
111
0.616382
ac1782a9db224abbac89043baaba3499015a362a
43
module Swarmclient VERSION = "0.1.5" end
10.75
19
0.697674
abbd4c0a3d21da13803dbcdec7704447b4764ff9
348
class Kid3 < Cask # note: "3" is not a version number, but an intrinsic part of the product name (ID3 tags) url 'http://downloads.sourceforge.net/sourceforge/kid3/kid3-3.0.2-Darwin.dmg' homepage 'http://kid3.sourceforge.net/' version '3.0.2' sha256 'a1b60a4eea11ca62001365dd28d418c595ce2d073dd4e0ba07bd28a94cb5...
38.666667
91
0.755747
79421e868d0515ecd814f35b23db263f68f79263
4,071
require "factory_girl" require 'rspec/collection_matchers' require "codeclimate-test-reporter" if ENV["CI"] CodeClimate::TestReporter.start end # This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `....
43.774194
129
0.747482
6a8568726f6096205c7735b1ad4f3989df68bd47
286
# frozen_string_literal: true require 'pathname' require 'tmpdir' RSpec.shared_context 'with tmpdir' do let(:tmpdir) { Pathname(Dir.mktmpdir) } after do tmpdir.rmtree if tmpdir.exist? end end RSpec.configure do |config| config.include_context 'with tmpdir', :tmpdir end
16.823529
47
0.741259
1a66f8a7cc2b681573f813e9996ac48a317fd5c6
14,607
describe ResponseController do let(:assignment) { build(:assignment, instructor_id: 6) } let(:instructor) { build(:instructor, id: 6) } let(:participant) { build(:participant, id: 1, user_id: 6, assignment: assignment) } let(:review_response) { build(:response, id: 1, map_id: 1) } let(:review_response_round1)...
43.602985
196
0.67276