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
113e868c578e022d8ac5a884415a191c998754df
1,616
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision/v1p4beta1/geometry.proto require 'google/api/annotations_pb' require 'google/protobuf' Google::Protobuf::DescriptorPool.generated_pool.build do add_file("google/cloud/vision/v1p4beta1/geometry.proto", :syntax => :proto3) do ...
39.414634
142
0.729579
f7971ffe35cab35f3df42c58114b5c550623a2d1
665
# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to diction...
51.153846
180
0.816541
6a4320b6149af7ec116da43e54f9de627ceebe33
412
default['abc-app']['wordpress_url'] = "http://wordpress.org/latest.tar.gz" default['abc-app']['dependencies'] = ['php5','php5-gd','php5-mysql','libssh2-php', 'apache2', 'libapache2-mod-php5', 'php5-curl'] default['abc-app']['wpconfig'] = { :db_name => 'wordpress', :username => 'wordpress', :password => 'wordpress',...
34.333333
129
0.648058
62f29992effa96c434a9581f63d4e88af769cbc2
3,434
require 'rails_helper' describe 'Mass messages requests', type: :request, active_job: true do let(:user) { create :user } before do sign_in user end describe 'POST#create' do let!(:client_1) { create :client, user: user } let!(:client_2) { create :client, user: user } let!(:client_3) { create...
26.415385
90
0.619103
b9d17b14c33f939826fc3de84d6df50ceb66521a
478
# frozen_string_literal: true require 'rails_helper' RSpec.describe Member::DisabledNotificationMailer, type: :mailer do describe '#notify' do subject { Member::DisabledNotificationMailer.notify(user.id) } let(:user) { create(:user) } its(:subject) { is_expected.to eq I18n.t('dashboard.users.mailers.di...
31.866667
90
0.723849
4a617e663bdd4feeb8dc6baef768bc66a75a0b56
104
class PUBError < StandardError def initialize(msg="Opps something happened") super(msg) end end
17.333333
47
0.740385
ff686e9b7ae86568096313a2f10842bcda1cf1d8
1,192
require "map" class MVCLI::Argv attr_reader :arguments, :options def initialize(argv, switches = []) @switches = switches.map(&:to_s) @arguments, @options = scan argv end def scan(argv, arguments = [], options = Map.new) current, *rest = argv case current when nil [arguments, option...
24.326531
56
0.57802
ff64fcf73c8f7128ecd7dcbdd8bc432c8523d111
312
require 'spec_helper' describe Spree::Api::V2::Platform::StateChangeSerializer do include_context 'API v2 serializers params' subject { described_class.new(resource, params: serializer_params) } let(:resource) { create(:state_change) } it { expect(subject.serializable_hash).to be_kind_of(Hash) } end
28.363636
70
0.769231
b94b351a1d7ad9b668a8891c76c23478454b8447
1,391
# # Copyright:: Copyright (c) 2015 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 # # http://www.apache.org/licenses/LICENSE-...
28.387755
74
0.680805
878f778bbf17dd80a2dbe1e337ce605f7a7107e5
1,524
Sequel.require 'adapters/shared/mysql' module Sequel module DataObjects # Database and Dataset instance methods for MySQL specific # support via DataObjects. module MySQL # Database instance methods for MySQL databases accessed via DataObjects. module DatabaseMethods include Sequel::M...
30.48
85
0.611549
e979c6627e808a7f4a9a8612763cc773f7c7e104
1,645
require 'bibtex' require 'citeproc' require 'csl/styles' module Jekyll class PublicationIndexGenerator < Generator priority :high def generate(site) config = site.config['publication_index'] || {} publication_index = PublicationIndex.new(site, site.source, './', config['target']) site....
23.169014
89
0.555623
87139371b8ff7f01ffcbf5c38cbae41f21db0dcb
234
class ChangeWikipediaSummaryColumnOnProtectedArea < ActiveRecord::Migration def change rename_column :protected_areas, :wikipedia_summary_id, :wikipedia_article_id add_index :protected_areas, :wikipedia_article_id end end
33.428571
80
0.837607
ace3cb3ff478dc0a82a13caf1d9d3efad752be30
681
require File.expand_path("../lib/pakiderm/version", __FILE__) Gem::Specification.new do |s| s.name = "pakiderm" s.version = Pakiderm::VERSION s.authors = ["Máximo Mussini"] s.email = ["maximomussini@gmail.com"] s.summary = "Pakiderm will never forget the return value." s.description = "Pakiderm is a simple...
34.05
97
0.694567
b944a4050e3fa217b9bfb22b0929d5308fc8dbaf
426
FactoryBot.define do factory :gws_column_check_box, class: Gws::Column::CheckBox do cur_site { gws_site } name { "name-#{unique_id}" } order { rand(999) } required { %w(required optional).sample } tooltips { "tooltips-#{unique_id}" } prefix_label { "prefix_label-#{unique_id}" } postfix_la...
30.428571
64
0.659624
6a05fef687d10b907a962958d4c7d2abdbd04bdc
705
Pod::Spec.new do |s| s.name = "MisskeyKit" s.version = "3.0.1" s.summary = "An elegant Misskey framework written in Swift." s.license = { :type => 'MIT', :file => 'LICENSE' } s.homepage = "https://github.com/yuigawada/MisskeyKit-for-iOS" s.author = { "YuigaWada" => "yuigawada@gmail.com"...
44.0625
106
0.624113
e98f52100e0510fbc40c8e3c7d948feeeb43cc7c
129
name "os-base" description "OpenStack Base role" run_list( "recipe[openstack-common]", "recipe[openstack-common::logging]" )
18.428571
37
0.736434
114ff3cdd241aae1d732827c95856222bce59e1f
319
class Theremin < Cask version '0.7' sha256 '809d0f7527d072a43f33b9e1088dc2387e08bb1a3696bb60bfd8e82b8853102d' url 'http://f.nn.lv/ms/l5/29/Theremin.app.zip' appcast 'http://theremin.amd.co.at/appcastProfileInfo.php' homepage 'https://github.com/TheStalwart/Theremin' license :oss app 'Theremin.app' end
26.583333
75
0.761755
e9c32ec7984e4709f982024ec3350b048fae9616
3,486
# Copyright (C) 2015-2017 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 ...
28.809917
97
0.58864
bbd00e6315b0732ae894da0a31a863bc01709ca9
2,441
Knock.setup do |config| ## User handle attribute ## --------------------- ## ## The attribute used to uniquely identify a user. ## ## Default: # config.handle_attr = :email ## Current user retrieval from handle when signing in ## -------------------------------------------------- ## ## This is w...
28.057471
113
0.625563
21f2a41602e3e721cd97a3649b31d8387ebe9157
1,141
# frozen_string_literal: true NUMERALS = %w[M D C L X V I].freeze VALUES = [1_000, 500, 100, 50, 10, 5, 1].freeze def numeralize(num) result = '' VALUES.each_with_index do |val, index| next unless (num / val).positive? dividend = num / val num = num % val result += assign_numeral(dividend, index)...
21.12963
96
0.646801
4a1cc284cf4b70d03823c2218574f0e8c8a86050
1,333
# Copyright 2015 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.027027
89
0.747937
265a8e2801b9d33ef8c2794b1fbed5058981c56a
468
test_name "Reboot Module - POSIX Provider - No Refresh" extend Puppet::Acceptance::Reboot reboot_manifest = <<-MANIFEST reboot { 'now': } MANIFEST confine :except, :platform => 'windows' posix_agents.each do |agent| step "Attempt to Reboot Computer without Refresh" #Apply the manifest. apply_manifest_on agent...
22.285714
63
0.767094
917b72a199699989919c5ed51e4e179df9bab069
231
class CreateEntries < ActiveRecord::Migration[6.0] def change create_table :entries do |t| t.datetime :date t.text :content t.integer :user_id t.integer :topic_id t.timestamps end end end
17.769231
50
0.640693
abb3e2575dd3280d83a810a9f1ab02e7768bd477
4,329
# encoding: UTF-8 # # Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. require_relative 'base_action' module GoodData module LCM2 class CollectDymanicScheduleParams...
40.457944
141
0.680989
ff762ab0cd81d617d4ae979425a04db9e946e221
175
RSpec.describe Peekj do it "has a version number" do expect(Peekj::VERSION).not_to be nil end it "does something useful" do expect(false).to eq(true) end end
17.5
40
0.691429
f832c01666ffe024daf0f10d0df540415ea8a74c
3,877
module Utilities module Import module Demo class NodeData include Utilities::Import::Data COLLAPSED_NODE_TYPES = %w(section dep) attr_reader :title, :node_type attr_reader :lunch attr_accessor :unit_external_id, :employment_external_id attr_accessor :parent_...
32.041322
107
0.634769
28a56bd47ac026858de2d7192ebc2e3e6c53e457
3,783
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
41.119565
102
0.756807
7a31558ad78088991ef06c5f9ad0bd9b0327f62e
11,550
# -*- coding: utf-8 -*- require File.join(File.dirname(__FILE__), 'helper') class GoogleGeocoderTest < BaseGeocoderTest #:nodoc: all def setup super @full_address = '100 Spear St Apt. 5, San Francisco, CA, 94105-1522, US' @full_address_short_zip = '100 Spear St Apt. 5, San Francisco, CA, 94105, US' ...
44.594595
158
0.729177
116d1fb233d57c08636bc0b4f5a217c040c33391
4,037
# frozen_string_literal: true require 'uri' module Integrations class Irker < Integration prop_accessor :server_host, :server_port, :default_irc_uri prop_accessor :recipients, :channels boolean_accessor :colorize_messages validates :recipients, presence: true, if: :validate_recipients? before_v...
34.801724
285
0.663116
bfb4de3f917071a1c512d19b3260c3fefcd8e427
954
# frozen_string_literal: true module BlogNotification class HTTP # Target url. # # @return [String] attr_reader :url # Request. # # @return [Faraday::Connection] attr_reader :faraday_connection # Response instance. # # @return [Faraday::Response] attr_reader :respon...
17.666667
75
0.600629
e92acaea70180e946f15c5d56137c1e53079e040
2,747
# # The MIT License # Copyright (c) 2015 Estonian Information System Authority (RIA), Population Register Centre (VRK) # # 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, i...
43.603175
98
0.770659
38a32b4aa357443f4348d7c2079473485c100578
3,541
# 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 rake db:seed (or created alongside the # db with db:setup). # ******* NOTE ******** # You will have problems if you try to change the titles of # courses/sections/lessons, s...
33.40566
138
0.704886
7ac8262db1769e26275d7087876013b096306c3e
1,607
#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2021 the OpenProject GmbH # # 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 ChiliProj...
34.934783
98
0.721842
abed9497f2299627f0cc36a6c065278aee2b2780
517
# frozen_string_literal: true require 'spec_helper' require 'vk/api/board/methods/restore_comment' RSpec.describe Vk::API::Board::Methods::RestoreComment do subject(:model) { described_class } it { is_expected.to be < Dry::Struct } it { is_expected.to be < Vk::Schema::Method } describe 'attributes' do sub...
28.722222
58
0.72147
bb514d8b76649d19cdebbb2cfd98b63670a2b70c
3,872
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded we...
42.086957
103
0.738895
286855ea3b1ca3a2ccff37f45b002713f6eff50a
1,242
# frozen_string_literal: true # Copyright 2022 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...
36.529412
74
0.783414
08e48bcc1e5e978a2ae4acf0483c62dc73da127e
936
# encoding: utf-8 # # Demonstration of enabling and disabling kerning support # require "#{File.dirname(__FILE__)}/../example_helper.rb" Prawn::Document.generate "kerning.pdf" do text "To kern?", :at => [200,720], :size => 24, :kerning => true text "To not kern?", :at => [200,690], :size => 24, :kerning => false ...
30.193548
76
0.53953
1d3d349ccbefd7763c768342a508bb4cd6b868cf
2,996
# -*- encoding: utf-8 -*- # stub: rails 4.2.5 ruby lib Gem::Specification.new do |s| s.name = "rails".freeze s.version = "4.2.5" s.required_rubygems_version = Gem::Requirement.new(">= 1.8.11".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["David Heinemeier...
49.114754
207
0.650534
28a30233ff5ee2e48df93d80e7aeeac623faefad
1,127
class GamesController < ProtectedController before_action :set_game, only: [:show, :update, :destroy] # GET /games # GET /games.json def index @games = Game.where(user_id: current_user.id) render json: @games end # GET /games/1 # GET /games/1.json def show render json: @game end # POS...
18.783333
71
0.648625
b971ec44db27e7bf5898c1ef40884f0f84b18118
79
Site.index :fast do include_types "PageClass1", PageClass2, :PageClass3 end
15.8
53
0.772152
037f319c1cc1679f5a72d4a5e7d12b0172838369
1,179
module LoanPresenter extend ActiveSupport::Concern included do extend ActiveModel::Naming extend ActiveModel::Callbacks include ActiveModel::Conversion include ActiveModel::MassAssignmentSecurity include ActiveModel::Validations attr_reader :loan delegate :modified_by, :modified_by=...
17.338235
59
0.649703
289f758bb2f026f2e8dbc4efc7012b4aa3de9ab4
310
module Hubtran class Response def initialize(response) @response = response end def successful? @response.success? end def errors return [] if successful? to_hash["errors"] end def to_hash @to_hash ||= JSON.parse(@response.body) end end end
14.761905
45
0.603226
1852e9d5f5c4c82a0d38e60cd4881c37ffa9c13e
322
module EmarsysLegacy # Methods for the Lanugage API # # class Language < DataObject class << self # List languages # # @return [Hash] List of languages # @example # EmarsysLegacy::Language.collection def collection get 'language', {} end end end e...
16.1
44
0.580745
79f929f87884c540b774cdf3a5431037078a1883
2,251
# frozen_string_literal: true # Copyright 2016-2021 Copado NCS LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
23.694737
90
0.6757
e9fcfc55b3e89164dcba3b7ec9a72b6b4d00f512
405
require 'spec_helper' describe Seatbelt::GhostTunnel do let(:tunnel){ Seatbelt::GhostTunnel } it "is a module" do expect(tunnel).to be_a Module end describe "methods" do it "provides #enable_tunneling!" do expect(tunnel).to respond_to(:enable_tunneling!) end it "provides #disable_tunn...
19.285714
55
0.696296
e85bdbe7c39246386189e614c3fae231a3f9cfe5
6,715
# Use this setup block to configure all options available in SimpleForm. SimpleForm.setup do |config| # Wrappers are used by the form builder to generate a # complete input. You can remove any component from the # wrapper, change the order or even add your own to the # stack. The options given below are used to...
37.937853
102
0.685778
e2f1020a09d66ca0683fa5c739c5cc0df1bbcc25
602
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE $:.unshift(File.expand_path('../../lib', __FILE__)) $:.unshift(File.expand_pat...
31.684211
74
0.722591
f77ebbf27daf9ae940f6de5023be979df33825c7
2,246
#!/usr/bin/env ruby def roller(orignal_spec) rtn = [] sets, iterations, die, modifier, drop, reroll, totals = 1, 1, 20, 0, false, false, false spec = orignal_spec.dup if spec.gsub!(/([+-]\d+)$/, '') modifier = $&.to_i end if spec.gsub!(/[rR]$/, '') reroll = true end drop = true if spec =~ /...
20.418182
90
0.480855
acc6b4c80c579ea942ba355e016d3797ae782dde
2,193
# frozen_string_literal: true module GraphQL module StaticValidation module ArgumentsAreDefined def on_argument(node, parent) parent_defn = parent_definition(parent) if parent_defn && context.warden.get_argument(parent_defn, node.name) super elsif parent_defn kin...
30.458333
96
0.598723
e89c87d769fb1de05dbe1367f73f5051ebecb01c
3,206
# This file is copied to spec/ when you run 'rails generate rspec:install' require 'spec_helper' require 'database_cleaner' ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) # Prevent database truncation if the environment is production abort("The Rails environment is running i...
38.626506
86
0.745789
086b2a15fc8eadb069fc8010390cacf9f311731c
3,890
module MyRegistrations class Statuses < UserSpecificModel include RegistrationsModule include Berkeley::UserRoles include Cache::CachedFeed include Cache::JsonifiedFeed include Cache::UserCacheExpiry include ClassLogger PRIORITIZED_CAREERS = ['LAW', 'GRAD', 'UGRD', 'UCBX'] def get_f...
39.292929
118
0.67892
6a4d00ae7c7f02e9e1f509ea906b9a5847965b75
7,427
require 'spree/backend/action_callbacks' class Spree::Admin::ResourceController < Spree::Admin::BaseController helper_method :new_object_url, :edit_object_url, :object_url, :collection_url before_filter :load_resource, :except => [:update_positions] rescue_from ActiveRecord::RecordNotFound, :with => :resource_no...
27.609665
114
0.649522
7a1ee8258558581f3a281a4966992446a21c6dcc
12,406
# Copyright 2010-2014 Greg Hurrell. All rights reserved. # Licensed under the terms of the BSD 2-clause license. module CommandT class Controller include PathUtilities include SCMUtilities def initialize @prompt = Prompt.new end def show_buffer_finder @path = VIM::pwd ...
28.784223
85
0.581896
bb6b9fc691ab8b56dee8c6aac78d04d2e2d1cd39
433
require 'systemu' module EmbulkRuby class Embulk extend EmbulkRuby class << self def exec command: "run", config: nil, bundler: nil bundler = (bundler.nil? ? "" : "-b #{bundler}") embulk = "#{path} #{command} #{config.to_s} #{bundler}" Bundler.with_clean_env do status...
25.470588
63
0.572748
ab34c2160a77951d7fff018599ce3d59250b9a5a
26
# include_recipe 'apache2'
26
26
0.807692
03805216dc48d3d257237dfe0ea39eeb943ec91c
702
# frozen_string_literal: true class Users::SessionsController < Devise::SessionsController # before_action :configure_sign_in_params, only: [:create] # GET /resource/sign_in # def new # super # end # POST /resource/sign_in # def create # super # end # DELETE /resource/sign_out # def destro...
18.473684
69
0.709402
26855b2018fc420b1517064e5e0045833cf42cb1
1,843
class FactsController < ApplicationController before_action :set_fact, only: [:show, :edit, :update, :destroy] # GET /facts # GET /facts.json def index @facts = Fact.includes(:activity).limit(15) end # GET /facts/1 # GET /facts/1.json def show end # GET /facts/new def new @fact = Fact.n...
24.573333
88
0.642973
ab6d5c1187a3f9709f9547f1f22e84c283c56659
1,355
#!/usr/bin/env ruby # # Generate Go constants for standardized DHCP options from IANA web page. # require "open-uri" require "nokogiri" def rfc_name(rfc) file = open("https://tools.ietf.org/html/rfc%d" % rfc) doc = Nokogiri::XML.parse(file.read) title = doc / 'title' parts = title.inner_text.split(' - ', 2) ...
21.507937
97
0.611808
2106e86cc2a8fb46cd9caa080880369dda77c367
5,072
# # Be sure to run `pod spec lint HJAudioBubble.podspec' to ensure this is a # valid spec and to remove all comments including this before submitting the spec. # # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html # To see working Podspecs in the CocoaPods repo see https://gith...
36.489209
107
0.589708
18acfc1eed2bc60a857aa657e30af097ceda7fcb
1,484
Gem::Specification.new do |s| s.name = 'logstash-output-oss' s.version = '0.1.1' s.licenses = ['Apache-2.0'] s.summary = 'Sends Logstash events to the Aliyun Object Storage Service' s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash cor...
47.870968
206
0.660377
28f62165cda82955953f120cf89cb01803a52f63
1,429
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'msfca/version' Gem::Specification.new do |spec| spec.name = "msfca" spec.version = Msfca::VERSION spec.authors = ["Wei Zhu"] spec.email = ["wxz138@case.edu"] ...
36.641026
96
0.664801
e91f93acae82cdfbd5ba008be875ca669152ee84
4,897
require "language_pack" require "pathname" require "yaml" require "digest/sha1" require "language_pack/shell_helpers" require "language_pack/cache" require "language_pack/helpers/bundler_cache" require "language_pack/metadata" require "language_pack/fetcher" require "language_pack/instrument" Encoding.default_external...
28.306358
118
0.64611
6aa36c7f4f8ce83e14dc6a51ee70be5e68ab266b
3,702
# coding: utf-8 # vim: et ts=2 sw=2 RSpec.describe HrrRbSsh::Transport::ServerHostKeyAlgorithm::EcdsaSha2Nistp256 do let(:name){ 'ecdsa-sha2-nistp256' } it "can be looked up in HrrRbSsh::Transport::ServerHostKeyAlgorithm dictionary" do expect( HrrRbSsh::Transport::ServerHostKeyAlgorithm[name] ).to eq describe...
34.277778
116
0.640465
d5ad27878f219015c926adaede9315c77d3a0f06
2,984
module Smartsheet # Groups Endpoints # @see https://smartsheet-platform.github.io/api-docs/?ruby#groups API Groups Docs class Groups attr_reader :client private :client def initialize(client) @client = client end def create(body:, params: {}, header_overrides: {}) endpoint_spec =...
35.52381
114
0.649464
9156323b229fd9a1f22c12e5bf920cd4a8dfc4bd
530
require 'spec_helper' describe 'rsync::server::section' do context 'supported operating systems' do on_supported_os.each do |os, os_facts| let(:title) { 'test' } let(:facts) { os_facts } let(:pre_condition) { 'include "::rsync::server"' } let(:params) {{ :path => ...
21.2
79
0.583019
1a92598fc8a3025cb8805894f4643f99dacd8f9d
1,844
module Reek module Cli module Report module Strategy # # Base class for report startegies. # Each gathers results according to strategy chosen # class Base attr_reader :report_formatter, :warning_formatter, :examiners def initialize(report_formatt...
28.369231
92
0.546638
4a3d57d39ae7011c6eb9fe0a62ff469bea1cb206
588
Pod::Spec.new do |s| s.name = 'RKValueTransformers' s.version = '1.1.0' s.license = 'Apache2' s.summary = 'A powerful value transformation API extracted from RestKit.' s.homepage = 'https://github.com/RestKit/RKValueTransformers' s.authors = { 'Blake Watters' => 'blakewatters@gmail.com', 'Samuel E. ...
39.2
111
0.670068
2181c11412ddd1aa9e80bc81cbf120e66e75e321
823
# frozen_string_literal: true # A module to include for easy access to the GitHub API module ApiClient extend ActiveSupport::Concern def github_token ENV["GITHUB_TOKEN"] || "<unknown>" end def github_client_id ENV["GITHUB_CLIENT_ID"] || "<unknown-client-id>" end def github_client_secret ENV["...
23.514286
67
0.688943
26900d7f19bd9a7a82b2451d80812c4e6edac29d
1,330
class Asciinema < Formula desc "Record and share terminal sessions" homepage "https://asciinema.org" url "https://github.com/asciinema/asciinema/archive/v2.0.1.tar.gz" sha256 "7087b247dae36d04821197bc14ebd4248049592b299c9878d8953c025ac802e4" revision 1 head "https://github.com/asciinema/asciinema.git" bo...
38
94
0.767669
0161ef3828d38aef0b4a9050a47a1d1685c25080
62
module OmniAuth module SAML VERSION = '1.3.1' end end
10.333333
21
0.645161
03288ba45d917817dfe00fa2af84e70636e6f347
961
require 'test_helper' class SiteLayoutTest < ActionDispatch::IntegrationTest def setup @user = users(:michael) end test "layout links" do get root_path assert_template 'static_pages/home' assert_select "a[href=?]", root_path, count: 2 assert_select "a[href=?]", help_path assert_select "a...
27.457143
54
0.695109
ac88f683e743769cac924bc9fcc94cd1dd7511e4
3,764
require_relative '../test_helper' module Batch class CallbacksTest < Minitest::Test # This job adds each callback as they run into an array class BatchSlicesJob < RocketJob::Job include RocketJob::Batch field :call_list, type: Array, default: [] before_slice do call_list << 'befor...
27.676471
116
0.633369
5d06ef123e95f69fe92c6cea86f72ee282c99787
250
class Sign < Middleman::Extension def initialize(app, **opts, &block) super(app, **opts, &block) end #alias :included :registered def after_build(builder) builder.thor.run 'app/sign.sh' end end ::Middleman::Extensions.register(:sign, Sign)
20.833333
45
0.72
33fe3ffbf9a271326b5085dfc32caff0ca980253
1,053
require File.join(File.dirname(__FILE__), 'spec_helper') describe "Core Extensions" do describe Hash do describe "#to_params" do def should_be_same_params(query_string, expected) query_string.split(/&/).sort.should == expected.split(/&/).sort end it "should encode characters in...
33.967742
159
0.574549
bf52c39ac0536967c2dd391af5bde7299231b0f1
3,038
#-- 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.755556
109
0.673469
797d17eed4bb3623e22bbd017297742072ba471a
6,831
require 'logger' require 'rubygems' gem 'soap4r' module Jira4R class JiraTool attr_accessor :enhanced # Create a new JiraTool # # where: # version ... the version of the SOAP API you wish to use - currently supported versions [ 2 ] # base_url ... the base URL of the JIRA instance - ...
32.221698
215
0.669302
183f59b89e0c7bdc0bd865c7b0494d0833d04f1f
3,387
# Copyright, 2017, 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...
30.241071
91
0.710954
0866f81fe69d1ae897437284b1f3310783dce26a
1,493
title 'Tests to confirm libgpg-error library exists' plan_origin = ENV['HAB_ORIGIN'] plan_name = input('plan_name', value: 'libgpg-error') control 'core-plans-libgpg-error-library-exists' do impact 1.0 title 'Ensure libgpg-error library exists' desc ' Verify libgpg-error library by ensuring that (1) its in...
40.351351
115
0.728064
7a4fd5c89db965f98a288de45beead8c143de39e
553
def power(x,n) result = 1 while n.nonzero? if n[0].nonzero? result *= x n -= 1 end x *= x n /= 2 end return result end def f(x) Math.sqrt(x.abs) + 5*x ** 3 end (0...11).collect{ gets.to_i }.reverse.each do |x| y = f(x) puts "#{x} #{y.infinite? ? 'TOO LARGE' : y}" end # Map co...
18.433333
49
0.439421
3338ae21b792a4101561ca41cf8f25efcba6ecbf
1,453
module OmniAuthFixtures def self.facebook_response {provider: 'facebook', uid: 10205522242159630, info: {email: 'thomas@craftacademy.se', name: 'Thomas Ochman', image: 'http://graph.facebook.com/v2.6/10205522242159630/picture'}, credentials...
40.361111
185
0.599449
e9bc34f1c013cf62786c18ed225b396ec8c14c71
476
Shindo.tests("Storage[:atmos] | nested directories", ['atmos']) do unless Fog.mocking? @directory = Fog::Storage[:atmos].directories.create(:key => 'updatefiletests') end atmos = Fog::Storage[:atmos] tests("update a file").succeeds do pending if Fog.mocking? file = @directory.files.create(:key => ...
23.8
83
0.661765
117d607693b90d2c42e1cea46518ba3493f1cb52
1,021
# frozen_string_literal: false # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** Type: MMv1 *** # # ---------------------------------------------------------------------------- # # This file is automatically generated by Magic Modules a...
29.171429
78
0.488737
7a09c396e114a12d2796c670002abef0c4935aa1
687
# frozen_string_literal: false # # help.rb - helper using ri # $Release Version: 0.9.6$ # $Revision$ # # -- # # # require 'rdoc/ri/driver' require "irb/cmd/nop.rb" # :stopdoc: module IRB module ExtendCommand class Help<Nop begin Ri = RDoc::RI::Driver.new rescue SystemExit else...
15.976744
40
0.505095
b930e8c51d3ad2817a39d2e11f96e1619cd4f274
367
require "bundler/setup" require "exact_cover" RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_with ...
24.466667
66
0.754768
6a972aee3231bf609153494a80251188b6e3d96e
8,503
# Transaction mailer # # Responsible for: # - transactions created # - transaction status changes # - reminders # include ApplicationHelper include ListingsHelper class TransactionMailer < ActionMailer::Base include MailUtils default :from => APP_CONFIG.sharetribe_mail_from_address layout 'email' include Mo...
45.962162
190
0.699753
2610ebd29ac7b708aa61a9fdd26a1f7fbd6d1c28
424
require "test_helper" describe Slop do describe ".option_defined?" do it "handles bad constant names" do assert_equal false, Slop.option_defined?("Foo?Bar") end it "returns false if the option is not defined" do assert_equal false, Slop.option_defined?("FooBar") end it "returns true...
23.555556
57
0.693396
e92b8e825d3a1f1cb86f5593c77490edf335031a
724
RSpec.configure do |config| config.before do Wallaby.configuration.resources_controller.try(:clear) Wallaby.configuration.clear Wallaby::Map.clear Wallaby::ModelAuthorizer.provider_name = nil end config.around :suite do |example| Wallaby.configuration.resources_controller.try(:clear) Wall...
27.846154
58
0.743094
d58f6d3f1cc49dfb909babe724939d27900cedcb
144
class UserWithCustomMessage include ActiveModel::Validations attr_accessor :homepage validates :homepage, url: { message: "wrong" } end
18
48
0.770833
9106971af06f82e2338505c855263cd0023590a2
1,637
class RaxmlNg < Formula desc "RAxML Next Generation: faster, easier-to-use and more flexible" homepage "https://sco.h-its.org/exelixis/web/software/raxml/" url "https://github.com/amkozlov/raxml-ng.git", :tag => "0.9.0", :revision => "0a064e9a40f2e00828662795141659d946440c81" bottle do cellar ...
32.74
94
0.695174
aceab72d96fd7bcd27b6bed18fe99e9ed527a974
1,696
class Daemonize < Formula desc "Run a command as a UNIX daemon" homepage "https://software.clapper.org/daemonize/" url "https://github.com/bmc/daemonize/archive/release-1.7.8.tar.gz" sha256 "20c4fc9925371d1ddf1b57947f8fb93e2036eb9ccc3b43a1e3678ea8471c4c60" license "BSD-3-Clause" bottle do cellar :any_s...
40.380952
93
0.735849
ed93b08ecdfb44814b67cf94215e8a1ce9a28901
1,021
require "spec_helper" describe "Flnt::Configuration" do it "should have default values" do expect(Flnt::Configuration()).to eq( [ nil, { host: 'localhost', port: 24224, } ] ) end it "should be customized" do Flnt::Configuration.configure do |c|...
19.634615
58
0.565132
1a35f153153cec773cb6525a8f83520e1e03c362
5,437
describe Escort::Setup::Configuration::Generator do let(:generator) {Escort::Setup::Configuration::Generator.new(setup)} let(:setup) { Escort::SetupAccessor.new(app_configuration) } describe "#default_data" do subject {generator.default_data} context "when basic configuration" do let(:app_config...
53.303922
186
0.642634
87ad03bb9a03b91d4702c7e7d4b44bb640892f39
65
class Instruction < ApplicationRecord belongs_to :recipe end
16.25
37
0.8
38dd19ae01881582726aed0afbb373d36b72b21e
1,223
module Specjour::RSpec::Runner ::RSpec.configuration.backtrace_exclusion_patterns << %r(lib/specjour/) def self.run(spec, output) Specjour.logger.debug '------------------in Specjour::Runner.run---------------' Specjour.logger.debug spec if spec.include?('--description') location = spec.split(...
34.942857
93
0.68193
61492ce448c98a591a0f0ca8bd02d11b6b220e77
538
# frozen_string_literal: true module ActionView module Template::Handlers class Builder class_attribute :default_format, default: :xml def call(template) require_engine "xml = ::Builder::XmlMarkup.new(:indent => 2);" \ "self.output_buffer = xml.target!;" + templat...
20.692308
57
0.552045
87ed52cad59f0e1da3d92c4123ceffa77069153b
146
# frozen_string_literal: true FactoryBot.define do factory :partner_company do name { 'Company Name' } identity { 'P/ABCD' } end end
16.222222
29
0.691781
28300d09ef28869245769ba5edf543fb75c1dc31
561
module Travis module Yml module Configs module Model class Job < Struct.new(:attrs) def [](key) attrs[key] end def stage attrs[:stage] if attrs[:stage].is_a?(String) end def stage=(stage) attrs[:stage] = stage ...
18.7
56
0.486631
b9d1fe27942378d54fb1b4447d30a8c1349c17ff
2,052
#-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2015 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.37931
91
0.730507
bbdb610635241496c4f65c68895687f3671e4115
1,037
include_recipe "postgresql::server" include_recipe "postgresql::client" include_recipe "database::postgresql" postgresql_connection_info = {:host => "localhost", :port => node['postgresql']['config']['port'], :username => 'postgres', ...
33.451613
86
0.712633
6a599b80187fcf99e58983f7ad713e71a4964baa
1,823
# -*- coding: utf-8 -*- # module Rouge module Lexers class Matlab < RegexLexer desc "Matlab" tag 'matlab' aliases 'm' filenames '*.m' mimetypes 'text/x-matlab', 'application/x-matlab' def self.analyze_text(text) return 0.4 if text.match(/^\s*% /) # % comments are a de...
24.635135
76
0.487109