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
0119791f0c93fc41f99c257e28599828c28735c1
220
module OdfCore module Element module Db class TableType < AbstractElement XML_ELEMENT_NAME = 'db:table-type' CHILDREN = [].freeze ATTRIBUTES = [].freeze end end end end
14.666667
42
0.6
1a689004738afa01b1d6a5ca968daf798487143b
1,969
module Immigrate class Database def create_fdw_extension enable_extension :postgres_fdw end def drop_fdw_extension disable_extension :postgres_fdw end def create_server_connection server db_config = db_config(server) db, host, port, fetch_size = db_config.slice('database'...
26.253333
119
0.602844
6aa8b77aebf6d81280db2edd0df4f9fd636af1bf
3,299
require 'spec_helper' require 'fileutils' module Cache describe CacheManager do let(:cache_dir) { cache_dir = "/tmp/cache_maven" } let(:manager) { manager = CacheManager.new(cache_dir, '172.16.129.1', 3128) } let(:url) { url = "http://repo.pyrata.org/release/maven2/org/mycontainer/mycontainer-kernel/mav...
44.581081
160
0.69415
e95064b05c1fa90d7d08277c5dd80b87c8352f89
164
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run SimpleBlogFeed::Application
32.8
67
0.780488
7a9d75ecb7bbef5b543846db5435b044f463e5ed
378
require 'spec_helper' RSpec.describe MeteoMate::FetchGrib2Ranges do let(:idx_file) { File.open("#{RSPEC_ROOT}/spec_resources/grib2_index_file.idx") } it 'should parse the ranges from the file' do ranges = MeteoMate::FetchGrib2Ranges::call(idx_file) expect(ranges.size).to eql(522) expect(ranges["...
27
66
0.722222
ab0a2b34f708307b955a3f54ade551660dd119a9
494
require 'test_helper' class SiteLayoutTest < ActionDispatch::IntegrationTest 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[href=?]", about_path assert_select "a[h...
26
54
0.704453
287b0f2c505a813a561e96e0365c6c852905d3bd
51
class ItemsController < ApplicationController end
12.75
45
0.862745
acd5a47235158766b025cba0f9a186728e8b0ee3
9,145
# frozen_string_literal: true # rubocop:disable Layout/LineLength, Lint/RedundantCopDisableDirective # == Schema Information # # Table name: events # # id :integer not null, primary key # additional_info :jsonb # admin_notes :text # age_restrictions_d...
35.038314
120
0.654237
28988abc607bf922ad1850c3046e17fcb1c1d617
192
class CreateSetlists < ActiveRecord::Migration def change create_table :setlists do |t| t.text :data t.belongs_to :concert, index: true t.timestamps end end end
17.454545
46
0.666667
1c6ea03a3eb9117b8b655fc1d431a1deffe975e7
4,330
require 'uri' require 'yaml' module Licensee class InvalidLicense < ArgumentError; end class License class << self # All license objects defined via Licensee (via choosealicense.com) # # Options: # - :hidden - boolean, return hidden licenses (default: false) # - :featured - boolea...
24.742857
80
0.602079
5db1566f55deac9b9fb63c22606caf1950dd4736
4,776
require 'html/pipeline' module Gitlab # Custom parser for GitLab-flavored Markdown # # See the files in `lib/gitlab/markdown/` for specific processing information. module Markdown # Provide autoload paths for filters to prevent a circular dependency error autoload :AutolinkFilter, 'gitlab...
38.829268
93
0.671273
019042923a86e8f78cfe68c6163311ff205b3b97
1,634
require_relative "../canvas_base_resolver" module LMSGraphQL module Resolvers module Canvas class UpdateUserSetting < CanvasBaseResolver type Boolean, null: false argument :id, ID, required: true argument :manual_mark_as_read, Boolean, required: false argument :release_notes...
48.058824
240
0.697674
e2438d42a95f17a8b40f276eace6f1594928085f
136
RSpec.describe 'zeitwerk' do it 'eager load all files' do expect { Zeitwerk::Loader.eager_load_all }.not_to raise_error end end
22.666667
65
0.742647
87d2b0c206b7b632706d414be787fc7863d51d6c
2,063
# -*- encoding: us-ascii -*- require_relative '../../../spec_helper' require_relative 'fixtures/classes' describe "Enumerator::Lazy#chunk" do before :each do @yieldsmixed = EnumeratorLazySpecs::YieldsMixed.new.to_enum.lazy @eventsmixed = EnumeratorLazySpecs::EventsMixed.new.to_enum.lazy ScratchPad.reco...
30.338235
90
0.668444
38cd1c14a64a36ddbf45d68738d3d810bac8bc94
1,427
require_relative '../lib/race_for_president/race' bernie = RaceForPresident::Candidate.new("Bernie") hillary = RaceForPresident::Candidate.new("Hillary") race_for_president = RaceForPresident::Race.new("The Presidential Race") race_for_president.add_candidate(bernie) race_for_president.add_candidate(hillary) @playe...
27.980392
134
0.735109
edda1973d04dd6fda4f9f20fcfda5a53dffc753f
542
# frozen_string_literal: true module Folio::DragonflyFormatValidation extend ActiveSupport::Concern class_methods do def validate_file_format(formats = %w[jpeg png bmp gif svg tiff]) validates_property :format, of: :file, in: formats, ...
30.111111
77
0.51845
39477c242f8be407439b9a6b59e79c64f615a5b7
3,942
# frozen_string_literal: true module RuboCop module Cop module Style # This cop checks for the use of a method, the result of which # would be a literal, like an empty array, hash or string. # # @example # # bad # a = Array.new # h = Hash.new # s = String.n...
32.85
78
0.558853
bb997fc87f18e84e97c6d7639af79edb3b029070
490
# frozen_string_literal: true require "p006a" solutions = [ DirectSolution, CombinationsSolution, DynamicProgrammingSolution ] solutions.each do |solution| RSpec.describe solution do test_cases = { 0 => 0, 1 => 0, 2 => 4, 3 => 22, 10 => 2_640, 50 => 1_582_700, 100...
17.5
51
0.591837
d55cf6dc2d5199913ba972778806f3d60192e373
147
class RenameWebhooksWebhooksConfig < ActiveRecord::Migration[5.0] def change rename_column :workflows, :webhooks, :webhooks_config end end
24.5
65
0.789116
7af5993bbd7a6a4c0071af6b39459a2fdb648c37
155
# frozen_string_literal: true RSpec.describe Lite::Address do it 'to be a version number' do expect(Lite::Address::VERSION).not_to be nil end end
19.375
48
0.735484
e9a3baf7ea2451fa67981a45163dcecea79e238b
3,364
require 'rest-client' require 'json' module Devise module Crowd class Connection attr_reader :crowd, :login def initialize(params = {}) if ::Devise.crowd_config.is_a?(Proc) crowd_config = ::Devise.crowd_config.call else crowd_config = YAML.load(ERB.new(File.read(:...
32.660194
213
0.623365
62c011b7ba71a61ea555cb6ca5bb31e1d083285b
103
require 'drb' describe "DRb::DRbConn#close" do it "needs to be reviewed for spec completeness" end
14.714286
49
0.737864
acf3415f89a0d72b56e922b6e9b22fb0759571c7
1,033
# # Cookbook:: hashitalks # Recipe:: default # apache2_install 'default' service 'apache2' do extend Apache2::Cookbook::Helpers service_name lazy { apache_platform_service_name } supports restart: true, status: true, reload: true action [:start, :enable] end apache2_module 'deflate' apache2_module 'headers' ...
20.254902
54
0.727977
ff0ea6e055294aef70e4efd72fbea6ede8ea87fb
1,090
# frozen_string_literal: true require "assert" require "assert/context/suite_dsl" require "assert/suite" module Assert::Context::SuiteDSL class UnitTests < Assert::Context desc "Assert::Context::SuiteDSL" subject{ Factory.context_class(parent_class1) } let(:parent_class1){ Factory.context_class } ...
24.222222
54
0.719266
3806918b3baef1bbd70be711fddaec6f586aefb8
674
cask "keycue" do version "9.7" sha256 "b8bcbea943768ac519d3b6577f673f3194b6f052fccd3abce5c4ec57f6535cde" url "https://www.ergonis.com/downloads/products/keycue/KeyCue#{version.no_dots}-Install.dmg", user_agent: :fake appcast "https://macupdater.net/cgi-bin/check_urls/check_url_redirect.cgi?url=https://ww...
33.7
134
0.743323
5de153e074bdb844510a6c0b76665ea356571a1e
1,494
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '3.2' # Add additional assets to the asset load path # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional ...
55.333333
93
0.771084
4a5acf6763571b73207917771d2dbccc303dcf12
309
# Don't forget! This file needs to be 'required' in its spec file # See README.md for instructions on how to do this def fizzbuzz(num) if (num % 3 == 0) && (num % 5 == 0) "FizzBuzz" elsif num % 3 == 0 "Fizz" elsif num % 5 == 0 "Buzz" end end p fizzbuzz(3) p fizzbuzz(9) p fizzbuzz(5)
17.166667
65
0.598706
33510dd347948abdcf207201dd9057dbf2c3a1eb
441
require 'biovision/base' require 'carrierwave' require 'carrierwave-bombshelter' require 'mini_magick' module Biovision module Courses class Engine < ::Rails::Engine config.generators do |g| g.test_framework :rspec g.fixture_replacement :factory_bot, :dir => 'spec/factories' end ...
23.210526
68
0.68254
281084647bca11f66fe3c318d969141cdb9ee8c1
2,640
#-- 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 ChiliProject, which is a fork ...
32.592593
91
0.681818
bf14e083003b1a7b60b8b11ea31c240fefa95e9a
465
cask 'liclipse' do version '6.0.0,ve32xytlixmlg3x' sha256 'd26d250e9edecf99108e3e37e07014f8a4347d74d9dce583c2ac1481ec3c94c3' # mediafire.com/file was verified as official when first introduced to the cask url "https://www.mediafire.com/file/#{version.after_comma}/liclipse_#{version.before_comma}_macosx.cocoa.x...
35.769231
118
0.778495
336edcfaa6e7344747c009114bae4da7419ae77f
151
module Buff class Client module User def user_info(options = {}) Buff::UserInfo.new(get("/user.json")) end end end end
15.1
45
0.582781
1a225dee079a04bb23e164e35586d2508ea04643
214,501
require_relative '../helper' require 'date' require 'fluent/test/helpers' require 'json' require 'fluent/test/driver/output' require 'flexmock/test_unit' require 'fluent/plugin/out_elasticsearch' class ElasticsearchOutputTest < Test::Unit::TestCase include FlexMock::TestCase include Fluent::Test::Helpers attr_a...
40.982232
469
0.589601
18b62aecfc79f71e83ecb2ff7077236ea96c700e
173
class ApplicationController < ActionController::Base before_filter :set_locale protect_from_forgery def set_locale I18n.locale = params[:locale] || :en end end
19.222222
52
0.763006
622421e2ff657c22e33363f5e419dc98b385ae8d
653
Pod::Spec.new do |s| s.name = "RNEosEcc" s.version = "1.0.0" s.summary = "RNEosEcc" s.description = <<-DESC RNEosEcc DESC s.homepage = "https://github.com/author/RNEosEcc.git" s.license = "MIT" # s.license = { :type => "MIT", :file => ...
27.208333
89
0.520674
87b483ed23a207e190c18a3b2ed2b2f36f960e85
377
require 'rspec' RSpec::Matchers.define :inherit_from do |superclass| match do |klass| klass.ancestors.include?(superclass) end failure_message do |klass| "Expected #{klass} to inherit from #{superclass}. " \ "Ancestors: #{klass.ancestors}" end failure_message_when_negated do |klass| "Expect...
22.176471
57
0.702918
abd096bcb5c8d0587accdc3e5efd2f557edbd163
153
class Message include ActiveModel::Model attr_accessor :name, :email, :subject, :body validates :name, :email, :subject, :body, presence: true end
25.5
58
0.732026
21139102dcdb50c919abdf1eac3101a770c5bf1e
180
class Recipe < ActiveRecord::Base has_many :ingredients, through: :amounts has_many :amounts belongs_to :user extend Slug::ClassMethods include Slug::InstanceMethods end
22.5
42
0.777778
abde901456f0e808b3143a15cdafc14060f6cb46
223
require 'square/error/client_error' module Square module Error # Raised when Square returns the HTTP status code 401 class Unauthorized < Square::Error::ClientError HTTP_STATUS_CODE = 401 end end end
20.272727
57
0.730942
1d4a8bdf3b0754e26b42a38e5333cfaf37a0f2ee
1,944
Pod::Spec.new do |s| s.name = "SalesforceAnalytics" s.version = "10.0.0" s.summary = "Salesforce Mobile SDK for iOS" s.homepage = "https://github.com/forcedotcom/SalesforceMobileSDK-iOS" s.license = { :type => "Salesforce.com Mobile SDK License", :file => "LICENSE.md" } s.author...
58.909091
815
0.748971
6a239e95a77378df4d50db6fb1da06afa26fd647
1,832
module ActiveAdmin class Resource module Menu # Set the menu options. # To disable this menu item, call `menu(false)` from the DSL def menu_item_options=(options) if options == false @include_in_menu = false @menu_item_options = {} else @include_...
26.941176
82
0.630459
18e3c980d3e63defa9acbbcc3249b795a27d7a93
1,402
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
35.05
79
0.764622
0192b8a55fc7905c11d1b0789a5dfd92dd1387ad
929
class User < ApplicationRecord attr_accessor :remember_token before_save {self.email = email.downcase} Valid_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i validates :name, presence:true, length:{maximum:50} validates :email, presence:true validates :password, presence:true, length:{minimum: 6} has_secu...
26.542857
76
0.729817
2197e3651643276d2ae50b77410600cc9dd3f402
1,318
class CargoC < Formula desc "Helper program to build and install c-like libraries" homepage "https://github.com/lu-zero/cargo-c" url "https://github.com/lu-zero/cargo-c/archive/v0.8.0.tar.gz" sha256 "2bcb143317e7f579bcfd13ef3f230cf72961ccc79abb176789f8d1fdff03fd35" license "MIT" bottle do sha256 cellar...
33.794872
106
0.745827
0882916fe8a2072b0d3fedaf2c054a9ba18ecfea
931
# frozen_string_literal: true RSpec.describe QuetzalDbPipeline::Cfn::S3::QuetzalDbPipeline do subject(:template) do Helpers::Template.new(File.join(__dir__, '..', '..', '..', '..', 'quetzal-db-pipeline-cfn-template.yml')) end let(:expected_bucket) do { 'Type' => 'AWS::S3::Bucket', 'Propertie...
26.6
109
0.571429
62c6afebadfa1234905050535c81631df5c16fb7
101
require 'machine_learning' describe MachineLearning::Classifier do it 'does some stuff' do end end
16.833333
39
0.80198
26e52f23f73c5872b609b1660db06f441c7c1c04
1,932
# frozen_string_literal: true require 'rails_helper' RSpec.describe Spree::Preference, type: :model do it "should require a key" do @preference = Spree::Preference.new @preference.key = :test @preference.value = true expect(@preference).to be_valid end describe "type coversion for v...
24.15
50
0.591615
62de1d3aec1840e0abe16eacda96c5d5cfac6e7e
357
require 'rails-controller-testing' RSpec.configure do |config| [:controller, :view, :request].each do |type| config.include ::Rails::Controller::Testing::TestProcess, :type => type config.include ::Rails::Controller::Testing::TemplateAssertions, :type => type config.include ::Rails::Controller::Testing::...
35.7
82
0.719888
914e7b46186250dc0bea147cc8e09b5b22ac3f11
5,506
require 'fluent/plugin/input' require 'fluent/plugin/prometheus' require 'fluent/plugin/prometheus_metrics' require 'net/http' require 'webrick' module Fluent::Plugin class PrometheusInput < Fluent::Plugin::Input Fluent::Plugin.register_input('prometheus', self) helpers :thread config_param :bind, :str...
33.168675
133
0.629132
088e6bd7fad9112aba73616cf343b319ecfa84c9
2,196
# frozen_string_literal: true require 'spec_helper' require 'aca_entities/magi_medicaid/libraries/mitc_library' RSpec.describe ::AcaEntities::MagiMedicaid::Mitc::Contracts::EligibilityResponseContract do let(:category_determination) do { category: 'Child Category', indicator_code: 'N', ineligibility...
30.082192
130
0.699909
38dd0914537d3c407c50926b8401c9231c5b0a42
406
delivery_method_was = ActionMailer::Base.delivery_method ActionMailer::Base.delivery_method = :test User.create!( name: 'Administrator', first_name: 'Mister', last_name: 'Admin', email: 'admin@test.com', language: 'en', country: 'DE', interface_language: 'en', password: 'administrator', password_confirmation: ...
36.909091
92
0.761084
87853d5811bd8d9263c473b89034dbcddaad8a7b
279
# encoding: utf-8 require 'cfndsl/JSONable' module CfnDsl class MetadataDefinition < JSONable ## # Handles Metadata objects def initialize(value) @value = value end attr_reader :value def to_json(*a) @value.to_json(*a) end end end
13.95
37
0.637993
01b8a93ea7587d2abef4ba6312974efa7954a127
4,887
require 'test_helper' class TestAssertions < Test::Unit::TestCase def test_assert_xml_contain_message_if_fails begin assert_xml_contain("<root><one>1</one><one>2</one></root>", "<root><one>3</one></root>") rescue Exception => e assert_match %r{the xml:\n<root><one>3</one></root>\nshould contain x...
18.511364
157
0.527931
1cb59d5ba364e1da1ba922851583d865b8a8ee09
6,874
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "Getting gems from git" do before :each do build_lib "very-simple", :path => "#{tmp_path}/very-simple" end describe "a simple gem in git" do before(:each) do @path = build_git_repo "very-simple", :with => tmp_path.join(...
30.017467
98
0.607652
9134b6430aea5f677becb468981176627fe865d0
452
# http://api.rubyonrails.org/classes/ActionDispatch/IntegrationTest.html require 'test_helper' class Cms::Fortress::UsersControllerIntegrationTest < ActionDispatch::IntegrationTest setup do @comfy_cms_site = comfy_cms_sites(:default) end test "it should redirect to login if unauthenticated" do get "/cms...
26.588235
85
0.75885
08c0c45dbe414592565b5dab0eb1fc4235009b94
898
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Hash #:nodoc: module CriteriaHelpers #:nodoc: def expand_complex_criteria hsh = {} each_pair do |k,v| case k when Mongoid::Criterion::Complex hsh[k.key] ||= {} ...
30.965517
134
0.493318
916eabdff79644778502bd69c2de78a8d85b4a88
94
name 'mapr_hbase_master' description 'MapR HBase Master' run_list *%w[ role[mapr] ]
13.428571
31
0.680851
62f3f48362b8d1667ff4a145d68f452de20ceb3e
1,668
# 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::OperationalInsights::Mgmt::V2020_03_01_preview module Models # # The list linked storage accounts service operation response. # ...
29.263158
82
0.546763
f73f2fde08da4ad8fde3c6b81668acf7e3596fb1
2,618
module GoSocial module Facebook include GoSocial::Assistant LIKE_BUTTON_CLASS = "fb-like" LIKE_BOX_CLASS = "fb-like-box" COMMENT_CLASS = "fb-comments" # Facebook Like Button def like_button(options = {}) clazz = GoSocial::Facebook params = clazz.options_to_data(clazz.default_...
26.989691
86
0.564553
5de67739db7fd9dd15247034f11678d927868035
120
require 'test_helper' class TvShowTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
15
42
0.7
f8dd98aa86a297653690d09d9c7967ebd3f80864
806
Pod::Spec.new do |spec| spec.cocoapods_version = '>= 1.0' spec.name = "Instructions" spec.version = "1.4.0" spec.summary = "Create walkthroughs and guided tours (with coach marks) in a simple way, using Swift." spec.homepage = "https://github.com/ephread/Instructions" ...
42.421053
113
0.594293
87c6cfd1e1a4f75c06a4fe2ce003e112a1e856d5
730
require 'rails_helper' RSpec.describe LoginController, type: :controller do describe 'POST login' do before do User.create!(email: 'example@mail.com', name: 'exemple', password: '123123123' ) end it 'should login with valid params' do params = {:email => 'example@mail.com', :password => '123...
30.416667
86
0.649315
01d86aa25441f1ba609a1186c62fde69bd5363cd
3,449
# # Cookbook:: delivery-golang # Recipe:: publish # # Author:: Salim Afiune (<afiune@chef.io>) # # Copyright:: 2015, Chef Software, Inc. # # All rights reserved - Do Not Redistribute require 'aws/s3' load_config File.join(repo_path, '.delivery', 'config.json') # Binary Directory binary_path = "#{repo_path}/binary" d...
26.736434
84
0.698463
616f4db6fd813e167f18193289a2f5d7d68cb678
1,748
class Docker < Formula desc "Pack, ship and run any application as a lightweight container" homepage "https://www.docker.com/" url "https://github.com/docker/docker-ce.git", :tag => "v18.03.0-ce", :revision => "0520e243029d1361649afb0706a1c5d9a1c012b8" bottle do cellar :any_skip_relocation ...
35.673469
93
0.697941
38843926acaada15453656d67251886503899ad8
199
require 'koala' module SocialInsight module Facebook module Authentication protected def api(access_token) Koala::Facebook::API.new access_token end end end end
16.583333
45
0.678392
1aba76fd8e59f751d9a3dad4be3c19b8c3a7ff43
2,721
# frozen_string_literal: true ENV["RAILS_ENV"] = "test" require File.expand_path("dummy/config/environment.rb", __dir__) require "bundler/setup" require "rspec/rails" require "simplecov" require "rails/all" require "database_cleaner" require "capybara/rspec" require "capybara/rails" require "sail" require "selenium/we...
24.294643
101
0.729879
01df4478af6f03377fd766146becde500e4977e3
3,072
require 'optparse' require 'puppetserver/ca/certificate_authority' require 'puppetserver/ca/config/puppet' require 'puppetserver/ca/utils/cli_parsing' require 'puppetserver/ca/utils/file_system' module Puppetserver module Ca module Action class Revoke include Puppetserver::Ca::Utils CERT...
28.183486
86
0.579427
7a8349b5585064339d8ef9292da80298b8923169
160
#!/usr/bin/env ruby # coding: utf-8 ## # Siren::BndBox test module # require 'test_helper' module BndBoxTest include Siren def test_bndbox end end
8.421053
27
0.6875
611f134842fcfbb48d3aca871c0bd536919fb348
1,175
module NavigationHelpers def navbar_link(label, section_id, current_section_id, target, options = {}) link = link_to(%Q{<span>#{label}</span>}, url_for(target), { 'data-nav-section': [section_id].flatten.last }.merge(options)) if current_section_id_matches?(current_section_id, section_id) %Q{<li c...
29.375
85
0.645106
abd5e50838d425c243a17e286fcaf0fe402c41b2
12,926
describe MailingLists::MailgunList do let(:canvas_site_id) { '1121' } let(:fake_course_data) { Canvas::Course.new(canvas_course_id: canvas_site_id, fake: true).course[:body] } before { allow_any_instance_of(Canvas::Course).to receive(:course).and_return(statusCode: 200, body: fake_course_data) } let(:response)...
39.05136
126
0.629197
ed22bc31dc8f9109deb4e75ca1dfd28211f7ce12
294
namespace :start do desc 'Start dev server' task :development do exec 'foreman start -f Procfile.dev' end desc 'Start production server' task :production do exec 'NPM_CONFIG_PRODUCTION=true npm run postinstall && foreman start' end end task :start => 'start:development'
19.6
74
0.721088
1df280c49e203e78eb5c2be1896281abb49070f5
204
class AddCompletenessToUser < ActiveRecord::Migration[5.0] def change add_column :users, :completeness, :float, null: false, default: 0 add_column :users, :completeness_details, :json end end
29.142857
69
0.745098
1aae821e5f82b1d5cc47ad23ea22045eb8c96406
324
module MaintenanceLogsHelper def formatted_date_performed(maintenance_log) maintenance_log.date_performed.strftime("%b %d, %Y") end def formatted_date_due(maintenance_log) maintenance_log.date_due.strftime("%b %d, %Y") end def time_entered? #returns true if date_performed/date_due exists end ...
21.6
56
0.762346
7ab39e257f4c5f134785205023f6be524f6d000f
1,856
# -*- encoding: utf-8 -*- # stub: multi_json 1.15.0 ruby lib Gem::Specification.new do |s| s.name = "multi_json".freeze s.version = "1.15.0" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "bug_tracker_uri" => "https://github.co...
54.588235
413
0.712284
388cfb2db57ca3759a88442233f28f3d983b1483
142
class AddProspectusToSponsorshipInfo < ActiveRecord::Migration def change add_column :sponsorship_infos, :prospectus, :string end end
23.666667
62
0.802817
f72c98c7fe7c9514b0450a93ad001b2b299790a3
1,549
require 'geocoder/lookups/base' require 'geocoder/results/baidu_ip' module Geocoder::Lookup class BaiduIp < Base def name "Baidu IP" end def required_api_key_parts ["key"] end def query_url(query) "http://api.map.baidu.com/location/ip?" + url_query_string(query) end ...
28.163636
77
0.586185
4a7baf5a832f2f9da0265ffd5fcc323dc7462fad
4,021
# 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::ApiManagement::Mgmt::V2017_03_01 module Models # # Details of the Credentials used to connect to Backend. # class BackendCre...
32.168
77
0.432231
1dc231ab449081d3ee720400640f190cd8dd1c2c
616
require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) Pod::Spec.new do |s| s.name = package['name'] s.version = package['version'] s.summary = package['description'] s.license = package['license'] s.requires_arc = true s.authors = package['author'] ...
30.8
90
0.621753
1dee8b734a1f1ba12a0edd80c930329f68bf7ecd
81
warn "use require 'rack/cache/cache_control'" require 'rack/cache/cache_control'
27
45
0.802469
bb57172dd2e957c1284428ca7e305adcc16339e9
1,610
=begin # Mux Ruby - Copyright 2019 Mux Inc. # NOTE: This file is auto generated. Do not edit this file manually. =end require 'spec_helper' require 'json' # Unit tests for MuxRuby::ErrorsApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe...
38.333333
359
0.726708
6a8c92591cb2d1c0c8a5b2926abd90a753677d5c
1,437
# frozen_string_literal: true require './config/environment' # routes and configurations class ApplicationController < Sinatra::Base configure do set :public_folder, 'public' set :views, 'app/views' set :method_override, true enable :sessions set :session_secret, 'password_secret' end get '...
19.958333
95
0.606124
387973a9f7c703adfdbafc16432914330d5ca8ae
1,191
# frozen_string_literal: true module ApiSupport::Params extend ActiveSupport::Concern included do wrap_parameters format: %i[url_encoded_form json multipart_form] before_action :wrap_parameters_check private def flat_params params.except(:format, :controller, :action, :provider_key, :api_k...
30.538462
141
0.650714
62572e3a4a37c4eae513fde2aae334ff4be46a62
7,428
# encoding: UTF-8 module Spree module SlideshowsHelper def insert_slideshow(params={}) params[:id] ||= "slideshow" params[:class] ||= "first_slideshow" params[:category] ||= "home" params[:auto] ||= false params[:next_text] ||= '>>' params[:prev_text] ||= '<<' params...
36.591133
174
0.528541
4a4e14e7cd3569bbe10206f033a4ab47d236d8df
16,380
require 'formula' class Opencaster < Formula homepage '' url 'http://ftp.de.debian.org/debian/pool/main/o/opencaster/opencaster_3.2.2+dfsg.orig.tar.gz' sha256 'c9d77f98b31d53f521e3179003a9cb66b0586704717e9d401f3bc0dafa243865' version '3.2.2' def patches DATA end def install system "make", "inst...
27.529412
150
0.660623
ed5c5d8f8a777be0639c4b3e469e50fbb066460f
782
class LivingStyleGuide::Importer < Sass::Importers::Filesystem def initialize(root) super(root) end def find_relative(name, base, options, absolute = false) @options = options engine = super(name, base, options) find_markdown(options[:filename]) engine end def find(name, options) @o...
19.073171
62
0.677749
28933c789667292209ec93ef8d853275174cbfd1
1,017
require "nokogiri" require "asciidoctor-plantuml/plantuml" module Banzai module Filter # HTML that replaces all `code plantuml` tags with PlantUML img tags. # class PlantumlFilter < HTML::Pipeline::Filter def call return doc unless doc.at('pre > code[lang="plantuml"]') && settings.plantuml_...
25.425
92
0.639135
39e01c998e41afffc675166d744a4f25721c63ff
2,412
class Libharu < Formula desc "Library for generating PDF files" homepage "https://github.com/libharu/libharu" url "https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz" sha256 "8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2" license "Zlib" head "https://github.com/libharu/libhar...
36
122
0.660448
4abe986f634a976f86caa67d85cd296713d32758
368
require "bundler/setup" require "itch_scraper" 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.533333
66
0.755435
01b9a9899cfe4477f7c455467140d4bcbc681afb
810
require_relative 'db_object' module LogStash module Filters module Jdbc class SingleLoadRunner attr_reader :local, :loaders, :preloaders def initialize(local, loaders, preloaders) @local = local @loaders = loaders @preloaders = [] preloaders.map do |pre| dbo = DbObject.new(p...
18.409091
46
0.62716
213b79f1946738175518fc722223f5c504442b2c
22,925
require 'puppet/util/windows' require 'facter' require 'ffi' module Puppet::Util::Windows::User extend Puppet::Util::Windows::String extend FFI::Library def admin? return false unless check_token_membership # if Vista or later, check for unrestricted process token elevated_supported = Puppet::Util...
41.530797
151
0.659891
1a81c725e8a02486441feae1ff22c6c244dea29b
215
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. module Azure::DataMigration::Mgmt VERSION = '0.18.1' end
30.714286
94
0.767442
bb81694ccc068767f627f1c2378ad7805403c39f
4,986
require_relative 'patient_context_test' require_relative 'limited_scope_grant_test' require_relative 'restricted_resource_type_access_group' module ONCCertificationG10TestKit class SmartLimitedAppGroup < Inferno::TestGroup title 'Standalone Patient App - Limited Access' short_title 'Limited Access App' ...
40.209677
108
0.648616
33852086b3f37eb546d22870d46577122fe76910
1,021
=begin #Selling Partner API for Direct Fulfillment Inventory Updates #The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor's inventory updates. OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Cod...
28.361111
146
0.786484
33da49f3a6aa66ffa136a170cb042a3fb3deb248
3,006
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.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 th...
37.111111
79
0.610113
b9b1df16de129a0a700227215c1238e810f154c5
5,323
# # Be sure to run `pod spec lint Easify.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://github....
38.021429
100
0.600038
21b95fec5de85bc4c194f17526e752b2a6391b3e
3,856
require "log4r" require_relative "../../linux/cap/network_interfaces" module VagrantPlugins module GuestDebian module Cap class ChangeHostName extend Vagrant::Util::GuestInspection::Linux def self.change_host_name(machine, name) @logger = Log4r::Logger.new("vagrant::guest::debia...
36.377358
107
0.554979
338713bf160d4d684fe91f3251dd3f798d0452ba
4,960
describe Berater::Middleware::FailOpen do it_behaves_like 'a limiter middleware' let(:limiter) { Berater::Unlimiter.new } let(:lock) { limiter.limit } let(:error) { Redis::TimeoutError } describe '.call' do let(:instance) { described_class.new(errors: errors, on_fail: on_fail) } let(:errors) { nil }...
24.924623
76
0.607258
e260ca2f3f9298037cc1a98433bc7e9c76737e5f
2,586
# frozen_string_literal: true require_relative "slimer/version" require_relative "slimer/database" require_relative "slimer/group_configurator" require "logger" # @abstract module Slimer class Error < StandardError; end DEFAULT_GROUP = "general" DEFAULT_DATABASE_URL = "sqlite://./slimer.db" DEFAULT_SIDEKIQ...
21.915254
91
0.705723
18596aad32c188eaef8d252905d5dd54c6c42983
5,344
require 'formula' class Nginx < Formula homepage 'http://nginx.org/' url 'http://nginx.org/download/nginx-1.4.6.tar.gz' sha1 '1d790fd2b403b0b694a8dbbc28f7e34dbc3ca863' devel do url 'http://nginx.org/download/nginx-1.5.11.tar.gz' sha1 'c52239582d67063ab40ec2f88aa82ffb3eb8f469' end head 'http://hg....
32
106
0.62762
d5de40ae455f884d74f8cb25e9b1d9a59adfbe2d
102
class DropCategoriesTable < ActiveRecord::Migration def change drop_table :categories end end
17
51
0.784314
e985da17f7b59719090f597ab39ee81668508eb6
320
# This migration comes from stash_datacite (originally 20150918190607) class CreateDcsGeoLocationPoints < ActiveRecord::Migration def change create_table :dcs_geo_location_points do |t| t.float :latitude t.float :longitude t.integer :resource_id t.timestamps null: false end end end
24.615385
70
0.7375