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
7a6f038aed9191c7eb6ce23567e97a0dbbe27201
958
# Copyright 2021 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, ...
30.903226
74
0.717119
b97665495f296fa555b4a93c0216b17f04a67bb7
44
require 'gnome2' require 'panelapplet2.so'
11
25
0.772727
e8270534b65fa1d3bc1a0e5e8c9d25f2cff447ac
1,693
#Composed in Melbourne Australia (Not in Berlin, livecoding the-world?) #By the Yarra River bar = 1 quart = 2*bar live_loop :schedule do cue :start 7.times do cue :bar sleep bar;cue :quart cue :quart sleep bar end end def say(words) sync :bar with_fx :reverb, room: 100 do with_fx :lpf do ...
21.705128
99
0.638512
f8c49595951f63e931133dd56a49bfd6f3f1177b
2,054
# # Cookbok Name:: td-agent # Provider:: filter # # Author:: Anthony Scalisi <scalisi.a@gmail.com> # # # # 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/L...
25.675
130
0.662123
915990fe5a96a317d2c46148b971f9d76226bd91
1,542
RSpec::Matchers.define :have_styling do |rules| normalized_rules = StylingExpectation.new(rules) chain(:at_selector) { |selector| @selector = selector } match { |document| @selector ||= 'body > *:first' normalized_rules == styles_at_selector(document) } description { "have styles #{normalized_ru...
24.47619
116
0.692607
5da7bf2d7b6d33446dbdeb5651b5f76458f87e6d
6,939
require 'time' require 'openssl' module Aws module Signers class V4 def self.sign(context) new( context.config.credentials, context.config.sigv4_name, context.config.sigv4_region ).sign(context.http_request) end # @param [Credentials] credentials ...
33.684466
82
0.593601
039b0605ae8d97372ee70359df87c7ff3af69fd8
1,201
require File.dirname(__FILE__) + '/../../spec_helper' include Mingle4r::API describe Wiki do it "should set the collection name to 'wiki'" do Wiki.collection_name.should == 'wiki' end it "should element_name to 'page'" do Wiki.element_name.should == 'page' end it "should return the identifier as t...
25.020833
64
0.658618
f836d863f09f3546929c3312869576956481577c
1,822
require 'rails_helper' # rubocop:disable Metrics/BlockLength, Performance/HashEachMethods, RSpec/ContextWording describe "Google Analytics", type: :feature do before do visit map_path end context "Header links" do links = { title: { selector: '#logo a.title-link', descri...
34.377358
88
0.573546
918a7572d8e326be436fe758e905a5801eaf0841
2,989
require 'ip_ranger' RSpec.describe IPRanger::IPRange do it 'converts an IP range to two IPs' do ip_range = described_class.new('1.1.1.1', '1.1.1.2') expect(ip_range.cidrs).to contain_exactly(IPAddr.new('1.1.1.1/32'), IPAddr.new('1.1.1.2/32')) end it 'converts an IP range with two common subnets to CIDR...
33.58427
97
0.592171
e22667336575e34a88c690284be5c74e4dcbe2cf
945
class RemoveColumns < ActiveRecord::Migration def change remove_column :test_target_instances, :remark remove_column :test_targets, :remark remove_column :test_case_templates, :remark remove_columns :test_case_test_case_template_param_instance_associations, :created_at, :updated_at remove_colum...
37.8
234
0.791534
21196b3510217c2272d71de2f03da2f337c7d12b
1,628
# /******************************************************************************************* # * # * raylib [audio] example - Sound loading and playing # * # * NOTE: This example requires OpenAL Soft library installed # * # * This example has been created using raylib 1.0 (www.raylib.com) # * raylib is licens...
32.56
95
0.641278
626a549d319516c343210042e1ef9b70deb0ca8f
4,676
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
35.694656
116
0.704448
d505911c169d735ca8da5e91e6565529795209af
887
Riddle::Client::Versions[:search] = 0x117 Riddle::Client::Versions[:excerpt] = 0x102 class Riddle::Client private # Generation of the message to send to Sphinx for an excerpts request. def excerpts_message(options) message = Message.new message.append [0, excerpt_flags(options)].pack('N2') # 0 =...
31.678571
72
0.733935
33ebc7ba695f6941fb893e65e287de68f9d2f09b
940
require "gfa/record" class GFA # Class-level MIN_VERSION = "1.0" MAX_VERSION = "1.0" def self.load(file) gfa = GFA.new fh = File.open(file, "r") fh.each { |ln| gfa << ln } fh.close gfa end def self.supported_version?(v) v.to_f >= MIN_VERSION.to_f and v.to_f <= MAX_VERSION.to...
20.434783
61
0.605319
91a6393146210f50a733734f38767b5048037d78
768
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "news/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "news" s.version = News::VERSION s.authors = ["Seb Ashton"] s.email = ["seb@madebymade.co.uk"] s.ho...
32
95
0.638021
f75909fb41475ce037818f37654c1ae3f389050e
1,845
module Support module MongoSeed def seed_db category1 = Mongoid::Category.create(:name => 'first') category2 = Mongoid::Category.create(:name => 'second') post1 = category1.posts.create(:name => 'first') post1a = category1.posts.create(:name => 'like first') post2 = category2.posts....
34.166667
70
0.615718
4a11d8cc106ea7df20f3f924ab48d810676792eb
10,345
# # these tests taken from the HTML5 sanitization project and modified for use with Loofah # see the original here: http://code.google.com/p/html5lib/source/browse/ruby/test/test_sanitizer.rb # # license text at the bottom of this file # require File.expand_path(File.join(File.dirname(__FILE__), '..', 'helper')) req...
42.052846
118
0.671629
21dd3d044473deaaeaeceb7b8f14454d17c6dc5f
1,365
#!/usr/bin/env ruby require 'nokogiri' require 'open-uri' require 'json' page = Nokogiri::HTML(open('http://www.alec.org/model-legislation/')) FILENAME = ARGV.first || "alec-model-bills.json" bill_urls = [] bills = [] # helper functions def get_bill_info(url) bill_page = Nokogiri::HTML(open(url)) bill_title = ...
23.534483
110
0.663736
183f6e99517e1b1bf1d75a8799c9b1d3156aae45
776
cask 'axure-rp' do version '9.0.0.3704' sha256 '1b175588b5248db1abfb644b64e5165ac511055edb79be5c1d294b92ec5008b7' # axure.cachefly.net/ was verified as official when first introduced to the cask url 'https://axure.cachefly.net/AxureRP-Setup.dmg' appcast 'https://www.axure.com/release-history' name 'Axure R...
40.842105
165
0.710052
910e525c5cacb73462140c7c8178cbdfdcaa7f3c
1,146
module SunspotCell module Indexer def self.included(base) base.class_eval do def add_documents(documents) documents_arr = Sunspot::Util.Array(documents) docs_attach = [] docs_no_attach = [] documents_arr.each do |document| if document.contains_at...
24.913043
91
0.526178
6aedce2b48bad5bc961385288dc97ff2da9abd0e
3,516
class Kapacitor < Formula desc "Open source time series data processor" homepage "https://github.com/influxdata/kapacitor" url "https://github.com/influxdata/kapacitor.git", :tag => "v1.5.1", :revision => "89828ffff6cf5cd4cb2b34bf883e134395f734de" head "https://github.com/influxdata/kapacitor.g...
34.470588
106
0.646758
ff915b79bdb6342865ce4a353cdb281776b5e708
424
require 'spec_helper' require 'challenge_code' include Challenge data1 = '86,2,3' data2 = '125,1,2' describe 'Stuff' do it 'should not throw an error' do expect{ challenge(data1) }.not_to raise_error expect{ challenge(data2) }.not_to raise_error end it 'shoud work 1' do expect( challenge(data1)).t...
20.190476
49
0.693396
26d7302ff24c1b6c53fec28de35b6a8ddb90e480
3,434
shared_examples_for "#autoload_all syntactic sugar" do before :each do @file_list = [ "#{@base_dir}/module1/a.rb", "#{@base_dir}/module2/longer_name.rb", "#{@base_dir}/module2/module3/b.rb" ] end it "accepts files with and without extensions" do should_no...
45.786667
102
0.639779
bb0a1562a3d6a69a071b2a51ffcabfc399016a66
118
require_relative "holidays/version" module Holidays class Error < StandardError; end def initialize end end
13.111111
35
0.762712
bbc6e8f6b66cbfdab21019ab823fb5ea761b011d
2,838
class ZncConfig def initialize(config_path) @config = parse_config(config_path) end def user_exists(username) return true if @config.key?(username) false end def auth_user(username, password) return false unless user_exists(username) hash = @config[username]['password']['hash'] sal...
26.523364
64
0.551092
1ca31f4f61c3a1af849db605020e0330da9d45f3
2,258
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::RecoveryServicesBackup::Mgmt::V2019_05_13 module Models # # Encapsulates information regarding data directory # class SQLDataDirectoryMapping ...
28.225
79
0.522586
6aff7531210bbaee6b3b17db8b96b1b2eb379140
1,834
# == Schema Information # # Table name: audio_segments # # id :bigint not null, primary key # duration :integer # duration_ms :integer # percentile :float # relative_segments ...
45.85
117
0.522901
f75e5374846a6b5893cd798a168e2d94f1190224
987
cask 'folx' do version '5.1.13647' sha256 'c15ff8719b31a98cfe8566f5bc875aa46278da5dd18fc7c3e26445ef864db150' url "http://www.eltima.com/download/folx-update/downloader_mac_#{version}.dmg" appcast 'http://mac.eltima.com/download/folx-updater/folx.xml', checkpoint: '3e558df977be7022303f45aae20be26c652c...
37.961538
88
0.653495
6227d10815091b19dd44e14f2fbb454d5dc932e2
185
module TokenAuthenticateMe module Generators class ControllersGenerator < ::Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) end end end
23.125
60
0.740541
ff683ccff1502564822ac16afa78e7731feca505
334
class Admin::FetchTrackInfosController < ApplicationController def update track_info = TrackInfo.find params[:id] WikiDataJob.perform_later(track_info: track_info) GoogleJob.perform_later(track_info: track_info) LastfmJob.perform_later(track_info: track_info) redirect_to track_info_path(track_in...
27.833333
62
0.796407
335adbc51210580eb62fb35a969cb99b78409a0c
1,812
class CategsController < ApplicationController before_action :set_categ, only: [:show, :edit, :update, :destroy] # GET /categs # GET /categs.json def index @categs = Categ.all end # GET /categs/1 # GET /categs/1.json def show end # GET /categs/new def new @categ = Categ.new end # G...
24.16
89
0.645143
21dcf79a5e32c188780f890b015e72966b0979c4
4,047
# frozen_string_literal: true # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
35.814159
154
0.713121
79afb5aca21e60c52faf8853f0a06501bae496e0
1,689
# frozen_string_literal: true # typed: true require 'workos/version' require 'sorbet-runtime' require 'json' # Use the WorkOS module to authenticate your # requests to the WorkOS API. The gem will read # your API key automatically from the ENV var `WORKOS_API_KEY`. # Alternatively, you can set the key yourself with #...
30.160714
74
0.741859
ab5a6e926a37334f0d121e59d2d5bb2740864523
825
module Elasticsearch module API module Actions def scroll_each(arguments={}, &blk) valid_params = [ :index, :scroll, :size, :body ] params = Utils.__validate_and_extract_params arguments, valid_params params[:body] ||= {} params[:scroll] ||= "5m" ...
23.571429
79
0.493333
e25a632d566a0879cdc061d8f9de02200d2e89a7
129
class AddFinishPointToTeams < ActiveRecord::Migration[5.0] def change add_column :teams, :finish_point, :integer end end
21.5
58
0.75969
ed90f538c76a6e501035637761ff113762a8226f
2,219
# frozen_string_literal: true module FlowcommerceSpree module Webhooks class CardAuthorizationUpsertedV2 attr_reader :errors alias full_messages errors def self.process(data) new(data).process end def initialize(data) @data = data['authorization']&.to_hash ...
33.119403
113
0.544389
e9d5d52cabb3cea76669c642648480574fe76832
2,914
module Gitlab # Retrieving of parent or child groups based on a base ActiveRecord relation. # # This class uses recursive CTEs and as a result will only work on PostgreSQL. class GroupHierarchy attr_reader :base, :model # base - An instance of ActiveRecord::Relation for which to get parent or # ...
27.752381
80
0.645848
269e0c099be1fa47527fa7ec8737eb03e11d717a
1,396
require 'test_helper' class SchoolsControllerTest < ActionDispatch::IntegrationTest#ActionController::TestCase setup do @password = "password" @confirmed_user = User.create(email: "#{rand(50000)}@example.com", password: @password ) # @unconfirmed_user = User.create(emai...
24.928571
88
0.624642
b91f2a6459a49806aabc0eaab751f31a84cfd52e
2,278
class Embeddable::OpenResponse < ApplicationRecord MIN_FONT_SIZE = 9 MAX_FONT_SIZE = 24 MAX_ROWS = 80 MIN_ROWS = 1 MAX_COLUMNS = 80 MIN_COLUMNS = 10 self.table_name = "embeddable_open_responses" belongs_to :user has_many :page_elements, :as => :embeddable has_many :pages, :through =>...
28.123457
100
0.733538
62e108c7317f236b32bb505e743d4ef679c07321
759
# -*- encoding : utf-8 -*- require 'spec_helper' require 'ImportLogic' # Generate sample CSV. # Import sample CSV # Verify against test db describe ImportLogic do let(:imp) { described_class.new(nil) } let(:csv_test_file) { File.expand_path('./spec/lib/test.csv') } describe 'Reads file' do before do ...
21.083333
102
0.645586
ffe653d46ad87277c3d64d0727919a60694fda37
2,377
require 'fog/core/model' module Fog module Compute class Aliyun class Image < Fog::Model identity :id, aliases: 'ImageId' attribute :description, aliases: 'Description' attribute :product_code, aliases: 'ProductCode' attribute :os_type,...
35.477612
99
0.553639
61caf0f74f0dba4e4faa20619069bb55f6ffa8b6
7,097
=begin #SendinBlue API #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/or...
34.120192
839
0.698605
f737117c74498a153f46aad0fde0a6edefc42dc0
617
cask :v1 => 'hipchat' do version :latest sha256 :no_check url 'https://www.hipchat.com/downloads/latest/mac' appcast 'https://www.hipchat.com/release_notes/appcast/mac' homepage 'https://www.hipchat.com/' license :unknown app 'HipChat.app' postflight do suppress_move_to_applications end zap ...
25.708333
71
0.580227
03fb5fb4e6ce2f932a493ce8d86a24a408376400
1,533
module Notes module Sections class SectionNotesController < ApplicationController before_filter :authorize_user def new @section_note = SectionNote.new end def create @section_note = section.section_note.build(section_note_create_params) if @section_note.save ...
23.584615
84
0.645793
bb6350f3a28a82604c739e929b6906a91e0310c5
2,840
#Hilarious as it seems, this is necessary so bundle exec cucumber works for mongoid cukeage (I'm assuming mongomapper is automatically present because its a git repo) Object.send(:remove_const, 'MongoMapper') if defined?(::MongoMapper) require 'bundler' Bundler.setup require 'rspec/expectations' #require 'byebug' D...
39.444444
182
0.704225
38b0c82e916c4d77e438f0236bd41ef420f3df4a
571
# frozen_string_literal: true class CourseSubmissionMailerWorker include Sidekiq::Worker sidekiq_options lock: :until_executed def self.schedule_email(course, instructor) perform_async(course.id, instructor.id) end def perform(course_id, instructor_id) course = Course.find(course_id) instructor...
30.052632
83
0.805604
ff302541d9ea235fc6e5a6687791aae92b6cc296
1,702
# frozen_string_literal: true lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'karafka/version' Gem::Specification.new do |spec| spec.name = 'karafka' spec.version = ::Karafka::VERSION spec.platform = Gem::Platform::RUBY spec.authors = ...
39.581395
110
0.668625
e82a7c77caf84b8ae3e30a3dd44fd476ee0577f3
3,191
# -*- encoding: binary -*- require_relative '../../spec_helper' require_relative 'fixtures/classes' describe "String#count" do it "counts occurrences of chars from the intersection of the specified sets" do s = "hello\nworld\x00\x00" s.count(s).should == s.size s.count("lo").should == 5 s.count("eo"...
30.103774
81
0.578189
9101a1ee61e8cfb92d72e60405c4c0c4782d5c36
3,914
# 21.07.0 # Source: https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/poppler.rb # Changes: cairo symbols, no bottle class PopplerAT21070 < Formula desc "PDF rendering library (based on the xpdf-3.0 code base)" homepage "https://poppler.freedesktop.org/" url "https://poppler.freedesktop.org/...
29.651515
92
0.69673
acd63960f63aaa716278284adc56e1101e650d84
14,672
# # Author:: Daniel DeLeo (<dan@opscode.com>) # Copyright:: Copyright (c) 2012-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 at...
31.484979
131
0.610755
d54fcce8ffdb5aa7ba10aff0754758b07d4c31af
1,489
require 'ruby_parser' require 'channel9' require 'channel9/ruby/compiler' module Channel9 module Ruby def self.compile_string(type, str, filename = "__eval__", line = 0) stream = Channel9::Stream.new stream.build do |builder| parser = RubyParser.new begin tree = parser.pars...
27.574074
71
0.576226
33d944661cf0a25f43875ede613c0b2a769a8fdc
136
BLACKLIST_BASE = File.expand_path("") BLACKLIST_CONFIG = { "config_path" => 'config', "initializers_path" => 'initializers', }
27.2
42
0.669118
e98d4810fa2e9bd9368f5e12bf62d833dbc736ee
88
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'capistrano/pimcore'
29.333333
58
0.75
9191def54ec5eaae2171754b3de1d69a35854206
2,192
# Sends out emails to administrators # class AdminMailer < ApplicationMailer I18N_SCOPE = 'mailers.admin_mailer' def new_shf_application_received(new_shf_app, admin) # shf_app is used in the mail view @shf_app = new_shf_app set_greeting_name(admin) set_mail_info __method__, admin mail to: ...
31.314286
123
0.738139
115cac4eb02569aab48ef067432acd260ed347f1
92
# frozen_string_literal: true module Elastic TimeoutError = Class.new(StandardError) end
15.333333
41
0.804348
edbb83ef02f0a79bcf677e61fd0daa4af9804907
969
require "codeclimate-test-reporter" CodeClimate::TestReporter.start require "minitest/autorun" require 'dnsimpler' require 'webmock/minitest' class MiniTest::Test def setup DNSimpler.setup do |config| config.base_uri = "https://api.sandbox.dnsimple.com/" config.http_proxy = nil config.debug =...
27.685714
138
0.685243
d5f6ba0e1ec75033363f40eecd9d5d52ab1a9f2e
4,043
require 'spec_helper' describe Hydra::Works::Collection do let(:collection) { described_class.new } let(:collection1) { described_class.new } let(:work1) { Hydra::Works::Work.new } describe '#collections' do it 'returns empty array when only works are aggregated' do collection.ordered_members << wor...
28.878571
85
0.662379
ed0022df0e6fb52b653c9acfaf98bec979f3f211
2,296
class Opencolorio < Formula desc "Color management solution geared towards motion picture production" homepage "https://opencolorio.org/" url "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.1.1.tar.gz" sha256 "16ebc3e0f21f72dbe90fe60437eb864f4d4de9c255ef8e212f837824fc9b8d9c" license "BSD-...
40.280702
123
0.719512
ff6766067f8a50789154d68c65aa3c2831d30d27
1,104
require File.expand_path('../shared/constants', __FILE__) describe "Digest::SHA256#digest" do it "returns a digest" do cur_digest = Digest::SHA256.new cur_digest.digest().should == SHA256Constants::BlankDigest # add something to check that the state is reset later cur_digest << "test" cur_dige...
34.5
86
0.745471
79bb40029dc9559922861d18abf6ecc3112a98b5
283
# frozen_string_literal: true require_relative '../spec_helper' module CodeKindly RSpec.describe Utils do it 'has a version number' do expect(Utils::VERSION).not_to be nil end it 'is frozen' do expect(Utils::VERSION.frozen?).to be true end end end
17.6875
47
0.685512
f8f6105f41429085751e363867be98669ac378c5
112
class Api::V1::AffiliateSerializer < ActiveModel::Serializer attributes :name attributes :display_count end
22.4
60
0.803571
e2c5bcfe998734d0ad18e952c429f50bcea65516
622
require 'selenium-webdriver' require_relative '../pages/login' describe 'Login' do before(:each) do driver_path = File.join(Dir.pwd, 'vendor', 'geckodriver') if File.file? driver_path service = Selenium::WebDriver::Service.firefox(path: driver_path) @driver = Selenium::WebDriver.for :firefox, se...
23.037037
71
0.684887
b9db7d59af84707ba3dd8c13c16af4caefcdeef8
599
Rails.application.routes.draw do get 'sessions/new' root 'application#hello' # root 'static_pages#home' get 'ccsf_rails/index' get 'ccsf_rails/links' get 'ccsf_rails/about' get 'ccsf_rails/assignments' get 'static_pages/home' get 'static_pages/help' get 'static_pages/about' get 'static_pages/c...
28.52381
47
0.684474
d5a83fb0daafd1e5346ed6f853852578ac47c39b
2,588
# frozen_string_literal: true require_relative 'test_helper' require 'okapi/hashing/v1/hashing_pb' require 'okapi' require 'okapi/hashing' class HashTest < Minitest::Test def before_setup Okapi.load_native_library end # rubocop:disable Layout/LineLength # taken from: https://raw.githubusercontent.com/BLA...
44.62069
281
0.816074
87339acec890b5f4a3baed22dc9845824734584a
1,036
class InboundMailParser def initialize(msg) @msg = msg end def proposal @proposal ||= find_proposal(find_public_id(msg)) or return end def comment_user @comment_user ||= find_comment_user(msg) end def comment_text @comment_text ||= find_comment_text(msg) end private attr_reader ...
21.583333
107
0.67471
61e4e517e8a15de75adb97738c346b28e773e371
1,140
RSpec.feature "Users can view fund level activities" do context "when the user belongs to BEIS" do let(:user) { create(:beis_user) } before { authenticate!(user: user) } scenario "can view a fund level activity" do fund_activity = create(:fund_activity) programme = create(:programme_activity,...
36.774194
90
0.750877
f7ef889f514fa1df5bad1e1862d229a2458684e1
386
require "spec_helper" describe String do it "acts as proxy for StringMaster using #prep method" do "<b>This</b> is quite a long text".prep do |s| s.cut(11, 7, :append => '...') s.html_escape end.should == "&lt;b&gt;This...&lt;/b&gt;" "<b>This</b> is quite a long text".prep.cut(11, 7, :append...
27.571429
116
0.582902
62138d3555172a205e398ffddd5a29c2e58c1a42
664
RSpec.shared_context 'Stubbed Apple Receipt Verification' do let(:verify_url) { 'http://example.com/receipt-verify' } before do require 'apple_receipt_service' stub_const('AppleReceiptService::VERIFICATION_URL', verify_url) end subject { described_class.new('fake_receipt') } def stub_receipt_verifica...
31.619048
83
0.698795
61f6fa222ba710b864dabed1ece384fba4a66205
903
require "vector_salad/standard_shapes/basic_shape" require "vector_salad/standard_shapes/path" require "vector_salad/standard_shapes/n" require "vector_salad/mixins/at" module VectorSalad module StandardShapes # Rectangle shape. class Rect < BasicShape include VectorSalad::Mixins::At attr_reader ...
23.763158
59
0.569214
3992cdd6c22d3bf7c7624b89b50c3af08d440dd8
4,861
require_relative 'test_persister' module TargetedRefreshSpecHelper def create_persister TestPersister.new(@ems, ManagerRefresh::TargetCollection.new(:manager => @ems)) end def expected_ext_management_systems_count 2 end def base_inventory_counts { :auth_private_key => 0, ...
45.009259
94
0.575396
b9909b5f2ae7993459ef61abb70133c859a4508a
1,104
name "php" maintainer "Opscode, Inc." maintainer_email "cookbooks@opscode.com" license "Apache 2.0" description "Installs and maintains php and php modules" version "1.1.0" depends "build-essential" depends "xml" depends "mysql" %w{ debian ubuntu centos redhat fedora scientifi...
38.068966
71
0.73279
acf0eace8cdfdd024246e3db6bf19d625bc7b10e
727
class DashboardController < ApplicationController before_action :authenticate_user! def show authorize :dashboard # Return all active/inactive volunteers, inactive will be filtered by default @volunteers = policy_scope( current_organization.volunteers.includes(:versions, :supervisor, :casa_cases...
34.619048
152
0.766162
bba571c5e0eea4d99f37f66784f0e7a4b4df6f2a
118
json.liquid_template do json.id @liquid_template.id json.href api_admin_liquid_template_url(@liquid_template) end
23.6
59
0.838983
1daf1ed40756593f9c5e225ac570d31440155274
930
cask "kindavim" do version "7.0.0" sha256 :no_check url "https://kindavim.app/releases/kindaVim.zip" name "kindaVim" desc "Use Vim in input fields and non input fields" homepage "https://kindavim.app/" livecheck do url "https://kindavim.app/releases/appcast.xml" strategy :sparkle end depend...
31
86
0.727957
f88aad9fdbf158f4d92b6a8dca2230ff9f7b5e14
400
Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV['GOOGLE_OMNIAUTH_PROVIDER_KEY'], ENV['GOOGLE_OMNIAUTH_PROVIDER_SECRET'] provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET'], {:provider_ignores_state => true, :client_options => {:ssl => {:ca_path => "/etc/ssl/c...
66.666667
164
0.76
26b5230b64b4920c19d6d31a7486b5ff970e3c46
2,527
require 'rails_helper' RSpec.describe "Followings", type: :request do let!(:user1) { create(:user) } let!(:user2) { create(:other_user) } let!(:user3) { create(:taro) } before do create_list(:post1, 30, user_id: user1.id) create_list(:post2, 30, user_id: user2.id) create_list(:post3, 30, user_id: u...
32.397436
130
0.671943
080504d27349d7d5b828dfcb16c2f8786204f097
29,822
# # a language data file for Ruby/CLDR # # Generated by: CLDR::Generator # # CLDR version: 1.3 # # Original file name: common/main/pt.xml # Original file revision: 1.42 $ # # Copyright (C) 2006 Masao Mutoh # # This file is distributed under the same license as the Ruby/CLDR. # private def init_data @languages ...
36.060459
69
0.583998
acbe6f55f0dc6af41f1cca62ffe359a2da5a4def
1,794
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 signup_path, params: { user: { name: "", ...
34.5
80
0.615385
87e0657363b768c7b361d11ffdedf242d070adaa
248
class CreateCarts < ActiveRecord::Migration[5.2] def change create_table :carts do |t| t.belongs_to :user, foreign_key: true t.belongs_to :product, foreign_key: true t.integer :quantity t.timestamps end end end
20.666667
48
0.673387
edfc4c08c8e8687240d73c48342825077f2cabac
1,123
module RssNewsBrasil class Rss attr_reader :title, :description, :link, :image_url, :last_build_date, :items def initialize(rss) @rss = rss @channel = @rss.channel set_required_data set_optionals_data ...
23.395833
65
0.581478
8707cb705ebb76427f7c5390642518357836c68d
4,478
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## ## # Original script comments by nick[at]executionflow.org: # Meterpreter script to deliver and execute powershell scripts using # a compression/encoding method based on the powershe...
35.539683
142
0.670835
abbf53ac557a024e6e26e525f0b39e99edaa527d
1,049
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional ...
49.952381
139
0.71878
4a6f57b49e9296d455eb933056f758e6444c9193
1,444
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). # # Examples: # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Ch...
31.391304
111
0.641274
0133820251d8c1082f043185c73617a5553c6bfe
1,731
require 'puppet/configurer' require 'puppet/resource/catalog' class Puppet::Configurer::Downloader attr_reader :name, :path, :source, :ignore # Evaluate our download, returning the list of changed values. def evaluate Puppet.info _("Retrieving %{name}") % { name: name } files = [] begin catal...
25.455882
131
0.616984
d5b9d956aa928f8e42240fb63c2c45f594ebae2c
4,177
# 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::ServiceFabric::V7_0_0_42 module Models # # Represents the health of the stateful service replica. # Contains the replica aggrega...
32.379845
79
0.486713
916de01e9632743e1482c0ef5ae4a632e084abb0
130
class AddAltNamesToNcbiNode < ActiveRecord::Migration[5.2] def change add_column :ncbi_nodes, :alt_names, :string end end
21.666667
58
0.761538
87af0867e1aeb7fbd5e944e8dad17c910418dd19
48
module Urlogger module VisitsHelper end end
9.6
21
0.791667
1ce0b6e532801dee9d2cd20983a3f398e3c26938
1,629
module FbGraph class Photo < Node include Connections::Comments include Connections::Likes include Connections::Likes::Likable include Connections::Picture include Connections::Tags include Connections::Tags::Taggable attr_accessor :from, :name, :icon, :source, :height, :width, :images, :...
31.941176
130
0.610804
e9e31cca9ba60956232cf165fb7888f077dd6ac8
117
class RemoveLikesColumn < ActiveRecord::Migration[5.0] def change remove_column :posts, :likes_count end end
19.5
54
0.760684
08021600565b3d8b6f9fb25cbbf3e29d56c33b94
1,832
# -*- encoding: utf-8 -*- # stub: addressable 2.3.8 ruby lib Gem::Specification.new do |s| s.name = "addressable" s.version = "2.3.8" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Bob Aman"] s.date ...
40.711111
212
0.612991
28032df6ec8040fbf67431795d6264616ef4ce18
827
cask 'colorsnapper' do version '1.3.2' sha256 'd866cf1040cfab7f4036050d1b50f9d9e05a65316607a0c55c3d96eb7443eaef' # amazonaws.com/cs2-binaries was verified as official when first introduced to the cask url "https://s3.amazonaws.com/cs2-binaries/ColorSnapper2-#{version.dots_to_underscores}.zip" appcast 'https:...
37.590909
94
0.725514
e2af4e24bb17bd9ebe9a03a418bfcfdfe6fa7ff2
1,132
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "inspec-test-fixture/version" Gem::Specification.new do |spec| spec.name = "inspec-test-fixture" spec.version = InspecPlugins::TestFixture::VERSION spec.authors = ["InSpec Engineering ...
36.516129
189
0.676678
2157caf73d5fbe495744ee4a0ecac047c9d3c48d
75
class Space def main(arg) return 0 end end # 5.5 local # 42 on pi
8.333333
15
0.613333
1dd9fe9fef152f931e6287317b98bbc8e2909268
551
# frozen_string_literal: true class Syscase class Web # Base page class Page < LB::Project::Page LB::Project::View.setup(self) def covered @covered ||= Syscase::Web.db.repository( Syscase::Web::Persistence::Repositories::Paths ).coverage_count end def cover...
20.407407
60
0.593466
018686851dc44bd4544dc8799b4f3a21e00af949
1,466
cask 'forklift' do version '3.2.7' sha256 '0e96fb834cb12628e3d9715361411fe9bf1a5e7fc28971920e55668ee2008cc7' url "https://download.binarynights.com/ForkLift#{version}.zip" appcast "https://updates.binarynights.com/ForkLift#{version.major}/update.xml" name 'ForkLift' homepage 'https://binarynights.com/forkl...
40.722222
105
0.606412
799a8662b94aacdd935bbc91a8b18ef6ebed2c63
645
require 'spec_helper' describe GitlabSchema.types['Issue'] do it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Issue) } it { expect(described_class.graphql_name).to eq('Issue') } it { expect(described_class).to require_graphql_authorizations(:read_issue) } it { expect(describ...
30.714286
93
0.750388
d53fc62463f599b0e8f2239031de1cb13118bfeb
9,664
# frozen_string_literal: true module RocketChat module Messages # # Rocket.Chat Room messages template (groups&channels) # class Room # rubocop:disable Metrics/ClassLength include RoomSupport include UserSupport def self.inherited(subclass) field = subclass.name.split('::')...
31.376623
83
0.583092
4affb3bfb25a17ec107d7f4a134207e03699a894
122
require "test_helper" class SendEmailJobTest < ActiveJob::TestCase # test "the truth" do # assert true # end end
15.25
44
0.704918
edb4718bbdb2aa60cbebea056482f44bf18ea085
873
# # Author:: Seth Chisamore (<schisamo@opscode.com>) # Cookbook Name:: iis # Recipe:: mod_security # # Copyright 2011, Opscode, 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 # # ht...
30.103448
74
0.74685
3375b8fcf9fb9737eca51ba7515779899fde39bb
80
class Labelling < ApplicationRecord belongs_to :label belongs_to :photo end
16
35
0.8