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
b9d52330d3e5b325f076ffdb27f2e22ba5e3785d
134
class AddImageUrlToCounselings < ActiveRecord::Migration[6.0] def change add_column :counselings, :image_url, :string end end
22.333333
61
0.768657
014a667d168a5f4440e5974ac025c751a17f0f64
327
# encoding: utf-8 # frozen_string_literal: true module ViaCep # Translate methods allows us to use metaprogramming. METHODS = { zipcode: 'cep', street: 'logradouro', complement: 'complemento', neighborhood: 'bairro', city: 'localidade', state: 'uf', ibge: 'ibge', gia: 'gia' }.free...
19.235294
55
0.639144
614423827e3c859ab65f178bcd5ad0988c3c21b0
8,565
#! /usr/bin/env ruby # # check-http # # DESCRIPTION: # Takes either a URL or a combination of host/path/port/ssl, and checks for # a 200 response (that matches a pattern, if given). Can use client certs. # # OUTPUT: # plain text # # PLATFORMS: # Linux # # DEPENDENCIES: # gem: sensu-plugin # gem: net # # U...
28.360927
114
0.585055
1846aab0b2e04d328aec216a934274e9795005c2
221
# encoding: UTF-8 module CSKit module Parsers module Bible autoload :BibleParser, 'cskit/parsers/bible/bible_parser' autoload :BibleTokenizer, 'cskit/parsers/bible/bible_tokenizer' end end end
20.090909
69
0.714932
ed5d3d73674b8563a500da46ae8046a90b6490db
797
# -*- encoding: utf-8 -*- require File.expand_path('../lib/warden-browserid/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ["ringe"] gem.email = ["runar@rin.no"] gem.description = %q{Warden BrowserID strategy - DISCONTINUED} gem.summary = %q{Authenticate your Warden-ena...
37.952381
91
0.651192
18e25500255e4468eb5d8ec58bd000df042e23d8
627
# Copyright (c) 2009-2011 VMware, Inc. class VCAP::Services::MongoDB::MongoDBError < VCAP::Services::Base::Error::ServiceError MONGODB_DISK_FULL = [31201, HTTP_INTERNAL, 'Node disk is full.'] MONGODB_CONFIG_NOT_FOUND = [31202, HTTP_NOT_FOUND, 'MongoDB configuration %s not found.'] MONGODB_CRED_NOT_FOUND = ...
57
93
0.744817
1801924c099d6ea67945d4faa080652a76533f51
21,529
# frozen_string_literal: true require "active_record/connection_adapters/abstract_adapter" require "active_record/connection_adapters/statement_pool" require "active_record/connection_adapters/sqlite3/explain_pretty_printer" require "active_record/connection_adapters/sqlite3/quoting" require "active_record/connection_...
34.281847
180
0.604022
1113f42911b048f3b97d747c6d1948108f632921
201
class RenameAvailableComponentId < ActiveRecord::Migration[5.1] def change rename_column :check_list_engine_audit_type_components, :available_component_id, :available_component_type_id end end
33.5
113
0.845771
e9fffa2c9a0780c326b209d0e502dbf5843d7685
1,937
require 'spec_helper' describe OregonDigital::FillerDataBuilder do subject {OregonDigital::FillerDataBuilder} let(:arguments) {} describe "#call" do let(:default_options) do {:collections => [ { :institution => OregonDigital::Vocabularies::OREGON_UNIVERSITIES.University_of_Oregon, ...
34.589286
165
0.638616
f723f64a8297b8124348d7efa06bbf820b870175
663
# frozen_string_literal: true class RolesController < ApplicationController def index # Returns all tasks in order by id @roles = Role.order(id: :asc) end def new @roles = Role.new end def show @roles = Role.find(params[:id]) end def create redirect_to '/roles' if current_user.role...
17.918919
92
0.648567
bf3d463552ada1092b1305980730f0231a4f03ba
2,034
# coding: utf-8 Pod::Spec.new do |s| # MARK: - Description s.name = 'SwiftCommonsLogging' s.summary = 'Provides simple abstraction layer over an existing logging frameworks.' s.version = '1.4.0' s.platform = :ios s.ios.deployment_target = '9.0' s....
30.818182
129
0.672566
6a1a8baf7be17a05ecdb158e6381c68b5084b905
2,034
# frozen_string_literal: true require 'rails_helper' RSpec.describe Employee, type: :model do subject { build(:employee) } it_behaves_like 'uuidable' it { is_expected.to belong_to(:user).optional } it { is_expected.to belong_to :company } it { is_expected.to belong_to :team } it { is_expected.to belong_...
29.057143
106
0.683874
21abb31f414d8a91690e309365bb7f89b5dc17e6
660
class RelationshipsController < ApplicationController before_action :logged_in_user def create @user = User.find_by id: params[:followed_id] current_user.follow(@user) respond_to do |format| format.html { redirect_to @user } format.js end @active_relationships_find_by = current_user...
27.5
99
0.727273
18e4e0db10aec96f1470e638f688d211fbf15e74
327
# frozen_string_literal: true module FantasticProject module RouteHelpers # Application value for the path of a requested project class EventRequestPath def initialize(category, country) @category = category @country = country end attr_reader :category, :country end e...
20.4375
59
0.69419
f8bfc357bf1c0562f11b2aa8cfc09d4350134199
1,147
set :application, "faulkner" set :domain, "faulkner.scholarslab.org" set :deploy_to, "/usr/local/projects/#{application}" set :user, 'wsg4w' set :runner, user set :run_method, :run set :repository, "git://github.com/scholarslab/Faulkner-Audio-Collection.git" set :scm, :git set :branch, "master" set :deploy_via, :rem...
30.184211
85
0.70619
1db349261a7e7a95ea44c6dba651f5e7fe931803
1,001
# frozen_string_literal: true # Copyright 2019 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...
29.441176
77
0.758242
1af057e51609188b52c29f994010a24d8d295762
1,900
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
43.181818
95
0.74
013e3d5dea2da99ad4ef1969bd691a229239aa92
35
module Atv VERSION = "1.0.1" end
8.75
19
0.628571
ab4b3ed09681dce0c792047282814f35520d1b0a
900
# coding: utf-8 Gem::Specification.new do |spec| spec.name = "jekyll-sleek" spec.version = "0.1.5" spec.authors = ["Jan Czizikow"] spec.email = ["jan.czizikow@gmail.com"] spec.summary = %q{Sleek is a modern Jekyll theme focused on speed performance & SEO best practices.} ...
36
108
0.635556
6a79aa3ef48171f4ef27912c4f67565048d646e7
1,513
require "language/node" class NetlifyCli < Formula desc "Netlify command-line tool" homepage "https://www.netlify.com/docs/cli" url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-6.14.10.tgz" sha256 "f0292c9e8fb4eaa71d55aa700b9fd06d485c3ac123a6d014fea630a44cbded35" license "MIT" head "https://github...
40.891892
123
0.77462
38413f094eb4a61e4861e650626feb5857f92dce
3,203
# Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com> # # 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...
25.023438
79
0.71433
617db0a96b7fe12cd6bf2b31b67b4548e52055c0
1,228
# frozen_string_literal: true module Qernel module MeritFacade # A special case of consumer used when representing loss within the electricity network. In this # we need to determine the demand from a method on GraphApi::Energy, and set the demand on the # node and sole incoming edge after the calculatio...
29.238095
100
0.668567
ac9beaffcb1d60ac60e65c483e413b75254647fc
902
module ReadRuby require 'pp' class Example EXAMPLE_REX = /^\s{4}\s*.+ #\s*=>/ def self.example?(line) !!line.match(EXAMPLE_REX) end attr_reader :example def initialize(example) @example = example @given, @expected = @example.split(/\s*#=>\s*/) end def actual ...
16.4
89
0.595344
bb1c6c88d2c0e580c0baa6d4c56fa9cdb7c50270
409
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] = "Account activated!" redirect_to user else ...
27.266667
80
0.672372
33ae2d9e87f0aae79e6e36134bb4580b2d75cffc
1,048
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v8/enums/budget_period.proto require 'google/protobuf' require 'google/api/annotations_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_file("google/ads/googleads/v8/enums/budget_period.proto", :syntax => :prot...
32.75
173
0.734733
acccb2ae9f37da5060c7bc5559e1ef146b68d623
300
module M2ySitef class Base def self.baseUrl M2ySitef.configuration.server_url end def self.basicHeaders {'Content-Type' => "application/json", 'merchant_id' => M2ySitef.configuration.merchant_id, 'merchant_key' => M2ySitef.configuration.merchant_key } end end end
20
153
0.71
ffe00ce0f04214f84b3876e3a7fe64f3aee25787
2,690
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Discourse Zendesk Plugin' do let(:staff) { Fabricate(:moderator) } let(:zendesk_url_default) { 'https://your-url.zendesk.com/api/v2' } let(:zendesk_api_ticket_url) { zendesk_url_default + '/tickets' } let(:ticket_response) do { tic...
36.351351
104
0.652788
38be0c59718b2aab47ccaed35356ae30cb449d79
8,825
require 'tmpdir' module Twine VALID_COMMANDS = ['generate-string-file', 'generate-all-string-files', 'consume-string-file', 'consume-all-string-files', 'generate-loc-drop', 'consume-loc-drop', 'generate-report'] class Runner def initialize(args) @options = {} @args = args end def self.run...
27.321981
183
0.601926
26bec46f28ec50ea61b8fcaf1ffd22f8abbe72e9
702
module Cryptoexchange::Exchanges module Oex module Services class Pairs < Cryptoexchange::Services::Pairs PAIRS_URL = "#{Cryptoexchange::Exchanges::Oex::Market::API_URL}/get_allticker" def fetch output = super adapt(output) end def adapt(output) ...
25.071429
86
0.548433
79e6c3ce70c8907ea50ececad8f520b52c1fa5d7
1,101
module Canvas class Base include Enumerable attr_reader :default_pixel, :pixels def initialize(opts:{}) @default_pixel = opts.fetch(:default_pixel) { Pixel.new([0, 0, 0]) } @pixels = Hash[pixel_coordinates.map { |pc| [pc, default_pixel] }] end def pixels=(new_pixels) vali...
18.661017
74
0.60218
1a91570de29ff04419b4e30724d339c613c4ad73
306
require 'date' require 'pycall/import' include PyCall::Import Encoding.default_internal = 'UTF-8' Encoding.default_external = 'UTF-8' module Auto module_function def view yr = ARGV[1] mh = ARGV[2] pyimport :calendar puts (calendar.month(yr.to_i,mh.to_i)) end end puts '' __END__
13.909091
42
0.696078
e9a9f7a08ce22d56acf8c3ea084701c4cf96b2ae
456
def foo(x) end foo(UNDEFINED_CONSTANT) foo(1) C = "dummy" class C def foo end self.new.foo end BAR = 1 BAR = "str" def log(x) end log(BAR) __END__ # Errors smoke/constant2.rb:8: [error] the class "C" is String smoke/constant2.rb:15: [warning] already initialized constant Object::BAR # Classes class Object ...
12.666667
73
0.66886
f80df28261488527cd943fd52ded76dbc98e3e0e
622
# encoding: UTF-8 $:.push File.expand_path('../lib', __FILE__) require 'open_project/orphan_projects/version' Gem::Specification.new do |s| s.name = 'openproject-orphan_projects' s.version = OpenProject::OrphanProjects::VERSION s.authors = ['Oliver Günther'] s.email = 'mail@oliverguenther....
36.588235
101
0.684887
f864a60aeb4553f5f1881a35efddb4644124c8ef
354
require 'active_record/connection_adapters/postgresql_adapter' class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter def set_standard_conforming_strings old, self.client_min_messages = client_min_messages, 'warning' execute('SET standard_conforming_strings = on', 'SCHEMA') rescue nil ensure self.cl...
32.181818
72
0.810734
18c0d4b2601118edc9488e17972b61c20caa81c7
466
cask "font-stardos-stencil" do version :latest sha256 :no_check # github.com/google/fonts/ was verified as official when first introduced to the cask url "https://github.com/google/fonts/trunk/ofl/stardosstencil", using: :svn, trust_cert: true name "Stardos Stencil" homepage "https://fonts...
27.411765
87
0.72103
1c6c7575518fb19298d1c7b37ce42d3966b8cf66
649
require "geocoder/results/google" module Geocoder module Result class GooglePlacesDetails < Google def name @data["name"] end def place_id @data["place_id"] end def types @data["types"] || [] end def reviews @data["reviews"] || [] ...
14.75
43
0.51926
d5fc2b9b7aeeec643a7e6bb6fac6976c63da6ced
3,405
# frozen_string_literal: true class Fisk module Instructions # Instruction VSCALEFPD: Scale Packed Double-Precision Floating-Point Values With Double-Precision Floating-Point Values VSCALEFPD = Instruction.new("VSCALEFPD", [ # vscalefpd: xmm{k}{z}, xmm, m128/m64bcst Form.new([ OPERAND_TYPES...
28.613445
124
0.507489
03389604183063b179bf8a89bff7c86e9dc41421
1,610
# 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 `rails #...
40.25
86
0.738509
bb33c69954daf5a72e736c075eac2e17e7937bd8
2,343
module Api class MfaController < ApplicationController def mfa_email_login verification_url = params[:"verification_url"] email = params[:Email] password = params[:Password] email_template = '' email_template2_f_a='' fields = '' login_url = '' sms_template = '' ...
41.105263
252
0.749893
e26448c9250f0ce14c2280f35911985b874403e7
1,305
module Infusionsoft # Wrapper for the Infusionsoft API # # @note all services have been separated into different modules class Client < Api # Require client method modules after initializing the Client class in # order to avoid a superclass mismatch error, allowing those modules to be # Client-names...
38.382353
78
0.758621
f85e53c28d34826a444f7781616502a8db968e76
13,809
require 'test_helper.rb' class RemoteOrbitalGatewayTest < Test::Unit::TestCase def setup Base.mode = :test @gateway = ActiveMerchant::Billing::OrbitalGateway.new(fixtures(:orbital_gateway)) @amount = 100 @credit_card = credit_card('4112344112344113') @declined_card = credit_card('400030001111222...
35.590206
116
0.698385
91eeeff564ea34e07e7838fb82e56fc684109a60
9,474
require 'json' require 'active_merchant/billing/gateways/quickpay/quickpay_common' module ActiveMerchant module Billing class QuickpayV10Gateway < Gateway include QuickpayCommon API_VERSION = 10 self.live_url = self.test_url = 'https://api.quickpay.net' def initialize(options = {}) ...
31.791946
130
0.608719
e887304e12e0f3dd88739e9daaa1e097bddf9d0f
548
cask :v1 => 'garmin-ant-agent' do version '2.2.2' sha256 '11df82fdd8d39a9d83df03c8efe8b1b1cb3e8f65d1e1bd47f823e9eda9bfcc57' url "http://download.garmin.com/software/ANTAgentforMac_#{version.gsub('.','')}.dmg" homepage 'http://www8.garmin.com/support/download_details.jsp?id=4417' license :unknown # todo: c...
39.142857
115
0.731752
01c8cf9c449accdc67d29cd850ebffe56623f2f7
58
require_relative 'utils' require_relative 'raml-generate'
19.333333
32
0.844828
d58efae99fdd6b478a25ef4b003a9ee5c595eb5d
302
# # Cookbook:: cpe_chefclient # Recipe:: default # # Copyright:: (c) 2019-present, Uber Technologies, Inc. # All rights reserved. # # This source code is licensed under the Apache 2.0 license found in the # LICENSE file in the root directory of this source tree. # cpe_chefclient 'Manage chef-client'
23.230769
72
0.741722
5d05f2c9a8f86dffa5b42e45d4ae8972da74a5a7
766
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Routing for events REST API', type: :routing do it 'routes POST /events to events/creation#create' do expect(post('/events')) .to route_to(controller: 'events/creation', action: 'create') end it 'routes GET /events to events/index_p...
29.461538
67
0.689295
ff6ed13673e0cc8dd65be2a5a99afc97f15c263a
218
require 'spec_helper' describe LinuxBlockDevice do it 'has a version number' do expect(LinuxBlockDevice::VERSION).not_to be nil end it '.size' do expect(LinuxBlockDevice).to respond_to(:size) end end
18.166667
51
0.733945
62c600f913c3d4ee7aac497663f9f2af733aec4f
2,479
require 'test_helper' class UserTest < ActiveSupport::TestCase def setup @user = User.new(name: "Example User", email: "user@example.com", password: "foobar", password_confirmation: "foobar") end test "should be valid" do assert @user.valid? end test "name should be present" do @user...
30.231707
94
0.666801
b95e37508089026f443e0b71af98e08fecc57dbd
2,115
# vFabric Administration Server Ruby API # Copyright (c) 2012 VMware, 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 ...
41.470588
161
0.755556
870f7eb4445d5593ffeb739b783274f337330d88
1,676
# # Be sure to run `pod lib lint ANLanguageManager.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 = 'AN...
38.976744
119
0.652148
e9b5f22fd2a2db67f4877414de53425780ca52d1
278
require "toy_robot_simulator/version" module ToyRobotSimulator autoload :Board, 'toy_robot_simulator/board' autoload :Robot, 'toy_robot_simulator/robot' module CommandInput autoload :FileCommandInput, 'toy_robot_simulator/command_input/file_command_input' end end
25.272727
86
0.820144
d56ef99aa284191276fa7890f65270fe7f704258
843
module Comet module DSL class Linker include Comet::DSL::Helpers alias inject instance_exec def script(script) @script = script end def option(*args, **kwargs) @options.add('', *args, **kwargs) end def initialize(triple, isa:, cpu:, opt:, &block) ...
18.326087
65
0.539739
ed3a32ea93343f20a376230283d1fe8d02dda547
1,307
# frozen_string_literal: true Given('a user with email {string} is already logged in') do |current_user_email| @user = FactoryBot.create(:user, email: current_user_email) visit new_user_session_path within '.default-user-login' do fill_in 'user[email]', with: @user.email fill_in 'user[password]', with: @...
26.673469
80
0.725325
794d75bf2db6df8021634d50dd4c3516ef053018
1,889
# -*- coding: binary -*- require 'net/ssh/buffer' require 'net/ssh/errors' require 'net/ssh/loggable' require 'net/ssh/authentication/constants' module Net; module SSH; module Authentication; module Methods # The base class of all user authentication methods. It provides a few # bits of common functionality. cl...
30.467742
76
0.698253
6acde4e74fd1d7f8219559611b0bce10c9f4bb9c
538
require 'erb' module FirewallGenerator module Output class Template attr_accessor :options, :list def initialize(options) @options = options end def template ERB.new(template_data, nil, "<>") end def result template.result(binding).tap do |result| ...
16.8125
49
0.557621
8775dfe29692c286ac04afa3579991db63f5222b
350
module Cukunity module TouchInputMethods include Cukunity::Utils DEFAULT_TAP_DELAY = 0.5 def default_tap_delay=(delay) @default_tap_delay = delay.to_f end def set_default_tap_delay(delay) default_tap_delay = delay end def default_tap_delay @default_tap_delay || DEFAUL...
17.5
45
0.705714
014955b46dd9da853fdd3e61b18c1d994487b733
1,542
# frozen_string_literal: true require 'set' module RuboCop module Cop module Layout # This cops checks for two or more consecutive blank lines. class EmptyLines < Cop MSG = 'Extra blank line detected.'.freeze LINE_OFFSET = 2 def investigate(processed_source) return...
25.278689
80
0.579118
4a5715270ab3f2fba40aeae8a6f60844821898fa
3,152
module ApiValve # This class is wraps the original request. It's methods are called by # the Forwarder to make the actual request in the target endpoint. # So by changing the public methods in this call, we can control how the # request is forwarded class Forwarder::Request attr_reader :original_request,...
28.396396
89
0.669099
5ddf2c79d89f00950d327429dc1d6fb720bf672b
1,232
module Gws::Board::GroupSetting extend ActiveSupport::Concern extend Gws::GroupSetting included do field :board_new_days, type: Integer field :board_file_size_per_topic, type: Integer field :board_file_size_per_post, type: Integer attr_accessor :in_board_file_size_per_topic_mb, :in_board_file_siz...
30.04878
95
0.769481
21b0201e2ba322e523b86c994dbc87bcf08a51a7
1,220
# frozen_string_literal: true # Copyright (c) 2019-present, BigCommerce Pty. Ltd. All rights reserved # # 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 l...
53.043478
120
0.779508
015be9fb6ec6505dd80e78c1dd9db285699801f2
1,102
# 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). # #ユーザー User.create!(name: "Example User", email: "example@railstutorial.org", ...
31.485714
111
0.634301
ed515f9d7bf1cbfc383ca2ed85b3fb67232811f9
2,104
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: namespace.proto require 'google/protobuf' require 'lint_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_file("namespace.proto", :syntax => :proto3) do add_message "gitaly.AddNamespaceRequest" do optional :storage_name, :...
43.833333
127
0.769962
612073e54c689b6cd1c461ed37cf5bbb1f654316
339
module FormtasticBootstrap module Inputs module Base module Html include Formtastic::Inputs::Base::Html def input_html_options if errors? { :class => "error" }.merge(super) else super end end en...
16.142857
46
0.483776
3966976116b062d1d9d6ed802546dc2f9a03de26
872
Given(/^I create two Contacts in the same Household via the API$/) do create_two_contacts_on_account_via_api("aaaatestcontact1_#{@random_string}", "aaaatestcontact2_#{@random_string}") end Then(/^I should see the New Opportunity page$/) do expect(on(NPSPNewContactDonationPage).page_header).to match /Opportunity Ed...
43.6
136
0.770642
0860611ad0811100d94af8fee38bc51558d99fcd
1,810
$LOAD_PATH << File.expand_path('../lib', __dir__) require_relative 'boot' # Pick the frameworks you want: # require "active_job/railtie" # require "rails/test_unit/railtie" # require 'action_cable/engine' require 'active_model/railtie' require 'active_record/railtie' require 'action_controller/railtie' require 'action...
29.672131
73
0.701657
9106cc63f2245abcb2d153c973d02b76737aae9a
14,081
# timing.rb # Created on September 22, 2009 # Copyright (c) 2009-2011, Wei-ju Wu # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyrigh...
41.907738
80
0.479369
1c1d530488f0afb681e6fe92d728f255157fdca3
1,112
require 'puppet/parameter/boolean' require_relative '../../puppet_x/puppetlabs/iis/property/string' Puppet::Type.newtype(:iis_feature) do @doc = 'Allows installation and removal of IIS Features.' ensurable do desc 'Manage the state of this rule.' defaultvalues defaultto :present end newparam(:nam...
30.054054
80
0.720324
e2b6b6b8cdb1dc5d20dfe4a66764eb307977a133
104,076
require File.expand_path('../../../spec_helper', __FILE__) module Pod describe Installer::Analyzer do describe 'Analysis' do before do repos = [Source.new(fixture('spec-repos/test_repo')), TrunkSource.new(fixture('spec-repos/trunk'))] aggregate = Pod::Source::Aggregate.new(repos) @s...
45.388574
268
0.588061
62b017df041e7661ddb01b6583dd49a129e52acb
2,483
#-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2014 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, which is a fork of ...
35.985507
91
0.701973
f7d237944dfdd852b7aee4161c4447d666bc05ce
2,230
# frozen_string_literal: true class AccountsController < ApplicationController before_action :authenticate_user! before_action :set_account, only: %i[show edit update destroy activate deactivate] # GET /accounts # GET /accounts.json def index @accounts = current_user.accounts.where(active: true).order('...
23.229167
110
0.70852
f783335b6735f1b2716ec7859bacee2cc7084f59
14,355
# Copyright 2016 Google, 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 writing, ...
36.713555
143
0.679276
ff5c198365e30672f0e5109d7735abbdab436e9c
123
class AddUserRefToMoney < ActiveRecord::Migration[5.1] def change add_reference :money, :user, index: true end end
20.5
54
0.739837
385b1b891c669868c70d6f17e9e1ec85bffb7aec
273
SCRIPT_DIR = File.split(File.expand_path(__FILE__))[0] $LOAD_PATH << File.join(SCRIPT_DIR, '../lib') require 'pp' require 'daemons' options = { :dir_mode => :script, :dir => 'tmp', :multiple => true } Daemons.run(File.join(SCRIPT_DIR,'testapp.rb'), options)
13.65
56
0.655678
91d6db98b364239839d72c9ce5136cc531f22424
3,921
class Pdf2htmlex < Formula desc "PDF to HTML converter" homepage "https://coolwanglu.github.io/pdf2htmlEX/" url "https://github.com/coolwanglu/pdf2htmlEX/archive/v0.14.6.tar.gz" sha256 "320ac2e1c2ea4a2972970f52809d90073ee00a6c42ef6d9833fb48436222f0e5" revision 20 head "https://github.com/coolwanglu/pdf2htm...
35.008929
93
0.649579
4a348e86da27b4675615fb1fc03cf37c8716c69a
1,546
require 'rails_helper' RSpec.describe RecipeFood, type: :model do it 'valid if quantity is present' do @user = User.create!(name: 'shittu', email: 'shittu@gmail.com', password: 'qwerty') @food = @user.foods.create(name: 'Chapo', measurement_unit: 'grams', price: 150) @recipe = @user.recipes.create(name: ...
49.870968
117
0.648771
1aaf58f4378bd90b6bcaed474aaa2462e2b31f2b
8,839
require "fileutils" require "pathname" module IsoDoc module Function module ToWordHtml def set_termdomain(termdomain) @termdomain = termdomain end def in_sourcecode @sourcecode end def note? @note end def init_file(filename, debug) file...
36.524793
79
0.600407
f74eec07fc80c9348c976f2bfecb1abfe6905902
3,984
# frozen_string_literal: true module Bullet class Rack include Dependency def initialize(app) @app = app end def call(env) return @app.call(env) unless Bullet.enable? Bullet.start_request status, headers, response = @app.call(env) response_body = nil if Bullet...
32.390244
209
0.656376
21e6c8bf479f33397346cdf36747c5ee8308499e
30,836
class AnsibleAT28 < Formula include Language::Python::Virtualenv desc "Automate deployment, configuration, and upgrading" homepage "https://www.ansible.com/" url "https://files.pythonhosted.org/packages/e6/a3/d68781949f0b6d261ef8f17a4d1c6ee75df261ff168f4ead585604899e26/ansible-2.8.20.tar.gz" sha256 "f0672d13...
48.18125
160
0.816059
0164b804ad2610cbe79e78f91a7ba21f5ecaf18f
892
require "spec_helper" describe Protobuf::ActiveRecord::NestedAttributes do let(:user_message) { UserMessage.new(:name => "foo bar", :email => "foo@test.co", :photos => [{ url: "https://test.co/test.png" }]) } describe "._filter_attribute_fields", :aggregate_failures => true do it "includes nested attrib...
29.733333
114
0.695067
1d0119733ab45719eaddc652d3f0ae9fab73e930
1,158
## # $Id$ ## ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## #!/usr/bin/env ruby $:.unshift(File.join(File.d...
20.678571
72
0.636442
036ce545efe372627ce85cfc5e6c93199332b2eb
2,599
module Fog module Storage class InternetArchive class Real # Get headers for an object from S3 # # @param bucket_name [String] Name of bucket to read from # @param object_name [String] Name of object to read # @param options [Hash]: # @option options [String] ...
44.810345
163
0.606772
086eb1f7bb4790a3cc007c913693dc262b56a269
10,617
## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Pricing < Domain class V1 < Version class PhoneNumberList < ListResource class CountryList < ListResource ...
37.515901
113
0.528963
91ec097529d5c80407205dd22b4ba01ad8dcc3f1
135
# Attribute needed by the 'ohai' cookbook to process this cookbook's plugin files. default['ohai']['plugins']['sudo-user'] = 'plugins'
45
82
0.725926
391581bc824828455404307a72ac5b9fa8a61f92
5,159
module FirewallCookbook module Helpers module Windows include FirewallCookbook::Helpers include Chef::Mixin::ShellOut def fixup_cidr(str) newstr = str.clone newstr.gsub!('0.0.0.0/0', 'any') if newstr.include?('0.0.0.0/0') newstr.gsub!('/0', '') if newstr.include?('/0') ...
39.381679
118
0.605931
381521b8631d96c81f9f0b98911f3e9fcc4a3052
3,060
=begin #GraphHopper Directions API #You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time win...
31.546392
403
0.729412
acd3118f66ff624b8dfb2d5ae365e80f75dab93e
604
# frozen_string_literal: true class OldEventSerializer include FastJsonapi::ObjectSerializer set_key_transform :dash set_type :events set_id :uuid attributes :subj_id, :obj_id, :source_id, :relation_type_id, :total, :message_action, ...
24.16
74
0.637417
87289102d048f5876d7776d234016f5439aac5ca
603
require 'geo_certs/order/contact' module GeoCerts class Order < ApiObject ## # Used for setting or retrieving the Administrator associated with a GeoCerts::Order. # class Administrator < Contact def to_geocerts_hash #:nodoc: { :administrator_first_name => GeoCerts...
25.125
89
0.626866
e29e56c82898928579ac2bfba9725911645059a4
1,133
# frozen_string_literal: true module AcaEntities module Serializers module Xml module Medicaid module Atp # A basis for Medicaid MAGI (Modified Adjusted Gross Income) eligibility based on Medicaid citizenship or immigration rules. class MedicaidMagiCitizenOrImmigrantEligibilityB...
31.472222
134
0.622242
e21be726a081ede65f8c09f894d5279861857f36
1,706
class Links < Formula desc "Lynx-like WWW browser that supports tables, menus, etc." homepage "http://links.twibright.com/" url "http://links.twibright.com/download/links-2.26.tar.gz" sha256 "c42a4dba21dcfb4525034139489cd47f30aa0c5f9d05b37d4e2eaaea943fe2b1" license "GPL-2.0-or-later" livecheck do url "...
36.297872
123
0.689332
5d2caee55f5c74dc74be31c5649ea5a98e38ad39
138
class AddHeroImageToInstitutions < ActiveRecord::Migration[5.2] def change add_column :institutions, :hero_image, :string end end
23
63
0.775362
03d461587181cfb331d820495a216de5b468e11f
621
class LikesController < ApplicationController def create @like = current_user.likes.new(opinion_id: params[:opinion_id]) if @like.save redirect_to opinions_path, notice: 'You liked this opinion.' else redirect_to opinions_path, alert: 'You cannot like this opinion.' end end def destr...
28.227273
93
0.703704
620278ede736dc807a8ea9cf61346939d2488606
151
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Cropper::Application.initialize!
25.166667
52
0.801325
0808761d2d902bea1d768da1d5dbdf222e4c1b3e
4,225
class Opencv < Formula desc "Open source computer vision library" homepage "https://opencv.org/" url "https://github.com/opencv/opencv/archive/4.1.1.tar.gz" sha256 "5de5d96bdfb9dad6e6061d70f47a0a91cee96bb35afb9afb9ecb3d43e243d217" bottle do sha256 "af576f40cf58dcb301fbed604b2155580f3df2c3d1c46c359780aca8...
31.296296
97
0.677633
7a4b10a6af40e745fd7c7bd08995e47232d3a198
2,341
# Copyright (c) Jobcase, Inc. All rights reserved. # 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,...
34.426471
79
0.756941
08658e83f60e3696ca968c93f0768caf7c64a256
1,081
# -*- encoding: utf-8 -*- require File.expand_path('../lib/mongoid-sequence/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ["Gonçalo Silva"] gem.email = ["goncalossilva@gmail.com"] gem.description = %q{Mongoid::Sequence gives you the ability to specify fields to behave like a s...
49.136364
176
0.66235
3347b832f1781dbfe991130d35a3171dca3acdcf
1,634
# 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. require 'uri' require 'cgi' require 'date' require 'json' require 'base64' require 'erb' require 'securerandom' require 'time' require 'timeliness' require ...
46.685714
149
0.670135
1d948599531d8fe39c22db396e6e634315ba9405
676
class EventsController < ApplicationController def index @event=Event.next_event redirect_to @event.eventbrite_url if @event && @event.eventbrite_url end def admin if !current_user redirect_to "/login" else @events=Event.all end end de...
22.533333
76
0.568047
5d93de2b6cb6c2d94c105977bcd4994ca65f0a29
905
# frozen_string_literal: true # Configure Rails Environment ENV['RAILS_ENV'] = 'test' require_relative '../test/dummy/config/environment' # ActiveRecord::Migrator.migrations_paths = [File.expand_path('../test/dummy/db/migrate', __dir__)] # ActiveRecord::Migrator.migrations_paths << File.expand_path('../db/migrate', _...
41.136364
99
0.790055
ffe792ee0253dc6f6df9fae3865fc4802db81619
991
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
45.045455
86
0.759839
1d805f58acbd987952202bc84d3269a991ccc25e
3,184
module VCAP::Services module ServiceBrokers::V1 class HttpClient def initialize(attrs) @url = attrs.fetch(:url) @token = attrs.fetch(:auth_token) @broker_client_timeout = VCAP::CloudController::Config.config[:broker_client_timeout_seconds] || 60 end def provision(plan_i...
31.524752
166
0.615892