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 |
|---|---|---|---|---|---|
6aaf6d510c92315b3ce16f67062e61ab3d074e3d | 16,252 | # frozen_string_literal: true
# A blob is a record that contains the metadata about a file and a key for where that file resides on the service.
# Blobs can be created in two ways:
#
# 1. Ahead of the file being uploaded server-side to the service, via <tt>create_and_upload!</tt>. A rewindable
# <tt>io</tt> with th... | 45.780282 | 177 | 0.743539 |
1c950b455227b42fd6e0d2ab236a3b7031dfbe88 | 2,668 | require 'rails_helper'
RSpec.describe NfgUi::UI::Base do
let(:view_context) { action_controller_base_view_context }
let(:action_controller_base_view_context) { ActionController::Base.new.view_context }
let(:base_component) { NfgUi::UI::Base.new(view_context) }
subject { base_component }
pending 'specs need... | 28.382979 | 87 | 0.635307 |
39eab725e0f1435966de0bd88a8a44cd38325fc0 | 1,623 | # encoding: UTF-8
# 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 sou... | 31.211538 | 86 | 0.720887 |
01147cad525521bf9fc031c3a69037bef05811f2 | 3,402 | require 'optparse'
require 'io/console'
require 'yaml'
module Rmega
module CLI
module Helpers
def cli_options
$cli_options ||= read_configuration_file
end
def cli_prompt_password
print("Enter password: ")
password = STDIN.noecho(&:gets)
password = password[0..-2... | 26.169231 | 151 | 0.546443 |
e20b1248b42475c7b2e47f8a520488d8211f0474 | 1,786 | # 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... | 40.590909 | 85 | 0.767077 |
4aa15f3bbc20e39088a753bbaa143725808c2a12 | 5,750 | =begin
#Selling Partner API for Merchant Fulfillment
#The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
OpenAPI spec version: v0
Generated by: https://github.com/swagger-api/swagger-cod... | 29.187817 | 182 | 0.625217 |
39891ce01f068a5faaf9116ed9179221134c22e8 | 202 | Deface::Override.new(
:name => "replace_cart_container",
:virtual_path => "spree/orders/edit",
:replace => "[data-hook='cart_container']",
:partial => 'tshop/orders/cart_container',
)
| 28.857143 | 45 | 0.648515 |
6273cafead8e0663d6d7f7251bdc55f62b3c85b8 | 183 | require 'spec_helper'
describe Elias::Parks do
describe ".find" do
let(:mk) { Elias::Park.find('magic-kingdom') }
it { mk.should be_an_instance_of Elias::Park }
end
end
| 18.3 | 50 | 0.677596 |
18b686db8f24f16bb53ffeeae01637c3a9003e44 | 69 | # frozen_string_literal: true
module MyTado
VERSION = "0.1.0"
end
| 11.5 | 29 | 0.724638 |
edab6dba081dd5064b5bd6d5ff0ee0fa0016134d | 1,216 | lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'heartcheck/activerecord/version'
Gem::Specification.new do |spec|
spec.name = 'heartcheck-activerecord'
spec.version = Heartcheck::Activerecord::VERSION
spec.authors = ['Locaweb']
spec.email = ['desenvol... | 35.764706 | 77 | 0.722862 |
e9189b0514148b1d1a0ac2fb2dee595be4a691c4 | 8,538 | # frozen_string_literal: true
require "bundler"
require "bundler/friendly_errors"
require "cgi"
RSpec.describe Bundler, "friendly errors" do
context "with invalid YAML in .gemrc" do
before do
File.open(Gem.configuration.config_file_name, "w") do |f|
f.write "invalid: yaml: hah"
end
end
... | 33.351563 | 160 | 0.679784 |
61eb940fa3df9391ea1afeaab970109d354218c6 | 1,006 | =begin
#BrowserUp Proxy
#___ This is the REST API for controlling the BrowserUp Proxy. The BrowserUp Proxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-... | 28.742857 | 219 | 0.750497 |
08e37723df0b3004db7f2543247fdec9f279854e | 9,890 | # 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::DataFactory::Mgmt::V2018_06_01
module Models
#
# The Azure Data Factory nested object which identifies data within
# different d... | 42.085106 | 100 | 0.60364 |
01abf40a9960c7f687f2fe5e6226a93bf3f270d2 | 9,259 | require 'spec_helper'
describe Etsy::User do
context "The User class" do
it "should be able to find a single user" do
users = mock_request('/users/littletjane', {}, 'User', 'getUser.single.json')
expect(Etsy::User.find('littletjane')).to eql(users.first)
end
# should "be able ... | 37.184739 | 157 | 0.567664 |
115f085f8e43eb568cd2d4553d7c7a30e96f13b3 | 6,455 | # -------------------------------------------------------------------------- #
# Copyright 2002-2020, OpenNebula Project, OpenNebula Systems #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# no... | 37.748538 | 81 | 0.486754 |
7a5d796904fc86402b9ddd339661088ee8afeee2 | 969 | require 'spec_helper_acceptance'
# Ensure IP Forwarding is disabled - Section 3.1.1
# Ensure packet redirect sending is disabled - Section 3.1.2
# Ensure source routed packets are not accepted - Section 3.2.1
# Ensure ICMP redirects are not accepted - Section 3.2.2
describe file('/etc/sysctl.d/99-sysctl.conf') do
... | 51 | 83 | 0.69969 |
620270fe38c07c8a53133b6eeec78d6a756db450 | 2,589 | # frozen_string_literal: true
module SM
module Middleware
module Response
# class responsible for customizing parsing
class SMParser < Faraday::Response::Middleware
def on_complete(env)
return unless env.response_headers['content-type'] =~ /\bjson/
env[:body] = parse(env.b... | 29.420455 | 105 | 0.588258 |
5d9e51066e3cd4fcf6c03bdf394bd80531489980 | 2,470 | require 'mustache'
module Fern
module Documentation
class MarkdownGenerator
# rubocop:disable Metrics/LineLength
TEMPLATE = %(# {{verb}} {{path}}
_{{controller}}\#{{action}}_
{{doc}}
{{#has_parameters}}
## Parameters
| Name | Type | Array | Required | Min | Max | Values | Default |
| ---- | ---- ... | 21.478261 | 113 | 0.528745 |
7a019e7dcf8ababb7523f79570d67e02bc1bd19d | 489 | module Catalogillo
module Api
module V1
class ProductsController < ApplicationController
def index
params[:products].each do |p|
product = Catalogillo::Product.new p
product.index
end
head Sunspot.commit ? :ok : :unprocessable_entity
end... | 24.45 | 107 | 0.591002 |
ed2079c65923bc008fba4f01c67d9f9db15edba4 | 1,913 | require 'morpheus/api/api_client'
class Morpheus::AccountGroupsInterface < Morpheus::APIClient
def get(account_id, id, params={})
raise "#{self.class}.get() passed a blank id!" if id.to_s == ''
url = "#{@base_url}/api/accounts/#{account_id}/groups/#{id}"
headers = { params: params, authorization: "Beare... | 39.040816 | 118 | 0.652901 |
f841685af65d508a817d57e738484888dabfbc68 | 1,279 | require 'spec_helper'
describe "Authentication" do
context "on successful sign in" do
use_vcr_cassette 'Github_Key/_create', :erb => true
before(:each) do
OmniAuth.config.mock_auth[:github] = { :credentials => { :token => "65r6w5er1w6er5w65ef1" },
:extra =... | 27.804348 | 98 | 0.579359 |
ff786eb3f36ef054451684338f777a7844ef0b60 | 11,306 | module Spree
module ProductScopes
extend ActiveSupport::Concern
included do
cattr_accessor :search_scopes do
[]
end
def self.add_search_scope(name, &block)
singleton_class.send(:define_method, name.to_sym, &block)
search_scopes << name.to_sym
end
def se... | 36.947712 | 176 | 0.629489 |
e8b68cb5a8f8e064ab739e1ae469a97e6742f550 | 249 | # encoding: utf-8
module Mongoid #:nodoc:
module Fields #:nodoc:
module Serializable #:nodoc:
# Defines the behaviour for date fields.
class Time
include Serializable
include Timekeeping
end
end
end
end
| 19.153846 | 46 | 0.64257 |
5dd63acd75ad6d814098e7d16469386a4914cbf4 | 5,316 | require 'spec_helper'
describe 'collectd::plugin::dns', type: :class do
on_supported_os(test_on).each do |os, facts|
context "on #{os} " do
let :facts do
facts
end
context 'with default values for all parameters' do
it { is_expected.to contain_class('collectd::plugin::dns') }
... | 30.906977 | 136 | 0.541761 |
ff2e6429c97a1ffa0bf76da56b4ea5aecd4a9bd3 | 466 | module Rails3BeforeRender
module BeforeRenderInstance
extend ActiveSupport::Concern
included do
alias_method_chain :render, :before_render_filter
define_callbacks :render
end
def render_with_before_render_filter *opts, &blk
run_callbacks :render, action_name do
render_witho... | 24.526316 | 79 | 0.755365 |
614a112ed1b5fc2bebdbfddbb9b2daec367e7b4b | 198 | require "sagrone_scraper/version"
require "sagrone_scraper/agent"
require "sagrone_scraper/base"
require "sagrone_scraper/collection"
module SagroneScraper
def self.version
VERSION
end
end
| 18 | 36 | 0.813131 |
614236a6a3bb2b6a3d358c7ff213b96593ebcec5 | 232 | # frozen_string_literal: true
require "test_helper"
module Wf
class GuardsControllerTest < ActionDispatch::IntegrationTest
include Engine.routes.url_helpers
# test "the truth" do
# assert true
# end
end
end
| 16.571429 | 62 | 0.724138 |
d5ca49649434fe8c2482f0b16153fa336be52022 | 14,515 | module Bosh::Director
module DeploymentPlan
# Represents a single job instance.
class Instance
include DnsHelper
# @return [DeploymentPlan::Job] Associated job
attr_reader :job
# @return [Integer] Instance index
attr_reader :index
# @return [Models::Instance] Instance mo... | 33.677494 | 118 | 0.613641 |
3953dff8a44e2fb65d05051aade8fbe8720e7f0e | 946 | $:.unshift File.expand_path("../lib", __FILE__)
require 'sinatra/asset_pipeline/version'
Gem::Specification.new do |gem|
gem.name = "sinatra-asset-pipeline"
gem.version = Sinatra::AssetPipeline::VERSION
gem.authors = ["Joakim Ekberg"]
gem.email = ["jocke.ekberg@gmail.com"]
gem.description = "An asset pipeli... | 36.384615 | 130 | 0.749471 |
91c22e7ad82966856ef4e06072afa003010092c1 | 1,627 | require 'rails_helper'
describe 'Admin disables Git access protocol' do
include StubENV
let(:project) { create(:project, :empty_repo) }
let(:admin) { create(:admin) }
before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
sign_in(admin)
end
context 'with HTTP disabled' do
before do
... | 21.986486 | 109 | 0.696988 |
ab94a2c7ce5f0de941432fddef71e28021769d40 | 1,081 | require 'spec_helper'
describe 'impala::statestore' do
context 'supported operating systems' do
on_supported_os.each do |os, facts|
path = '/etc/impala/conf'
context "on #{os}" do
let(:facts) do
facts
end
context "without any parameters" do
let(:params) {{... | 33.78125 | 125 | 0.628122 |
6ac3127b1f69084153cf0bad593badd924d8d1b5 | 167 | class CreateWardVillages < ActiveRecord::Migration[5.1]
def change
create_table :ward_villages do |t|
t.string :name
t.timestamps
end
end
end
| 16.7 | 55 | 0.682635 |
21f3dc9674716d9893754671bc4f6f4271d8017b | 1,366 | # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'codebreaker/version'
Gem::Specification.new do |spec|
spec.name = "codebreaker"
spec.version = Codebreaker::VERSION
spec.authors = ["denis"]
spec.email = ["d.... | 40.176471 | 104 | 0.671303 |
bbad439c3a9e9e558545e916f4b7c46decef48d2 | 171 | # frozen_string_literal: true
module DropboxApi::Errors
class UploadWriteFailedError < BasicError
ErrorSubtypes = {
reason: WriteError
}.freeze
end
end
| 17.1 | 43 | 0.730994 |
e2bf1ef608fa55285ffd756a281822b85007353a | 2,977 | require 'rails_helper'
RSpec.describe Admin::QuantCommodityPropertiesController, type: :controller do
render_views
let(:user) { FactoryBot.create(:user) }
before { sign_in user }
describe 'POST create' do
let(:quant) { FactoryBot.create(:api_v3_quant) }
let(:quant_2) { FactoryBot.create(:api_v3_quant... | 27.564815 | 84 | 0.672153 |
acc2710928f8b4d7c7e159e50a1b54421e832e54 | 349 | FactoryBot.define do
factory :resource do
access_date { Date.today }
association(:resourcetype)
description { Faker::Movies::StarWars.quote }
draft { false }
private { true }
publication_date { Date.today }
status { Faker::Creature::Cat.registry }
title { "MyString" }
url { "https:... | 24.928571 | 49 | 0.653295 |
b91eb86cabeb7255ec27b22937b57fe3f45212d0 | 459 | # ActiveSupport dependencies.
%w{
concern
inflector
core_ext/hash/reverse_merge
core_ext/object/blank
}.each { |name| require "active_support/#{name}" }
# Flip files.
%w{
abstract_strategy
controller_filters
cookie_strategy
database_strategy
declarable
declaration_strategy
definition
facade
f... | 16.392857 | 50 | 0.742919 |
ab4cda5acf695b0962fab8c629f48330bf83e0d8 | 156 | class CreateWidgets < ActiveRecord::Migration[5.2]
def change
create_table :widgets do |t|
t.string :name
t.timestamps
end
end
end
| 15.6 | 50 | 0.660256 |
e84a3717c5b981ffeb031bd6dff1c250e5da1ed3 | 301 | # frozen_string_literal: true
class PlaylistBookmark < ActiveRecord::Migration
def change
create_table :playlist_bookmarks do |t|
t.integer :user_id
t.integer :playlist_id
end
add_index :playlist_bookmarks, :user_id
add_index :playlist_bookmarks, :playlist_id
end
end
| 23.153846 | 48 | 0.744186 |
ffa3ddd191ad07e931e9d0e7279868ff8af88d81 | 501 | SPEC = Gem::Specification.new do |s|
s.name = "mmmail"
s.version = "1.0.0"
s.date = "2009-02-22"
s.author = "Loren Segal"
s.email = "lsegal@soen.ca"
s.homepage = "http://github.com/lsegal/mmmail"
s.platform = Gem::Platform::RUBY
s.summary = "Mmmm, a Minimalist mail library for Ruby. Works with SMTP or s... | 35.785714 | 86 | 0.646707 |
acf800deec5a179a3f148f8da1f2c54a1ebecf0c | 908 | # -*- encoding: utf-8 -*-
$LOAD_PATH.push File.expand_path("lib", File.dirname(__FILE__))
require 'unified_assets'
Gem::Specification.new do |s|
s.name = "unified-assets"
s.version = UnifiedAssets::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Jake Gordon"]
s.email = ["jake@... | 31.310345 | 86 | 0.622247 |
1a5ac6c613fb562f4dabc9cbd948f3f0ac65da2b | 615 | Pod::Spec.new do |s|
s.name = "ButtonStyleKit"
s.version = "1.6.0"
s.summary = "ButtonStyleKit is helper library for UIButton custom styles."
s.homepage = "https://github.com/keygx/ButtonStyleKit"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "keygx" => "y.kagiyama@gmail.com" }
s.social_... | 41 | 104 | 0.668293 |
1c7bea0b9b95b682b338ec929ae0f8ba21c6ba30 | 5,522 | require 'json'
require 'uri'
module Agents
class PhantomJsCloudAgent < Agent
include ERB::Util
include FormConfigurable
include WebRequestConcern
can_dry_run!
default_schedule 'every_12h'
description <<-MD
This Agent generates [PhantomJs Cloud](https://phantomjscloud.com/) URLs that ... | 34.08642 | 256 | 0.678377 |
7ab06d216a02d08c1ad96201abba2e645cd21471 | 2,980 | # 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... | 21.134752 | 63 | 0.592282 |
d5ae69e4e8ea75fd1926cf702d2fde6bd8fad248 | 5,590 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... | 43.671875 | 114 | 0.747048 |
391ff15400cd001b907abcdeffedff18dea2a4a4 | 378 | $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'active_record/default_values'
ActiveRecord::Base.establish_connection(adapter: 'sqlite3',
database: File.dirname(__FILE__) + '/active_record-default_values.sqlite3')
load File.dirname(__FILE__) + '/support/sche... | 42 | 115 | 0.695767 |
1db85baae31c437adf578969a63d5fd15c35c173 | 1,669 | #!/usr/bin/env ruby
require 'ghtorrent'
class GHTFixForks < GHTorrent::Command
include GHTorrent::Settings
include GHTorrent::Retriever
include GHTorrent::Persister
def logger
@ght.logger
end
def persister
@persister ||= connect(:mongo, settings)
@persister
end
def go
@ght ||= GHT... | 26.078125 | 95 | 0.554224 |
f7d4fe88877223fe1e1b43c0db51c585b4aa0d0e | 1,077 | require 'brakeman/checks/base_check'
#Checks if password is stored in controller
#when using http_basic_authenticate_with
#
#Only for Rails >= 3.1
class Brakeman::CheckBasicAuth < Brakeman::BaseCheck
Brakeman::Checks.add self
@description = "Checks for the use of http_basic_authenticate_with"
def run_check
... | 25.046512 | 80 | 0.657382 |
e926435a78421b96283b7fc62113aad7a2bc48b0 | 1,175 | require 'spec_helper'
describe <%= class_name.pluralize %>Controller do
render_views
describe "GET" do
before :each do
permit_with 200
@<%= singular_name %> = create :<%= singular_name %>
request.headers['HTTP_ACCEPT'] = "application/json"
request.headers['X-API-Token'] = "tota... | 26.704545 | 81 | 0.621277 |
abddb632ece7e1a89dcdf656b477b3faf35e5121 | 366 | class Hash
# Returns the value of self for each argument and deletes those entries.
#
# @param *args The keys whose values should be extracted and deleted.
#
# @return [Array<Object>] The values of the provided arguments in
# corresponding order.
#
# @api public
def extract!(*args)
args.map do |... | 22.875 | 74 | 0.672131 |
e83ab5d9a06055b2d79b760d325e098b60aec6fc | 132 | require 'test_helper'
class GrimoireDefinitionTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| 16.5 | 54 | 0.727273 |
bf3fd77797bdd273d07d8ce0f4e63d1632a5b3f9 | 393 | require_relative "locale"
require_relative "direction"
class ABBYY::Cloud
module Models
class Engine < Model
attribute :name, Types::Strict::String
attribute :languages, Types::Array.member(Types::Locale)
attribute :translation_directions, Types::Array.member(Types::Direction)
end
... | 24.5625 | 78 | 0.720102 |
388ee049d09f108f6b19247fb0c3ee8405cba314 | 3,911 | # frozen_string_literal: true
RSpec.describe "Running bin/* commands" do
before :each do
install_gemfile! <<-G
source "file://#{gem_repo1}"
gem "rack"
G
end
it "runs the bundled command when in the bundle" do
bundle! "binstubs rack"
build_gem "rack", "2.0", :to_system => true do |s|... | 24.141975 | 107 | 0.623626 |
f7094575ceb6225c232298ee7629fb55904e182f | 924 | #
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint classifyfileselector.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'classifyfileselector'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin.'
s.d... | 38.5 | 104 | 0.601732 |
ac777cc92247aa3ff68f197e23639c073393547e | 558 | Pod::Spec.new do |s|
s.name = "Fable"
s.version = "0.0.1"
s.summary = "An elegant highlight focus guide written in swift"
s.homepage = "https://github.com/fanglinwei/Fable"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "calm" => "calm1993@163.com" }
s.platform ... | 21.461538 | 89 | 0.587814 |
180a850e1b8c207c21ff4027c79773cd292c7b07 | 1,027 | require 'test_helper'
class VerbsControllerTest < ActionController::TestCase
setup do
@verb = verbs(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:verbs)
end
test "should get new" do
get :new
assert_response :success
end
test "s... | 20.54 | 65 | 0.676728 |
e2e137f4c15a33cab376eaf49adeeac5bc52212a | 993 | # Settings specified here will take precedence over those in config/environment.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between... | 39.72 | 82 | 0.793555 |
bb04f4f710a1b7bb2f2c9e4324eeea76c47e8787 | 942 | require 'platform-api'
# Provides a simple interface to the PlatformApi that is easy to use and test.
class HerokuClient
def create_app(app_json_schema_data)
app_setup.create(app_json_schema_data)
end
def delete_app(app_name)
app.delete(app_name)
end
def source_app_config_vars
config_var.info(s... | 17.127273 | 78 | 0.740977 |
629459bcdca771a9de853ac7707a778436f8f695 | 939 | # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'timesheets/version'
Gem::Specification.new do |spec|
spec.name = "timesheets"
spec.version = Timesheets::VERSION
spec.authors = ["Bradley J. Spaulding"]
spec.email ... | 33.535714 | 74 | 0.659212 |
e24d4cbef42d73d330dc0d60448da4187ed35806 | 16,216 | module Hyrax
module CollectionTypes
class PermissionsService
# @api public
#
# Ids of collection types that a user can create or manage
#
# @param roles [String] type of access, Hyrax::CollectionTypeParticipant::MANAGE_ACCESS and/or Hyrax::CollectionTypeParticipant::CREATE_ACCESS
... | 69.299145 | 170 | 0.666564 |
bb833390fffe9fdc0db018647c537003bf888b19 | 122 | # Copyright (c) 2020 Jean-Sebastien Gelinas, see LICENSE.txt
# frozen_string_literal: true
require 'tileset_tooling/app'
| 24.4 | 60 | 0.795082 |
33196b1c93afa2220ea1d88d972a6c2abf5a5c40 | 589 | cask "eqmac" do
version "1.0.0"
sha256 "f0cf0831da9fc08f7c2f267b6a691173b32b4aa688625afcc43cade6d5f65a7f"
url "https://github.com/bitgapp/eqMac/releases/download/v#{version}/eqMac.pkg",
verified: "github.com/bitgapp/eqMac/"
name "eqMac"
desc "System-wide audio equalizer"
homepage "https://eqmac.app/"... | 26.772727 | 81 | 0.692699 |
d54fe5e4618175c818d04e708d1c3a1d2bdca6ac | 459 | # 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::V2020_05_01
module Models
#
# Defines values for IkeIntegrity
#
module IkeIntegrity
MD5 = "MD5"
S... | 21.857143 | 70 | 0.651416 |
f863a8bae883d64e4fec3dbc8cb617845ac6ce01 | 432 | require 'bundler/setup'
Bundler.require
ENV['SINATRA_ENV'] ||= "development"
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:database => "db/development.sqlite"
)
require_relative "../app/controllers/application_controller.rb"
Dir[File.join(File.dirname(__FILE__), "../app/models", "*.rb")].each... | 28.8 | 94 | 0.708333 |
384ecac33159baf6005fe2fa902b07fc2c74a394 | 3,656 | controller :domains do
friendly_name "Domains API"
description "This API allows you to create and view domains on server"
authenticator :server
action :create do
title "Create a domain"
description "This action allows you to create domains"
param :name, "Domain name (max 50)", :required => true, :... | 31.517241 | 139 | 0.657002 |
5dd5941900eee9a2384c0218d6f73c15291c1ba2 | 1,285 | require_relative '../../../spec_helper'
describe Admin::Views::Players::Index do
let(:exposures) { Hash[players: []] }
let(:template) { Hanami::View::Template.new('apps/admin/templates/players/index.html.haml') }
let(:view) { Admin::Views::Players::Index.new(template, exposures) }
it 'exposes #players' ... | 33.815789 | 119 | 0.649027 |
e2e399e034c21a4052016f6ca0797a3c7be14900 | 2,633 | class Lmod < Formula
desc "Lua-based environment modules system to modify PATH variable"
homepage "https://lmod.readthedocs.io"
url "https://github.com/TACC/Lmod/archive/8.4.26.tar.gz"
sha256 "7bcd16046439dfe380635ff404af501a436a93146321a535e3014066b83392d3"
license "MIT"
bottle do
sha256 cellar: :any_... | 34.644737 | 122 | 0.698063 |
e24484faae68742d153b89b98bce270ffd875a34 | 124 | require "test_helper"
class UserStatusTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| 15.5 | 46 | 0.709677 |
4a3d49d5ce2c620d66df4ceaf90a3a311f57877c | 2,468 | module WatirPerformance
class Results
WD_ONLY_FINDERS = [:link_text,
:partial_link_text]
WD_FINDERS = [:class_name,
:id,
:name,
:tag_name]
CSS_FINDERS = [:css_id,
:css_class,
:css_tag,
... | 25.708333 | 122 | 0.485413 |
3985a5c938c4b9d1299723cc93a6a7e00e7fddd1 | 255 | require "simplemde/version"
# module Simplemde
module Rails
class Simplemde < Engine
initializer :assets do |config|
Rails.application.config.assets.precompile += %w( simplemde/simplemde.min.js simplemde/simplemde.min.css )
end
end
end
| 23.181818 | 112 | 0.741176 |
62b358f52cd3066ba5af6a6db62a6f4703df6f96 | 857 | # frozen_string_literal: true
FactoryBot.define do
factory :matrix_question, class: 'Rapidfire::Question' do
question_text { 'Question?' }
association :question_group, factory: :question_group
type { 'Rapidfire::Questions::Radio' }
answer_options { "option1\r\noption2\r\noption3" }
validation_rul... | 26.78125 | 60 | 0.652275 |
edc5ba6f81a52f85f2c6afa779513d8cf0879235 | 1,988 | =begin
#SendinBlue API
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/or... | 41.416667 | 839 | 0.695674 |
03ec223279ed0ff1b053525c7f15f3a41292d109 | 44,475 | # This file has been automatically generated from a template file.
# Please make modifications to `templates/gRPC-C++.podspec.template`
# instead. This file can be regenerated from the template by running
# `tools/buildgen/generate_projects.sh`.
# gRPC C++ CocoaPods podspec
#
# Copyright 2017 gRPC authors.
#
# License... | 63.085106 | 147 | 0.522406 |
fffa082baacfb5780980e42212dc0024ac6a8f9e | 1,227 | # frozen_string_literal: true
module Gitlab
module SlashCommands
module Presenters
class IssueSearch < Presenters::Base
include Presenters::IssueBase
def present
text = if resource.count >= 5
"Here are the first 5 issues I found:"
elsif resourc... | 24.54 | 84 | 0.502037 |
218165b53d4d8a7e73a2a4262d07a5ac770744c1 | 1,596 | require 'yaml'
class Api::V1::WebHooksController < Api::BaseController
skip_before_filter :verify_authenticity_token
before_filter :authenticate_with_api_key
before_filter :verify_authenticated_user
before_filter :find_gem_by_name, :except => :index
def index
respond_to do |format|
format.json { ... | 28 | 79 | 0.642857 |
b9ba94f6ce3d52060c24dd0303cdf58ee630c809 | 5,501 | require 'spec_helper'
describe 'mysql_service_test::single on centos-6.5' do
cached(:centos_6_service_57_single) do
ChefSpec::SoloRunner.new(
platform: 'centos',
version: '6.7',
step_into: 'mysql_service'
) do |node|
node.set['mysql']['version'] = '5.6'
end.converge('mysql_service... | 33.95679 | 105 | 0.640065 |
e21d5948fd9fb07dbb758f26546d1fd189a0d274 | 1,663 | # 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... | 42.641026 | 95 | 0.736621 |
1c2c511d5c687b21905d1fe7c417da73ec816e3a | 1,017 | require_relative '../../spec_helper'
require_relative 'shared/extract_range_matched'
require 'strscan'
describe "StringScanner#pre_match" do
before :each do
@s = StringScanner.new("This is a test")
end
it "returns the pre-match (in the regular expression sense) of the last scan" do
@s.pre_match.should =... | 24.214286 | 82 | 0.639135 |
625487bafea94235462b6385729fb8040a78d59d | 413 | class CreateCoupons < ActiveRecord::Migration[5.0]
def change
create_table :coupons do |t|
t.string :title
t.text :description
t.decimal :ammount
t.integer :max_redemptions, default: 0
t.string :code
t.string :state, default: 'available'
t.date :start_date
t.date :e... | 22.944444 | 50 | 0.644068 |
7a0218d03e4155a180f78e8bc3bc858e33ad1ea6 | 151 | FactoryBot.define do
factory :benefit_markets_market_policies_market_policy, class: 'BenefitMarkets::MarketPolicies::MarketPolicy' do
end
end
| 25.166667 | 114 | 0.81457 |
ab932cd67733eaa134a1091d287d2a5ec34821e8 | 2,504 | #
# Copyright:: Copyright (c) 2012 Opscode, Inc.
# Copyright:: Copyright (c) 2014 GitLab.com
# Copyright:: Copyright (c) 2015 SKIF-Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... | 24.31068 | 74 | 0.724042 |
b96794076af756db3e8ae0d334ad0951f6013f17 | 801 | # frozen_string_literal: true
module YARD::CodeObjects
# Represents an instance method of a module that was mixed into the class
# scope of another namespace.
#
# @see MethodObject
class ExtendedMethodObject
instance_methods.each {|m| undef_method(m) unless m =~ /^__/ || m.to_sym == :object_id }
# @r... | 32.04 | 92 | 0.684145 |
8728e325e14498e39b59fdd1ad040d851a490c61 | 40 | module Pvcglue
class Deploy
end
end
| 8 | 14 | 0.75 |
bbd2f390e66da5806551ea49a0f2aff7f0cc0b65 | 264 | module Enom
module Commands
class CheckDomain
def execute(args, options={})
name = args.shift
response = Domain.check(name)
output = "#{name} is #{response}"
puts output
return output
end
end
end
end
| 18.857143 | 41 | 0.57197 |
5da01cee954a4d7411d4a0f34e1c5f4967968d1e | 173 | require 'test_helper'
class UsersControllerTest < ActionDispatch::IntegrationTest
test "should get new" do
get signup_path
assert_response :success
end
end
| 15.727273 | 59 | 0.757225 |
1c79b2ddc38df7a5751b5ef5f0514d9206ab70ed | 2,437 | # frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'User follows pipeline suggest nudge spec when feature is enabled', :js do
include CookieHelper
let(:project) { create(:project, :empty_repo) }
let(:user) { project.owner }
describe 'viewing the new blob page' do
before do
sign_in(... | 31.649351 | 144 | 0.682396 |
acaa27a6c4ea6f969d306e709155f9ca28be71a0 | 195 | class CreateEmails < ActiveRecord::Migration
def change
create_table :emails do |t|
t.string :user_id, :null => false
t.string :email, :null => false
t.timestamps
end
end
end
| 19.5 | 44 | 0.676923 |
1df41f00dc72f806339bc1b0fd2c8131b968ed35 | 287 | class Actiontastic < Cask
version 'beta8'
sha256 'f6536cd0cb477dd3867ccf359469b7a4377fb307a0307b27566c1f4219b79c44'
url 'https://s3.amazonaws.com/kaboomerang/actiontastic/ActiontasticBeta8.zip'
homepage 'http://actiontastic.com'
link 'ActiontasticBeta8/Actiontastic.app'
end
| 28.7 | 79 | 0.815331 |
620c55b2f0a1ab3b75586cb6a1ee2452d37b0178 | 530 | Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
# resources :questions
# resources :rounds
# resources :games
namespace :api do
namespace :v1 do
resources :questions
resources :rounds
resources :g... | 25.238095 | 102 | 0.650943 |
e2018fbe3cc44edb133d9c9b5257718fcdab83da | 381 | if defined?(Spree::Admin::BaseController)
require File.expand_path('../../base_controller_decorator', __FILE__)
Spree::Admin::BaseController.class_eval do
protected
def model_class
const_name = controller_name.classify
if Spree.const_defined?(const_name)
return "Spree::#{const_na... | 27.214286 | 71 | 0.674541 |
6a669fa92d207e988f42385231c2bbc195b3d53c | 1,279 | ##########################################################################
# Copyright 2016 ThoughtWorks, 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/li... | 34.567568 | 74 | 0.603597 |
e2b752cb4997ec383de90d55e686ed3de03c5e5f | 18,501 | # 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_07_01
#
# A service client - single point of access to the REST API.
#
class NetworkManagementClient < MsRestAzur... | 41.389262 | 154 | 0.738014 |
91709405ab6b7c7479e56680c4daadb9dbe6f5d1 | 2,558 | # 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::V2019_11_01
module Models
#
# Country details.
#
class AvailableProvidersListCountry
include MsRestAzu... | 29.402299 | 80 | 0.481235 |
5dea6dfa5b519795a2efc67346616b07cbede3b3 | 1,440 | # frozen_string_literal: true
module BrInvoicesPdf
module Nfce
module Renderer
module CustomerIdentification
extend Util::BaseRenderer
extend BaseRenderer
module_function
def execute(pdf, data)
box(pdf, [0, pdf.cursor], page_content_width(pdf)) do
cus... | 30 | 96 | 0.584722 |
ac2a255029cdc0fdc7bfa0f06ae38b603eda403d | 22,489 | #
# compiler.rb
#
# Copyright (c) 2010 by Daniel Kelley
#
# $Id:$
#
# GMP Forth Compiler
require 'gmpforth/word'
require 'gmpforth/documentation'
require 'pp'
require 'yaml'
require 'tempfile'
class GMPForth::Compiler
attr_accessor :case_sensitive
attr_reader :dict
# Target image is headless (no dictiona... | 20.651056 | 109 | 0.545022 |
7a3aeafde032b47d0370a0496818b0e45a15b403 | 7,016 | require 'spec_helper'
require 'puppet_spec/files'
require 'puppet/pops'
require 'puppet/loaders'
require 'puppet_spec/compiler'
describe 'FileBased module loader' do
include PuppetSpec::Files
let(:static_loader) { Puppet::Pops::Loader::StaticLoader.new() }
let(:loaders) { Puppet::Pops::Loaders.new(Puppet::Node:... | 35.08 | 138 | 0.607754 |
288ee4d6ac6fada37277875510115a26f3f50686 | 830 | require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)
class Php55Xdebug < AbstractPhp55Extension
init
homepage 'http://xdebug.org'
url 'http://xdebug.org/files/xdebug-2.2.5.tgz'
sha1 '62d388e07a45cab9eee498e7905c92a7e5d023cc'
head 'https://github.com/xdebug/xdebug.git'
def extension_... | 29.642857 | 75 | 0.631325 |
7a1a6da49900a0fd327186ec10479f050291797e | 712 | module ApexCharts
class BaseChart
attr_reader :options, :series
def initialize data, options={}
@series = sanitize_data(data)
@options = Utils::Hash.deep_merge(
build_options(x_sample, options),
Utils::Hash.camelize_keys(
{**@series, char... | 20.342857 | 69 | 0.58427 |
e2ac44888e815defb02358706146b6d5ffa7c2dd | 16,359 | # frozen_string_literal: true
require 'active_support/concern'
require 'grape/dsl/headers'
module Grape
module DSL
module InsideRoute
extend ActiveSupport::Concern
include Grape::DSL::Settings
include Grape::DSL::Headers
# Denotes a situation where a DSL method has been invoked in a
... | 37.349315 | 157 | 0.604927 |
61f7687a7a3df95fdc6f7217984b344bf3cea345 | 1,749 | # frozen_string_literal: true
require_relative 'boot'
require 'rails'
# Pick the frameworks you want:
require 'active_model/railtie'
require 'active_job/railtie'
require 'active_record/railtie'
# require "active_storage/engine"
require 'action_controller/railtie'
require 'action_mailer/railtie'
# require "action_mail... | 34.98 | 92 | 0.763865 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.