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
62315e80c77c66ac503671523ff0dcf9f81678da
9,454
require 'excon' require 'digest' require_relative 'changelog' require_relative '../analytics/app_identifier_guesser' require_relative '../helper' require_relative '../ui/ui' module FastlaneCore # Verifies, the user runs the latest version of this gem class UpdateChecker def self.start_looking_for_update(gem_n...
31.618729
185
0.598477
0369179f1eec9173b57a9daa317d46559d760902
689
Pod::Spec.new do |s| s.name = "ISaMaterialLogIn" s.version = "0.1.0" s.summary = "A Login/SignUp ViewController with Material Design animations and error handling!" s.homepage = "https://github.com/FraDeliro/ISaMaterialLogIn" s.license = { :type => 'MIT', :file...
43.0625
110
0.606676
5d143e18cca108a3ec2115e28356a1507d959ea1
13,265
require 'spec_helper' describe Assessments::Permission do describe '#initialize' do let(:assessment) { create(:assessment) } it { expect(Assessments::Permission.new(assessment).assessment).to eq assessment } end describe '#available_permissions' do it { expect(Assessments:...
22.071547
121
0.596758
62e99bf794be0bf2a4739b9927901110cffb8024
909
# This file was generated automatically by dotnet-releaser - DO NOT EDIT class Allseer < Formula desc "Package Description" homepage "https://github.com/jorelius/AllSeer" version "1.0.0" license "MIT" on_macos do if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? url "https://github.com/jorelius/Al...
30.3
103
0.691969
26d82d4ea153d3e3b6dbc280064fd32910007dff
58,233
module ActiveRecord # Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the # +record+ method to retrieve the record which did not validate. # begin # complex_operation_that_calls_save!_internally # rescue ActiveRecord::RecordInvalid => invalid # puts invalid.record....
50.549479
223
0.624783
21dd451ffb108f6f3247247cb34f4a0a3ebf6c30
1,383
module AutomateApi module Resource class Endpoint < Hashie::Dash property :path property :collect property :method, default: :get property :klass, default: nil property :alias, default: nil end class EndpointNotSupported < StandardError def initialize(endpoint, klass) ...
22.672131
79
0.597252
eddba5e80ee60aad54a1758c71476f78dc165541
2,788
# encoding: UTF-8 control 'V-219256' do title "The Ubuntu operating system must generate audit records for successful/unsuccessful uses of the fchmodat system call." desc "Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, ...
34
79
0.704089
39eb4e8952fb65cc5e39ee4202364fef08b524fc
823
# -*- encoding: utf-8 -*- require File.expand_path('../lib/enumerize/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ["Sergey Nartimov"] gem.email = "info@twinslash.com" gem.description = %q{Enumerated attributes with I18n and ActiveRecord/Mongoid support} gem.summary = ...
41.15
90
0.646416
d5c86658e07185c831f0fe44caf68130efe169cc
5,540
# typed: false # frozen_string_literal: true require "formula" require "missing_formula" require "descriptions" require "cli/parser" require "search" module Homebrew extend T::Sig module_function extend Search PACKAGE_MANAGERS = { macports: ->(query) { "https://www.macports.org/ports.php?by=name&substr...
35.063291
115
0.638087
e8cc7305d5bef80b2c51264c136d729c554aca2a
3,197
require "test_helper" class DowntimeTest < ActiveSupport::TestCase context "validations" do should "validate presence of message" do downtime = FactoryBot.build(:downtime, message: nil) assert_not downtime.valid? assert_includes downtime.errors[:message], "can't be blank" end should "...
31.343137
108
0.69096
018a934cf95728ad81cc6892e7ca0fd34219bfd0
1,148
# Licensed to Elasticsearch B.V under one or more agreements. # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information module Elasticsearch module XPack module API module SQL module Actions # TODO: Descrip...
33.764706
143
0.610627
1d6e2cbbe0d86865192b37bb7e7044a9cf61a65e
176
require "thor" module Hackerrank module Thor module Crawlers end module Generators end module Parsers end module Presenters end end end
9.777778
21
0.647727
e9b59069628ceed80ec2372423ef236fa38775d2
484
# frozen_string_literal: true require "rails_helper" module Renalware module Letters describe Letterhead, type: :model do it :aggregate_failures do is_expected.to validate_presence_of(:name) is_expected.to validate_presence_of(:unit_info) is_expected.to validate_presence_of(:trust_...
26.888889
69
0.739669
210fe66f637cee899b989930d4ee433845221aad
11,008
require 'msf/core' require 'msf/base' require 'msf/ui' require 'msf/ui/console/framework_event_manager' require 'msf/ui/console/command_dispatcher' require 'msf/ui/console/table' require 'find' module Msf module Ui module Console ### # # This class implements a user interface driver on a console interface. # ### clas...
23.322034
109
0.696039
d5804d9e1c0d1a3e0ff0863b5c35e0e037f466ab
584
require 'dotenv' Dotenv.load NEXMO_API_KEY = ENV['NEXMO_API_KEY'] NEXMO_API_SECRET = ENV['NEXMO_API_SECRET'] VERIFY_REQUEST_ID = ENV['VERIFY_REQUEST_ID'] VERIFY_CODE = ENV['VERIFY_CODE'] require 'nexmo' client = Nexmo::Client.new( api_key: NEXMO_API_KEY, api_secret: NEXMO_API_SECRET ) response = client.verify.c...
19.466667
44
0.763699
e2901cdbb4d2abbbbc521a0aaf3ad441a164f060
324
begin puts 10/0 rescue => e puts "\nYou broke the internets!" puts e.class end #You broke the internets! #ZeroDivisionError #=============== class Person def initialize(name) raise ArgumentError, "\nNo name present, sucka!\n" if name.empty? end end Joe = Person.new('') #notice the Argument error messa...
15.428571
69
0.67284
28c491f42e8e3eff9e93ecae109a78b10d1ca09f
1,022
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) require "mirror_theme" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in conf...
37.851852
99
0.731898
b99d84d59c8ec40a3d25a716dc0e35f9fdd7dfd2
3,759
# frozen_string_literal: true require "test_helper" # # Some common specs for breakpoints # module BreakpointSpecs def test_shows_breakpoint_enabled assert_match @regexp, @output.string end def test_shows_breakpoint_hit assert_match @regexp, @output.string match = @output.string.match(@regexp) ...
22.111765
79
0.693269
f8a502719d464c23390d2e36b3cc0584c26e0369
1,371
# coding: utf-8 Gem::Specification.new do |spec| spec.name = "alembic-jekyll-theme" spec.version = "3.0.4" spec.authors = ["David Darnes"] spec.email = ["me@daviddarnes.com"] spec.summary = %q{A Jekyll boilerplate theme designed to be a starting point for any Jekyll websit...
45.7
208
0.687819
39fb0183554e49be32a8046597d427be9b6a53b5
363
# frozen_string_literal: true require_relative 'rails-route-checker/app_interface' require_relative 'rails-route-checker/config_file' require_relative 'rails-route-checker/loaded_app' require_relative 'rails-route-checker/runner' require_relative 'rails-route-checker/parsers/loader' require_relative 'rails-route-check...
33
53
0.85124
1d6300f0541074143bf79da08d91b0b65028fc57
646
# -*- coding: UTF-8 -*- # Persian module module Persian # Persian Text class # Digest Persian texts class Text # Replace english characters with it's key persian value on standard persian keyboard # For now just support QWERTY keyboard def self.english_to_persian_char(text) EN_FA_KEYBOARD_CHAR....
28.086957
98
0.695046
280675348092b66f11bd7e0fe7356ac4e57ca7a4
377
# frozen_string_literal: true title 'maven archives profile' control 'maven archive' do impact 1.0 title 'should be installed' describe file('/etc/default/maven.sh') do it { should exist } end describe file('/usr/local/lib/apache-maven-3.8.3/bin/mvn') do it { should exist } end describe file('/...
19.842105
63
0.679045
b9b41ab24d95ddd101f6528e159cffe29ea3bcee
118
@trips.each do |trip| json.set! trip.id do json.partial! 'api/trips/trip-summary', trip: trip end end
19.666667
58
0.627119
bffb1059cd10e4e7826d29f36cc6c2155ae41ed0
671
def generate_flags config = '' if Gem::Version.new(node['prometheus']['version']) < Gem::Version.new('2.0.0-alpha.0') # Generate cli opts for prometheus 1.x node['prometheus']['flags'].each do |flag_key, flag_value| config += "-#{flag_key}=#{flag_value} " if flag_value != '' end else # Gene...
33.55
88
0.630402
7aa3d3bcbf7ac4fbb0b95ec549652a7b5c0dbc94
322
require 'spec_helper' module GitTransactor describe EAD do let(:ead_file_path) { 'spec/fixtures/ead/wag_108.xml' } let(:ead) { GitTransactor::EAD.new(ead_file_path) } describe '.eadid' do it 'should return the correct eadid' do expect(ead.eadid).to be == 'wag_108' end end end en...
23
59
0.658385
6a8967b5d96933168a0f6502268f52ab7a7c6919
182
RSpec.describe ArchiveMigration do it "has a version number" do expect(ArchiveMigration::VERSION).not_to be nil end it "testing" do ArchiveMigration.recover end end
18.2
51
0.741758
bb3d1befed6bd4c4a5eff50e8f03522fa239b0ca
1,366
class Iojs < Formula homepage "https://iojs.org/" url "https://iojs.org/dist/v1.6.4/iojs-v1.6.4.tar.xz" sha256 "bcbf57c1af6260980bed53f52d1d505eb09b8fa6f938ec70b415f363a96fdcdf" bottle do sha256 "7ba0151933b0e2a91296f5b0c9ae865a65d4b7ee729523427505c9095ef95449" => :yosemite sha256 "d1e66bb417275d8a2b96...
29.695652
95
0.707906
f7883d61ff0a8aa1b036e6eda99618a7e1525e6f
1,173
module Spree module Admin class ImagesController < ResourceController before_action :load_product before_action :load_edit_data, except: :index create.before :set_viewable update.before :set_viewable private def location_after_destroy spree.admin_product_images_url(@...
21.722222
64
0.640239
1ad2f007089dc14f018c44cb938a21a2a18d9e08
2,000
require 'thread' module Celluloid # Maintain a thread pool FOR SPEED!! class InternalPool attr_accessor :busy_size, :idle_size, :max_idle def initialize @pool = [] @mutex = Mutex.new @busy_size = @idle_size = 0 reset end def reset # TODO: should really adjust this b...
21.505376
74
0.557
21d015ba958849e0e567315e564817cfcb669f26
2,696
# # Fluentd # # 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, so...
22.098361
117
0.598294
870f3142c8a2a5137480247aa592e7259406721b
695
Pod::Spec.new do |spec| spec.name = "XColor" spec.version = "0.3" spec.summary = "XColor is a color handling extension for UIColor written in Swift." spec.homepage = "https://github.com/jaumevn/XColor" spec.license = { :type => "MIT", :file => "LICENSE" } spec.source = { :gi...
36.578947
100
0.627338
d51be525855f452ae14979466b13d9835c0ed51b
2,662
require 'active_support/core_ext/hash' module RareMap # RareMap::Options defines all available options of RareMap. # @author Wei-Ming Wu # @!attribute [r] opts # @return [Hash] the details of options class Options # A default group name DEFAULT_GROUP = 'default' attr_reader :opts # Cre...
34.128205
129
0.634861
21bf89e43f806c3f354e9a016497e5cb218552bf
753
cask 'font-monoid-xtrasmall-dollar-0-1-l-nocalt' do version :latest sha256 :no_check # github.com/larsenwork/monoid was verified as official when first introduced to the cask url 'https://github.com/larsenwork/monoid/blob/release/Monoid-XtraSmall-Dollar-0-1-l-NoCalt.zip?raw=true' name 'Monoid-XtraSmall-Dolla...
37.65
107
0.749004
e95eb531c9b3627cc9dc2b9b20c9f4d8b398c774
1,815
#-- copyright # OpenProject Backlogs Plugin # # Copyright (C)2013-2014 the OpenProject Foundation (OPF) # Copyright (C)2011 Stephan Eckardt, Tim Felgentreff, Marnen Laibow-Koser, Sandro Munda # Copyright (C)2010-2011 friflaj # Copyright (C)2010 Maxime Guilbot, Andrew Vit, Joakim Kolsjö, ibussieres, Daniel Passos, Jason...
40.333333
125
0.761983
f8c4fc9b67a133991474b3377107229b47283951
1,096
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'basher/version' Gem::Specification.new do |spec| spec.name = "basher-basher" spec.version = Basher::VERSION spec.authors = ["shuriu"] spec.email = ["stefan.ro...
36.533333
104
0.662409
035345e3410fe915bc565d679bc27486fd45bf92
1,308
class AddOauth2Tables < ActiveRecord::Migration def self.up create_table 'oauth_clients', :force => true do |t| t.string 'name' t.string 'oauth_identifier', :null => false t.string 'oauth_secret', :null => false t.string 'oauth_redirect_uri' end create_table 'oauth_authori...
29.727273
67
0.644495
7a3d40e905f3d29999f6f421b7508ee04d986683
2,871
require "test_helper" class StructUpdateNonExistentAttributeTest < Minitest::Test class Chassis < FormObj::Struct attribute :brakes end class Team < FormObj::Struct attribute :name attribute :cars, array: true do attribute :code, primary_key: true attribute :driver attribute :chassi...
39.875
132
0.53396
61ae68d95ee234174515a594c0490a6ea7cc3062
331
class CreateTaxonConfirmations < ActiveRecord::Migration[5.1] def change create_table :taxon_confirmations do |t| t.integer :taxid t.integer :sample_id t.integer :user_id t.string :strength # "watched" or "confirmed" t.index [:sample_id, :strength, :taxid] t.timestamps end...
23.642857
61
0.667674
79d7a920e5d877c8371540bda9c56587d39b8402
4,950
#-- encoding: UTF-8 #-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2018 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject,...
33.445946
101
0.745859
bf8cfe5b44f5eca27b399185015c130ea629bb98
144
# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_youtubeAudio_session'
36
82
0.8125
6aeeb2bd0cac5a3ddf6b306f343b7a61670c131d
15,453
# frozen_string_literal: true module Engine module Game module G18Dixie module Companies AUCTIONABLE_PRIVATE_DESCRIPTION = 'Auctionable' AUCTIONABLE_PRIVATE_DESC_DETAIL = 'This private cannot be purchased, it may instead be put up for auction as a SR action' POOL_PRIVATE_DESCRIPTION...
44.151429
130
0.545331
265af2ec1e30ca467460a8f6757d04273f2bd615
1,152
require('rspec') require('anagram') require('pry') describe('#anagram') do it("checks if two words are anagrams") do obj = Anagram.new("words", "sword") expect(obj.anagram_checker).to(eq("These words are anagrams.")) end it("checks if two words with different cases are anagrams") do obj = Anagram.new...
38.4
95
0.689236
791e758acd0a9c0faf8629b56746b11ddbd2c4d3
360
# frozen_string_literal: true module Officevibe Error = Class.new(StandardError) InvalidAuthToken = Class.new(Officevibe::Error) class ClientMiddleware < Faraday::Response::Middleware def on_complete(env) case env[:status] when 302 raise Officevibe::InvalidAuthToken, JSON.parse(env.body)...
22.5
75
0.708333
33c01b20c6f2bf27c27c0c1de1a90c90e8f87fcb
3,498
class ZooKeeper # this is the default watcher provided by the zookeeper connection # and is used to monitor all watch events on any paths # watchers are implemented by adding the :watch => true flag to # any #children or #get or #exists calls # you never really need to initialize this yourself class EventHa...
33.314286
112
0.664666
e2e912258e7cb540121b2e052b0499908c5b186a
51
module SugoiWebpageCapture VERSION = "0.0.3" end
12.75
26
0.745098
e2ff607434821c7f530631107c43607e9f981d46
427
before do @errors = Array.new end get '/login' do erb :"/login/index" end post '/login' do user = User.find_by(username: params[:user][:username]) if user && user.authenticate(params[:user][:password]) session[:user_id] = user.id redirect "/questions" else @errors << "Invalid Username or Passwo...
17.08
57
0.64637
037b7d4f5b8e13429ccf199143a3f9cfb29ff173
177
class AddFieldsToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :research_interests, :text add_column :users, :organisation_id, :integer end end
25.285714
53
0.751412
33cd151062238a840242d5594eb15b80510053fd
944
cask 'lightproxy' do version '1.1.27' sha256 'a37df94cbd771e2547924dc31002c7e139dfd1d757aaedb94573cf03b1cda1b4' # github.com/alibaba/lightproxy/ was verified as official when first introduced to the cask url "https://github.com/alibaba/lightproxy/releases/download/v#{version}/LightProxy-#{version}.dmg" appca...
37.76
101
0.630297
1c838f5bbab594027aedc8513092e02a7801a022
557
module Fog module Aliyun class Storage class Real # Initiate a multipart upload # # @param bucket_name [String] Name of bucket to create # @param object_name [String] Name of object to create # @param options [Hash] # # @see https://help.aliyun.com/doc...
27.85
84
0.626571
1129a8f2df47d8122221f130348d417d4153ea6e
179
# frozen_string_literal: true require 'set' module Ped DOMAINS = File.readlines(File.join(File.dirname(__FILE__), 'domains.txt')) .map(&:strip) .to_set .freeze end
17.9
76
0.692737
4a968f7bd3d0324706b342bcd54e3723862c4424
563
# # encoding: utf-8 if os[:family] == 'redhat' describe file('/etc/sysconfig/atop') do it { should be_file } its('content') { should match "LOGPATH" } its('content') { should match "INTERVAL" } end elsif os[:family] == 'debian' describe file('/etc/default/atop') do it { should be_file } its('...
22.52
46
0.642984
7a0577512ed2b8e2e7a877764baefe4a095141a9
324
require 'wgif/cli' require 'wgif/converter' require 'wgif/download_bar' require 'wgif/downloader' require 'wgif/exceptions' require 'wgif/gif_maker' require 'wgif/installer' require 'wgif/info_displayer' require 'wgif/uploader' require 'wgif/validator' require 'wgif/version' require 'wgif/video' require 'wgif/video_cac...
23.142857
29
0.799383
6ab34b2b15b31ed686dd35984418d1f7e37db18d
4,119
require 'spec_helper' describe Article::Page, dbscope: :example do let(:node) { create :article_node_page } describe ".new_size_input" do let!(:form) { create(:cms_form, cur_site: cms_site, state: 'public', sub_type: 'static') } let!(:file1) do SS::File.create_empty!( cur_user: cms_...
34.613445
121
0.563972
acc721ce2fbe6b301ba5c70c81dcaa42238e5066
1,373
class UsersController < ApplicationController def edit @user = User.find_by_id UserParams.build(params).fetch(:id) end # we should allow logged in users to update their pending_organisation_id # and only superadmins should be allowed to update organisation_id # makes me think of a attributes permissions...
35.205128
110
0.744355
e8af712bcd896c26cb35e7cdc43088bfb6d4cf3b
2,740
require File.expand_path("../../Requirements/php-meta-requirement", __FILE__) class PhpCodeSniffer < Formula desc "Check coding standards in PHP, JavaScript and CSS" homepage "https://pear.php.net/package/PHP_CodeSniffer" url "http://download.pear.php.net/package/PHP_CodeSniffer-3.1.1.tgz" sha256 "b69af3322937...
30.10989
125
0.725912
e249a9f578770af88f53b90aae1fa56d0c2c88c7
1,815
# # Be sure to run `pod lib lint FFSpecialKit.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'FFSpeci...
36.3
103
0.654545
7917a15440990bbe98f5c8b93e4ec32984c9e3a3
574
require 'simplecov' require './spec/support/simplecov_quality_formatter' module SimpleCovHelper def start_simple_cov(name) SimpleCov.start do add_filter '/spec/' add_filter '/lib/generators' command_name name formatters = [SimpleCov::Formatter::QualityFormatter] if ENV['TRAVIS'] ...
22.96
65
0.688153
ab5a2d3785156b11b773352a4ba476325f4a3ed6
633
# typed: false RSpec.shared_examples 'rails sub-gem auto_instrument?' do context 'auto_instrument?' do subject(:auto_instrument?) { integration.auto_instrument? } context 'outside of a rails application' do before do allow(Datadog::Tracing::Contrib::Rails::Utils).to receive(:railtie_supported?...
26.375
104
0.680885
388edcecf9274062b27df334293fe50953f0412f
1,025
cask 'datagrip' do version '2019.3.3,193.6494.42' sha256 '8cac9f932f19f8bd5a3d1446bd193f985224157a19acd551917525913beed24f' url "https://download.jetbrains.com/datagrip/datagrip-#{version.before_comma}.dmg" appcast 'https://data.services.jetbrains.com/products/releases?code=DG&latest=true&type=release' name ...
41
253
0.696585
012ee8c7f2316277eeaa6f2e7e19dbdd52463c0d
1,591
require 'spec_helper' describe Instrumentality::Executor do before do allow(Instrumentality::Logger).to receive(:log) end describe '.execute' do context 'when command exits with status different than zero' do let(:command) { 'exit 1' } it 'should raise an error' do expect do ...
25.253968
82
0.639849
ed5ea2fb1c2cfea4a81f22f335175564019bd1e9
1,256
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'jekyll/widgets/version' Gem::Specification.new do |spec| spec.name = 'jekyll-widgets' spec.version = Jekyll::Widgets::VERSION spec.authors = ['Adam Bouqdib'] spec.ema...
39.25
104
0.66242
28e4021bb2a73b02e89bff8c7b016610d97322af
1,853
# Class that holds definitions for all of the pages in RedSky # These can be used to determine if the browser is currently displaying that page # # Field types : # Use :text_field instead of :input if it's a text-field # Use :button instead of :input if it's a button # Otherwise, use the actual HTML element type requi...
26.855072
116
0.637885
e8255a4e95624acc3eb0d296e7c24d11b6689aee
4,152
module DBI # # TypeUtil is a series of utility methods for type management. # class TypeUtil @@conversions = { } # # Register a conversion for a DBD. This applies to bound parameters for # outgoing statements; please look at DBI::Type for result sets. # #...
37.745455
83
0.575626
f748ac9ae192093b2e4788cd393782750f1b8357
430
# frozen_string_literal: true module Neo4j module Driver module Exceptions # Failed to authenticate the driver to the server due to bad credentials provided. # When this error happens, the error could be recovered by closing the current driver and restart a new driver with # the correct credent...
26.875
121
0.718605
62b60b32eff291fc3a8a9469fc88f8be59e7eeee
23
module AdiesHelper end
7.666667
18
0.869565
e2aa2be25190292a70edd180e7477670cbc2fd9b
846
# -*- encoding: utf-8 -*- require File.expand_path('../lib/netsuite/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Ryan Moran', 'Michael Bianco'] gem.email = ['ryan.moran@gmail.com', 'mike@cliffsidemedia.com'] gem.description = %q{NetSuite SuiteTalk API Wrapper} gem.summary...
38.454545
85
0.626478
1c39ed12465adac525e7e539289537e8c9dd41f6
202
class AddPercentDefaultInExpenses < ActiveRecord::Migration[5.2] def up change_column_default :expenses, :percent, 0 end def down change_column_default :expenses, :percent, nil end end
20.2
64
0.752475
e9cc1cb10e68c97925cab0ad7aa35b826fac6e96
387
# frozen_string_literal: true module Flippant class Registry def initialize clear end def register(group, fun = nil, &block) table[group.to_s] = fun || block end def registered table end def registered?(group) table.key?(group.to_s) end def clear ...
12.9
42
0.591731
ac0195c4367cad546f8e4aae650d20f270b82ba6
18,400
# frozen-string-literal: true module Sequel class Database # --------------------- # :section: 7 - Miscellaneous methods # These methods don't fit neatly into another category. # --------------------- # Hash of extension name symbols to callable objects to load the extension # into the D...
34.200743
142
0.667391
f7be51df4bea900aa1ffa5643a248090c937c8d5
839
class Recipe < ApplicationRecord belongs_to :category belongs_to :user accepts_nested_attributes_for :category, reject_if: :all_blank has_many :comments, dependent: :destroy has_many :users, through: :comments has_many :ingredients, dependent: :destroy accepts_nested_attributes_for :ingr...
26.21875
92
0.727056
28ff35c71a42d341085b91e2bca2c5927e15952e
119
class LifeRecord < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base has_many :lifeRecords end
17
37
0.798319
bf1344674904ab696edcc1a5511faea1be4a5f90
546
# frozen_string_literal: true require 'logging_library/custom_formatter' require 'logging_library/logger_factory' require 'logging_library/logger' require 'logging_library/mixins/loggable' require 'logging_library/version' module LoggingLibrary Loggable = Mixins::Loggable LOG_LEVELS = Mixlib::Log::LEVELS.keys.fr...
21
57
0.767399
5de05610894dbba991719b0c96d033e5e553c39d
2,051
################################################################################################### # This script send packets in all VLANs [1-4094] with all possible priorities [0-7]. ################################################################################################### require 'rubygems' require 'racket...
32.046875
99
0.627011
7a40f46db0dd1ca1dfb849c06243539edba81574
576
# # Output ecr repository # require 'kumogata/template/helper' _output "#{args[:name]} ecr repository", ref_value: "#{args[:name]} ecr repository", export: _export_string(args, "ecr repository") _output "#{args[:name]} ecr repository uri", value: _join([ _account_id, "....
33.882353
78
0.519097
4aa3a6232152f478609e4f7b13fa8d00cb4ef207
287
cask 'kubernetes-cli-1.19.11' do version '1.19.11' sha256 'c3b968b7e454376dc249e5968e433673ce14b3f31f2ea298b87fc67a1f8e7ccf' url "https://dl.k8s.io/v#{version}/kubernetes-client-darwin-amd64.tar.gz" name 'Kubernetes Client' homepage 'https://kubernetes.io/' end
31.888889
77
0.728223
037defc7849f61bd8bb3604a4a1c5086754adc2c
3,923
# frozen_string_literal: true require 'singleton' class LitmusHelper include Singleton include PuppetLitmus end def iptables_flush_all_tables ['filter', 'nat', 'mangle', 'raw'].each do |t| expect(LitmusHelper.instance.run_shell("iptables -t #{t} -F").stderr).to eq('') end end def ip6tables_flush_all_tab...
34.113043
130
0.672699
e82b9ee79cd474fbb5311a5914b6a5523818808a
1,119
# -*- encoding: utf-8 -*- Gem::Specification.new do |spec| spec.add_dependency 'activesupport', ['>= 3.0', '< 4.2'] spec.authors = ["Brandon Keepers", "Brian Ryckbost", "Chris Gaffney", "David Genord II", "Erik Michaels-Ober", "Matt Griffin", "Steve Richert", "Tobias Lütke"] spec.description = "Delay...
62.166667
242
0.66756
283e59e378c65c059397fe4a3e07b69871e8d114
347
class LearnBlogCLI::Posts attr_accessor :name, :url, :author, :description @@all = [] def initialize(name=nil, url=nil, author=nil, description=nil) @name = name @url = url @author = author @description = description @@all << self end def self.all @@all end def self.clear ...
14.458333
65
0.608069
389c5d49b9d008a6c8b7a58cac727c11fdbf6140
2,841
# Copyright (C) 2014-2020 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 w...
25.827273
74
0.645195
33b662cfb9d5c7d88a48582a89566b7624c77d74
1,020
require 'discordrb' require_relative '../helpers/general' module Bot::Commands module General extend Discordrb::Commands::CommandContainer command :hello do |event| event.respond "Hello, #{event.user.name}" end command :kuji do |event| # Get command user's voice channel voice_chan...
26.153846
84
0.616667
28805ef3363bf61f145410a8e8a9aa2d0c28d066
1,502
class TwoFactor::Sms < ::TwoFactor attr_accessor :send_code_phase attr_accessor :country, :phone_number validates_presence_of :phone_number, if: :send_code_phase validate :valid_phone_number_for_country def verify? if !expired? && otp_secret == otp touch(:last_verify_at) refresh! true ...
22.41791
90
0.717044
0394c9a4650fd090746d60ce9a93a13a3213a3c2
2,041
# # Be sure to run `pod lib lint MDHomeProject.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'MDHom...
34.59322
106
0.659971
629a1a2b65b36809d84723f6d1e90e6d739b4dad
518
$:.push File.expand_path("../lib", __FILE__) Gem::Specification.new do |s| s.name = "enumerable-detect-value" s.version = '0.1.0' s.authors = [ "Daniel Doubrovkine" ] s.email = "dblock@dblock.org" s.platform = Gem::Platform::RUBY s.required_rubygems_version = '>= 1.3.6' s.files = Dir['**/*'] s.require_...
32.375
84
0.664093
6186e68313bf08040f1a3b25a5232463807e22c2
2,547
# frozen_string_literal: true module Stupidedi module Versions module FunctionalGroups module FortyTen module SegmentDefs s = Schema e = ElementDefs r = ElementReqs CAS = s::SegmentDef.build(:CAS, "Claims Adjustment", "To supply adjustment reason...
43.913793
146
0.584609
8723f41783c7183d29b772ab36eee023bf37a5fc
132
module Geotab class DeviceStatusInfo include Geotab::Concerns::Findable include Geotab::Concerns::Initializable end end
18.857143
43
0.772727
033ba97ff4f07217d809c7a3f4d859a5c2a07f58
160
class AddMorefieldsToUser < ActiveRecord::Migration def change add_column :users, :box_bg_color, :string add_column :users, :theme, :string end end
22.857143
51
0.74375
877a883bed85fffcba4ea09959068e0172cbed3f
324
# => 1.0.0 Initial Release # => 1.1.0 Added delete_object and delete_bucket methods # => 1.1.1 Fixed typo in gemspec and added additional documentation # => 1.2.0 Added additional Fog::Storage::AWS parameter handling # => 1.3.0 Added multi-threaded multipart upload module Ubiquity class S3 VERSION = '1.3.0' end...
32.4
67
0.722222
4aea09618d0c332ec2cf69466b08dd48ed168480
167
# frozen_string_literal: true FactoryBot.define do factory :plan_limits do plan trait :default_plan do plan factory: :default_plan end end end
13.916667
33
0.706587
1a02454784e0578e62edd9a25416305c9a3eae63
933
module RbtcArbitrage module Client attr_accessor :options attr_writer :balance def initialize config={} @options = config @options = {} set_key config, :volume, 0.01 set_key config, :cutoff, 2 set_key config, :logger, Logger.new(STDOUT) set_key config, :verbose, true ...
19.4375
87
0.595927
289f1de8ba4672372c9d7e76c2dbbe291763f86a
9,335
module Hue class Bulb attr_accessor :id, :stash, :options def initialize(light_num, options = {}) self.id = light_num self.options = options end def status JSON.parse Net::HTTP.get(Bridge.uri('lights', id)) end def states status['state'] end def [](...
22.120853
106
0.527799
877e20bba85a67df6ec29d2eca56c71a92be9b3c
197
# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :identifier_global_lsid, class: 'Identifier::Global::Lsid', traits: [:housekeeping] do end end
28.142857
96
0.77665
e935debdca09ef366d3c12a7aff10d095054f340
393
class AccountActivationsController < ApplicationController def edit user = User.find_by(email: params[:email]) if user && !user.activated? && user.authenticated?(:activation, params[:id]) user.activate log_in user flash[:success] = "アカウントが有効化されました" redirect_to user else flas...
26.2
80
0.6743
216e1513d804acc92f88dd864ba2df29fac5f054
156
json.array!(@messages) do |message| json.extract! message, :id, :postfix_queue_id, :postfix_message_id json.url message_url(message, format: :json) end
31.2
68
0.75641
1a39f20002bfa4a27012af38cf684f3f52b75025
411
require 'spec_helper' # Specs in this file have access to a helper object that includes # the OrdersHelper. For example: # # describe OrdersHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("this","that")).to eq("this that") # end # end #...
25.6875
71
0.705596
03635e75107db678fb0e6c56bc860fd2ed9a141b
2,165
class JsonrpcGlib < Formula desc "GNOME library to communicate with JSON-RPC based peers" homepage "https://gitlab.gnome.org/GNOME/jsonrpc-glib" url "https://download.gnome.org/sources/jsonrpc-glib/3.30/jsonrpc-glib-3.30.0.tar.xz" sha256 "841780eb93f0ad3e79a6bda61e803210bdddf21648afac9403d0bfd4e814fb7c" bott...
30.492958
93
0.657275
bbdeb5e7b6ec13cfbffcd7be31cbb87237967231
14,291
require 'test_helper' class NodeControllerTest < ActionController::TestCase # def should_get_index(usermsg) # get :index # assert_response :success # assert_template 'welcome/index' # assert_equal 'layouts/welcome', @response.layout, "Wrong layout" # assert_select 'div#user_bar_frontpage ul li#user-ba...
31.477974
109
0.67637
010e58a6c21655d541301c1369906795a098776f
3,230
# frozen_string_literal: true module Funding class BursaryForm < TraineeForm FIELDS = %i[ funding_type applying_for_bursary bursary_tier applying_for_scholarship applying_for_grant ].freeze NON_TRAINEE_FIELDS = %i[ funding_type ].freeze NONE_TYPE = "none" ...
28.333333
97
0.663777
611b27f154a85e4d9f8af1c48c6aa85457112992
488
namespace 'mk' do desc 'Create a new migration at migrations/YYYYMMDDHHMMSS_name.rb' task :migration, :name do |_, args| make_class_template "migrations/#{Time.now.utc.strftime('%Y%m%d%H%M%S')}_#{args[:name]}.rb", "class #{args[:name].camelize} < ActiveRecord::Migration" end desc 'Create a new model at mo...
37.538462
154
0.688525
f82c8ddef2ab7b73f9e8112eecd26dc6f6ca1a30
1,526
require 'carrierwave' require 'remotipart' require 'bootsy/engine' require 'bootsy/container' require 'bootsy/form_helper' require 'bootsy/form_builder' require 'bootsy/core_ext' autoload :BootsyInput, 'bootsy/simple_form/bootsy_input' # Public: Top Bootsy module module Bootsy ## CONFIGURATION OPTIONS # Default ...
23.476923
67
0.728047
fff3b28b9411d9a7bf93a3accfd3a9a553b15a9c
1,273
gem 'dm-core', '~>0.9.10' require 'dm-core' module DataMapper module Resource class << self alias_method :_dm_shorthand_included, :included def included(target) _dm_shorthand_included(target) parentname, basename = target.name.split /::(?=\w+$)/ if basename parent...
24.018868
90
0.495679