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
4a530e626abf69a8db45cd44a98fcf4986b913c4
791
require 'travis/yml/helper/obj' module Travis module Yml class Msgs include Enumerable, Helper::Obj attr_reader :msgs def initialize @msgs = [] end def each(&block) msgs.each(&block) end def to_a msgs end def concat(other) ...
16.479167
44
0.470291
26d704417de684d0913281b91c9368f39cdb4aac
2,771
require 'rails_helper' require 'support/devise' RSpec.describe ReportsController, type: :controller do login_report describe "GET #location" do it "returns http success" do get :location expect(response).to have_http_status(:success) end describe "Variable Assignments, Display tree Ture " ...
29.795699
107
0.635511
21f9f8df3b688b33fcf1383b17dddd439d2ee225
3,596
class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true belongs_to :user belongs_to :recipient, :class_name => "User", :foreign_key => "recipient_id" validates_presence_of :comment # validates_presence_of :recipient validates_length_of :comment, :maximum => 2000 before_s...
33.924528
180
0.672692
0195d0e1fbc6c542dc70d3d0ab65052d75688dea
1,401
module Application class << self def initialize! load_entities load_lib load_models load_helpers load_restfuls_v1 load_routes load_validations load_comm load_patch load_api end private def load_entities Dir[File.expand_path('../entit...
21.890625
94
0.630978
61d39d113dc7b4ba132cb334888d9c3e669bcfe0
208
module SparkApi module Models class PortalListingCart < ListingCart def self.find(contact_id, *arguments) @contact_id = contact_id super(*arguments) end end end end
14.857143
43
0.649038
79ce1b6d36ebf8dcad1d59978972d06a61d6d963
2,013
module Users class BackupCodeSetupController < ApplicationController include MfaSetupConcern include RememberDeviceConcern before_action :authenticate_user! before_action :confirm_user_authenticated_for_2fa_setup before_action :ensure_backup_codes_in_session, only: %i[continue download] befor...
27.958333
78
0.740189
acbf681eabecd1e281ad14fde5e97bf8f234572c
626
cask "chrysalis" do version "0.8.2" sha256 "4008f87f49271bed6e27f3f7d359ce8537df179cad35dd8b0f6e56b4179b66e4" url "https://github.com/keyboardio/Chrysalis/releases/download/v#{version}/Chrysalis-#{version}.dmg" name "Chrysalis" desc "Graphical configurator for Kaleidoscope-powered keyboards" homepage "http...
27.217391
102
0.722045
e286845ad35549f3884fcb1da14b097cdb1545c9
907
require File.expand_path('../../../spec_helper', __FILE__) describe "File.lchmod" do platform_is_not :os => [:linux, :windows, :openbsd, :solaris] do before :each do @fname = tmp('file_chmod_test') @lname = @fname + '.lnk' touch(@fname) { |f| f.write "rubinius" } rm_r @lname File....
27.484848
66
0.596472
f717277e9b6918d1235a6025c43ab557939df5ba
127
class SettingsController < ApplicationController layout "devise" before_action :authenticate_user! def index end end
14.111111
48
0.787402
e23276967a49b2b76c9ec83e7accbf86d8d1bc8d
333
module TestUnit module Generators class DecoratorGenerator < ::Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) def create_decorator_test template 'decorator_test.rb', File.join('test/decorators', class_path, "#{file_name}_decorator_test.rb") end e...
27.75
112
0.714715
e9f57f15dde25b7937306cd774671430555ded62
9,867
require 'chef/formatters/base' require 'chef/formatters/error_mapper' module ChefSpec class ChefFormatter < Chef::Formatters::Base cli_name :chefspec # Called at the very start of a Chef Run def run_start(version); end def run_started(run_status); end # Called at the end a successful Chef run....
34.865724
108
0.736495
b92a9b1ca85dd58b3c876369291a93efde435921
90
class StaticController < ApplicationController skip_before_filter :ensure_signed_in end
22.5
46
0.877778
1a52dc2d2df8f63593d076a0461027236a054cb8
1,332
class Gocryptfs < Formula desc "Encrypted overlay filesystem written in Go" homepage "https://nuetzlich.net/gocryptfs/" url "https://github.com/rfjakob/gocryptfs/releases/download/v1.8.0/gocryptfs_v1.8.0_src-deps.tar.gz" sha256 "c4ca576c2a47f0ed395b96f70fb58fc8f7b4beced8ae67e356eeed6898f8352a" license "MIT" ...
31.714286
104
0.738739
62b9fb77e6b001512b182f4bc8eb1e490b401336
430
package "yum-s3-iam" do version node['yum_s3_iam']['version'] end template File.join('/', 'etc', 'yum.repos.d', "#{node['yum_s3_iam']['repo_name']}.repo") do owner 'root' group 'root' mode '0644' source 's3-iam.repo.erb' variables :repo_name => node['yum_s3_iam']['repo_name'], :repo_description...
30.714286
91
0.639535
1d80aec337e185b986fe26ea77e68884ff079c7d
618
require 'thor' require 'fxpotato' require 'date' require 'fxpotato/cli_formatter' module FxPotato class CLI < Thor desc "getrate BASE TARGET", "Gets the foreign exchange rate for the given currencies on the chosen date." method_option :date, :aliases => "-d", :desc => "A specific date to get the rate for, e....
29.428571
129
0.666667
b9500cb27f2dbdb71b0ceb6e2bd6e2517b0d4909
835
#!/usr/bin/env ruby # # Put description here # # # # # require 'swig_assert' require 'using_composition' include Using_composition f = FooBar.new if f.blah(3) != 3 raise RuntimeError,"FooBar::blah(int)" end if f.blah(3.5) != 3.5 raise RuntimeError,"FooBar::blah(double)" end if f.blah("hello") != "hello" ...
14.649123
44
0.664671
5d95228a99c84aa264b0962ac336d0afcb6b8e66
1,389
class TreeBuilderReportSavedReports < TreeBuilderReportReportsClass private def tree_init_options(_tree_name) { :full_ids => true, :leaf => 'MiqReportResult' } end def set_locals_for_render locals = super locals.merge!(:autoload => true) end def root_options { :t...
29.553191
92
0.691145
abb745f19b87bd58cbd48fd3755dce892ef5c0c9
651
require 'spec_helper' describe 'gnocchi::client' do shared_examples_for 'gnocchi client' do it { is_expected.to contain_class('gnocchi::params') } it 'installs gnocchi client package' do is_expected.to contain_package('python-gnocchiclient').with( :ensure => 'present', :name => 'py...
21
66
0.631336
bf71fadd2cf64035d48b69bef66b4a10e0065d69
127
class AddChoicesToQuestions < ActiveRecord::Migration[5.2] def change add_column :questions, :choices, :string end end
21.166667
58
0.755906
f8b8ad08e01034a8d2e0c554a7d441887fb21708
323
# frozen_string_literal: true class CreateAnimals < ActiveRecord::Migration[5.2] def change create_table :animals do |t| t.string :name t.string :gender t.date :birthdate_rescuedate t.boolean :rescued t.boolean :adopted t.date :adoption_date t.timestamps end end e...
19
50
0.662539
ac0aa2a9a99d612a13732369c8fb9df41b2e0db5
418
module CourseExports class PrepareJob < ApplicationJob include Loggable queue_as :low_priority def perform(course_export) # Prepare the export. CourseExports::PrepareService.new(course_export).execute # Notify the user who requested the export. unless course_export.user.email_bo...
23.222222
62
0.727273
d53ab5f5165bfc68d28c494552bdffb1717f642d
3,649
require 'json' module ActiveMerchant #:nodoc: module Billing #:nodoc: class KomojuGateway < Gateway self.test_url = 'https://komoju.com/api/v1' self.live_url = 'https://komoju.com/api/v1' self.supported_countries = ['JP'] self.default_currency = 'JPY' self.money_format = :cents ...
31.456897
99
0.605097
386c977be37182d0e31da296e74338c4ca59bf2f
6,460
# Copyright (c) 2009-2013 VMware, Inc. # Copyright (c) 2012 Piston Cloud Computing, Inc. require 'spec_helper' describe Bosh::OpenStackCloud::Cloud do let(:server) { double('server', :id => 'i-test', :name => 'i-test', :flavor => { 'id' => 'f-test'} ) } let(:volume) { double('volume', :id => 'v-foobar') } let(...
33.298969
105
0.61548
f746284063676e767aa6794fb5a6f11955d6992b
1,457
require('matrix') class Cramer def self.solution1(row1, known_term) matrix = Matrix.rows([row1]) determinant = matrix.determinant if determinant.zero? raise ArgumentError.new('The determinant is zero!') end x1 = Rational( Matrix.columns([known_term]).determinant, determin...
21.746269
85
0.633493
0136702d7b840b6a1ad4d69696bb5a4b726df464
1,411
cask 'metasploit' do version '4.17.0+20180709104409' sha256 '6cf63efd2cd51c58f5bb444ed2c52c0d0ec6a782a32a1b7c8e24773c2e844e6f' url "https://osx.metasploit.com/metasploit-framework-#{version}-1rapid7-1.pkg" appcast 'https://osx.metasploit.com/LATEST' name 'Metasploit Framework' homepage 'https://www.metaspl...
38.135135
80
0.693834
26a22c8e5feda87003a9770712269c55d7d4c8f1
280
# frozen_string_literal: true begin require 'rspec/core/rake_task' RSpec::Core::RakeTask.new('spec:postgres'.freeze) do |t| t.rspec_opts = '--tag postgres'.freeze end # rubocop:disable Lint/HandleExceptions rescue LoadError # rubocop:enable Lint/HandleExceptions end
23.333333
58
0.757143
7ae9e377a60759b200de6a9290c4cb60c67913db
1,731
$:.push File.expand_path('../lib', __FILE__) require 'daylight/version' Gem::Specification.new do |s| s.name = 'daylight' s.version = Daylight::VERSION s.platform = Gem::Platform::RUBY s.license = 'Apache-2.0' s.authors = ['Reid MacDonald', 'Doug McInnes'] s.email = ['reidmix@gm...
44.384615
86
0.659157
ac61c3737f3c5f4a5950317317ca8a6e55f57f90
4,322
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'rex' class MetasploitModule < Msf::Post include Msf::Post::Windows::Services def initialize(info={}) super(update_info(info, 'Name' ...
32.496241
125
0.578436
330ad0c6eabf0395d6e411371cc099cfa865f1ea
1,155
module Restfulie module Common module Representation module Atom class Person < XML def initialize(node_type, options_or_obj) if options_or_obj.kind_of?(Hash) @doc = Nokogiri::XML::Document.new() node = @doc.create_element(node_type) ...
23.571429
79
0.440693
abfc041562bdeb2c37326391299d0f2ac586b3d3
147
module Taka module DOM module HTML module UListElement def type self['type'] end end end end end
12.25
25
0.52381
26321e4dec6a14e2f3be4d55c0eb5d14d94f6e9e
553
# frozen_string_literal: true require 'spec_helper' # Before running this spec again, you need to set environment variable BOLETOSIMPLES_ACCESS_TOKEN RSpec.describe BoletoSimples::BankBilletPayment do before do BoletoSimples.configure do |c| c.application_id = nil c.application_secret = nil end ...
30.722222
97
0.759494
210effdb128f4f462336bc263b11a07a27c1a53c
791
require 'fetchers/base_list_fetcher' module VCAP::CloudController class AppUsageEventListFetcher < BaseListFetcher class << self def fetch_all(message, dataset) filter(message, dataset) end private def filter(message, dataset) if message.requested?(:after_guid) ...
24.71875
68
0.648546
1a17cfeb8e73e67d3339580961c96d4ca36e7864
707
#!/usr/bin/env ruby -w require 'rmagick' img = Magick::Image.read('images/Flower_Hat.jpg').first # Make a watermark from the word "RMagick" mark = Magick::Image.new(140, 40) {self.background_color = 'none'} gc = Magick::Draw.new gc.annotate(mark, 0, 0, 0, -5, 'RMagick') do gc.gravity = Magick::CenterGr...
25.25
67
0.660537
1ca24ff299ad7ce4acdd2e40dfd574a955799c4c
633
require 'drb' CLIENTS_COUNT = 5 TASKS_COUNT = 100000 DRb.start_service clients = [] CLIENTS_COUNT.times do |i| clients << DRbObject.new(nil, "druby://127.0.0.1:111#{i}") end puts "start with clients #{clients.size}" $res = 0 $res_count = 0 $mutex = Mutex.new tm = Time.now clients.map do |cl| Thread.new do ...
18.085714
87
0.592417
1a4dcdfaebf912d7033b3de419471a0a9dd555b2
84
Rails.application.routes.draw do mount Marketplace::Engine => "/marketplace" end
16.8
45
0.761905
6a57caa670f99a1581a2142743873a0bcd28d232
41
module Whodunnit VERSION = "0.0.5" end
10.25
19
0.682927
f868f57c5daf7c9da57f5944b07f1ad05c6e23a7
3,003
# == Schema Information # # Table name: requests # # id :bigint not null, primary key # comments :text # request_items :jsonb # status :integer default("pending") # created_at :datetime not null # updated_at :datetime not null # distribu...
31.28125
136
0.663337
b9cb62332eb26b19f14798b179ca15d55a610ff4
177
module GovukContentModels module ActionProcessors class ApproveReviewProcessor < BaseProcessor def process? requester_different? end end end end
17.7
48
0.717514
e8b81c5e1694c2eec6a86e064b44737425877b5d
504
module Driving class SwitchingLanes include SimpleIterator attr_accessor :how def initialize @how = [ "When switching lanes it is important to remember the order of operations.", "First, signal in the direction you would like to move.", "Next, check your rear view mirror, th...
28
150
0.660714
0893cd5a8da358cc47b3f974d1fd99627fecfdbd
1,382
# -*- coding: utf-8 -*- require 'helper' class TestRegressionChartScatter02 < Test::Unit::TestCase def setup setup_dir_var end def teardown File.delete(@xlsx) if File.exist?(@xlsx) end def test_chart_scatter02 @xlsx = 'chart_scatter02.xlsx' workbook = WriteXLSX.new(@xlsx) worksheet ...
27.64
80
0.484805
4aedd89d39ed15f60a8ac4eb14a2a28187298a1b
1,041
# Stolen from Technoweenie's restful_authentication Rails::Generator::Commands::Create.class_eval do def route_resource(*resources) resource_list = resources.map { |r| r.to_sym.inspect }.join(', ') sentinel = 'ActionController::Routing::Routes.draw do |map|' logger.route "map.resource #{resource_list}" ...
34.7
79
0.690682
7a5e33c61babca3e3a19eb6e3d9612859ec25bba
1,621
# frozen_string_literal: true module Ci class RetryBuildService < ::BaseService CLONE_ACCESSORS = %i[pipeline project ref tag options name allow_failure stage stage_id stage_idx trigger_request yaml_variables when environment coverage_regex ...
28.438596
93
0.660086
1ce5abb5e6631379a5d6ef3407db327296371aa9
608
cask "tortoisehg" do version "5.9.3" sha256 "af0a8fe6cfa41e37e67fa08e0a36eabed20863090f7c266688ff93d6c9d29f9a" url "https://www.mercurial-scm.org/release/tortoisehg/macos/TortoiseHg-#{version}-mac-x64-qt5.dmg", verified: "mercurial-scm.org/release/tortoisehg/" name "TortoiseHg" desc "Tools for the Merc...
32
101
0.733553
3385565b348aee474420d1feb02b40df53b9079e
3,554
module RailsAdmin module Config module Actions Edit.class_eval do def self.loading_member Thread.current[:cenit_pins_off] = true yield ensure Thread.current[:cenit_pins_off] = nil end register_instance_option :controller do proc do ...
39.488889
149
0.535734
6298344c7b5e6c5914994619bdb1a3d1d723156c
118
require 'json_to_csv/version' require 'json_to_csv/convert' module JsonToCsv class Error < StandardError; end end
14.75
34
0.79661
1d7874c0dfc6a9cb799e0f7a16e1d7f60a336503
152
class QuestionPolicy < InstrumentPolicy attr_reader :user, :record def initialize(user, record) @user = user @record = record end end
16.888889
40
0.690789
18044a5e98e383a320f2b4a64c0f0494475b728c
3,774
Template_stservice = <<-EOS EOS # #ifndef INCLUDED_MBED # #include "mbed.h" # #endif # #ifndef INCLUDED_BLEDEVICE # #include "BLEDevice.h" # #endif # /* # * Power control service # * Service_Uuid: 0xFF00 # */ # static const uint16_t power_control_char_uuid = 0xFF00; # uint8_t power_control_char_value[8] = {0,}; ...
31.714286
90
0.575517
3811c99194a7a5eeb901e9d42eab709864c0fd97
9,186
require 'sequel_postgresql_triggers' Sequel.migration do up do extension :pg_triggers # RIPENESS CODES # ----------------------------------- create_table(:ripeness_codes, ignore_index_errors: true) do primary_key :id String :ripeness_code, null: false, unique: true String :descripti...
37.190283
101
0.675376
f7b6420d0036c05f0c477173d4bf442090f7e2ce
2,260
# encoding: utf-8 module RuboCop module Cop module Performance # This cop is used to identify usages of # # @example # # bad # [1, 2, 3, 4].map { |e| [e, e] }.flatten(1) # [1, 2, 3, 4].collect { |e| [e, e] }.flatten(1) # # # good # [1, 2, 3, 4].flat...
34.242424
80
0.511947
d581f0d0713e237a6f81b3c475c340b951b9673b
8,548
# frozen_string_literal: true class Integration::KubernetesService < Integration::ServiceBase attr_reader :namespace class_attribute :maintain_tls_spec, default: ActiveModel::Type::Boolean.new.cast(ENV['KUBERNETES_ROUTE_TLS']) def initialize(integration, namespace: self.class.namespace) s...
28.684564
155
0.662494
037ddc28b6d57f920d637f731f7502bccd2823e4
854
# frozen_string_literal: true require "active_support" require "active_support/core_ext/class/attribute" require "active_support/core_ext/object/inclusion" require "spicerack/version" require "around_the_world" require "short_circu_it" require "substance" require "tablesalt" require "technologic" require "redis_has...
26.6875
68
0.818501
d51fd0bfd4cb31e791bab1619fec6b09727e5fee
940
require 'opal/jquery/element' module Browser # {Window} instances are {Native} objects used to wrap native window instances. # # Generally, you will want to use the top level {::Window} instance, which # wraps `window` from the main page. class Window include Native # Returns this {Window} instance ...
22.926829
81
0.648936
26e2e67ebb468b320dd0365ae8aef2f799b1b2c1
672
require "spec_helper" feature "Manage Sessions" do background do create(:event, :full_event) end scenario "As a guest, I want to register " do visit root_path click_link "add-sessions-button" click_link "Register here" fill_in 'participant_name', with: 'Jack Johnson' fill_in 'Your emai...
24
66
0.697917
384df5b668cb303622d07cc0c288517087f3356a
3,202
require 'spec_helper' describe 'nova::conductor' do let :pre_condition do 'include nova' end shared_examples 'nova-conductor' do it { is_expected.to contain_package('nova-conductor').with( :name => platform_params[:conductor_package_name], :ensure => 'present' ) } it { is_expec...
28.336283
119
0.62055
5d0d949ea60b666bdb32a34feec3c6a5755ae608
3,235
# instantiate IdGen with make_class and # call mint_id and update_metadata for it to choose and mint the right types of ids based on tenant config # # Instance of this class is really never used directly by outside code, but one of the subclasses is used. # require 'stash/doi/datacite_gen' # require 'stash/doi/ezid_gen...
36.761364
144
0.692427
91b7d3073fa334c2005df8f25ec52c5a80c3cc05
198
class EmailAndPrintTemplateToCommon < ActiveRecord::Migration def change rename_column :commons, :template_id, :print_template_id add_column :commons, :email_template_id, :integer end end
28.285714
61
0.80303
18c5c3b8c7f5fd3bf996be5fa8892001761ba1f2
2,745
# encoding: UTF-8 require 'ffi' require 'rbconfig' module FreeImage def self.msvc? # If this is windows we assume FreeImage was compiled with # MSVC since that is the binary distibution provided on # the web site. If you have compiled FreeImage yourself # on windows using another compiler, ...
27.45
101
0.698361
28621736f28d1776c86ea73de08e3b52977b105c
2,355
# Copyright 2001-2018 Rally Software Development Corp. All Rights Reserved. require 'spec_helpers/jira_spec_helper' require 'rspec' include JiraSpecHelper describe "The JIRA Custom field for version Tests" do before(:all) do #Set current working dir to yeti root, as ca_agile_central2_jira_connector.rb sees it ...
35.149254
129
0.675584
0819623039a45897470b7086444b940880549548
3,264
# # Author:: Tyler Ball (<tball@chef.io>) # Copyright:: Copyright 2010-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 ...
33.649485
118
0.66636
ff057f9cf0a8eae59d65548efb3d36f2c4fce940
743
# frozen_string_literal: true RSpec.describe Spree::WalletPaymentSource do describe 'setting it as the default' do it 'reports a payment method changed event for subscriptions that use the default payment source' do stub_const('Spree::Event', class_spy(Spree::Event)) user = create(:user) subscr...
35.380952
104
0.732167
e9e22d0fdc1f522ba406d4f9529e077e26690d95
2,214
# frozen_string_literal: false require 'rubygems/test_case' require 'rubygems' require 'fileutils' class TestGemPathSupport < Gem::TestCase def setup super ENV["GEM_HOME"] = @tempdir ENV["GEM_PATH"] = [@tempdir, "something"].join(File::PATH_SEPARATOR) end def test_initialize ps = Gem::PathSuppo...
25.744186
80
0.654472
abbeae5546323c4142cc35a3fb295dc970cc5bb7
1,120
cask 'unity-android-support-for-editor@2018.2.9f1' do version '2018.2.9f1,2207421190e9' sha256 :no_check url "https://download.unity3d.com/download_unity/2207421190e9/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2018.2.9f1.pkg" name 'Android Build Support' homepage 'https://unity3d.com/unit...
31.111111
142
0.716964
0803a5e78f9def04323758cd6ac005c88ff2ce23
2,195
# Copyright © 2011 MUSC Foundation for Research Development # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this list of c...
46.702128
145
0.788155
39bd5158219fa872c772eea1f4a06041fab9cc2e
1,216
# # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # require 'json' payjp_sdk = JSON.parse(File.read(File.join(__dir__, '../sdkconfig.json'))) Pod::Spec.new do |s| s.name = 'payjp_flutter' s.version = '0.3.1' s.summary = 'A Flutter plugin for PAY....
36.848485
104
0.615954
79b5b3f695db17b437dc5ddcc25ae6af39fc5a11
3,292
module Fastlane module Actions class ErbAction < Action def self.run(params) template = File.read(params[:template]) trim_mode = params[:trim_mode] result = Fastlane::ErbTemplateHelper.render(template, params[:placeholders], trim_mode) File.open(params[:destination], 'w') {...
33.938144
146
0.423147
abc90484fc30dd822258912f7553aad5f33b63c9
344
cask 'font-astloch' do # version '1.000' version :latest sha256 :no_check url 'https://github.com/google/fonts/trunk/ofl/astloch', using: :svn, revision: '50', trust_cert: true homepage 'http://www.google.com/fonts/specimen/Astloch' license :ofl font 'Astloch-Bold.ttf' font 'A...
21.5
58
0.656977
6270effacef9bdc544ed04ad891f382a904f3bf5
3,317
# Copyright © 2011-2016 MUSC Foundation for Research Development # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this list...
52.650794
145
0.78987
abb8c632a0d39e5ab98b0dba438d5b44c8fd4e65
2,966
#TODO: Extract Daybreak specific stuff into a Daybreak extension. require_dependency 'application_controller' class PublicAccessExtension < Radiant::Extension version "0.2" description "Provides public access (signup/signin) to website." url "" define_routes do |map| map.tell 'tell' ...
45.630769
220
0.673972
6291e30daab0310d6b2a7b0829997c7f8a3a5f68
757
# frozen_string_literal: true module Agris module Api module Messages class Import < MessageBase def initialize(model) @model = model end def message_number 82_320 end def message_hash { xml: xml_hash } end...
18.463415
66
0.471598
e2972a93f323bf2723ccc15ec6e27d347f693c0e
57
$LOAD_PATH << File.expand_path('../../../lib', __FILE__)
28.5
56
0.614035
612c450bf2567e20f064100e727da73b9682c2d7
34
puts 'kerker' + 2.to_s + 'herher'
17
33
0.617647
7a3b8cc60eefa39a84dc2277cef55711dd488848
727
# Cookbook Name:: wazuh-manager # Attributes:: agent_conf # Author:: Wazuh <info@wazuh.com default['ossec']['centralized_configuration'] = { 'enabled' => 'no', 'path' => '/var/ossec/etc/shared/default' } # Example of configuration to include in agent.conf # <agent_config os="Linux"> # <localfile> # ...
25.068966
74
0.584594
911449621c20c7eafa037463eed3efeb6af94c3c
21,410
require 'spec_helper' require 'unit/puppet/x/spec_jenkins_providers' # we need to make sure retries is always loaded or random test ordering can # cause failures when a side effect hasn't yet caused the lib to be loaded require 'retries' require 'puppet/x/jenkins/provider/cli' describe Puppet::X::Jenkins::Provider::C...
31.119186
102
0.61163
219035edf8fc4464dce9769292fd2c7030478d9d
1,151
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'redtube_api/version' Gem::Specification.new do |spec| spec.name = "redtube_api" spec.version = RedtubeApi::VERSION spec.authors = ["Kevin Kirsche"] spec.email ...
42.62963
169
0.667246
912c8173e44f1e358e20b05c8708b73e07b2a86e
462
# == Schema Information # # Table name: review_replies # # id :integer not null, primary key # review_id :integer # msg :text default("") # created_at :datetime not null # updated_at :datetime not null # # Indexes # # index_review_replies_on_review_id (review_...
22
53
0.651515
4a5ade4ccdf792801afd673a9c21bba486b88e81
6,485
require 'selenium/webdriver/common/error' # Generic helper methods not specific # to a particular tag name module Appium module Common # json and ap are required for the source method. require 'json' require 'ap' # awesome print require 'timeout' # for wait # iOS .name returns the accessibility ...
29.080717
102
0.620971
7947f13f3e329ab6b955056d93db5d8ca7c90218
8,224
describe "ar_pglogical extension" do let(:connection) { ActiveRecord::Base.connection } around do |example| pool = ActiveRecord::Base.establish_connection( :adapter => "postgresql", :database => "pg_pglogical_test", :pool => 1 ) pool.connection.transaction do begin ...
31.509579
92
0.578064
08d32e4615103d2655b0c7e2267f9cbe16e1a45d
5,948
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::FILEFORMAT def initialize(info = {}) super(update_info(info, ...
36.048485
94
0.594317
7a4b15cd71c712e0b3ecdfefd23108adbde74ef7
1,223
# frozen_string_literal: true require "abstract_unit" require "active_support/core_ext/array" require "active_support/core_ext/hash" class ExtractOptionsTest < ActiveSupport::TestCase class HashSubclass < Hash end class ExtractableHashSubclass < Hash def extractable_options? true end end def...
25.479167
64
0.708913
ed0dccdfd0d65d92de4071e9a7f1aac39bd3cd8b
536
lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'imgix-optimizer/version' Gem::Specification.new do |s| s.name = 'imgix-optimizer' s.version = Imgix::Optimizer::VERSION s.authors = ['Sean C Davis'] s.email = 'sean@helloampl...
29.777778
55
0.610075
f7ed7f6b13dbc6d7265b948d14bd44504019c868
2,945
#-- # Copyright (c) 2005 David Heinemeier Hansson # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge,...
45.307692
93
0.800679
e9a31bdfe4825ee7f1462c180bb4599244558e7a
2,066
# frozen_string_literal: true module Solargraph module Diagnostics # Utility methods for the RuboCop diagnostics reporter. # module RubocopHelpers module_function # Requires a specific version of rubocop, or the latest installed version # if _version_ is `nil`. # # @param v...
32.28125
86
0.613262
26cb166a579461d4f30db93ffe3f806880c1c03b
1,015
desc 'setup', 'Setup a project for the first time' long_desc <<-LONGDESC Example: `geordi setup` Check out a repository and cd into its directory. Then let `setup` do the tiring work: run `bundle install`, create `database.yml`, create databases, migrate (all if applicable). If a local bin/setup file is found, Geordi...
30.757576
80
0.733005
382bffcab7f05d33fe2f92e409428a5fa8b4c538
738
require "fileutils" module MobRotation class Database def sanitized_entries_in each_database_entry(@filename) do |entry| yield(entry.to_s.strip) end end def initialize(filename) @filename = filename FileUtils.touch(filename) unless File.exist?(filename) end def w...
22.363636
69
0.630081
b9cc05747066d1e53c704b62de4ca3e62f0cb740
7,916
# Copyright 2014 Google Inc. All rights reserved. # # 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 a...
32.310204
100
0.69429
7935f26a10115962375e178b296de2f83f121592
814
module OdfCore module Element module Text class NoteBody < AbstractElement XML_ELEMENT_NAME = 'text:note-body' CHILDREN = [ "dr3d:scene", "draw:a", "draw:caption", "draw:circle", "draw:connector", "draw:control", "draw:cu...
21.421053
43
0.470516
087f632fc41c49eb60c48b337f3de4b8ba3c3776
1,117
class CurveCubicsController < ApplicationController before_action :authenticate_user! load_and_authorize_resource param_method: :curve_cubic_params before_action :set_curve_cubic, only: [:show, :edit, :update, :destroy] respond_to :html def index @curve_cubics = CurveCubic.all respond_with(@curve_cu...
21.901961
212
0.752014
ed4da581e71560396a24654c982f32a249aa10db
75
require "lib/hello_helper" helpers HelloHelper page "/", :layout => false
15
26
0.733333
1d4ced60f011da211903cd4de5531410f6de2349
335
class CreateProfiles < ActiveRecord::Migration[5.0] def change create_table :profiles do |t| t.references :user, foreign_key: true t.date :birthday t.string :birthplace t.string :currentplace t.string :education t.string :occupation t.text :bio t.timestamps ...
20.9375
51
0.638806
ac66ab64557ddc8e68d70f29dd82bd6f7b0eaca6
65
class Entrylog < ApplicationRecord serialize :content, JSON end
16.25
34
0.815385
7ad97665deff50fb360aedad20ddb6528f4da658
1,177
module ErlangConfig class ErlTerm attr_accessor :str def initialize(str) @str = str end def self.decode(str) str.strip! term_open_str = str[/^(\[|\{|\"|\'|<<|#Ref|<)/,1] if term_open_str.nil? # integer,float, or, atom matches = /^(([-0-9\.]+)|([a-z][a-z0-9_]*))/.match(...
31.810811
96
0.562447
ed9923bbd1497074748db8980aa26aa6052a52fe
12,649
require 'spec_helper' prometheus_host = 'localhost' prometheus_port = 9090 kube_apiserver_secure_port = 6443 alertmanager_host = 'localhost' alertmanager_port = 9093 describe 'Checking if Prometheus user exists' do describe group('prometheus') do it { should exist } end describe user('prometheus') do it...
39.160991
176
0.637046
1a3ca81fb1e24030d65dd172be1dd5d7b123b506
270
class CreateAccounts < ActiveRecord::Migration def self.up create_table :accounts do |t| t.string :name t.string :url t.string :password t.text :comments t.timestamps end end def self.down drop_table :accounts end end
15.882353
46
0.640741
1a5257c9023c52ed9cf391e4298e82c47ec137cf
81
require 'test_helper' class PasswordResetsHelperTest < ActionView::TestCase end
16.2
53
0.839506
18692df6497027edb8765778eddab592c955a7dc
145
require 'test_helper' class OpportunitiesControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
18.125
67
0.751724
62a7d480f4de4a3571fa2ff8c3c5e41730f7eb59
1,402
module Ci class ProjectsController < ::ApplicationController before_action :project before_action :no_cache, only: [:badge] before_action :authorize_read_project!, except: [:badge, :index] skip_before_action :authenticate_user!, only: [:badge] protect_from_forgery def index redirect_to ...
29.208333
94
0.693295
38fc42fde11e645c77ea8467bc295f337679b508
115
json.array!(@notes) do |note| json.extract! note, :id, :date, :text json.url note_url(note, format: :json) end
23
40
0.669565
28d76bbd714ab4392f348b6ed0d41750f5e60db3
2,001
module StripeMock module RequestHandlers module Tokens def Tokens.included(klass) klass.add_handler 'post /v1/tokens', :create_token klass.add_handler 'get /v1/tokens/(.*)', :get_token end def create_token(route, method_url, params, headers) if params[:customer].n...
37.055556
136
0.626187
d5a1197b190b2fc9ac3befa93cca5c4fd6064fcd
1,574
class Libuninameslist < Formula desc "Library of Unicode names and annotation data" homepage "https://github.com/fontforge/libuninameslist" url "https://github.com/fontforge/libuninameslist/releases/download/20200413/libuninameslist-dist-20200413.tar.gz" sha256 "5c0283b2e18d101e58b70a026119d66c9d3e749e4537def77...
33.489362
116
0.715375
91dbb1b8e9f476d0b089abd507a58f80279af102
2,551
module Git::Story::Setup include Git::Story::Utils extend Git::Story::Utils MARKER = 'Installed by the git-story gem' HOOKS_DIR = '.git/hooks' PREPARE_COMMIT_MESSAGE_SRC = File.join(__dir__, 'prepare-commit-msg') PREPARE_COMMIT_MESSAGE_DST = File.join(HOOKS_DIR, 'prepare-commit-msg') CONFIG_TEMPLATE = ...
28.032967
87
0.633477