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 |
|---|---|---|---|---|---|
b98f02bc14186fb681f86e829c46c74412b0db60 | 421 | cask 'torbrowser-pt' do
version '5.5.3'
sha256 '7f18a726e4e66f9e5a6efac2c8fa86feaac0297cc9d6f8c961370d814381b764'
url "https://dist.torproject.org/torbrowser/#{version}/TorBrowser-#{version}-osx64_pt-PT.dmg"
name 'Tor Browser'
homepage 'https://www.torproject.org/projects/torbrowser.html'
license :oss
gp... | 30.071429 | 95 | 0.75772 |
61fa1889e81ea939ad2de6d2163635b61ecc1b27 | 4,594 | class Radare2 < Formula
desc "Reverse engineering framework"
homepage "https://radare.org"
revision 1
stable do
url "https://radare.mikelloc.com/get/2.8.0/radare2-2.8.0.tar.gz"
sha256 "015c0b54cbeab2f055ca45ea57675ac5fcddb9be788249143e20bb64554a769e"
resource "bindings" do
url "https://radar... | 34.80303 | 93 | 0.658903 |
f8aeba375583c23b0fd59e4f45e0d71d6955e000 | 641 | # frozen_string_literal: true
require 'test_helper'
class EpochsGeoMapHtmlErbTest < ActionDispatch::IntegrationTest
setup do
@epoch = epochs(:epoch_1)
@user = users(:users_1)
sign_in @user
end
test 'should map epoch' do
get geo_map_epoch_url(id: @epoch.id)
assert_response :success
ass... | 24.653846 | 63 | 0.686427 |
38e44d24abf0e7e1a1d594928e3bbfe2cf8ff654 | 3,042 | require 'rubygems/dependency'
require 'bundler/shared_helpers'
require 'bundler/rubygems_ext'
module Bundler
class Dependency < Gem::Dependency
attr_reader :autorequire
attr_reader :groups
attr_reader :platforms
PLATFORM_MAP = {
:ruby => Gem::Platform::RUBY,
:ruby_18 => Gem::Platfor... | 28.166667 | 92 | 0.571335 |
bb66c75b9561495d5cc01bb50bbcd81576886941 | 170 | class RootController < ApplicationController
def index
# TODO: redirect to the user_sponsorship path when logged in
redirect_to user_conferences_path
end
end
| 24.285714 | 64 | 0.794118 |
1ccb4031159252079f9cb30ab397b59557e00842 | 6,557 | =begin
#Selling Partner API for Notifications
#The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.
... | 31.524038 | 272 | 0.637029 |
1117003d24163eba029b5865ac3983ceaa15b7bc | 194 | FactoryGirl.define do
factory :cloud_network_floating_nuage,
:class => "ManageIQ::Providers::Nuage::NetworkManager::CloudNetwork::Floating",
:parent => :cloud_network
end
| 32.333333 | 90 | 0.706186 |
b95fb75ed5ce78a958dc690513720f0cd83d354d | 226 | module Edlink
module Entities
class Source < ApiStruct::Entity
attr_entity :id,
:name,
:status,
:created_date,
:updated_date
end
end
end | 20.545455 | 36 | 0.477876 |
18de40d8bd5720faf4d5caed63827046efac8f24 | 163 | def logger_with_no_output
logger = double('Logger').as_null_object
allow(Logger).to receive(:new).and_return(logger)
end
Before do
logger_with_no_output
end | 20.375 | 51 | 0.797546 |
6ab5933dd0957b216da448707e530bd5368cec1f | 572 | cask 'disk-arbitrator' do
version '0.5'
sha256 'dcc05e6579a7ef3835cb06beb4c9e1dcc64f01128e91fc00cfc7e3a00876fd2a'
# kainjow.com is the official download host per the vendor homepage
url "https://kainjow.com/downloads/Disk%20Arbitrator-#{version}.dmg"
name 'Disk Arbitrator'
homepage 'https://github.com/abur... | 31.777778 | 75 | 0.75 |
38664d0294ecd3c5d8c005ca54357e3362b42200 | 1,929 | module Regexp::Expression
class Subexpression < Regexp::Expression::Base
# Traverses the subexpression (depth-first, pre-order) and calls the given
# block for each expression with three arguments; the traversal event,
# the expression, and the index of the expression within its parent.
#
# The e... | 29.676923 | 78 | 0.646449 |
e83620fa2b26054116ac3104ac5ca03d5eb51d12 | 766 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/automl/v1/annotation_spec.proto
require 'google/protobuf'
require 'google/api/resource_pb'
require 'google/api/annotations_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("google/cloud/automl/v1/annotation_spec.p... | 28.37037 | 131 | 0.736292 |
5db2e6aeea3c50d6703c16d53c3a65b660428871 | 2,308 | module Sequel
module Plugins
# The eager_each plugin makes calling each on an eager loaded dataset do eager loading.
# By default, each does not work on an eager loaded dataset, because each iterates
# over rows of the dataset as they come in, and to eagerly load you need to have all
# values up front... | 35.507692 | 100 | 0.625217 |
011131de0b4567b7bd705baed92b9ecde03defe2 | 3,012 | # Copyright (c) 2009-2012 VMware, Inc.
module Bosh::Director
module ProblemHandlers
class InactiveDisk < Base
register_as :inactive_disk
auto_resolution :ignore
def initialize(disk_id, data)
super
@disk_id = disk_id
@data = data
@disk = Models::PersistentDisk[@... | 26.654867 | 81 | 0.569721 |
3891f41501e6a32dca20bc801e49871679c38b9d | 175 | require File.expand_path('../../../spec_helper', __FILE__)
ruby_version_is "1.9" do
describe "Dir#to_path" do
it "needs to be reviewed for spec completeness"
end
end
| 21.875 | 58 | 0.708571 |
4ab9ad8daa80f8adda637e0f5d250fd0928bc387 | 20,163 | # -*- coding: utf-8 -*-
require "helper"
module Nokogiri
module XML
class TestReader < Nokogiri::TestCase
def test_from_io_sets_io_as_source
io = File.open SNUGGLES_FILE
reader = Nokogiri::XML::Reader.from_io(io)
assert_equal io, reader.source
end
def test_e... | 33.108374 | 118 | 0.528195 |
e29d4e2c993a6236defb63dc2f96f609a633720f | 151 | class Card < ActiveRecord::Base
has_many :guesses
belongs_to :deck
validates :question, presence: true
validates :answer, presence: true
end
| 16.777778 | 37 | 0.748344 |
18c60555071a82bd59d2468e47ae2b0523eb83d2 | 16,629 | # frozen_string_literal: true
require 'sequel'
require 'multi_json'
require 'fileutils'
require 'csv'
module Dynflow
module PersistenceAdapters
Sequel.extension :migration
Sequel.database_timezone = :utc
class Sequel < Abstract
include Algebrick::TypeCheck
include Algebrick::Matching
... | 34.64375 | 135 | 0.615732 |
ff174c6c6bb72c420ba9b218506719bcfa2f3ef0 | 2,097 | # The Patterns module contains common regular expression patters for the Puppet DSL language
module Puppet::Pops::Patterns
# NUMERIC matches hex, octal, decimal, and floating point and captures several parts
# 0 = entire matched number, leading and trailing whitespace and sign included
# 1 = sign, +, - or nothin... | 44.617021 | 118 | 0.649976 |
1137c8036b2a8379665e04546f3d064ba39f77ef | 1,663 | class ApplicationController < ActionController::Base
http_basic_authenticate_with name: ENV['BASIC_AUTH_NAME'],
password: ENV['BASIC_AUTH_PASSWORD'] if Rails.env.staging?
before_action :store_location , unless: :login_page_access?
# Prevent CSRF attacks by raising an exception.
# Fo... | 30.796296 | 85 | 0.643416 |
184ed5129097074ced63093d4725b8d274ebe9f7 | 2,282 | # frozen_string_literal: true
module Mutant
class Reporter
class CLI
class Printer
# Env progress printer
class EnvProgress < self
delegate(
:coverage,
:amount_subjects,
:amount_mutations,
:amount_mutations_alive,
:amount... | 29.25641 | 78 | 0.442594 |
7a30bae2225eb5ba41030dec8fb83b6b1a5c4543 | 899 | # frozen_string_literal: true
require "rails"
require "react_on_rails/error"
require "react_on_rails/prerender_error"
require "react_on_rails/json_parse_error"
require "react_on_rails/helper"
require "react_on_rails/controller"
require "react_on_rails/version"
require "react_on_rails/version_checker"
require "react_o... | 35.96 | 66 | 0.87208 |
4a5d9acf6760655ddb41d113f6c5852f28229626 | 2,848 | require "spec_helper"
# unset models used for testing purposes
Object.unset_class('User')
class Notify::Senders::Mail < Notify::Base
def deliver
$notifications << 'mail'
$options = @options
end
end
class Notify::Senders::Jabber < Notify::Base
def deliver
$notifications << 'jabber'
$options = @o... | 26.616822 | 100 | 0.662921 |
793e345f9d641cfe27d12306a5e354b7bd306dfd | 3,433 | # We have to monkey patch the Net::HTTP:connect method in order to disable SNI because it does not
# work with the Habitat Supervisor HTTP Gateway.
#
# This is accomplished by commenting out this line:
# s.hostname = @address if s.respond_to? :hostname=
# https://bugs.ruby-lang.org/attachments/4940
#
module Net
class... | 37.315217 | 105 | 0.601806 |
4aa899354fed6cafd7cb0d288c577daeed38b377 | 438 | # frozen_string_literal: true
class AnswerForCorrectTemplateValidator < ActiveModel::Validator
def validate(record)
return if record.plan.nil? || record.question.nil?
# Make sure that the question and plan belong to the same template!
return unless record.plan.template == record.question.section.phase.t... | 31.285714 | 97 | 0.773973 |
abf1415027a0df96ca9d551f7bb1cf61a54efb90 | 7,655 | # frozen_string_literal: true
require 'active_support/concern'
require 'fast_jsonapi/multi_to_json'
module FastJsonapi
MandatoryField = Class.new(StandardError)
module SerializationCore
extend ActiveSupport::Concern
included do
class << self
attr_accessor :attributes_to_serialize,
... | 39.663212 | 198 | 0.655389 |
91ddc53574783462b11196dadf06664259ef588e | 74 | json.partial! "subcategoria/subcategorium", subcategorium: @subcategorium
| 37 | 73 | 0.837838 |
ff286f469a7dbf98d177c3abceacacda2e0493d3 | 1,897 | require 'fileutils'
require 'find'
GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
GOOGLE_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'google-compiler-20110615.jar')
YUI_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'yuicompressor-2.4.4.jar')
def compress_js(scripts, compressor)
min_js = ''
if (c... | 27.897059 | 81 | 0.637849 |
1a996af754060420b32ed70dfa61597824d2f767 | 15,621 | #!/usr/bin/env ruby
# Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser Gene... | 30.450292 | 165 | 0.601434 |
28245c41ee1ee6b97c5d2e11950210250fcf599b | 40,148 | # 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_11_01
#
# PublicIPPrefixes
#
class PublicIPPrefixes
include MsRestAzure
#
# Creates and initializes ... | 42.574761 | 158 | 0.700035 |
aba1b96019d284cb0cdea1a4bdebcb318e7f106e | 44 | arr = [1, 5, 10, 20]
puts arr.find(&:even?)
| 14.666667 | 22 | 0.545455 |
62034c70711c50145ff20c5f9d50a357236e2406 | 1,366 | require 'minitest/autorun'
require 'BOAST'
require 'narray_ffi'
include BOAST
require_relative '../helper'
def silence_warnings(&block)
warn_level = $VERBOSE
$VERBOSE = nil
result = block.call
$VERBOSE = warn_level
result
end
class TestProcedure < Minitest::Test
def test_powercap
n = Int( :n, :dir =... | 22.032258 | 72 | 0.508053 |
26ced028c403dd45d25f80274938695cb3bd3839 | 3,176 | class EvidenceItemValidator < ActiveModel::Validator
def validate(record)
validator = valid_types[record.evidence_type]
if validator.blank?
record.errors.add :evidence_type, "Invalid evidence type: #{record.evidence_type}"
return
end
if !validator[:clinical_significance].include? record.... | 39.7 | 221 | 0.664043 |
ac3967f4f77303ebe558a1a5f3d00697988cad19 | 1,145 | # frozen_string_literal: true
require 'spec_helper'
describe Ci::TriggerPresenter do
set(:user) { create(:user) }
set(:project) { create(:project) }
set(:trigger) do
create(:ci_trigger, token: '123456789abcd', project: project)
end
subject do
described_class.new(trigger, current_user: user)
end
... | 21.203704 | 65 | 0.657642 |
28a5cf8ca43661f0987c13b0fd51a09b7e65a91b | 297 | # frozen_string_literal: true
require 'spec_helper'
describe 'Tracking activity with ahoy' do
it 'stores specified action' do
3.times { visit test_index_path }
Ahoy::Event.take(3).each do |elem|
expect(elem.name).to eq 'index action of test controller invoked'
end
end
end
| 22.846154 | 71 | 0.717172 |
626bea0c626495aab656f947b0fb33512a9698c2 | 152 | class RemoveTermsOfServiceFromEventsSignUps < ActiveRecord::Migration[5.0]
def change
remove_column :events_sign_ups, :terms_of_service
end
end
| 25.333333 | 74 | 0.815789 |
e971a607a53391cf3246cc5857b760379351ed5e | 30,228 | # -----------------------------------------------------------------------------------
# <copyright company="Aspose Pty Ltd" file="folder.rb">
# Copyright (c) 2003-2021 Aspose Pty Ltd
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and asso... | 43.493525 | 175 | 0.636959 |
ed23b01fe636f653db04772f3c68fd11d108fd7a | 1,348 | require_relative 'base'
module Semi::Variables
class Url < Semi::Variables::Base
@@url_re = Regexp.new('^(?<proto>https?|ftp):\/{2}(?!\/)(?<host>[a-z\.0-9\-_]+)?(?::(?<port>\d{1,5}))?\/?(?<path>.*?)\/?(?<file>[^\/\?]+)?(?:\?(?<params>.*?))?$', Regexp::IGNORECASE)
def initialize(val)
if @@url_re.match... | 18.465753 | 186 | 0.505193 |
0307ccdaa317a2ed353f533e885b4471d932b32e | 14,568 | require 'fog/aws'
require 'fog/storage'
module Fog
module Storage
class AWS < Fog::Service
extend Fog::AWS::CredentialFetcher::ServiceMethods
requires :aws_access_key_id, :aws_secret_access_key
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_ses... | 35.188406 | 245 | 0.545511 |
bb3851313949605be11ac7a2fab566b7a7f7f2f9 | 3,540 | # frozen_string_literal: true
require 'test_helper'
module Shipit
class HookTest < ActiveSupport::TestCase
setup do
@stack = shipit_stacks(:shipit)
@hook = shipit_hooks(:shipit_deploys)
end
test "#url must be valid" do
@hook.delivery_url = 'file:/ad"fa/adfa'
refute @hook.valid?
... | 32.477064 | 107 | 0.668644 |
62f7199e40e2c691d328d5c30425ec1706ca96b1 | 2,517 | require "spec_helper"
require "opsicle"
module Opsicle
describe Update do
subject { Update.new("env", "type") }
let(:client) { double }
let(:env) { "env" }
let(:type) { "type" }
let(:values) { { :foo => "bar" } }
before do
allow(Client).to receive(:new).with('env') { client }
all... | 34.479452 | 112 | 0.599126 |
7a5e70db6380fc3fc083887f1c0dc2c77fb233c6 | 67 | module RuboCop
module Aha
VERSION = '0.8.1'.freeze
end
end
| 11.166667 | 28 | 0.656716 |
4ae0224ff7ae66f420260bcdc7d82dfd5dd749bd | 8,328 | # frozen_string_literal: true
module Stupidedi
module TransactionSets
module FortyTen
module Implementations
b = Builder
d = Schema
r = SegmentReqs
e = ElementReqs
s = SegmentDefs
PS830 = b.build("PS", "830", "",
d::TableDef.header("Header",
... | 57.833333 | 125 | 0.495677 |
f7d016f9fc05ca84c0b7d306bb6ab68337c9cc1a | 95 | # desc "Explaining what the task does"
# task :heerschable_table do
# # Task goes here
# end
| 19 | 38 | 0.705263 |
8765bc74464977f7ba2b8a53690ce313d6264c83 | 5,688 | =begin
#Topological Inventory
#Topological Inventory
OpenAPI spec version: 0.1.0
Contact: you@your-company.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.3.4
=end
require 'date'
module TopologicalInventoryApiClient
class ServiceInstancesCollection
attr_accessor :meta
attr_... | 27.882353 | 107 | 0.608122 |
1cd26cb2bfef0eb843e401b3a809157c199cb1fc | 862 | Pod::Spec.new do |s|
s.name = 'DBAttachmentPickerController'
s.version = '1.1.4'
s.authors = { 'Denis Bogatyrev' => 'denis.bogatyrev@gmail.com' }
s.summary = 'This powerful component allows to select different types of files from different sources on your device'
s.homepage = 'https://gi... | 45.368421 | 124 | 0.648492 |
620d4918a71c10deea9818a9294ed0e637ba5bd8 | 605 | # frozen_string_literal: true
class ReportManager
def initialize(fastlane:, output_directory:)
@fastlane = fastlane
@output_directory = output_directory
end
def produce_report(scheme:, workspace:, report_targets:, test_output_directory:)
xccov_file_direct_path = "#{test_output_directory}/#{scheme}.x... | 27.5 | 82 | 0.732231 |
1d36c3c8b115ec7437de103ea61d9d2f11af8492 | 18,994 | # frozen_string_literal: true
module ActiveRecord
module ConnectionAdapters # :nodoc:
module DatabaseStatements
def initialize
super
reset_transaction
end
# Converts an arel AST to SQL
def to_sql(arel_or_sql_string, binds = [])
sql, _ = to_sql_and_binds(arel_or_sq... | 35.837736 | 134 | 0.630883 |
38549fa2eae4e3d57119c58a038629fad5e37d73 | 403 | # -*- coding: utf-8 -*-
# =Batch Manager=
# =created_at: <%= Time.now.strftime "%Y-%m-%d %H:%M:%S" %>
# =times_limit: 1
ActiveRecord::Base.transaction do
# Code at here will rollback when dry run.
# @wet will be true when -f option passed.
if @wet
BatchManager.logger.info "Wet run completed!"
else
B... | 22.388889 | 60 | 0.66005 |
38821049aee619c0b7603e12ce9a42bb752ff2cd | 1,280 | class Cromwell < Formula
desc "Workflow Execution Engine using Workflow Description Language"
homepage "https://github.com/broadinstitute/cromwell"
url "https://github.com/broadinstitute/cromwell/releases/download/30.2/cromwell-30.2.jar"
sha256 "dfdc60966807899f6a1d82c6929e26f66aecfdce0f556b8f1918a58f8e523299"
... | 22.857143 | 91 | 0.627344 |
08259f890b6273ef0c20a76ecf904019dec12825 | 3,999 | #
# Author:: Sander Botman (<sbotman@schubergphilis.com>)
# Copyright:: Copyright (c) 2013 Sander Botman.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License ... | 35.705357 | 171 | 0.664166 |
bbc2f595baef7d3e562de739e93a64923819644a | 1,734 | require 'rails_helper'
require 'sorbet-rails/model_rbi_formatter'
RSpec.describe SorbetRails::ModelRbiFormatter do
before(:all) do
SorbetRails::Utils.rails_eager_load_all!
end
it 'does not throw an error when given an abstract class' do
formatter = SorbetRails::ModelRbiFormatter.new(Potion, Set.new(['Po... | 30.421053 | 98 | 0.689735 |
d5aef8d7c5619b1dd8269f3c11a401651ce05831 | 568 | # frozen_string_literal: true
RSpec.describe Bootpay::Api do
it "cancel payment" do
puts "cancel payment"
api = Bootpay::Api.new(
application_id: '5b8f6a4d396fa665fdc2b5ea',
private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=',
)
if api.request_access_token.success?
respon... | 27.047619 | 69 | 0.646127 |
edf5aa2fc90d57f8c0b40d04f1b9259490ed39fe | 276 | class CreateComments < ActiveRecord::Migration[6.0]
def change
create_table :comments do |t|
t.references :tutorial, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.text :review
t.timestamps
end
end
end
| 23 | 60 | 0.677536 |
7a1c0e49477d9d55e6efa7d8677794368ac94217 | 9,585 | #! /usr/bin/env ruby
require 'spec_helper'
require 'facter/util/loader'
describe Facter::Util::Loader do
before :each do
Facter::Util::Loader.any_instance.unstub(:load_all)
end
def loader_from(places)
env = places[:env] || {}
search_path = places[:search_path] || []
loader = Facter::Util::Loade... | 32.272727 | 124 | 0.637559 |
38b5daa14d40a902cf249b4344fdcb00a01c2615 | 1,704 | require "language/node"
class Esbuild < Formula
desc "Extremely fast JavaScript bundler and minifier"
homepage "https://esbuild.github.io/"
url "https://registry.npmjs.org/esbuild/-/esbuild-0.14.45.tgz"
sha256 "9a88eb91cd7f053d4229710e635ec0b4e33308fb4195f7c5993a52001301f0df"
license "MIT"
bottle do
s... | 41.560976 | 123 | 0.750587 |
1d5f251dcbf89041e95d260dc8aa4ed9ed18ec9b | 10,707 | # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic... | 42.488095 | 245 | 0.713739 |
396b2cfcd38df31825bc6dfa972558baa7639f18 | 225 | class CreatePackageAddonTypes < ActiveRecord::Migration
def change
create_table :package_addon_types do |t|
t.string :name
t.integer :price
t.integer :total_spots
t.timestamps
end
end
end
| 18.75 | 55 | 0.688889 |
1d3634aa6e68742a297e66d420f85a1b0d2e2678 | 92 | # frozen_string_literal: true
module Perx
module Rubocop
VERSION = '0.0.3'
end
end
| 11.5 | 29 | 0.695652 |
1d882280919a71149ef77879dd91aefc46799f15 | 4,681 | require "spec_helper"
describe Devices::UnattendedUpgrade do
def create_example_releases
["1.0.0", "1.0.1"].map do |version|
["stable", "beta"].map do |channel|
["rpi", "rpi3", "rpi4"].map do |platform|
yield({ fbos_version: version, update_channel: channel }) if block_given?
Re... | 37.150794 | 111 | 0.60329 |
d55cb2176bdc271281fb765591774d27cca5c8b2 | 954 | require 'json'
require 'omniauth-oauth2'
module OmniAuth
module Strategies
class Esa < OmniAuth::Strategies::OAuth2
DEFAULT_SCOPE = 'read'.freeze
option :name, 'esa'
option :client_options, site: 'https://api.esa.io'
uid { raw_info['id'] }
info do
{
nickname: ra... | 20.73913 | 77 | 0.54717 |
1aae90f51471c36e6dba4d9ea728764c5ffc7c16 | 270 | require 'spec_helper'
describe Spree::Admin::SlideLocationsController do
stub_authorization!
let(:slide_location) { create(:slide_location) }
context '#index' do
it 'returns 200' do
get :index
expect(response.status).to eq(200)
end
end
end | 19.285714 | 50 | 0.7 |
61ae9694388743c92ad8d73b2cf54c4e7124e59c | 67 | require "fibo/version"
module Fibo
# Your code goes here...
end
| 11.166667 | 26 | 0.701493 |
398b07a563be92ddf6129b5620c81e362b2b1965 | 2,743 | # To run these specs using rake, make sure the 'bones' and 'bones-extras'
# gems are installed. Then execute 'rake spec' from the main directory
# to run all specs.
require File.expand_path(
File.join(File.dirname(__FILE__), %w[.. lib ffi-rzmq]))
require 'thread' # necessary when testing in MRI 1.8 mode
Thread.abort_... | 22.483607 | 127 | 0.696318 |
6a00753a76244745f75d3404c976f490cbed0e71 | 951 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe BillingAddress, type: :model do
xdescribe 'validations' do
let(:address) { FactoryBot.build(:billing_address) }
# NIP is the taxpayer ID number in the Republic of Poland
describe 'NIP number validation' do
context 'with valid NIP... | 23.195122 | 61 | 0.583596 |
e88e0c1a1edbf2013ddfe5a30951feeb9557ffd9 | 646 | # -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "ey_config/version"
Gem::Specification.new do |s|
s.name = 'ey_config'
s.version = EY::Config::VERSION
s.summary = 'Engine Yard Configuration'
s.description = 'Access to additional services for Engine Yard customers.'
s.authors ... | 34 | 76 | 0.678019 |
4a0b13e6b02ac7a66ef0644adc55ad98fd8d2480 | 465 | cask 'font-news-cycle' do
version :latest
sha256 :no_check
# github.com/google/fonts was verified as official when first introduced to the cask
url 'https://github.com/google/fonts/trunk/ofl/newscycle',
using: :svn,
revision: '50',
trust_cert: true
name 'News Cycle'
homepage 'https... | 25.833333 | 86 | 0.690323 |
5dcb3528c95fd9093d10b8bef8c236c69d7d5158 | 1,065 |
Pod::Spec.new do |spec|
spec.name = "BWReportProblem"
spec.ios.deployment_target = '12.0'
spec.version = "0.1.1"
spec.summary = "BWReportProblem let's a user report any issues."
spec.homepage = "https://github.com/Rajesh9274/BWReportProblem"
spec.license = { :type => "MIT", ... | 35.5 | 112 | 0.668545 |
33ebbe7c6d674783992f78fcabfcd7da2da7eef7 | 664 | base_dir = File.join(File.dirname(File.expand_path(__FILE__)), '..')
log_level :info
log_location STDOUT
node_name 'pivotal'
client_key File.join(base_dir, '.chef', 'private.pem')
syntax_check_cache_path File.join(base_dir, '.chef', 'syntax_check_cache')
cookboo... | 51.076923 | 125 | 0.668675 |
3329a33fbd36cca2464fb5e66817dcfaa71aa3f1 | 383 | class CandidateInterface::ReviewApplicationComponent < ViewComponent::Base
attr_accessor :application_form
def initialize(application_form:)
@application_form = application_form
end
private
def reopen_date
Time.zone.now < CycleTimetable.date(:apply_opens) ? CycleTimetable.apply_opens.to_fs(:govuk_dat... | 27.357143 | 151 | 0.804178 |
212f18ef9d194bd2ddef838601ece0e8ca979daa | 6,443 | class Homestead
def Homestead.configure(config, settings)
# Set The VM Provider
ENV['VAGRANT_DEFAULT_PROVIDER'] = settings["provider"] ||= "virtualbox"
# Configure Local Variable To Access Scripts From Remote Location
scriptDir = File.dirname(__FILE__)
# Prevent TTY Errors
config.ssh.shell =... | 32.215 | 136 | 0.582027 |
f88779ed9110d8e5444c2b9f409bffef3b33dd48 | 917 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "CrossrefSubmissionLogs", type: :request do
let(:admin) { create(:platform_admin) }
before { sign_in(admin) }
describe "#index" do
it do
get crossref_submission_logs_path
expect(response).to render_template(:index)
end
e... | 25.472222 | 91 | 0.68048 |
b930a47ea13a17fd6be06ec9b323a8e235de0b80 | 2,234 | ICONS_DIR = 'public'
ORIGINAL_IMAGE = 'media/huginn-icon-square.svg'
desc "Generate site icons from #{ORIGINAL_IMAGE}"
task :icons => 'icon:all'
namespace :icon do
# iOS
task :all => :ios
[
57, 114,
60, 120, 180,
72, 144,
76, 152,
].each do |width|
sizes = '%1$dx%1$d' % width
fil... | 21.075472 | 75 | 0.599821 |
f7d03e33a817a50f80a81d3bb3680d22377ba334 | 915 | module Fletcher
# This class extends string functions
module String
def sanitize
self.strip
end
def camelize(first_letter_in_uppercase = true)
lower_case_and_underscored_word = self.dup.underscore
if first_letter_in_uppercase
lower_case_and_underscored_word.to_s.gsub... | 26.911765 | 112 | 0.575956 |
62b2d7eb75486bc73cecc95df76f57a8af8e6a4b | 1,391 | module Tenpay
class QueryResponse
def initialize(response)
@body = response
end
def valid?
sign == Digest::MD5.hexdigest(sign_params).upcase
end
def successful?
valid? && pay_result == '0'
end
def doc
@doc ||= Hpricot(@body)
end
def attach
... | 21.4 | 111 | 0.583034 |
ac3ce30b8e5fa8d108b4a134aa08076149d6d671 | 1,203 | class Express < Formula
# cite Roberts_2012: "https://doi.org/10.1038/nmeth.2251"
desc "Streaming quantification for sequencing"
homepage "http://bio.math.berkeley.edu/eXpress/"
url "https://github.com/adarob/eXpress/archive/1.5.3.tar.gz"
sha256 "1c09fa067672ba2ccbac6901602f3e2d9b5e514ff1fe87f54163e94af69ff02... | 33.416667 | 94 | 0.732336 |
6236587968625c4c716a8aa6ac217718ec6b5b2e | 18,525 | require 'spec_helper'
module YieldHelpers
# these helpers are prefixed with an underscore to prevent
# collisions with the matchers (some of which have the same names)
def _dont_yield
end
def _yield_with_no_args
yield
end
def _yield_with_args(*args)
yield(*args)
end
end
class InstanceEvaler
... | 35.970874 | 112 | 0.650958 |
1c1b3ab2a8d7dba23f1a9e0dd033f52970baa3b8 | 2,561 | require 'presenters/v3/base_presenter'
require 'presenters/mixins/metadata_presentation_helpers'
module VCAP::CloudController::Presenters::V3
class SpaceQuotaPresenter < BasePresenter
def initialize(
resource,
show_secrets: false,
censored_message: VCAP::CloudController::Presenters::Censorship:... | 32.833333 | 114 | 0.654041 |
4ad3ebed6ded57c82ef1b8e0daa6db0ef19856ac | 442 | name 'tcr_db2'
maintainer 'Ed Overton'
maintainer_email 'bogus@gmail.com'
license 'Apache-2.0'
description 'Installs/Configures IBM DB2 Enterprise Server version 10.5.x with TCR datbase'
version '1.0.0'
chef_version '>= 13.0'
supports 'redhat'
supports 'centos'
issues_url 'http... | 27.625 | 96 | 0.70362 |
4a70e0bd7d1e8c1bf0ef099a183c63d8ccd1fc98 | 3,727 | ##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank... | 28.891473 | 141 | 0.610142 |
7a619bd473d98e0e5df70eb51633b825c9d76d59 | 290 | class ExpensesController < ApplicationController
before_action :authenticate_user!
before_action :event
decorates_assigned :event
def index
@expenses_decorator = ExpensesDecorator.new(event)
end
private
def event
@event ||= Event.find(params[:event_id])
end
end
| 17.058824 | 54 | 0.751724 |
911c7fdbd0cf6e6cab43108b6ed31c60da24cc56 | 300 | class CreateReviews < ActiveRecord::Migration[6.1]
def change
create_table :reviews do |t|
t.integer :rating
t.text :description
t.references :movie, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end
| 23.076923 | 57 | 0.67 |
61d3936ba61ecd65cce06067d0f12ce9abe72ab2 | 87 | module Whatnow
class Engine < ::Rails::Engine
isolate_namespace Whatnow
end
end | 17.4 | 32 | 0.747126 |
ed7f6501a8091a7869cea3683a26669c79c06ce0 | 3,929 | # Loads an image from a file
# @param path [String]
# @return [Image]
def load_image(path)
# mrb_load_image
# src/mruby_integration/image.cpp
Image.new
end
# Unloads an image
# @param image [Image]
# @return [nil]
def unload_image(image)
# mrb_unload_image
# src/mruby_integration/image.cpp
nil
end
# Expor... | 22.19774 | 87 | 0.741665 |
21daea6ed354e434f13826d6a6f9fb212d2b98d8 | 2,459 | # coding: utf-8
require 'active_support/concern'
module ActsAsOrderedTree
module Hooks
# This AR-hook is used in Move transactions to update parent_id, position
# and other changed attributes using single SQL-query.
#
# @example
# class Category < ActiveRecord::Base
# include ActsAsOrd... | 28.593023 | 110 | 0.611224 |
18f7a7b5919fd8943c3e4a12b6d6b5065d928b9d | 4,428 | # coding: utf-8
module FeatureTests
module Action
module Paypal
extend Capybara::DSL
extend RSpec::Matchers
module_function
def connect_marketplace_paypal(min_price: "2.0", commission: "5", min_commission: "1.0")
topbar = FeatureTests::Section::Topbar
paypal_preferences =... | 32.8 | 123 | 0.678184 |
1d9d21a64b69e6993e9d67e654dfce613fd9f448 | 132 | class AddPublicToAccessLevel < ActiveRecord::Migration[4.2]
def change
add_column :access_levels, :public, :boolean
end
end
| 22 | 59 | 0.765152 |
f727580b3801994c9051d38169787a7e965ad463 | 3,778 | require 'test_helper'
describe "Fog::Network[:telefonica] | lb_health_monitor requests" do
before do
@lb_health_monitor_format = {
'id' => String,
'type' => String,
'delay' => Integer,
'timeout' => Integer,
'max_retries' => Integer,
'ht... | 29.286822 | 101 | 0.642668 |
edc586fbcff31fb0d6c07f0f88da14031922dd93 | 1,092 | # As aun unauthorized user
# I want to unsign pendings reports
# In order to be able to update a report again
feature 'Unsign Report' do
scenario 'when pending' do
user = create(:unauthorized_user)
login_as user, scope: :user
report = create(:verified_report, user: user)
expect(report).not_to be_upda... | 27.3 | 57 | 0.718864 |
f8aa2ef562900de55b01e735045d53fe82a21e66 | 94 | json.extract! @employee_shift, :id, :company_shift_id, :employee_id, :created_at, :updated_at
| 47 | 93 | 0.787234 |
08c507c247823804c2366e2f6e58dca521eee292 | 2,170 | ##
## Executes a recursive grep in the current directory to find all todos,
## and the respecitve filename and linenumber. If there's a .gitignore
## that function will ignore all directories and files from .gitignore
##
def get_lines
exclude = ''
if File.file?(".gitignore")
exclude = `cat .gitignore`.split("... | 20.666667 | 87 | 0.594931 |
e25f1d0f45d76a8d51ea66a0c9e0491f3f5c0cf6 | 2,873 | # frozen_string_literal: true
require 'jiji/test/test_configuration'
require 'jiji/test/data_builder'
describe Jiji::Model::Trading::Rate do
include_context 'use data_builder'
it 'tickから作成できる' do
rate1 = Jiji::Model::Trading::Rate.create_from_tick(:EURJPY,
data_builder.new_tick(1, Time.new(2014, 1, 1... | 35.036585 | 65 | 0.646711 |
e9b60aeab5ed66d960c04dee9550851ed1396861 | 10,793 | #
# Cookbook Name:: arcgis-enterprise
# Attributes:: webadaptor
#
# Copyright 2018 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
#
# ... | 60.977401 | 120 | 0.585379 |
e8e46593376f7968b6f84c4cd7958f6db75c6121 | 1,424 | 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_view/railtie"
require "action_cable/eng... | 36.512821 | 117 | 0.775281 |
bfbec6e2389a40446727eb09c98c6402c4f79c23 | 3,098 | require 'base64'
require 'json'
require 'restclient'
module RSpotify
API_URI = 'https://api.spotify.com/v1/'
AUTHORIZE_URI = 'https://accounts.spotify.com/authorize'
TOKEN_URI = 'https://accounts.spotify.com/api/token'
VERBS = %w(get post put delete)
def self.auth_header
authorization... | 38.725 | 183 | 0.695933 |
283717b5a71ce7102734692b4f244e2da3c367c0 | 149 | # frozen_string_literal: true
class AddNameToPartner < ActiveRecord::Migration[5.0]
def change
add_column :partners, :name, :string
end
end
| 18.625 | 53 | 0.751678 |
21a06058079194299468a86f4b5b5c3197f6e48f | 2,557 | # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
requ... | 44.086207 | 86 | 0.748925 |
1cacb5f0a2adaafbaad2cce04e724e782292e256 | 8,882 | # Copyright (c) 2018 Public Library of Science
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, pub... | 33.771863 | 111 | 0.680928 |
bfd28f7a676c75acf96c55f242d84cf0fe787220 | 4,183 |
#
# Copyright:: 2016 cloudbau GmbH
#
# 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 ... | 24.89881 | 80 | 0.618456 |
2896e1f2b6a87d30973d06007f7e4b2593fdb054 | 2,129 | #
# base.rb
# Copyright © 2019 Netguru S.A. All rights reserved.
#
module Highway
module Compiler
module Analyze
module Tree
module Values
# This class is a base abstract class for other classes in this
# module. You should not use it directly.
class Base
... | 31.308824 | 110 | 0.543448 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.