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
621df63d166d354965ef86f514a3f087a26fc027
293
module PageObject module Platforms module SeleniumWebDriver module TextField # # Set the value of the TextField # def value=(new_value) element.clear element.send_keys(new_value) end end end end end
16.277778
40
0.556314
911a45612e9189479d02fb021a88def63105209f
3,446
require "language/go" class Nsq < Formula desc "Realtime distributed messaging platform" homepage "http://nsq.io" url "https://github.com/bitly/nsq/archive/v0.3.5.tar.gz" sha256 "4120ad24e3700be1e65549b9a55eab5d4e744cd114d9b39779a47b6dedda0b35" head "https://github.com/bitly/nsq.git" bottle do cellar...
30.767857
97
0.690075
1143a68c5aecaa524893835a3ef279133f2b9557
520
require "bundler/setup" require "tomosia_icons8_crawl" RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run :focus # Enable flags like --only-failures and --next-failure config.example_status_persistence...
27.368421
66
0.780769
6a112560e38cd31ba0cac25bb35ada6e4bd307b6
135
# frozen_string_literal: true I18n.load_path += Dir[GitStats.root.join('config/locales/*.yml')] I18n.enforce_available_locales = true
27
65
0.785185
26087084add2a41a1d9ff1e587a9a9fc89711c10
1,481
class Ngspice < Formula desc "Spice circuit simulator" homepage "https://ngspice.sourceforge.io/" url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/27/ngspice-27.tar.gz" sha256 "0c08c7d57a2e21cf164496f3237f66f139e0c78e38345fbe295217afaf150695" bottle do sha256 "245e35d1ad12c0b06da908...
23.887097
94
0.648886
6a67d1439a4f82a9766e143cfc1e9abf1463e35d
515
require_relative './pipeline' module GOCD module PIPELINE_CONFIG class PipelineGroup include GOCD::PIPELINE_CONFIG attr_reader :name, :pipelines def initialize(group_data) @name = group_data['@group'] @pipelines = to_pipelines(group_data['pipeline']) || [] end priv...
25.75
124
0.67767
61c7de768f6877b8a32a11170f53ab6fbe6e7397
11,895
# ******************************************************************************* # Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable # Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
42.78777
115
0.696511
ed34771669606ef566ffed98b5a4a18e7e05d36b
966
# 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...
42
86
0.768116
f8f2119e418be8460314749c1f99cfa56d5ea58d
1,016
# frozen_string_literal: true module FinishedGoods module Ecert module EcertTrackingUnit class New def self.call(govt_inspection_sheet_id: nil, form_values: nil, form_errors: nil, remote: true) ui_rule = UiRules::Compiler.new(:ecert_tracking_unit, :new, govt_inspection_sheet_id: govt_insp...
32.774194
147
0.637795
f8f597e2fc7a8afcfaad2456bc9170777632e417
1,037
cask "webcatalog" do version "33.0.0" if Hardware::CPU.intel? sha256 "6db4355dccd13c951a35cd7bef3dfde5783088301c9fee830480e1858b49cedd" url "https://github.com/webcatalog/webcatalog-app/releases/download/v#{version}/WebCatalog-#{version}.dmg", verified: "github.com/webcatalog/webcatalog-app/" el...
32.40625
117
0.739634
b9c4229b38580830450a7c38eee3714f390ea9f0
1,638
require "rails_helper" RSpec.describe OrganisationPolicy do subject { described_class.new(user, organisation) } let(:organisation) { create(:delivery_partner_organisation) } context "as user that belongs to BEIS" do let(:user) { build_stubbed(:beis_user) } it { is_expected.to permit_action(:index) } ...
38.093023
112
0.721001
21493e91e0afe7d1e081c928fd7f292363b3b5b5
269
if ENV['PLATFORM'] == 'ios' require 'calabash-cucumber/cucumber' require_relative '../ios/pages/standard/IosCommon' elsif ENV['PLATFORM'] == 'android' require 'calabash-android/cucumber' require_relative '../../features/android/pages/standard/DroidCommon' end
29.888889
70
0.739777
ab48103a1ec6e36a0254be98d9244a8c4538a98d
682
$:.push File.expand_path("lib", __dir__) # Maintain your gem's version: require "spree_api_docs/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "spree_api_docs" s.version = SpreeApiDocs::VERSION s.authors = ["Spark Solutions"] s.email = ["...
29.652174
97
0.662757
9170e518853bb05077bad531ce1e09f89c24c561
9,201
=begin #NSX-T Data Center Policy API #VMware NSX-T Data Center Policy REST API OpenAPI spec version: 3.1.0.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.19 =end require 'date' module NSXTPolicy # This action is used to redirect HTTP request messages to a new U...
35.941406
967
0.662645
e2a79a82bd1278c0f57aaa4e00e883c1a8875508
220
# frozen_string_literal: true FactoryBot.define do factory :topic do sequence(:title) { |n| "Topic Title #{n}" } sequence(:body) { |n| "Topic Body #{n}" } association :user association :node end end
20
47
0.640909
7aac71878a957ef7dd903c8710019bba0e7b2d0f
243
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/matched_size.rb', __FILE__) require 'strscan' describe "StringScanner#matched_size" do it_behaves_like(:strscan_matched_size, :matched_size) end
30.375
63
0.781893
b9f784a59def31db8952984af768a620e52c64a7
6,831
=begin #Swagger Petstore #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed unde...
30.495536
157
0.644122
38660462e037fcf52f537a3f2d7b395748c76d88
258
# frozen_string_literal: true require "rails_helper" RSpec.describe Alchemy::PictureThumb do it { should belong_to(:picture).class_name("Alchemy::Picture") } it { should validate_presence_of(:signature) } it { should validate_presence_of(:uid) } end
25.8
66
0.763566
e2bf9807ca12512c28141a7ccbdeba7455fe4565
2,998
module Google module Language Languages = { 'af' => 'AFRIKAANS', 'sq' => 'ALBANIAN', 'am' => 'AMHARIC', 'ar' => 'ARABIC', 'hy' => 'ARMENIAN', 'az' => 'AZERBAIJANI', 'eu' => 'BASQUE', 'be' => 'BELARUSIAN', 'bn' => 'BENGALI', 'bh' => 'BIHARI', 'bg' ...
20.534247
70
0.412608
ed09dc61c62ea22be9ec212df9d7ccbd19b1972a
48
class Foo # this is a comment with no end end
12
33
0.708333
b9a31c86e81b8d84a6955b5ce8acaaf16b213a99
223
require 'rspec' require 'guard/compat/test/helper' require 'guard/resque-pool' ENV['GUARD_ENV'] = 'test' RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true end
20.272727
48
0.762332
b9d814c5df4f1d034a6a74a368fbac6de1c91565
1,754
module CompletePaymentSystems class Response attr_reader :xml, :response_hash, :code, :message def initialize(xml) @xml = xml @response_hash = parse_response(@xml) @code = @response_hash["resultCode"] @message = @response_hash["resultMessage"] end def ok? return signat...
33.09434
144
0.623147
acd0c0e0ce10be3120f742b3668624c028bb773d
7,699
require 'spec_helper' RSpec.describe DropletKit::DropletResource do subject(:resource) { described_class.new(connection: connection) } include_context 'resources' # Theres a lot to check def check_droplet(droplet) expect(droplet.id).to eq(19) expect(droplet.name).to eq('test.example.com') expect(d...
39.482051
142
0.682167
016a2a7dfc26ef74f6a00514da8eabf6a98184d5
629
# encoding: utf-8 shared_examples 'a subclass of Storage::SCMBase' do it_behaves_like 'a subclass of Storage::SSHBase' describe '#transfer!' do let(:connection) { mock } let(:ssh) { mock } let(:remote_path) { File.join('my/path') } before do storage.ip = '123.45.678.90' storage.path ...
20.290323
53
0.6407
7970e72176e1321c9daaf5b0b9312dec749ec583
352
# frozen_string_literal: true class RemoveUrlsFromCurrencies < ActiveRecord::Migration[4.2] def change remove_column :currencies, :wallet_url_template, :string if column_exists? :currencies, :wallet_url_template remove_column :currencies, :transaction_url_template, :string if column_exists? :currencies, :tra...
39.111111
122
0.8125
8777b9010b2c1c80b63d14cb522d22c8160726f9
523
module Kashflow class ApiMethod attr_accessor :name, :request_attrs, :response_attrs def initialize(name, fields) @name = name # split into request/response attrs @request_attrs, @response_attrs = fields.partition{|f| f[:direction] == 'IN' }.map do |arr| arr.map do |fields| ...
26.15
97
0.609943
f8c3d9f2eb39c5694fbfa7be22b5ae92aa5fbfcb
1,653
# 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 #...
35.934783
86
0.727163
ab2eb4e9ecf2ac08b3d8a27074968f841b284e03
602
# # Copyright 2008 Blanton Black # # 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 writi...
33.444444
74
0.757475
1c3487194c2030e5a4b5247b6942310827feccb7
118
class Message < ApplicationRecord belongs_to :user belongs_to :conversation validates_presence_of :content end
16.857143
33
0.813559
e2f2c229f50195b1ec44852ad0752f7a26d42cdd
4,937
require 'puppet' require 'yaml' require 'json' require 'uri' require 'net/https' require 'socket' begin require 'carrier-pigeon' rescue LoadError => e Puppet.info "You need the `carrier-pigeon` gem to use the IRC report" end unless Puppet.version >= '2.6.5' fail "This report processor requires Puppet version 2....
32.058442
108
0.574843
217e70b8dba7b833dd01307933eb8acfb8b29315
4,054
class Cms::Column::Value::UrlField2 < Cms::Column::Value::Base field :html_tag, type: String field :html_additional_attr, type: String, default: '' field :link_url, type: String field :link_label, type: String field :link_target, type: String field :link_item_type, type: String field :link_item_id, type: ...
26.671053
123
0.675876
08f455925d37de61a613d1ba2380031d11f7d33d
1,455
module Almanack module Representation class BuiltIcalEvent attr_reader :event def initialize(event) @event = event end def ical_event @ical_event ||= build! end def self.for(event) new(event).ical_event end private def build! ...
22.045455
95
0.612371
21bb643db3ad75a13cad3b0f92e4f113141d6265
841
require 'spec_helper' module CloudController::Errors RSpec.describe Details do describe '.new(name)' do let(:name) { 'DomainInvalid' } subject(:details) do Details.new(name) end it 'knows the error name' do expect(details.name).to eq('DomainInvalid') end it ...
22.131579
73
0.612366
03ec6020c304f06faffb262a5467d972f59231fa
4,982
require "abstract_unit" class ExecutorTest < ActiveSupport::TestCase class DummyError < RuntimeError end def test_wrap_invokes_callbacks called = [] executor.to_run { called << :run } executor.to_complete { called << :complete } executor.wrap do called << :body end assert_equal [...
20.672199
110
0.642714
39640a5bea22ec86a8dc8f60b5b7a15cd6163adc
1,815
module SystemBrowser class RequestProcessor ACTIONS = { 'get' => 'add', 'autoget' => 'autoadd' }.tap { |h| h.default = 'add' } def initialize(request:, session:) @request = request @session = session @services = [ Services::GemService, Services::BehaviourServ...
24.2
77
0.633609
ac54b18fd3e56db3ecb567e675ce0374aab1472e
1,045
# frozen_string_literal: true module RuboCop module Cop module Sequel # JSONColumn looks for non-JSONB columns. class JSONColumn < Cop MSG = 'Use JSONB rather than JSON or hstore' def_node_matcher :json_or_hstore?, <<-MATCHER (send _ :add_column ... (sym {:json :hstore})) ...
27.5
70
0.594258
acaa4233057f83d995d7867f4dac524c95e03f58
1,629
# frozen_string_literal: false require 'spec_helper' RSpec.describe Admin::Tag, type: :model do let(:valid_attributes) do { scope: 'value for scope', tag: 'value for tag' } end let(:bad_attributes) do { scope: 'no blank tags', tag: '' } end it 'should create a new in...
21.155844
79
0.658686
7ac899fa95697d61fdf917223ef68e448ceb0188
1,615
#! /usr/bin/env ruby # # beanstalkd-metrics # # DESCRIPTION: # This plugin checks the beanstalkd stats, using the beaneater gem # # OUTPUT: # metric-data # # PLATFORMS: # Linux # # DEPENDENCIES: # gem: beaneater # gem: sensu-plugin # # USAGE: # #YELLOW # # NOTES: # # LICENSE: # Copyright 2014 99designs, In...
21.533333
73
0.619814
1d4ef0ce16392b4ae8b40578aa1ec3db7b1be80b
621
class CreateAutomationSeriesEmailTemplates < ActiveRecord::Migration def change create_table :automation_series_email_templates do |t| t.references :automation_series, index: {name: "automation_series_id"}, foreign_key: true t.references :email_template, index: {name: "email_template_id"}, foreign_key...
41.4
95
0.743961
7a373fb6e581d0183cf7136951b247e545c78f2d
646
module Spree module Admin class HeroCarouselItemsController < ResourceController before_action :load_hero_carousel, except: [:create, :update] def location_after_save load_hero_carousel spree.admin_hero_carousel_hero_carousel_items_url(@hero_carousel) end private ...
24.846154
104
0.698142
03141e6fe5f403c26d2b9325b87358115986a4c4
6,772
require 'manageiq/providers/openstack/legacy/openstack_handle/handle' require 'fog/openstack' describe OpenstackHandle::Handle do before do @original_log = $fog_log $fog_log = double.as_null_object end after do $fog_log = @original_log end it ".auth_url" do expect(described_class.auth_url("...
35.088083
127
0.590224
114d3da461b93f0e088f061416cd2018bff595c3
1,782
module SuperDiff module RSpec module OperationTreeBuilders class ObjectHavingAttributes < SuperDiff::OperationTreeBuilders::DefaultObject def self.applies_to?(expected, _actual) SuperDiff::RSpec.an_object_having_some_attributes?(expected) end protected def build_o...
30.20339
84
0.621212
1810c0f1947aae722c0df01e5bd5fbb5317377a4
1,323
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.923077
71
0.712774
01b80d566f13e1384fe524a3e1c59b61a2765fe2
5,150
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
31.595092
84
0.596311
1de14f2fb3ea667dbc735a78c67a68516aab4e0c
671
# frozen_string_literal: true require "spec_helper" require "anyway/ext/deep_freeze" describe Anyway::Ext::DeepFreeze do using Anyway::Ext::DeepFreeze it "freezes nested arrays and hashes", :aggregate_failures do source = { a: 1, b: "hello", c: { id: 1, list: [1, 2, {name: "...
20.333333
63
0.603577
017f15aef1d92d1f848cb0e7d8e085d13efb245d
2,915
module Asciidoctor module NIST class Converter < Standoc::Converter def title_validate(root) nil end def content_validate(doc) super bibdata_validate(doc.root) end def bibdata_validate(doc) doctype_validate(doc) stage_validate(doc) su...
32.752809
82
0.619897
87b6011461caade76928842287b88d939c64b414
131
# frozen_string_literal: true module Importers module Cards class PlanarCardImporter < NormalCardImporter end end end
14.555556
49
0.770992
1cfcdec677c8b7a18089000befab443961d0d729
290
# frozen_string_literal: false require_relative "../atom" module RSS module Atom Feed.install_ns(DC_PREFIX, DC_URI) class Feed include DublinCoreModel class Entry; include DublinCoreModel; end end class Entry include DublinCoreModel end end end
16.111111
47
0.703448
1842816b312bbc604b2236d15534bd3a59f03740
1,587
cask "microsoft-edge-dev" do version "93.0.933.1" if Hardware::CPU.intel? sha256 "81db1578afa0d39abff5ef6405e6e1971d1ddaa31462d71c5e92d9bc5fc3348e" url "https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/MicrosoftEdgeDev-#{version}.pkg", verified: "...
33.765957
142
0.720857
e9343551e2ca56ea007946b97a2fc4a6b2e95749
1,473
module Lono::Bundler class Component extend Memoist extend Props::Extension props :export_to, :name, :sha, :source, :subfolder, :source_type, :type, :url, :clone_with delegate :repo, :org, :repo_folder, :org_folder, to: :org_repo include Concerns::StackConcern include Concerns::LocalConcern ...
27.792453
99
0.616429
1dfebc8c53ec9c29c872008615caa28966467f48
297
# frozen_string_literal: true require "rails_helper" module Renalware::Drugs describe Classification, type: :model do it :aggregate_failures do is_expected.to belong_to(:drug).touch(true) is_expected.to belong_to(:drug_type) is_expected.to be_versioned end end end
21.214286
49
0.737374
ed3330d797292867a2e9dd2cd2668ab9752db214
3,196
# Generated by Rawr version 1.7.1 configuration do |c| # The name for your resulting application file (e.g., if the project_name is 'foo' then you'll get foo.jar, foo.exe, etc.) # default value: "BareWiiUseJ" # #c.project_name = "BareWiiUseJ" # Undocumented option 'output_dir' # default value: "package" # #c.o...
26.633333
139
0.690238
ffbed2dcb35704028c7363d10ac522911b3583ae
3,032
require 'spec_helper' describe package('docker-ce') do it { should be_installed } end describe command('dpkg -l docker-ce') do its(:stdout) { should match /ii docker-ce/ } its(:stdout) { should match /5:18.09.7~3-0~debian/ } its(:stdout) { should match /arm64/ } its(:exit_status) { should eq 0 } end descr...
23.874016
69
0.676121
e80da95595b06144640970e79990f04f48531af0
4,073
#!/usr/bin/env rspec require 'spec_helper' augeas = Puppet::Type.type(:augeas) describe augeas do describe "when augeas is present", :if => Puppet.features.augeas?, :'fails_on_ruby_1.9.2' => true do it "should have a default provider inheriting from Puppet::Provider" do augeas.defaultprovider.ancestors.sh...
33.941667
119
0.668795
d502c65752d38b47345cadb6beaf1d2e82d90707
1,242
# frozen_string_literal: true require "erb" require "uri" require "active_support/actionable_error" module ActionDispatch class ActionableExceptions # :nodoc: cattr_accessor :endpoint, default: "/rails/actions" def initialize(app) @app = app end def call(env) request = ActionDispatch::...
27
116
0.638486
ab4bd4c5be93ddebb9536054bb365708edd1518a
1,069
# frozen_string_literal: true module Thredded class MessageboardNotificationsForFollowedTopics < ActiveRecord::Base belongs_to :user_preference, primary_key: :user_id, foreign_key: :user_id, inverse_of: :messageboard_notifications_for_followed_topics belongs_to :u...
34.483871
89
0.730589
01841b018d0c1967be47851b677461f8b0ca092b
2,314
require 'spec_helper' RSpec.describe Lapidarist::CLI do describe '#run' do context 'when there are is only one outdated gem' do context 'and it passes the test' do it 'leaves the single commit added by update' do stub_outdated_gems(stub_gems([stub_gem])) stub_update(stub_gems([s...
30.853333
72
0.625324
bb45e54fc4b309a417f6278b1843f79c125f4a51
1,747
RSpec.describe Spree::PrintInvoiceSetting do subject { described_class.new } describe '#page_sizes' do it 'has a list of page sizes' do expect(subject.page_sizes).to be_a(Array) expect(subject.page_sizes.size).to be(50) end end describe '#page_layouts' do it 'has a list of layouts' do ...
26.469697
102
0.681168
e2dce5034518622fb9f9ba6a6106078f2d014665
1,918
require 'test_helper' # was the web request successful? # was the user redirected to the right page? # was the user successfully authenticated? # was the correct object stored in the response? # was the appropriate message delivered in the json payload? class Overrides::PasswordsControllerTest < ActionDispatch::...
30.444444
85
0.654327
18c464fe73aadc0ff460fd7b320f686589f5b042
593
cask 'hp-eprint' do version '2.5.0' sha256 'cba1598dc5d03fbf28fa649dafca5cd251f273066cc3a050966834a73ba66c3e' url "https://ftp.hp.com/pub/softlib/software13/COL43009/ds-104730-8/HP-ePrint_v#{version}.dmg" name 'HP ePrint' homepage 'http://h20331.www2.hp.com/hpsub/us/en/eprint/overview.html' license :gratis...
31.210526
96
0.676223
abeb63c5917e1f2fb2a55d2a7aba0dc1b5d2243c
763
require 'test/unit' require "cases/helper" require 'active_support/core_ext/class/inheritable_attributes' class A include ClassInheritableAttributes end class B < A write_inheritable_array "first", [ :one, :two ] end class C < A write_inheritable_array "first", [ :three ] end class D < B write_inheritable_a...
23.121212
77
0.741809
e895ba97899619d650b89413afcc080c6b841365
462
module Wepay module Api class Base def initialize end private def get(path, params = {}) make_request(:get, path, params) end def post(path, params = {}) make_request(:post, path, params) end def make_request(http_method, path, params = {}) ...
18.48
54
0.556277
e987abf144de7f0229bc9a5c70a6b28b12ee132a
138
# frozen_string_literal: true require 'pry' require 'rails' require 'active_record' require 'active_support' require 'action_controller'
17.25
29
0.811594
08d54ca6673e0babb7bb1de324d8d5344a2f203a
698
component "rubygem-semantic_puppet" do |pkg, settings, platform| # Projects may define a :rubygem_semantic_puppet_version setting, or we use 1.0.4 by default version = settings[:rubygem_semantic_puppet_version] || '1.0.4' pkg.version version case version when '0.1.2' pkg.md5sum '192ae7729997cb5d5364f64b9...
36.736842
96
0.772206
3868e604a751bf7d4a80aebec406925f89edff28
287
Rails.application.routes.draw do get 'oauth_test/index' devise_for :users, controllers: { registrations: "users/registrations", omniauth_callbacks: "users/omniauth_callbacks" } resources :groups resources :users resources :events root :to => 'oauth_test#index' end
23.916667
50
0.738676
21bc06a52d9624e600e998d30c8906e3311a777b
5,667
# frozen_string_literal: true RSpec.describe Dry::Types::Array do describe "#of" do context "primitive" do shared_context "array with a member type" do it "returns an array with correct member values" do expect(array[Set[1, 2, 3]]).to eql(%w[1 2 3]) end it_behaves_like Dr...
27.245192
106
0.560967
1c5ca018b61eeb56c5b16b76f78496bf11d0abc2
960
#--- # Excerpted from "The RSpec Book", # published by The Pragmatic Bookshelf. # Copyrights apply to this code. It may not be used to create training material, # courses, books, articles, and the like. Contact us if you are in doubt. # We make no guarantees that this code is fit for any purpose. # Visit http://www.p...
30.967742
82
0.686458
e2b154976386a8e951273b3be28380dfc8e4f49d
3,924
# frozen_string_literal: true module Ci class Stage < Ci::ApplicationRecord include Importable include Ci::HasStatus include Gitlab::OptimisticLocking include Presentable enum status: Ci::HasStatus::STATUSES_ENUM belongs_to :project belongs_to :pipeline has_many :statuses, class_na...
26.513514
106
0.629205
e2637cee9c341cad08768bcb46742ac2ddfb909a
477
# frozen_string_literal: true require_relative '../bin/check-windows-service.rb' describe CheckWinService do before(:all) do CheckWinService.class_variable_set(:@@autorun, nil) end let(:check) do CheckWinService.new ['--service', 'A Sample Service'] end it 'should use quotes' do expect(check)....
25.105263
113
0.721174
ff5d517414aad099184cd21ebbce8edd87892228
854
class Mdp < Formula desc "Command-line based markdown presentation tool" homepage "https://github.com/visit1985/mdp" url "https://github.com/visit1985/mdp/archive/1.0.0.tar.gz" sha1 "24821e0602f3c7f141ce610de2beda8108050584" head "https://github.com/visit1985/mdp.git" bottle do cellar :any sha256 "...
31.62963
95
0.736534
0841e338a2b500fa3800119a68e04bb98d95004a
96
module DNS class Zone # Version number (major.minor.tiny) Version = '0.3.1' end end
13.714286
39
0.635417
e23f4fa4154c64233b9270b5941e6dd5828e7abe
3,623
RSpec.describe Game do describe "#remove_expired_items" do let(:current_time) { 10 } let(:expired_item) { Item.new("Expired", "00:07", "1") } let(:valid_item) { Item.new("Valid", "00:08", "1") } before do subject.items = [expired_item, valid_item] subject.remove_expired_items(current_time...
23.525974
66
0.566105
79ac97c8af93db75f87f11142fad8af10da77e9f
2,278
# generated from template-files/ios/ExpoKit.podspec Pod::Spec.new do |s| s.name = "ExpoKit" s.version = "2.9.0" s.summary = 'ExpoKit' s.description = 'ExpoKit allows native projects to integrate with the Expo SDK.' s.homepage = 'http://docs.expo.io' s.license = 'MIT' s.author = "650 Industries, Inc." ...
34.515152
97
0.657594
79d331962388c7b9fd917c89834fcf8239bfaf3e
736
cask "macloggerdx-beta" do version "6.37b13" sha256 :no_check url "https://www.dogparksoftware.com/files/MacLoggerDX.beta.dmg" name "MacLoggerDX" desc "Ham radio logging and rig control software" homepage "https://www.dogparksoftware.com/MacLoggerDX.html" livecheck do url :homepage regex(/Downlo...
27.259259
67
0.711957
7a4e13e1bde03393a342a8dafff1e636c9977dff
4,332
######################################################################## # TerraformCommands provides command line terraform commands # +plan+ and +apply+ for GeoEngineer ######################################################################## module GeoCLI::TerraformCommands def create_terraform_files(with_state = t...
29.469388
114
0.613112
38998e550faf58e2b7f2bc3dadbcdb4ee905bc98
2,095
# frozen_string_literal: true require 'spec_helper' require 'valkyrie/specs/shared_specs' RSpec.describe Valkyrie::Persistence::Fedora::MetadataAdapter, :wipe_fedora do [4, 5, 6].each do |fedora_version| context "fedora #{fedora_version}" do let(:version) { fedora_version } let(:adapter) { described_...
34.916667
143
0.639618
e89ea8b21d5700f00df15e481703c2840b152408
12,620
module ActionDispatch module Routing # Polymorphic URL helpers are methods for smart resolution to a named route call when # given an Active Record model instance. They are to be used in combination with # ActionController::Resources. # # These methods are useful when you want to generate the corr...
35.954416
112
0.56775
ffdc7c74e1929ea47dd34dc47274809357fd2c27
1,947
RSpec::Matchers.define :respond_with_status do |expected_status| match do |action| action.call expect(response).to have_http_status(expected_status) true end failure_message do "expected action to respond with #{expected_status}, but got #{response.status}" end end class RespondWithRedirectMat...
22.125
84
0.700051
d5b7effed84d45bb1017bb4c2bccda22c8ccbcc8
57
Spree::Admin::PaymentsController.helper :braintree_admin
28.5
56
0.859649
bbdb186324c2c870198a923cd459ddbc3c82ce94
2,532
module Feedjira module FeedUtilities UPDATABLE_ATTRIBUTES = %w(title feed_url url last_modified etag).freeze attr_writer :new_entries, :updated, :last_modified attr_accessor :etag def self.included(base) base.extend ClassMethods end module ClassMethods def parse(xml, &block) ...
23.018182
76
0.625987
b948d7efaa2d9a09be05b2ddc450376c51217383
10,471
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2018_12_01 module Models # # P2SVpnServerConfiguration Resource. # class P2SVpnServerConfiguration < SubReso...
37.665468
98
0.523446
3371c6007ebb859d55e907596240aeacddd0fd66
406
require 'spec_helper' describe 'Puppet_metrics_dashboard::HostList' do it do is_expected.to allow_value(['some-host.test', 'some-other.host.test']) end it do is_expected.to allow_value(['some-host.test', ['some-other.host.test', 9140]]) en...
23.882353
64
0.586207
01f2fcd55c1688364c853b7518fdf8c61ca4ada9
2,176
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
38.175439
97
0.674632
ac768a06d181b7703276c85b0aa445354b909311
10,502
# This file was created from a native ruby build on a rhel-6-s390x system. Any # changes made to this file will be lost the next time ruby is built. module RbConfig RUBY_VERSION == "2.4.4" or raise "ruby lib version (2.4.4) doesn't match executable version (#{RUBY_VERSION})" TOPDIR = File.dirname(__FILE__)....
38.328467
237
0.623786
ff647f7e646c6a9ddad87dbf09b7a4e3e5d50be6
224
# frozen_string_literal: true RSpec.configure do |c| c.before do stub_const('ImageOptim::Config::GLOBAL_PATH', '/dev/null') stub_const('ImageOptim::Config::LOCAL_PATH', '/dev/null') end c.order = :random end
20.363636
62
0.696429
bfe1b1bf567f3ca1ef112bdfe26e7b862639323c
11,070
Pubann::Application.routes.draw do require 'sidekiq/web' devise_scope :user do authenticate :user, ->(user) {user.root} do mount Sidekiq::Web => '/sidekiq' end end resources :evaluators resources :evaluations do post 'select_reference_project' => 'projects#select_reference_project' post 'del...
34.485981
162
0.693767
7944bbb0dcc2bc4560e7bebfadc5d83ff44801cc
3,559
# encoding: UTF-8 # frozen_string_literal: true module APITestHelpers extend Memoist def post_json(destination, body, headers = {}) post destination, String === body ? body : body.to_json, headers.reverse_merge('Content-Type' => 'application/json') end def put_json(destination, body, he...
30.161017
101
0.690643
1d93fd72dae9a630da99cbe2be58fbbe6b0fa6b1
1,400
class CadenceWorkflow < Formula desc "Distributed, scalable, durable, and highly available orchestration engine" homepage "https://cadenceworkflow.io/" url "https://github.com/uber/cadence.git", tag: "v0.24.0", revision: "517c6c135a24a4f23eea6f3a3747e14e59b5d49e" license "MIT" head "https://g...
35.897436
115
0.720714
39ce72baf3336eb82f793955d05f7bebef6d0fb9
127
require 'rails_helper' RSpec.describe Staff::CustomersController, type: :controller do pending 'I haven\'t writed yet.' end
21.166667
63
0.771654
e93f2e2e46cd45efac2df6d528f567f01ad024c2
190
# frozen_string_literal: true FactoryBot.define do factory :node do sequence(:name) { |n| "name#{n}" } section { |s| s.association(:section) } summary { "summary" } end end
19
43
0.636842
214359b46e8e804eac7ee8c5ccb259f6dc0e907d
5,315
# # Be sure to run `pod spec lint flutter_module_demo.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 https://guides.cocoapods.org/syntax/podspec.html # To see working Podspecs in the CocoaPods repo see ht...
37.964286
125
0.605644
6a719634b5c0a145adda3881cb2e8304809ab413
312
Rails.application.routes.draw do resources :authors do collection do post :import end end resources :publications do collection do get :search post :import end end # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end
20.8
101
0.692308
d596be580c11a57077703e3188a8d807038664d6
2,203
module Mongoid module Document # List of all embedded model names defined for this instance def all_embedded_model_names names = [] self.relations.each do |name, relation| names << name if [:embeds_one, :embeds_many].include? relation.macro.to_sym end names end # List...
27.197531
113
0.641852
18106e70036529164a5e4d0ca3a5e20f51e365e1
2,160
class Cms::ArticlesController < ApplicationController layout 'cms' before_action :authenticate_user!, except: [:index, :show] def top must_be_admin! a = Cms::Article.find params[:article_id] a.update_column :top, params[:act]=='enable' redirect_to cms_article_path(a) end def index @art...
24
143
0.643519
03e4657bbbffdb440a89661eec5db2a6ec492949
1,750
# frozen_string_literal: true # == Schema Information # # Table name: certificates # # id :bigint(8) not null, primary key # cert_add_info :string # cert_applic_address :string # cert_applic_inn :string # cert_applic_name :string # cert...
33.653846
80
0.627429
87b251d725e866b46066d6b2cd72090554aefc4c
879
# frozen_string_literal: true FactoryBot.define do factory :community_data, class: Hash do initialize_with { attributes } currentTier { 'A' } otherIds { { crn: 'X362207'} } offenderManagers { [ build(:community_offender_manager) ] } trait :crc do enhancedResourcing { false } end ...
19.533333
78
0.61661
61a8967351071ba99e6d6cb1c1235257c2a8e793
171
require 'coveralls' Coveralls.wear! SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter require 'minitest/autorun' require 'minitest/pride' require 'rack-heartbeat'
24.428571
57
0.818713
ac64045e16116c7b96c5d19eb2d43843d23a969a
1,130
# coding: utf-8 lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "hanami/authentication/version" Gem::Specification.new do |spec| spec.name = 'hanami-authentication' spec.version = Hanami::Authentication::VERSION spec.authors = ['Lega...
35.3125
76
0.656637
032b4085c273289f53e1285f2a3189605b5243b3
202
require 'synaccess_connect/net_booter/http/http_connection' require 'synaccess_connect/net_booter/http/rev_a' require 'synaccess_connect/net_booter/http/rev_b' module NetBooter module Http end end
22.444444
59
0.841584
4a21bd278cc96114db0d7c4c8f6175d2fe0c9807
3,096
# Encoding: utf-8 # # This is auto-generated code, changes will be overwritten. # # Copyright:: Copyright 2017, Google Inc. All Rights Reserved. # License:: Licensed under the Apache License, Version 2.0. # # Code generated by AdsCommon library 1.0.0 on 2017-10-13 16:16:07. require 'ads_common/savon_service' require '...
32.589474
85
0.764535