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
397ced2327ab18c9e1389b0ddeb8702ef3fa2824
182
require 'spec_helper' describe PageController do describe "GET 'about'" do it "returns http success" do get 'about' response.should be_success end end end
14
32
0.675824
61399345bbcc1cad098e7ec2f045412e2b08821e
26,749
require 'pathname' [ 'command', "dsl" ].each do |lib| require "beaker/#{lib}" end module Beaker #Provides convienience methods for commonly run actions on hosts module HostPrebuiltSteps include Beaker::DSL::Patterns NTPSERVER = 'pool.ntp.org' SLEEPWAIT = 5 TRIES = 5 UNIX_PACKAGES = ['curl',...
46.358752
165
0.636472
033b7351cb637dc63d92117cc56ff209c89ba5d0
863
# # Be sure to run `pod lib lint CubicSpline.podspec' to ensure this is a Pod::Spec.new do |s| s.name = 'CubicSpline' s.version = '0.1.2' s.summary = 'Cubic Spline in Swift' s.description = <<-DESC A simple cubic spline (https://en.wikipedia.org/wiki/Cubic_Hermite_spline) l...
31.962963
104
0.587486
6ada497cc450c14540a49db0d0ac92dfd070b1f1
3,374
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Brainfuck" do context "before execution" do subject { Brainfuck.new('') } its(:output) { should == "" } its(:tape) { should == [0] } its(:data_pointer) { should == 0 } its(:input) { should be_nil } end context "after e...
28.352941
106
0.590101
9113568aac357cd29a93538f6dc39a9097b953f6
7,793
require "test_helper" class DevelopersTest < ActionDispatch::IntegrationTest include DevelopersHelper include MetaTagsHelper include PagyHelper test "can view developer profiles" do get developers_path assert_select "h2", developers(:one).hero end test "custom meta tags are rendered" do get d...
27.832143
110
0.70512
6ab9bdde67ed9416611ed41b8bb3e9820e7b53a3
503
Pod::Spec.new do |s| s.name = 'Colours' s.version = '4.2' s.summary = '100s of beautiful, predefined Colors and Color methods. Works for iOS/OSX.' s.author = { 'Ben Gordon' => 'brgordon@ua.edu' } s.source = { :git => 'https://github.com/bennyguitar/Colours.git', :tag => '4.2' ...
29.588235
95
0.588469
21a32f4d5147380b4f060200013bc395f66e8e08
995
require 'puppet/indirector/facts/yaml' require 'puppet/util/profiler' require 'puppet/util/hdp' require 'json' require 'time' # HDP Facts class Puppet::Node::Facts::HDP < Puppet::Node::Facts::Yaml desc 'Save facts to HDP and then to yamlcache.' include Puppet::Util::HDP def profile(message, metric_id, &block) ...
25.512821
70
0.660302
5d5c9b57067f7b46dae49a56b863a8e361067983
1,772
# # Cookbook Name:: arcgis-mission # Recipe:: federation # # Copyright 2020 Esri # # 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 ...
38.521739
74
0.757336
4a6aa434076e3e847d503aa677652bcd687323b5
9,497
# frozen_string_literal: true require_relative '../test_helper' require_relative '../mock_helpers/pagy_buggy' require_relative '../mock_helpers/app' # in test we cannot use the Pagy::I18n.load method because # it would freeze the Pagy::I18n::DATA hash so i18n_load # do the same as Pagy::I18n.load, just omitting the ...
56.529762
211
0.66442
26af54de9165a0cb2215bec35480037594a89476
46,439
require 'active_resource/connection' require 'cgi' require 'set' module ActiveResource # ActiveResource::Base is the main class for mapping RESTful resources as models in a Rails application. # # For an outline of what Active Resource is capable of, see link:files/vendor/rails/activeresource/README.html. # #...
39.255283
184
0.621547
6aed271f9a99cce5eacd747088893df2f8095024
6,402
require 'nokogiri' require 'ostruct' require 'webrick/cookie' module Anemone class Page # The URL of the page attr_reader :url # The raw HTTP response body of the page attr_reader :body # Headers of the HTTP response attr_reader :headers # URL of the page this one redirected to, if any ...
26.786611
123
0.579975
d58e57df2f1b0f719836709cef1909461828aaab
11,585
# -*- coding: binary -*- module Msf module EvasiveTCP attr_accessor :_send_size, :_send_delay, :evasive def denagle begin setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) rescue ::Exception end end def write(buf, opts={}) return super(buf, opts) if not @evasive ret = 0 ...
22.45155
143
0.607769
b992febea039f776cfa1fc5b2fa1a690c08fc5e6
432
class SectionsController < ApplicationController def index unless params[:section] redirect_to sections_path(section: Section.first.name) return end @sections = Section.all section = Section.find_by(name: params[:section]) @food_items = section.food_items end def show @s...
21.6
60
0.6875
7a0f2efda6c3e963b89edb166f4b4a44a80ee43b
274
class CreateEmployments < ActiveRecord::Migration def change create_table :employments do |t| t.string :company_id t.string :employee_id t.timestamps end add_index :employments, :company_id add_index :employments, :employee_id end end
21.076923
49
0.708029
abdd67be3b275a2a510ccef8da27a3722a702dd2
11,596
require 'spec_helper' class Foo include Mongoid::Document include Mongoid::TagsArentHard field :label field :account, default: 'a' default_scope ->{ where(account: 'a') } taggable_with :tags taggable_with :colors, separator: ";" end describe Mongoid::TagsArentHard do let(:foo) { Foo.new } {tags...
30.515789
87
0.55959
f7fe617fd98938d2339e5d08005f32ee85eec1a1
3,539
require 'rails_helper' RSpec.describe TestCollection::AnswerSearchKey, type: :service do let(:test_collection) { create(:test_collection, :completed) } let(:org_id) { test_collection.organization_id } let(:test_id) { test_collection.id } let(:question_choice_id) { nil } let(:answer_number) { nil } let(:aud...
30.773913
121
0.674202
62900aa0d7bc48a44213f37857bd2214f0795c91
958
require 'fluent/plugin/parser' module Fluent::Plugin class SimpleJsonParser < JSONParser Fluent::Plugin.register_parser("simple_json", self) config_param :separator, :string, default: '.' def parse(text) r = @load_proc.call(text) time, record = convert_values(parse_time(r), r) r...
23.365854
56
0.584551
28be8bbb983e1bc2a616bb2c443b02deb8ecdd02
2,374
# frozen_string_literal: true require 'test_helper' require 'helpers/mocked_instrumentation_service' class HTML::PipelineTest < Minitest::Test Pipeline = HTML::Pipeline class TestFilter def self.call(input, _context, _result) input.reverse end end def setup @context = {} @result_class =...
30.831169
66
0.747262
1cabc943fdad461fe09ac8481cbfa15307f2fbd2
293
module Tagliani class Configuration class Elasticsearch < Struct.new(:url, :index, :refresh, :log) def initialize self.url = "http://localhost:9200" self.index = "tagliani" self.refresh = false self.log = false end end end end
24.416667
67
0.583618
b9eef57a096fe6c436337b03ef1bcdb3a95c9e68
1,028
require 'spec_helper' describe NetSuite::Actions::Delete do before(:all) { savon.mock! } after(:all) { savon.unmock! } context 'Customer' do let(:customer) do NetSuite::Records::Customer.new(:internal_id => '980', :entity_id => 'Shutter Fly', :company_name => 'Shutter Fly, Inc.') end before d...
27.783784
127
0.604086
116eaa80a3bc381c8d53ef5d82525c9e388ec8b0
206
class Gawker < Cask url 'http://sourceforge.net/projects/gawker/files/latest/download' homepage 'http://gawker.sourceforge.net/Gawker.html' version 'latest' sha256 :no_check link 'Gawker.app' end
25.75
68
0.747573
e8f31671ee7d99591242a82c0eef46ee574987ba
258
class MyArray attr_reader :array def initialize(array) @array = array end def sum(initial_value = 0) if block_given? array.reduce(initial_value) { |a, e| a + yield(e) } else array.reduce(initial_value, :+) end end end
16.125
57
0.627907
62941c1643a222c42f3b5fd7ec775a342b6071dc
225
namespace :national_circumstances do desc 'Imports national_circumstances' task import: :environment do TimedLogger.log('import national circumstances') do ImportNationalCircumstances.new.call end end end
25
55
0.777778
62009ef0d1b2903033576ecb99e2f812a35fe54e
3,008
# 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 `bin/rai...
38.564103
86
0.72141
28353b7ff69de1106f4b58a3cfd5bd6316a099de
1,711
class Komposition < Formula desc "Video editor built for screencasters" homepage "https://github.com/owickstrom/komposition" url "https://github.com/owickstrom/komposition/archive/v0.2.0.tar.gz" sha256 "cedb41c68866f8d6a87579f566909fcd32697b03f66c0e2a700a94b6a9263b88" license "MPL-2.0" revision 3 head "ht...
34.22
117
0.77031
bbb6de07c003ecf4b6c88745255d45e9a14f3f6d
778
module CanTango::PermitStore module Parser sweetload :Permit, :PermitMode, :Rule def self.create_for meth, action, target parser_class(target).new method, action, target end protected def self.parser_class target parser_name(target).constantize end def self.parser_name targ...
20.473684
63
0.57455
1c211feaf52bc14ce992d7551c93d51b91173c22
27,384
module Sass module Selector # An operator-separated sequence of # {SimpleSequence simple selector sequences}. class Sequence < AbstractSequence # Sets the line of the Sass template on which this selector was declared. # This also sets the line for all child selectors. # # @...
41.117117
100
0.576541
01f5e9a43ef4803bcedb334a7e6febdac8f031d7
651
# encoding: utf-8 module FFaker module PhoneNumberFR extend ModuleUtils extend self COUNTRY_PREFIX = %w[+33 0033 0] AREA_PREFIX = %w[1 2 3 4 5] MOBILE_PREFIX = %w[6 7] PHONE_NUMBER = ['########', ' ## ## ## ##'] def phone_number case rand(2) when 0 then home_work_phone_numbe...
22.448276
93
0.652842
2855b215f2b34a3f15b36dc5332268c0a0b6ecce
1,110
class Ilmbase < Formula desc "OpenEXR ILM Base libraries (high dynamic-range image file format)" homepage "https://www.openexr.com/" url "https://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.1.tar.gz" sha256 "cac206e63be68136ef556c2b555df659f45098c159ce24804e9d5e9e0286609e" bottle do cellar ...
38.275862
93
0.728829
d598fd02b762c8ba205c0b614c2813e7edc5281a
3,248
# frozen_string_literal: true require 'test_helper' class StatsDTest < Krane::TestCase include StatsD::Instrument::Assertions class TestMeasureClass extend(Krane::StatsD::MeasureMethods) def thing_to_measure 123 end measure_method :thing_to_measure def measure_with_custom_metric; end ...
33.142857
100
0.754618
e228c9f3928656ff296259ccdcbb7ca31484dea3
6,915
# lchg.rb - line changes detection library # # Copyright (C) 2010 Tanaka Akira <akr@fsij.org> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # ...
28.109756
102
0.58496
ffb14c159436c8712256a71d70c48b6b3af94868
409
require 'spec_helper' describe AgreementsController do describe "#show" do describe "response" do before { get :show } subject { response } it { should be_success } it { should render_template 'show' } end describe "route" do subject { { :get => "/agreement" } } i...
17.782609
76
0.599022
4a9e227eb6018e689b5e95620d8a26b28cdaf51b
11,430
require 'test_helper' class UsersControllerTest < ActionController::TestCase # Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead # Then, you can remove it from this and the units test. include AuthenticatedTestHelper fixtures :all def test_title get :new assert_select 'title...
28.718593
118
0.699913
26801e4ad68ee1d167731a9433bec9ac0522bc93
5,182
class Ghostscript < Formula desc "Interpreter for PostScript and PDF" homepage "https://www.ghostscript.com/" url "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9540/ghostpdl-9.54.0.tar.gz" sha256 "63e54cddcdf48ea296b6315353f86b8a622d4e46959b10d536297e006b85687b" license "AGPL-3.0-...
33.649351
135
0.736395
f75b3cc715c26b0fb277953cb1ab0fb67d291bd0
313
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/concat.rb', __FILE__) require 'strscan' describe "StringScanner#<<" do it_behaves_like :strscan_concat, :<< end describe "StringScanner#<< when passed a Fixnum" do it_behaves_like :strscan_concat_fixnum, :<< end
26.083333
58
0.744409
f8deb9661107874a93d06dc7cc6cbab464c60a35
7,466
require 'set' require 'core_classes/as_set' require 'core_classes/stdlib_classes' module CoreClasses extend AsSet private def self.ruby_222 Set.new( [ ARGF.class, ArgumentError, Array, BasicObject, Bignum, Binding, Class, Comparable, ...
23.77707
49
0.538039
7a6fdeae6fb6e3885164bac17efd764c8db804ad
1,902
class Harfbuzz < Formula desc "OpenType text shaping engine" homepage "https://github.com/harfbuzz/harfbuzz" url "https://github.com/harfbuzz/harfbuzz/releases/download/2.6.7/harfbuzz-2.6.7.tar.xz" sha256 "49e481d06cdff97bf68d99fa26bdf785331f411614485d892ea4c78eb479b218" bottle do cellar :any sha256 ...
30.190476
161
0.715563
d584f2d38a94c1fd83537c802da5efdedbe2f7c4
20,204
# Test for acts_as_category # # There are several ways to execute this test: # # 1. Open this file on a Mac in TextMate and press APPLE + R # 2. Go to "vendor/plugins/acts_as_category/test" and run "rake test" in a terminal window # 3. Run "rake test:plugins" in a terminal window to execute tests of all plugins # # For...
33.561462
108
0.691942
ab3c117e20d0f308cdef51d8f9012f35c10fc897
3,407
# frozen_string_literal: true require 'dry/monads/result' require 'dry/transaction/result_matcher' require 'dry/transaction/stack' module Dry module Transaction module InstanceMethods include Dry::Monads::Result::Mixin attr_reader :steps attr_reader :operations attr_reader :listeners ...
28.157025
123
0.601409
1a4f0a9399835284b9e2dfa8049f9c39fec27e6e
357
# Be sure to restart your server when you modify this file. # Rails.application.config.session_store :cookie_store, key: '_rails_41_app_session' MongoStore::Session.database = Mongo::Connection.new.db("rails41_app_#{Rails.env}") if ENV['MONGO_SESSION_STORE_ORM'] == "mongo" Rails.application.config.session_store :"#{EN...
59.5
128
0.789916
d5d415d2ddf4990e4d313716b5ea32548b095b39
2,479
# frozen_string_literal: true class UpdateVarcharFields < ActiveRecord::Migration[4.2] def self.up change_column :facilities, :url_name, :string, limit: 50, null: false change_column :facilities, :account, :string, limit: 50, null: false add_column :facilities, :description_c, :text, nu...
43.491228
80
0.674062
621e0b930617a4ff057c27061b206ab2ebd6070b
1,357
# Configure Spree Preferences # # Note: Initializing preferences available within the Admin will overwrite any changes that were made through the user interface when you restart. # If you would like users to be able to update a setting with the Admin it should NOT be set here. # # Note: If a preference is set her...
43.774194
146
0.759027
7a0696d6edee6aaf58bbba541e69e6052594d183
3,893
require "active_support/core_ext/integer/time" 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 applica...
41.414894
100
0.759312
39fe95656f254c22e35bc5c07da8796e4eda7946
1,452
#-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2013 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 ...
41.485714
91
0.756887
1cb94c178ea02938ec751c1b406c8e82a63d79e0
6,322
require 'spec_helper' describe FundAmerica::Offering do context '#list' do before(:all) do @response = FundAmerica::Offering.list end it 'must have object in response' do expect(@response['object']).not_to be nil end it 'must have object as resource_list' do expect(@response['...
26.902128
104
0.608826
e2fa992a31de9f156e33c8067be9dc35574ac30a
1,568
class Diskus < Formula desc "Minimal, fast alternative to 'du -sh'" homepage "https://github.com/sharkdp/diskus" url "https://github.com/sharkdp/diskus/archive/v0.6.0.tar.gz" sha256 "661687edefa3218833677660a38ccd4e2a3c45c4a66055c5bfa4667358b97500" license "Apache-2.0" bottle do rebuild 1 sha256 ce...
49
123
0.793367
e2f1c974f1986df9811257300bbccdaf27d9df8d
157
require 'aruba/platform' Aruba.platform.deprecated('The use of "aruba/jruby" is deprecated. Use "aruba/config/jruby" instead') require 'aruba/config/jruby'
31.4
101
0.77707
7a729bf380a4878bd86aa7daf73d16ad637bd475
2,570
# frozen_string_literal: true RSpec.shared_examples 'platforms_spec' do |plugin, plugin_name| let(:puppetdb_session) { double } let(:puppet_db) { double } let(:list) { [OpenStruct.new(name: 'production', modules: [Puppet::Module.new('modulea', '/foo/bar', 'production'), Puppet::Module.new('moduleb', '/foo/baz', ...
36.714286
178
0.443191
287e423f7009308bc02fee2cf9ac33d039a40694
295
require "rails_helper" describe MappingsBatch do describe "validations" do it { is_expected.to validate_presence_of(:user) } it { is_expected.to validate_presence_of(:site) } it { is_expected.to validate_inclusion_of(:state).in_array(MappingsBatch::PROCESSING_STATES) } end end
29.5
98
0.766102
bf51f68c13de676b44ac28ea058eb1cbb1d3950d
2,965
# The Kenney UI Space pack has transparent panels with optional cut corners. # This is a normal nine slice where each corner has two options. class GlassPanel < Zif::NinePanel SPRITES_PATH = 'sprites/kenney-uipack-space/danhealy-modified'.freeze CUT_CORNER = "#{SPRITES_PATH}/glass_cut_corner.png".freeze ROUND_C...
26.008772
110
0.609781
ac56dd0403455349244920d9ea5d425ae473bbe8
4,151
require 'triglav_client' class Client class Error < StandardError attr_reader :cause def initialize(message, cause) @cause = cause super(message) end end class AuthenticationError < Error; end class ConnectionError < Error; end attr_reader :url, :username, :password, :authenticator ...
28.047297
101
0.675259
612fd3b78f8812a19e948fdaa1475acd0084e8db
15,990
#!/usr/bin/env ruby require File.expand_path(File.join(File.dirname(__FILE__), "test_helper")) describe BinData::Record do it "is not registered" do lambda { BinData::RegisteredClasses.lookup("Record") }.must_raise BinData::UnRegisteredTypeError end end describe BinData::Record, "when defining with...
23.549337
122
0.677173
5d427ae1f6849513e10eb28019a0dbc0df24a0d5
992
# Warn when there is a big PR net_new = git.insertions - git.deletions warn('Big PR, try to keep changes smaller if you can') if git.lines_of_code > 800 or net_new > 500 # Encourage writing up some reasoning about the PR, rather than just leaving a title if github.pr_body.length < 3 warn 'Please provide a summary in...
45.090909
112
0.753024
03622cbce6bbb2b362a0a5242b923f4dca3d0c89
5,133
# # Be sure to run `pod spec lint CocoapodsLib.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 https://g...
37.195652
108
0.59887
ff65d39f8fcb9b89436efd85bea54a3f8dd1ff27
213
require "good_migrations/version" require "good_migrations/load_error" require "good_migrations/patches_autoloader" require "good_migrations/prevents_app_load" require "good_migrations/railtie" if defined?(Rails)
35.5
52
0.859155
ab1cbff00cebe86807296a8a53f8d97f9e66d8a1
1,051
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) module Dummy class Application < Rails::Application config.active_record.sqlite3.represent_boo...
42.04
99
0.729781
1ce43f4d066c5c0b5b9ed467afe0992dcbf54b7b
635
# == Schema Information # # Table name: gods # # id :bigint(8) not null, primary key # name :string # popularity :integer # pantheon :string # url :string # created_at :datetime not null # updated_at :datetime not null # require 'open-uri' class God < ApplicationRe...
19.242424
53
0.633071
f814153e30603feef0a5fc1bfa34184c6e610028
1,366
# frozen_string_literal: true require_relative 'lib/solidus_webhooks/version' Gem::Specification.new do |spec| spec.name = 'solidus_webhooks' spec.version = SolidusWebhooks::VERSION spec.authors = ['Elia Schito'] spec.email = 'contact@solidus.io' spec.summary = 'Webhooks support for Solidus' spec.homepag...
37.944444
99
0.715959
28be7db286f94d74ee2f5e5a39a785b0c45076c6
380
class ReferenceDocumentFromRevision < ActiveRecord::Migration[5.2] def change add_reference :versioned_revisions, :document, foreign_key: { to_table: :versioned_documents, on_delete: :restrict }, index: true, ...
34.545455
67
0.571053
4a039e96b99a7e291ec8d334479ab1cd168b97e3
3,398
module Xcake # This namespace provides all of methods for # the DSL where configurations are specified. # # Classes for the DSL which want to either # specifiy build settings or scheme launch arguments # (i.e The Project or Targets) include this namespace. # # @example # class Application # in...
24.271429
72
0.625662
1164f50db1d65207c89feb54c0a56663119a9f9a
633
module PokeApi # Ability object handling all data fetched from /ability class Ability < NamedApiResource attr_reader :is_main_series, :generation, :names, :effect_entries, :effect_changes, :flavor_text_entries, :poke...
22.607143
58
0.600316
bbfc18a75318f7a2f58519cc5b79acbbddde459d
51,404
# frozen_string_literal: true # Copyright 2020 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...
52.186802
172
0.558206
08d94c3fbaed8aab06a6ac1bfe5c7e52845a24d5
512
# # Cookbook Name:: newrelic_lwrp_test # Recipe:: agent_php # # Copyright (c) 2016, David Joos # include_recipe 'apache2' include_recipe 'php' newrelic_agent_php 'Install' do license node['newrelic']['license'] service_name node['newrelic']['php_agent']['web_server']['service_name'] config_file node['newrelic']...
26.947368
74
0.744141
bb91d483e16e4ada09c3e6bde22d7928e1704b97
886
# Require any additional compass plugins here. require 'modular-scale' # Set this to the root of your project when deployed: http_path = "/" css_dir = "stylesheets" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" # You can select your preferred output style here (can be overridden via the com...
32.814815
96
0.75395
ab2345b32cc0f56250ad434f273f73168be2f532
136
module Authentication class ApplicationMailer < ActionMailer::Base default from: 'from@example.com' layout 'mailer' end end
19.428571
46
0.742647
e20a8c52ff740a7118195bb40c38bfa973905508
16,782
=begin #NSX-T Manager API #VMware NSX-T Manager REST API OpenAPI spec version: 2.5.1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.19 =end require 'date' module NSXT class EdgeNode # Link to this resource attr_accessor :_self # The server will pop...
34.602062
508
0.641163
038d0968ee21f0772260722b87fe6459b24c2987
4,824
# -*- coding: utf-8 -*- # frozen_string_literal: true require 'diceBot/SwordWorld' class SwordWorld2_0 < SwordWorld # ゲームシステムの識別子 ID = 'SwordWorld2.0' # ゲームシステム名 NAME = 'ソードワールド2.0' # ゲームシステム名の読みがな SORT_KEY = 'そおとわあると2.0' # ダイスボットの使い方 HELP_MESSAGE = <<INFO_MESSAGE_TEXT 自動的成功、成功、失敗、自動的失敗の自動判定を行います。 ...
21.535714
89
0.65796
d53a4e634980116f319c6dc1016f2c6cac960a7f
1,526
#!/usr/bin/env rspec require 'spec_helper' require 'puppet/indirector/node/puppetdb' require 'puppet/util/puppetdb/command_names' require 'json' require 'date' require 'time' describe Puppet::Node::Puppetdb do CommandDeactivateNode = Puppet::Util::Puppetdb::CommandNames::CommandDeactivateNode before :each do ...
26.310345
85
0.67038
e8a0345d90622f1fbcfbb64e7f8be81dbd451e76
451
require 'rails_helper' # Specs in this file have access to a helper object that includes # the CageSearchesHelper. For example: # # describe CageSearchesHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("this","that")).to eq("this that") # ...
28.1875
71
0.718404
f8c4ca69d57aefba7c6764f10850c5488c87bae1
345
require 'route_command' module Booty module Products class NewCommand < Booty::RouteCommand handles :uri => /^\/products\/new$/, :method => :GET def initialize(view_engine) @view_engine = view_engine end def run(request) HtmlResponse.new(:template => "/products/new") ...
19.166667
58
0.623188
f79b0cad6e97bfac01a5e053772a1e233e20521d
46
def slowest_examples new(*options.keys) end
11.5
20
0.782609
e9337e705fb098cbea1f17734e1272a6a30c6c90
87
class CardReading < ApplicationRecord belongs_to :reading belongs_to :card end
17.4
37
0.770115
28f098cb594b6597e5c9b61108201bdfcafae01c
134
class InactiveTags < ActiveRecord::Migration[4.2] def change add_column :tags, :inactive, :boolean, :default => false end end
22.333333
60
0.716418
912397641fc765529896b20d474383b99dad2b3f
18,874
require_relative '../../../test_helper' module OmniAuth module Strategies class OpenIDConnectTest < StrategyTestCase def test_client_options_defaults assert_equal 'https', strategy.options.client_options.scheme assert_equal 443, strategy.options.client_options.port assert_equal '/au...
43.388506
205
0.673413
d5fd539553031d8cd800c5a1b097ab98636b9838
27
module CartBooksHelper end
9
22
0.888889
18c78f316a1fbaa6084b89c68a7129e9cef59f0d
140
# http://www.codewars.com/kata/55c933c115a8c426ac000082 # --- iteration 1 --- def eval_object(v) v["a"].send(v["operation"], v["b"]) end
20
55
0.657143
084b613c1edcfcb6c2b6a3876f4d74d541ead19c
156,990
# 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/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'seahorse/client/plugins/content_length.rb' require 'aws-sdk-core/plugins...
44.803082
373
0.656851
037906cd6c40c741cfd2c08364797c5412507d13
49
module Africansms VERSION = '0.2.2'.freeze end
12.25
26
0.714286
33aa99daa5511ffbd5a30a56b35877d3ed022055
2,680
# # File an ICLA: # - add files to documents/grants # - add entry to officers/grants.txt # - respond to original email # # extract message message = Mailbox.find(@message) # extract file extension fileext = File.extname(@selected).downcase if @signature.empty? grant = "#@filename#{fileext}" # verify that a grant...
27.346939
123
0.564925
219ab1989ea125c46f96ae4c1f4ea1cdcbbe5a4c
7,191
require 'spec_helper' describe Snippet, models: true do describe 'modules' do subject { described_class } it { is_expected.to include_module(Gitlab::VisibilityLevel) } it { is_expected.to include_module(Linguist::BlobHelper) } it { is_expected.to include_module(Participable) } it { is_expected.t...
35.59901
192
0.695731
bf77d68a81a6840f52c8719a5c3b9eb17b2fb6b2
265
class CreateRatings < ActiveRecord::Migration def change create_table :ratings do |t| t.string :name t.text :comment t.integer :stars t.references :food, index: true, foreign_key: true t.timestamps null: false end end end
20.384615
56
0.656604
915dc0355ed7079b3539df39fa35408747f03482
174
Pakyow::Realtime::MessageHandler.register :ping do |message, session, response| response[:status] = 200 response[:headers] = {} response[:body] = 'pong' response end
24.857143
79
0.706897
ab8773b7ede14c4f7cd9bc14eeb6116060c18180
6,847
require 'spec_helper' describe Group, 'Routable' do let!(:group) { create(:group, name: 'foo') } describe 'Validations' do it { is_expected.to validate_presence_of(:route) } end describe 'Associations' do it { is_expected.to have_one(:route).dependent(:destroy) } it { is_expected.to have_many(:re...
38.038889
150
0.688477
871bad31839da38d005d792628eb6b9d9e8f0ef7
561
# makes sure the dummy app is properly initialized: # bundles required gems # drops/creates the databases # migrates the development database # dumps db structure for reference # removes old sql dumps in tmp dir STDIN_STUB = 'STDIN_stub' DUMMY_PATH = '../../../spec/dummy' Dir.chdir File.expand_path(DUMMY_PATH, __FILE_...
23.375
51
0.7041
38d9151146a5c8272178e198d1d5990e12b7c4aa
374
require 'rest-client' class AccountDataManager def create(url) #url = 'https://my.api.mockaroo.com/login_wikipedia.json?key=e66a4260' response = RestClient.get url if response.code != 200 fail(msg ="GET failed. Response status code was: '#{response.code}'") end # return a hash of acc...
19.684211
75
0.681818
bbdfc836b388c2b2c0510ad3712babcf6bc9210c
7,418
class MariadbAT102 < Formula desc "Drop-in replacement for MySQL" homepage "https://mariadb.org/" url "https://downloads.mariadb.org/f/mariadb-10.2.39/source/mariadb-10.2.39.tar.gz" sha256 "d0c81ddb5d554388952487258e4a7a10cd92504a305efbcc1fa94668f1e9315d" license "GPL-2.0-only" livecheck do url "https:...
33.264574
108
0.664195
1d3f0ccac8b209a361b31c584cbe5a1d8ba11376
399
cask 'font-londrina-shadow' do version '1.001' sha256 '8e8fcd9dfb9dccc934ac9930ebc83a452c3c2049ffbce351b68622fe8308b10a' url 'https://googlefontdirectory.googlecode.com/hg-history/67342bc472599b4c32201ee4a002fe59a6447a42/ofl/londrinashadow/LondrinaShadow-Regular.ttf' homepage 'http://www.google.com/fonts/speci...
36.272727
148
0.824561
e23afc512aa97edcec2c80b2a81118d68286b6da
1,047
# Copyright (C) 2009-2014 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
28.297297
74
0.706781
624ca2987ae11db101648641136e274615b41ebc
682
module BrDanfe class XML def css(xpath) @xml.css(xpath) end def initialize(xml) @xml = Nokogiri::XML(xml) end def [](xpath) node = @xml.css(xpath) node ? node.text : '' end def collect(ns, tag) result = [] # With namespace begin @xml.xpa...
18.432432
57
0.513196
9155c24e409b3d0305096b29b8f71a3a78d06eab
629
cask 'blue-jeans' do version '2.15.0.237' sha256 'ed72ee9e64a1601f636f49189e1eaa4dd2d3a1847820e11f1b2aa1d4eb2b6c11' url "https://swdl.bluejeans.com/desktop-app/mac/#{version.major_minor_patch}/#{version}/BlueJeansInstaller.dmg" appcast 'https://www.bluejeans.com/downloads' name 'Blue Jeans videoconferencing'...
34.944444
113
0.666137
913c919752bbf9a3bbe799a049ad01b176cc25fc
8,486
#============================================================================== # ** TestUI_CRectangle #------------------------------------------------------------------------------ # Unit tests for the ResizableImage control #============================================================================== class TestU...
34.080321
116
0.4214
e2e067a3cbbcc617a8be5d4273f11e5e2be26825
1,103
# Encoding: utf-8 # # This is auto-generated code, changes will be overwritten. # # Copyright:: Copyright 2015, Google Inc. All Rights Reserved. # License:: Licensed under the Apache License, Version 2.0. # # Code generated by AdsCommon library 0.9.9 on 2015-06-30 09:24:53. require 'ads_common/savon_service' require '...
25.651163
69
0.708069
ab7b3eb34b75b08d56542784504c0fc6f9703c49
572
class AddFeedbackFieldsToApplicationForOffering < ActiveRecord::Migration def self.up add_column :application_for_offerings, :feedback_meeting_date, :datetime add_column :application_for_offerings, :feedback_meeting_person_id, :integer add_column :application_for_offerings, :feedback_meeting_comments, :te...
40.857143
80
0.835664
08d1490b74853d514a6f54dcea422d2b91376569
315
class RegistrationsController < Devise::RegistrationsController private def sign_up_params params.require(:user).permit(:name, :email, :password, :password_confirmation) end def account_update_params params.require(:user).permit(:name, :email, :password_confirmation, :current_password) end end
26.25
90
0.774603
1162c2d8cf6df62085f1551f063825f0db2a2d0b
3,858
class VimAT74 < Formula desc "Vi 'workalike' with many additional features" homepage "https://www.vim.org/" url "https://github.com/vim/vim/archive/v7.4.2367.tar.gz" sha256 "a9ae4031ccd73cc60e771e8bf9b3c8b7f10f63a67efce7f61cd694cd8d7cda5c" revision 18 bottle do sha256 "18867439556347ed829fc7bef2865f957...
37.096154
94
0.644116
26b25196961f6270c38d69c33a743e5fa75ddaf7
2,662
#encoding: utf-8 require_relative "../generator" require_relative "../fields_table_generator" require_relative "../options_example_generator" require_relative "../options_table_generator" require_relative "../sections_generator" require_relative "component_generator" module Docs class TransformGenerator < Component...
24.648148
169
0.601803
bb7d7e8f7b30bded1f8950b4de263433441e4121
648
# frozen_string_literal: true module EasyOrderable class Assorter def initialize(relation, args, custom_association_names) @relation = relation @args = args @custom_association_names = custom_association_names end def call joined_relation.order(*order_args) end private ...
20.903226
63
0.737654
abc6a8bb2d2ea0cad8a5b56502b32635a8c1da2d
411
require 'rbconfig' WINDOWS = RbConfig::CONFIG['host_os'] =~ /Windows|mswin/ if (WINDOWS) @devnull = 'NUL:' else @devnull = '/dev/null' end def quiet( &block ) io = [STDOUT.dup, STDERR.dup] STDOUT.reopen @devnull STDERR.reopen @devnull block.call ensure STDOUT.reopen io.first STDERR.reopen io.last $...
16.44
56
0.671533
7a13daa9a520f2e86bab12b667ec732c2a0b1c67
288
class Flightgear < Cask url 'http://ftp.snt.utwente.nl/pub/software/flightgear/ftp/MacOSX/FlightGear-2.12.1.dmg' homepage 'http://www.flightgear.org/' version '2.12.1' sha256 'd58f57bc22377bc4eaf4324e6f534d6cbf4e43a2830b587b91b1120169f9d53a' link 'FlightGear.app' end
36
95
0.753472
fff77c572ee454f3c6442ac8b18569d47af586ed
336
Deface::Override.new( :virtual_path => "layouts/erp/backend/_sidebar", :name => "add_backend_contacts_link_to_sidebar_menu", :insert_after => "[data-erp-hook='sidebar-menu']", :partial => "overrides/backend_contacts_link_to_sidebar_menu", :namespaced => true, :original => 'f5fe48b6dc6986328e0b873b3ffa...
42
65
0.738095