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 |
|---|---|---|---|---|---|
1a7134d37da736dd96e82b7e76ba4f9c7e326116 | 265 | # Describes a type of Document.
#
# Mainly use to classify types of evidence so that they can be
# organized when attached to Controls
class DocumentDescriptor < ActiveRecord::Base
include AuthoredModel
def display_name
title
end
is_versioned_ext
end
| 18.928571 | 62 | 0.773585 |
1ccca94c2052f0abd840c24ce377e2686c99e12a | 1,448 | ##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/handler/reverse_tcp'
require 'msf/core/payload/php/reverse_tcp'
require 'msf/base/sessions/meterpreter_php'
require 'msf/base/sessions/meterprete... | 30.166667 | 89 | 0.638812 |
4ae8f908e98aa6a5915898c9422061ae2efdfbe0 | 1,366 | class K9s < Formula
desc "Kubernetes CLI To Manage Your Clusters In Style!"
homepage "https://k9scli.io/"
url "https://github.com/derailed/k9s.git",
tag: "v0.24.14",
revision: "6e753b5aa63ee34d49fade16940d92714702ec55"
license "Apache-2.0"
head "https://github.com/derailed/k9s.git"
bottle ... | 42.6875 | 139 | 0.729136 |
01debedfbe850397bf596b8821ac48de8a4a1c78 | 1,975 | class BlocksController < ApplicationController
before_action :set_block, only: [:show, :edit, :update, :destroy]
skip_before_action :verify_authenticity_token, only: [:create, :update] #for dev only, disables authenticity checking on create/update
# GET /blocks
# GET /blocks.json
def index
@blocks = Blo... | 25.649351 | 136 | 0.659241 |
ffb8c3b565142ce441b2a69e124ebcbfffb0cd88 | 241 | module Fastlane
VERSION = '2.105.0'.freeze
DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
MINIMUM_XCODE_RELEASE = "7.0".freeze
RUBOCOP_REQUIREMENT = '0.49.1'.freeze
end
| 34.428571 | 112 | 0.759336 |
ed78b372bafd1d98aa7a655d910242d94907858c | 580 | require_relative '../support/utils'
include Utils
describe 'Main Component', type: :feature, js: true do
it 'Example 1' do
class ExamplePage < Matestack::Ui::Page
def response
main id: 'my-id', class: 'my-class' do
plain 'Hello World' #optional content
end
end
end
... | 22.307692 | 80 | 0.634483 |
e247b5e9e3777e3190328746e9bf50f3b72222f0 | 3,635 | # frozen_string_literal: true
require 'lib/publisher'
module View
class Welcome < Snabberb::Component
needs :app_route, default: nil, store: true
needs :show_intro, default: true
def render
children = [render_notification]
children << render_introduction if @show_intro
children << ren... | 34.951923 | 158 | 0.617056 |
21291a2a296af44d3fd990bac77a0da980a62d1c | 1,579 | require_relative 'ovirt_refresher_spec_common'
describe ManageIQ::Providers::Redhat::InfraManager::Refresher do
include OvirtRefresherSpecCommon
let(:ip_address) { '192.168.1.107' }
before(:each) do
init_defaults(:hostname => 'pluto-vdsg.eng.lab.tlv.redhat.com', :ipaddress => '10.35.19.13', :port => 443)
... | 37.595238 | 125 | 0.550348 |
91e3850a8d6fe31eaca137233f5e5a5b6805dd39 | 5,043 | # frozen_string_literal: true
require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads mos... | 44.236842 | 114 | 0.762443 |
38460cad0d503c8090404cd126014ba53cfce61e | 1,313 | # frozen_string_literal: true
require_relative "lib/viva_wallet/version"
Gem::Specification.new do |spec|
spec.name = "viva_wallet"
spec.version = VivaWallet::VERSION
spec.authors = ["Tom Dallimore"]
spec.email = ["me@tomdallimore.com"]
spec.summary = "A Ruby wrapper for ... | 39.787879 | 88 | 0.67936 |
1ced1b72599344ec1f8863add470476fcf9ae20f | 2,393 | # TODO: plistの変数展開はどうすれば良いだろうか。
Pod::Spec.new do |s|
s.name = "DeviceConnectAllJoynPlugin"
s.version = "2.1.0"
s.summary = "Device Connect Plugin for AllJoyn"
s.description = <<-DESC
A Device Connect plugin for AllJoyn.
Device Connect is an IoT solution for inte... | 44.314815 | 147 | 0.674467 |
796f160e96252ce31212db78ca9249c66c269fa6 | 251 | cask 'tiny' do
version :latest
sha256 :no_check
url 'http://www.delightfuldev.com/assets/files/tiny/Tiny.zip'
name 'Tiny'
homepage 'http://www.delightfuldev.com/tiny/'
license :gratis
depends_on macos: '>= 10.10'
app 'Tiny.app'
end
| 17.928571 | 63 | 0.689243 |
ac0956189b31e9621fff1a0667f5497c61064021 | 4,414 | # name: retort
# about: Reactions plugin for Discourse
# version: 1.2.0
# authors: James Kiesel (gdpelican)
# url: https://github.com/gdpelican/retort
register_asset "stylesheets/retort.scss"
RETORT_PLUGIN_NAME ||= "retort".freeze
enabled_site_setting :retort_enabled
after_initialize do
module ::Retort
class ... | 27.5875 | 137 | 0.682601 |
8711376159224523a836bda3e3ef8812ff5387d6 | 159 | class AddShipmentTimeSlotIdToSpreeShipments < ActiveRecord::Migration
def change
add_column :spree_shipments, :shipment_time_slot_id, :integer
end
end
| 26.5 | 69 | 0.823899 |
d55645067ad443a5113756c3861773a178e7d190 | 8,210 | require 'spec_helper'
describe 'puppet_enterprise::master::tk_authz' do
let(:params) do
{
'console_client_certname' => 'fake_console_certname',
'classifier_client_certname' => 'fake_classifier_certname',
'orchestrator_client_certname' => 'fake_orchestrator_certname'
}
end
let(:... | 47.456647 | 89 | 0.586967 |
acc267eaa37b2a0a04a360b6d0fc3ce22c4dfe73 | 1,876 | RSpec.describe 'Brickftp::Permission' do
let(:new_user) do
username = "testuser#{SecureRandom.hex(2)}"
Brickftp::User.create(username: username, password: 'password@123')
end
let(:new_permission) do
@new_user = new_user
Brickftp::Permission.create({path: "/test#{SecureRandom.hex(2)}", permission:... | 32.344828 | 121 | 0.660981 |
e85c5d25bfdb0a1b0af6dff21f0bca4d19713e7f | 376 | # Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::StorageCache::Mgmt::V2019_11_01
module Models
#
# Defines values for StorageTargetType
#
module StorageTargetType
Nfs3 = "nfs3"
Cl... | 22.117647 | 70 | 0.68617 |
ff787b58319d62dd3c1207b0bfcd328226376a1b | 449 | # frozen_string_literal: true
module DropletKit
class HealthCheckMapping
include Kartograph::DSL
kartograph do
mapping HealthCheck
scoped :read, :create, :update do
property :protocol
property :port
property :path
property :check_interval_seconds
property... | 20.409091 | 42 | 0.67706 |
ed96b31a0873b17d41324c0f1b3de9911a3e6111 | 12,441 | =begin
#NSX API
#VMware NSX REST API
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.1
=end
require 'date'
module NSXT
class AdvertiseRuleList
attr_accessor :_self
# The server will populate this field when returing the resource... | 32.23057 | 508 | 0.627924 |
3870b9e9a1bbf719b395c5bee51407c5798f740f | 2,204 | class CoinsController < ApplicationController
before_action :set_coin, only: [:show, :update, :destroy]
# GET /coins
def index
@coins = Coin.all
render json: @coins, except: [:created_at, :updated_at, :current_price, :price_change_percentage_1h_in_currency, :high_24h, :low_24h, :total_volume, :market_ca... | 30.191781 | 205 | 0.697368 |
3881a0dd1c2d3e40c637f7b711a7d2a5b7989816 | 285 | module SessionsHelper
def log_in(user)
session[:user_id] = user.id
end
def current_user
@current_user ||= User.find_by(id: session[:user_id])
end
def logged_in?
!current_user.nil?
end
def log_out
session.delete(:user_id)
@current_user = nil
end
end
| 13.571429 | 56 | 0.680702 |
879e06603d12e8ec77403ac364fc6b06c4a345df | 2,434 | class LatePolicy < ActiveRecord::Base
belongs_to :user
# has_many :assignments
has_many :assignments, dependent: :nullify
validates :policy_name, presence: true
validates :instructor_id, presence: true
validates :max_penalty, presence: true
validates :penalty_per_unit, presence: true
validates :penalt... | 42.701754 | 111 | 0.737058 |
bb205eb7ae60272a93ced5c72c26ed27dc492b7e | 95 | # frozen_string_literal: true
module Authcat
module Account
VERSION = "0.1.0"
end
end
| 11.875 | 29 | 0.705263 |
1d7db005801f6e203e27a8c68be4052b244fb5c3 | 121 | class Order < ActiveRecord::Base
belongs_to :meal
belongs_to :user
validates :quantity, presence: true
end
| 13.444444 | 37 | 0.710744 |
26942f06592129e2d869fc1fc47bb5cadedf48ec | 1,219 | # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'dissect/version'
Gem::Specification.new do |spec|
spec.name = "dissect"
spec.version = Dissect::VERSION
spec.authors = ["Ole J. Rosendahl"]
spec.email = ["ole... | 36.939394 | 104 | 0.686628 |
edb56c026b316fd887c8cce7cb19acab29ce8b7a | 755 | # add & configure Laravel Mix - BrowserSync to a [new] Laravel project
# DOCS: https://laravel-mix.com/docs/6.0/browsersync
# https://browsersync.io/docs/options/
set_current_patch 'mix:browsersync'
puts
patch_start
# set the config value if not set
confs.set('dev.mix.browsersync', value: true) unless confs.... | 25.166667 | 93 | 0.743046 |
d5f67a1383ffedf65821f6d819e2ba9a5b6b020a | 1,006 | shared_examples 'provider/provisioner/pe_bootstrap/3x' do |provider, options|
if options[:boxes].empty?
raise ArgumentError,
"Box files must be downloaded for provider: #{provider}. Try: rake acceptance:setup"
end
include_context 'acceptance'
let(:extra_env) do
vars = options[:env_vars].dup
... | 27.189189 | 90 | 0.670974 |
5d2b30a039a59cca3fae3e329eb520621d5b67c5 | 2,461 | # frozen_string_literal: true
require 'rspec'
RSpec.describe Navigation::RadioNavigationAidIO do
describe '::parse_navs_file' do
subject(:bnn) do
Navigation::RadioNavigationAid.lookup('BNN', Coordinate.new(latitude: 51.0, longitude: 0.0))
end
# rubocop: disable RSpec/BeforeAfterAll the data is re... | 41.016667 | 109 | 0.622511 |
ac1032d5caed3f8812d209118c96ef06f4a189e2 | 220 | require 'spec_helper'
describe SimpleDataValidator do
it 'has a version number' do
expect(SimpleDataValidator::VERSION).not_to be nil
end
it 'does something useful' do
expect(false).to eq(true)
end
end
| 18.333333 | 54 | 0.736364 |
bb0eeac6141d3a7663aa0300a610d1834e1ba0de | 431 | # encoding: utf-8
module WorldLite
c = Country.new
c.name = 'Liberia'
c.key = 'lr'
c.alpha3 = 'LBR'
c.fifa = 'LBR'
c.net = 'lr'
c.continent_name = 'Africa'
c.un = true
c.eu = false
c.euro = false
# Liberia / Africa
# tags: africa, western africa, un, fifa, caf
L... | 13.060606 | 50 | 0.538283 |
e825f31f588b3b561cd23096254f8cde4c173995 | 1,782 | # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2
#
# Copyright (c) 2016-present, Facebook, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | 33 | 74 | 0.688552 |
f84f12d5429a669abd3b1d494ac33a5a036c6972 | 13,712 | require 'spec_helper'
describe 'dariahshibboleth' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge(networking: { 'fqdn' => 'fq.dn' })
end
it { is_expected.to contain_anchor('dariahshibboleth::begin').that_comes_before('Class[dariahshibboleth::inst... | 40.568047 | 165 | 0.556374 |
87074c54dbb0462bdb845a806f3b7bc2deba1e64 | 4,617 | #-- 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 ... | 31.841379 | 91 | 0.701105 |
ab4e94bbdaee17aa80fc46722bffea54d94c01e1 | 283 | class CreateArtists < ActiveRecord::Migration[4.2]
def up
end
def change
create_table :artists do |t|
t.string :name
t.string :genre
t.integer :age
t.string :hometown
end
end
def down
end
end | 15.722222 | 50 | 0.522968 |
1d291b235fcecff7628719d019d4feb9bf2de6b5 | 6,350 | # typed: false
# frozen_string_literal: true
require "os/mac/version"
require "os/mac/xcode"
require "os/mac/xquartz"
require "os/mac/sdk"
require "os/mac/keg"
module OS
# Helper module for querying system information on macOS.
module Mac
extend T::Sig
module_function
# rubocop:disable Naming/Consta... | 30.528846 | 116 | 0.643622 |
18277086d4e87f4a1160809497a3ccb6904346c6 | 286 | module DemocracyInAction
class Proxy < ActiveRecord::Base
set_table_name :democracy_in_action_proxies
belongs_to :local, :polymorphic => true
def before_destroy
DemocracyInAction::Mirroring.api.delete self.remote_table, {'key' => self.remote_key}
end
end
end
| 26 | 91 | 0.748252 |
01293837251896257c15f8df2f53af7faf53b3eb | 734 | # Fedena
# Copyright 2011 Foradian Technologies Private Limited
#
# This product includes software developed at
# Project Fedena - http://www.projectfedena.org/
#
# 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 ... | 34.952381 | 74 | 0.775204 |
3958615a182cb687e30cd8fea69d255f036efcaf | 1,395 | # encoding: UTF-8
#
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2014 Onddo Labs, SL.
# 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 t... | 30.326087 | 77 | 0.733333 |
d5460a58bd1a50a9b58efa6227c9dee6b6a8039d | 4,517 | require 'active_support/core_ext/array/extract_options'
require 'active_support/core_ext/hash/keys'
require 'active_model/errors'
module ActiveModel
module Validations
extend ActiveSupport::Concern
include ActiveSupport::Callbacks
included do
extend ActiveModel::Translation
define_callbacks ... | 37.330579 | 144 | 0.627186 |
ab7a97a19228b1d84bacb2547d9799cf7c5907ca | 466 | require 'spec_helper'
describe GroupMembership, :type => :model do
it { is_expected.to belong_to :user }
it { is_expected.to belong_to :group }
it 'validates the uniqueness of group and user' do
described_class.create!(group_id: 3945, user_id: 89343)
membership = described_class.new(group_id: 3945, us... | 29.125 | 84 | 0.738197 |
e978632337f81086fe2409949da19d8225deedeb | 163 | require "helix_runtime"
begin
require 'margin_calculator/native'
rescue LoadError
warn "Unable to load margin_calculator/native. Please run `rake build`"
end
| 20.375 | 73 | 0.797546 |
f81a3babacbe7c28767c234ed1f840a5cba63ca4 | 183 | module Ecm
module Core
class HomeController < Ecm::Core::Configuration.base_controller.constantize
def index
render plain: 'Welcome!'
end
end
end
end
| 16.636364 | 79 | 0.666667 |
2166deda7a8a450c7507eb77e6667087706c1aab | 664 | require 'ripper'
module Ryakuzu
class Ripper
attr_reader :schema
def parse(filename)
sexp = ::Ripper.sexp IO.read(filename)
schema_commands = sexp[1][0][2][2]
@schema = schema_commands.inject({}) do |s, command|
next if command.length < 1
command_name = command[1][1][1]
... | 21.419355 | 68 | 0.558735 |
28dbe72e88f6125c05918ef0adfd8aaa26aa87e4 | 1,759 | require_relative '../util/model'
module ZOHOCRMSDK
module SendMail
class BodyWrapper
include Util::Model
# Creates an instance of BodyWrapper
def initialize
@data = nil
@key_modified = Hash.new
end
# The method to get the data
# @return An instance of Arr... | 27.484375 | 114 | 0.607732 |
87ff2357b928c9d081ded94b7612c0b9a3dcb699 | 1,379 | #-- encoding: UTF-8
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 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 ChiliProje... | 37.27027 | 91 | 0.765047 |
b9706973b3a7d08c23a03bdcd2989cd2b7fffb0a | 11,501 | require_relative '../test'
require 'brakeman/options'
class BrakemanOptionsTest < Minitest::Test
EASY_OPTION_INPUTS = {
:exit_on_warn => "-z",
:exit_on_error => "--exit-on-error",
:rails3 => "-3",
:run_all_checks => "-A",
:assume_all_routes => "-a",... | 33.628655 | 126 | 0.696635 |
21121dc9b280ac4c277293dcfd59e6f6fccb49b2 | 871 | require 'mocha-on-bacon'
require File.expand_path('../motion_stub.rb', __FILE__)
require 'bubble-wrap'
describe BubbleWrap do
describe '.root' do
it 'returns an absolute path' do
BubbleWrap.root[0].should == '/'
end
end
describe '.require' do
it 'delegates to Requirement.scan' do
BW::Req... | 28.096774 | 105 | 0.647532 |
871916f9c0ef8de4f1e6e935ae0f57e79c58cd6c | 4,294 | record_id = ARGV[0]
table_names = []
resurrection_cmds = []
system "rm resurrect_#{record_id}*"
puts "Exporting from projects..."
fname = "resurrect_#{record_id}-projects.csv"
dbconfig = Rails.configuration.database_configuration[Rails.env]
psql_cmd = "psql"
psql_cmd += " -h #{dbconfig['host']}" if dbconfig['host']
p... | 35.487603 | 152 | 0.690498 |
87dcdd95d99cab2302ee96fbec33f31085b97053 | 117 | class AddStatusToIdeas < ActiveRecord::Migration[5.1]
def change
add_column :ideas, :status, :string
end
end
| 19.5 | 53 | 0.735043 |
ab29819848cdb167e114ccc22aac2cc935de9c69 | 278 | module Arturo
class Engine < ::Rails::Engine
ActiveSupport.on_load(:action_controller) do
include Arturo::FeatureAvailability
helper Arturo::FeatureAvailability
include Arturo::ControllerFilters
helper Arturo::FeatureManagement
end
end
end
| 25.272727 | 48 | 0.733813 |
33a8dcfb2ec0e3c3477b410d80b92728c6eb84d2 | 679 | require_relative "boot"
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module SampleApp
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails... | 33.95 | 82 | 0.756996 |
6a881bc89fc7dd082635ba1a97811a2adef986f7 | 1,533 | require 'faker'
require 'pry'
require 'random-location'
petfinder = Petfinder::Client.new
dog_breeds = petfinder.breeds('dog')
cat_breeds = petfinder.breeds('cat')
bird_breeds = petfinder.breeds('bird')
dog_breeds.each do |breed|
DogBreed.create(name: breed)
end
cat_breeds.each do |breed|
CatBreed.create(name: ... | 34.840909 | 256 | 0.730594 |
4aaa33cdda7b5c688d567c6577fcd457cb30d835 | 1,567 | # 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::Cosmosdb::Mgmt::V2020_06_01_preview
module Models
#
# The list of new failover policies for the failover priority change.
#
... | 27.982143 | 73 | 0.522655 |
b942caa725debae4469adea12633fba4d3fa1eb4 | 1,838 | # coding: utf-8
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "pact/message/version"
Gem::Specification.new do |spec|
spec.name = "pact-message"
spec.version = Pact::Message::VERSION
spec.authors = ["Beth Skurrie"]
spec.email ... | 39.956522 | 96 | 0.691513 |
5da7ce513183122a02e62084e5e86c29046ee728 | 267 | class CreateCloseFriendsOgImages < ActiveRecord::Migration[6.0]
def change
create_table :close_friends_og_images do |t|
t.bigint :uid, null: false
t.json :properties
t.timestamps null: false
t.index :uid, unique: true
end
end
end
| 22.25 | 63 | 0.685393 |
e241b53a63392cc6a95d304b1384027ada1a0fa9 | 871 | # coding: utf-8
require 'bigdecimal'
module Preflight
module Rules
# Checks the MediaBox for every page is at 0,0. This isn't required by
# any standards but is good practice to ensure correct rendering with
# some applications.
#
# Arguments: none
#
# Usage:
#
# class MyPrefl... | 20.255814 | 88 | 0.586682 |
ac66d1ea2183b6385f3e6a5f16e61306902679cc | 851 |
Pod::Spec.new do |s|
s.name = "LFLiveKit-ReplayKit"
s.version = "0.0.1"
s.summary = "Forked form LFLiveKit, A ReplayKit Version"
s.homepage = "https://github.com/FranLucky/LFLiveKit-ReplayKit"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Pokeey" => "zha... | 40.52381 | 129 | 0.625147 |
ff3ecd03b2ff2dda7670a83bd7f5e13caf551f33 | 13,103 | require 'erb'
require 'httparty/request/body'
module HTTParty
class Request #:nodoc:
SupportedHTTPMethods = [
Net::HTTP::Get,
Net::HTTP::Post,
Net::HTTP::Patch,
Net::HTTP::Put,
Net::HTTP::Delete,
Net::HTTP::Head,
Net::HTTP::Options,
Net::HTTP::Move,
Net::HTTP... | 29.577878 | 159 | 0.635122 |
79601b4f0ac95f1bd3cf4d5400e5c991ddc3ca42 | 7,184 | require "spec_helper"
describe Canvas::Proxy do
before do
@user_id = Settings.canvas_proxy.test_user_id
@client = Canvas::Proxy.new(:user_id => @user_id)
end
context "when converting sis section ids to term and ccn" do
it "should return term and ccn" do
result = subject.class.sis_section_id_t... | 37.612565 | 126 | 0.664254 |
395903cede968c3ecb0d747c8719d9dfc87e1a42 | 456 | cask 'mycrypto' do
version '1.7.0'
sha256 '08a15e8fb3a24b17e5d068a98719bad293e3d8dca7787b18e26e28d870dc01c8'
# github.com/MyCryptoHQ/MyCrypto was verified as official when first introduced to the cask
url "https://github.com/MyCryptoHQ/MyCrypto/releases/download/#{version}/mac_#{version}_MyCrypto.dmg"
appcas... | 35.076923 | 103 | 0.778509 |
79915daa46388d71786909383a9730fa11b581bb | 9,449 | # == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime... | 34.36 | 152 | 0.638269 |
e2ea1d9f1178cad89e8f5b2a60880fb05283a195 | 1,046 | def test
connection = Fog::Google::SQL.new
puts "Create a Instance..."
puts "--------------------"
instance = connection.instances.create(:instance => Fog::Mock.random_letters(16), :tier => "D1")
instance.wait_for { ready? }
puts "Get the Instance..."
puts "----------------------"
connection.instances... | 26.820513 | 98 | 0.558317 |
62e923b1b2741f43ecd9315e7b54cfe550afbee9 | 1,189 | class Png2ico < Formula
desc "PNG to icon converter"
homepage "http://www.winterdrache.de/freeware/png2ico/"
url "http://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz"
sha1 "955004bee9a20f12b225aa01895762cbbafaeb28"
bottle do
cellar :any
sha1 "b3c0353afa9ea55e8dc9e8f41eeaac89... | 25.847826 | 86 | 0.708158 |
08a054551d7795673d4009f0cb861d458146abc1 | 1,093 | # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'ingress/version'
Gem::Specification.new do |spec|
spec.name = "ingress"
spec.version = Ingress::VERSION
spec.authors = ["Alan Skorkin"]
spec.email = ["alan@sk... | 37.689655 | 104 | 0.596523 |
912860598ededaa606fdae463247c0b09f9d83b2 | 769 | require 'test_helper'
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
def setup
@base_title = "railstutorial"
end
test "should get root" do
get root_path
assert_response :success
end
test "should get home" do
get home_path
assert_response :success
assert_select "titl... | 21.971429 | 65 | 0.694408 |
f88de5e5d79d88da9e8f37d31ef0e6362638e024 | 288 | FactoryBot.define do
factory :absence do
name { Faker::Cat.name }
location { Faker::Address.street_name }
end_date { Faker::Date.forward(30) }
start_date { Faker::Date.backward(15) }
event_type { Absence::TYPES.sample }
user_id user
end
end
| 26.181818 | 46 | 0.628472 |
7a8b4180880c930ce6101a417e254fc17306bc7a | 3,240 | namespace :corpus do
task :load_mail do
require File.expand_path('../../../spec/environment')
require 'mail'
end
# Used to run parsing against an arbitrary corpus of email.
# For example: http://plg.uwaterloo.ca/~gvcormac/treccorpus/
desc "Provide a LOCATION=/some/dir to verify parsing in bulk, othe... | 25.714286 | 83 | 0.635494 |
0891b497501f50ee403fe5073c82f2344574435e | 137 | class ChangeRefToTextInAccountVersions < ActiveRecord::Migration
def change
change_column :account_versions, :ref, :text
end
end
| 22.833333 | 64 | 0.79562 |
ed48d028948e2276570898553be34192511d4480 | 6,620 | # encoding: ascii-8bit
module Parser
module Source
##
# A buffer with source code. {Buffer} contains the source code itself,
# associated location information (name and first line), and takes care
# of encoding.
#
# A source buffer is immutable once populated.
#
# @!attribute [r] nam... | 27.020408 | 89 | 0.551813 |
1ae68ad75d6488c7b4a29367abb31e1900729d39 | 223 | class Array
def to_hash_keys(&block)
Hash[*self.collect { |v|
[v, block.call(v)]
}.flatten]
end
def to_hash_values(&block)
Hash[*self.collect { |v|
[block.call(v), v]
}.flatten]
end
end
| 15.928571 | 28 | 0.578475 |
87bc7f1b5eda221a0e1766e4d4c6fd92080a2115 | 367 | require 'bundler/setup'
require 'proc_buffer'
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.466667 | 66 | 0.754768 |
4aa01da7123ac1af79314998da6c44b02dd629e3 | 6,098 | cron_5m = '0/5 * * * *'
interval_5m = 5 * 60
cron_1h = '0 * * * *'
interval_1h = 60 * 60
cron_24h = '0 0 * * *'
gpo_cron_24h = '0 10 * * *' # 10am UTC is 5am EST/6am EDT
inteval_24h = 24 * 60 * 60
if defined?(Rails::Console)
Rails.logger.info 'job_configurations: console detected, skipping schedule'
else
# rubocop... | 31.43299 | 77 | 0.576582 |
1d76f973c065a0c19395808449322a3e48f0a422 | 140,319 | # Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 61.221204 | 231 | 0.667999 |
3842d1b65e1ad780a5e8af069f1cf0ef28b5e140 | 2,807 | # frozen_string_literal: true
require "cases/helper"
module ActiveRecord
class Migration
class PGChangeSchemaTest < ActiveRecord::PostgreSQLTestCase
attr_reader :connection
def setup
super
@connection = ActiveRecord::Base.connection
connection.create_table(:strings) do |t|
... | 38.986111 | 104 | 0.695404 |
38029837993c65c7e255a58ce2e37494bc9c52ed | 5,204 | #
# Be sure to run `pod spec lint caculatormaker.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 http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://git... | 37.438849 | 106 | 0.591084 |
0183a1e05353d993663d9fecec144716613c1f6e | 1,137 | # frozen_string_literal: true
require "spec_helper"
class SoftDeleteTest < ActiveSupport::TestCase
ActiveRecord::Base.connection.create_table(:walking_deads, force: true) do |t|
t.string :name
t.string :tag
t.datetime :deleted_at
t.timestamps null: false
end
class WalkingDead < ApplicationRecor... | 24.191489 | 80 | 0.699208 |
ffccf1cbec81f53d19902ddc7edb5bb7f793d221 | 77 | $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'AuthAyo'
| 25.666667 | 58 | 0.727273 |
ac487bcf7bed579be8a96ad01d30116e311e14da | 214 | Instagram.configure do |config|
config.client_id = ENV.fetch 'IG_CLIENT_ID'
config.client_secret = ENV.fetch 'IG_CLIENT_SECRET'
# For secured endpoints only
config.client_ips = ENV.fetch 'IG_CLIENT_IP'
end
| 30.571429 | 53 | 0.775701 |
5da33d2e2e7d043be3f9850832c37875d008a7cb | 51 | module FluentdRegexpTester
VERSION = "0.1.4"
end
| 12.75 | 26 | 0.745098 |
e9d7e62878493b4195d414a81967256e9d998d01 | 1,695 | # frozen_string_literal: true
require 'spec_helper'
describe FastJsonapi::ObjectSerializer do
include_context 'movie class'
context 'when testing object serializer with ruby struct' do
it 'returns correct hash when serializable_hash is called' do
options = {}
options[:meta] = { total: 2 }
o... | 38.522727 | 102 | 0.725074 |
1a7ac733faa55028bf94ebc27cbcd5c5279d2458 | 7,298 | require "spec_helper"
module VCAP::CloudController
describe Service, type: :model do
it_behaves_like "a CloudController model", {
:required_attributes => [:label, :description, :bindable],
:required_attribute_error_message => {
:label => 'name is required'
},
:unique_attributes ... | 33.631336 | 138 | 0.64182 |
b9ab54a2968d388e187635370237477f1bba1b4d | 1,417 | # frozen_string_literal: true
class EditsForInvoicingAndJournalingRefacting < ActiveRecord::Migration[4.2]
def self.up
# update the account_transaction table
remove_foreign_key :account_transactions, name: :fk_int_at_fa
remove_column :account_transactions, :facility_account_id
add_column :account... | 36.333333 | 93 | 0.669019 |
e983b47fff7db8452bf68737e68ffef8a525b913 | 45 | class TagPolicy < DirectiveAdmin::Policy
end
| 15 | 40 | 0.822222 |
031327029e0aad3649d6c0cab02226b55ca3cdcf | 134 | class ArtifactPartsAddIndexOnArtifactId < ActiveRecord::Migration
def change
add_index :artifact_parts, :artifact_id
end
end
| 19.142857 | 65 | 0.80597 |
38f8b50ac223c6496959ca22d684c51211370ccf | 358 | require "hbc/version"
describe Hbc::CLI::Doctor do
it "displays some nice info about the environment" do
expect {
Hbc::CLI::Doctor.run
}.to output(/\A==> macOS Release:/).to_stdout
end
it "raises an exception when arguments are given" do
expect {
Hbc::CLI::Doctor.run("argument")
}.to... | 22.375 | 55 | 0.667598 |
b920adc783ba983f00de51b88e9ac24a0d60a16d | 2,105 | class ListPositionDecorator < SimpleDelegator
def list_positions
fpl_team_list.list_positions.order(role: :asc, position_id: :desc)
end
def substitute_options
options =
if list_positions.goalkeepers.include?(__getobj__)
list_positions.goalkeepers.where.not(player_id: player_id)
elsif ... | 34.508197 | 111 | 0.705938 |
ff1215127e3b6e65b9ddeb5da70bd8cb2cdf816b | 91 | class HashProcessor
def initialize(event_table)
@event_table = event_table
end
end
| 15.166667 | 30 | 0.769231 |
912779bda0237b74dc1dc655082a4c7691d2a58a | 1,931 | module Eligible
class APIResource < EligibleObject
def self.class_name
name.split('::').last
end
def self.api_url(base, params = nil, param_id = nil)
if params.nil?
"/#{base}"
else
id = Util.value(params, param_id)
"/#{base}/#{id}"
end
end
def self... | 32.728814 | 137 | 0.683066 |
337ac5ae9021393c808fefa4e715d6f8ba8391c8 | 1,017 | Pod::Spec.new do |s|
s.name = 'AWSFacebookSignIn'
s.version = '2.13.3'
s.summary = 'Amazon Web Services SDK for iOS.'
s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
s.homepag... | 46.227273 | 158 | 0.646018 |
bf5dd918f7c1c9e2898294e384ba56808c0584ae | 10,616 | require 'test_helper'
class PaypalTest < Test::Unit::TestCase
def setup
@gateway = PaypalGateway.new(fixtures(:paypal_signature))
@credit_card = credit_card('4381258770269608') # Use a generated CC from the paypal Sandbox
@declined_card = credit_card('234234234234')
@params = {
:order_id => g... | 35.269103 | 165 | 0.721364 |
33fbefc1142aa9fd46180d2ecf1c6d8954c40306 | 1,385 |
Pod::Spec.new do |spec|
spec.name = "TFYSwiftRouter"
spec.version = "2.1.4"
spec.summary = "汇编代码的路由跳转,支持OC 于 Swift 各个界面跳转,方法跳转 数据传输,最低支持ios 13 Swift 5 "
spec.description = <<-DESC
汇编代码的路由跳转,支持OC 于 Swift 各个界面跳转,方法跳转 数据传输,最低支持ios 13 Swift 5
DESC
spec.homepage =... | 26.634615 | 114 | 0.674368 |
ab6d838555e3af119dc1f94ae89f85bff05d1f1b | 880 | ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require "minitest/reporters"
Minitest::Reporters.use!
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
include Applicati... | 27.5 | 82 | 0.645455 |
1dc047a8090153d9e1c0aa323a3061a86aca1c3f | 4,763 | module Invoker
module Power
class OsxSetup < Setup
RESOLVER_FILE = "/etc/resolver/dev"
RESOLVER_DIR = "/etc/resolver"
FIREWALL_PLIST_FILE = "/Library/LaunchDaemons/com.codemancers.invoker.firewall.plist"
def setup_invoker
if setup_resolver_file
find_open_ports
... | 31.753333 | 140 | 0.642032 |
392f032d62b84d825e8de8dcafb0dffd90ed104a | 3,003 | require 'yaml'
require 'json'
namespace, domain, kube_config = ARGV.shift(3)
configmap = %x(kubectl get configmap secrets-config --namespace #{namespace} -o json)
configmap = JSON.parse(configmap)['data']
current_secrets_name = configmap['current-secrets-name']
secrets = %x(kubectl get secret secrets --namespace #{n... | 30.958763 | 91 | 0.571762 |
268034eeeb408e3f4bf02c1ca04a454f9fb20921 | 4,850 | require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
class NewRelic::Agent::TransationSampleBuilderTest < Test::Unit::TestCase
def setup
@builder = NewRelic::Agent::TransactionSampleBuilder.new
end
def test_build_sample
build_segment("a") do
build_segment("aa") do
... | 24.744898 | 124 | 0.657526 |
03e6da3a0730792ab24cbaf184b938cf8ecb3021 | 1,792 | module Solargraph
module LanguageServer
module Message
module TextDocument
autoload :Base, 'solargraph/language_server/message/text_document/base'
autoload :Completion, 'solargraph/language_server/message/text_document/completion'
autoload :DidOpen, 'solarg... | 68.923077 | 105 | 0.742746 |
0378b69b1b1d65acb957380ae9f355e53cbe0f6a | 63 | module Clark
module EventBus
VERSION = '0.1.0'
end
end
| 10.5 | 21 | 0.650794 |
ffe2c5c0765ac8f7541c3937803e215f8221658a | 2,301 | # -*- encoding: utf-8 -*-
# stub: factory_girl_rails 4.2.1 ruby lib
Gem::Specification.new do |s|
s.name = "factory_girl_rails".freeze
s.version = "4.2.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors... | 46.02 | 163 | 0.655367 |
1dcc5b7fdd2839bc1ac077b84f0f93f4cb5d3188 | 2,467 | require 'puppet'
require 'puppet/provider/cinder_type/openstack'
provider_class = Puppet::Type.type(:cinder_type).provider(:openstack)
describe provider_class do
let(:set_creds_env) do
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test'
ENV['O... | 29.369048 | 140 | 0.588974 |
0845ae9d39fe19e706f4bdb0b69b8ee269891e2a | 614 | require 'money'
require 'money/bank/google_currency'
module Finance
class Money
def initialize(money, currency = nil)
@money = money.is_a?(Money) ? money : ::Money.new(money, currency)
exchange(currency) if currency
end
def exchange(currency)
return if @money.currency == currency
... | 25.583333 | 84 | 0.672638 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.