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 |
|---|---|---|---|---|---|
1dd9b38b7e0898325bc8e0c4f7506ce788b580e0 | 545 | cask 'cyberduck' do
version '6.9.4.30164'
sha256 '061debe0eb69146764abc06915dbc1f45f7f939d15278f8cc23f3519ef7f3854'
url "https://update.cyberduck.io/Cyberduck-#{version}.zip"
appcast 'https://version.cyberduck.io/changelog.rss'
name 'Cyberduck'
homepage 'https://cyberduck.io/'
auto_updates true
app '... | 27.25 | 75 | 0.669725 |
ac6aef7921af37b6b53a7afd54ef920909e1314a | 73 | module AzureMediaService
class MediaProcessor < Model::Base
end
end
| 12.166667 | 36 | 0.780822 |
f816138b42bbeb8f25c961fec6f1ffa299fffdec | 1,321 | require 'yaml'
module Raml
# @private
class Parser
class << self
def parse(data, file_dir=Dir.getwd)
register_include_tag
data = YAML.load data
expand_includes data, file_dir
Root.new data
end
private
def register_include_tag
... | 22.775862 | 67 | 0.544285 |
87f9a49239910540756964178d0c9c2eeaa39ae2 | 357 | class Dog < ApplicationRecord
include PgSearch::Model
validates :name, :age, :breed, :is_available, presence: true
paginates_per 5
scope :breed, -> (breed_parameter) { where("breed like ?", "%#{breed_parameter}%")}
pg_search_scope :search_dogs, against: [:name],
using: {
tsearch:{
any_word: t... | 21 | 85 | 0.64986 |
e8ad40b72cb920798b653d91236180321ca5f4c2 | 623 | # frozen_string_literal: true
# Copyright (c) 2019 Danil Pismenny <danil@brandymint.ru>
class DepositDecorator < ApplicationDecorator
delegate_all
def self.table_columns
%i[id member_uid member created_at updated_at currency aasm_state invoice_expires_at amount fee txid txout tid transfer_type address invoic... | 21.482759 | 153 | 0.770465 |
e285b9b51b834832496e5811b3c1c728273c49b1 | 2,219 | # Since lesson #8 is on methods, you will be writing the entire method.
# To gain more familiarity, look up the documentation for each hint.
# Remember to unskip the corresponding tests one at a time.
# method name: #ascii_translator
# parameter: number (an integer)
# return value: the number's ASCII character (https... | 30.819444 | 79 | 0.739522 |
339f6e2b8908bf6e376916f1416558c41c842acc | 737 | # frozen_string_literal: true
class Pry
class Config
# MemoizedValue is a Proc (block) wrapper. It is meant to be used as a
# configuration value. Subsequent `#call` calls return the same memoized
# result.
#
# @example
# num = 19
# value = Pry::Config::MemoizedValue.new { num += 1 }
... | 21.057143 | 76 | 0.545455 |
62cb0d3dd176760ac7211294320ef714a103efe1 | 261 | require "open-uri"
require "nokogiri"
require "pry"
require "cooking_time/version"
require_relative "cooking_time/cli.rb"
require_relative "cooking_time/scraper.rb"
require_relative "cooking_time/recipe.rb"
module CookingTime
# Your code goes here...
end
| 17.4 | 42 | 0.793103 |
f85f92a061350eccf59d343617200999e9b019a2 | 3,284 | # rubocop:disable Layout/EndOfLine
# This file is copied to spec/ when you run 'rails generate rspec:install'
require 'spec_helper'
require 'capybara/rspec'
require 'factory_bot_rails'
# require 'shoulda-matchers'
require 'support/factory_bot'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../config/envi... | 42.649351 | 87 | 0.734775 |
3327d678496d5f25a07041477bf89622d4af4459 | 930 | # frozen_string_literal: true
module Alchemy
class AttachmentsController < BaseController
before_action :load_attachment
authorize_resource class: Alchemy::Attachment
# sends file inline. i.e. for viewing pdfs/movies in browser
def show
response.headers['Content-Length'] = @attachment.file.siz... | 23.846154 | 69 | 0.639785 |
1aac19395f879c1c7fcaa0d47c702bbe8078adc9 | 120 | # Sample code from Programing Ruby, page 64
while line = gets
puts line if line =~ /start/ .. line =~ /end/
end
| 24 | 49 | 0.633333 |
180d9a784ff3de68826da6d0571735fbcc4c5114 | 1,691 | # frozen_string_literal: true
module VBADocuments
module DocumentUpload
class StatusAttributesSwagger
include Swagger::Blocks
swagger_component do
schema :DocumentUploadStatusAttributes do
key :required, %i[guid status]
property :guid do
key :description, 'The... | 33.156863 | 155 | 0.594323 |
39247b721cc639f792eb7e5d0c9527799a0b9976 | 102 | name "minion"
description "The role for docker minions"
run_list 'recipe[etcd2]', 'recipe[docker]'
| 25.5 | 43 | 0.735294 |
1c477ced965402f998d134d567a56640cf92f024 | 674 | require 'csv'
module Duracloud::Commands
class FindItems < Command
HEADERS = %i( content_id md5 size content_type modified )
def call
CSV.instance($stdout, headers: HEADERS, write_headers: true) do |csv|
CSV.foreach(infile, headers: false) do |row|
begin
item = Duracloud... | 29.304348 | 115 | 0.618694 |
91ee816d5e61bf1617b4d42365c6efb44c361fc5 | 2,075 |
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "ma_breweries/version"
Gem::Specification.new do |spec|
spec.name = "ma_breweries"
spec.version = MaBreweries::VERSION
spec.authors = ["'Justin Beaulieu'"]
spec.email = ["'be... | 46.111111 | 305 | 0.694458 |
87e4037d5c8662cacd568c1f43f125d220159c2e | 2,057 | class Ploticus < Formula
desc "Scriptable plotting and graphing utility"
homepage "https://ploticus.sourceforge.io/"
url "https://downloads.sourceforge.net/project/ploticus/ploticus/2.42/ploticus242_src.tar.gz"
version "2.42"
sha256 "3f29e4b9f405203a93efec900e5816d9e1b4381821881e241c08cab7dd66e0b0"
revision... | 34.864407 | 95 | 0.707341 |
e274919cb43a373bc3944f2cf9543020bb545096 | 818 | FactoryGirl.define do
POLICY_TAGS = %w(
important
priority
discussion
trivial
rfc
)
factory :policy do
title { Faker::Company.bs }
description { Faker::HipsterIpsum.paragraphs(rand(3) + 1).join("\n") }
submitter { create(:user, :with_confirmed_email) }
category
tag_list {... | 19.95122 | 74 | 0.594132 |
017eb063e26453df9cc40fb96d619acd7c9945ae | 1,090 | require 'test_helper'
class CategoriesControllerTest < ActionDispatch::IntegrationTest
setup do
@category = categories(:one)
end
test "should get index" do
get categories_url
assert_response :success
end
test "should get new" do
get new_category_url
assert_response :success
end
tes... | 22.244898 | 81 | 0.719266 |
034e9981b6a2e5126cecc5282b0343d31e94e455 | 77 | class Vote < ActiveRecord::Base
belongs_to :votable, polymorphic: true
end
| 19.25 | 40 | 0.779221 |
79681db112f6be230f6a306f02e5b4167c877ce8 | 112 | class AddRateToClients < ActiveRecord::Migration
def change
add_column :clients, :rate, :number
end
end
| 18.666667 | 48 | 0.75 |
1d8f3e0d59e987df2d20448f438c325a011975eb | 382 | require 'formula'
class Ivy < Formula
homepage 'http://ant.apache.org/ivy/'
url 'http://www.apache.org/dyn/closer.cgi?path=ant/ivy/2.4.0/apache-ivy-2.4.0-bin.tar.gz'
sha1 '97a206e3b6ec2ce9793d2ee151fa997a12647c7f'
def install
libexec.install Dir['ivy*']
doc.install Dir['doc/*']
bin.write_jar_scrip... | 27.285714 | 91 | 0.698953 |
ab03457b3eac855e9c01b55e35516c6b6f38a6aa | 2,020 | ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'winrm'
require 'net/winrm/stdin_shell'
require 'net/winrm/rex_http_transport'
module Net
module MsfWinRM
# Connection to a WinRM service, using Rex sockets
class... | 24.938272 | 82 | 0.617822 |
ed44a7a7694f3603c88031d04dc885d0206d2567 | 609 | require './config/environment'
class ApplicationController < Sinatra::Base
configure do
enable :sessions
set :session_secret, "7c554e078bd16af1669da55800461ca0b213d45f32122b1a29b0062f6e67ed3b35f889af3156765098290edd7a5f7b7f64728f8ba0c29b40cafc927743e8148a"
set :public_folder, 'public'
set :views, '... | 17.911765 | 156 | 0.712644 |
3395d257ac28d374482429646210946bd0741f43 | 15,733 | require 'tc_helper.rb'
class TestWorksheet < Test::Unit::TestCase
def setup
@p = Axlsx::Package.new
@wb = @p.workbook
@ws = @wb.add_worksheet
end
def test_pn
assert_equal(@ws.pn, "worksheets/sheet1.xml")
ws = @ws.workbook.add_worksheet
assert_equal(ws.pn, "worksheets/sheet2.xml")
end
... | 33.332627 | 226 | 0.681434 |
01bd9ba3444cafe998ad68a2c11e7f7f3ed13fa5 | 708 | module HealthSeven::V2_5_1
class BarP10 < ::HealthSeven::Message
attribute :msh, Msh, position: "MSH", require: true
attribute :sfts, Array[Sft], position: "SFT", multiple: true
attribute :evn, Evn, position: "EVN", require: true
attribute :pid, Pid, position: "PID", require: true
attribute :pv1, Pv1, positio... | 44.25 | 88 | 0.710452 |
abfe4a3f644a971ceeebcf9afea15f9310e116e6 | 440 | class AddResidualHeatToChart250 < ActiveRecord::Migration[5.2]
def change
output_element = OutputElement.find_by_key('heat_network_production')
OutputElementSerie.create!(
output_element: output_element,
label: 'energy_heat_industry_residual_heat_steam_hot_water_output_curve',
color: '#0000... | 31.428571 | 79 | 0.768182 |
3904108fa402fda91a1990753114424a37cc5364 | 916 | module Apiture
module Middleware
module Auth
class APIKey
def initialize(app, options)
@app = app
@id = options[:id]
@in = options[:in]
@name = options[:name]
@format = options[:format]
end
def call(env)
context = env[:con... | 22.9 | 52 | 0.456332 |
26c12e7456f021e756da6ef6d2d6c03a32bfa2fd | 496 | # Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attac... | 62 | 171 | 0.832661 |
1aa90a464861734d206f764728c45a02a965d19d | 876 | module PgStream
class Processor
CALLBACK_TYPES = [:before_execute, :during_execute, :after_execute]
def initialize(stream)
@stream = stream
@callbacks = CALLBACK_TYPES.map do |type|
[type, []]
end.to_h
@row_count = 0
end
def register(args)
args.each do |type, fu... | 25.028571 | 104 | 0.59589 |
e8fdda47ce7ac428c45b4419a9c0446f106af949 | 1,081 | =begin
#Selling Partner API for Shipment Invoicing
#The Selling Partner API for Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil marketplace for a selling partner’s Fulfillment by Amazon (FBA) orders.
OpenAPI spec version: v0
Generated by: https://github.com/swagger-a... | 30.885714 | 198 | 0.791859 |
4afa8b8ef96f863479d731c96ac8d8f9649174c5 | 439 | # User definable key/value pairs, usually used for Farmware authorship.
class FarmwareEnv < ApplicationRecord
belongs_to :device
serialize :value
validate :primitives_only
PRIMITIVES_ONLY = "`value` must be a string, number or boolean"
def primitives_only
errors.add(:value, PRIMITIVES_ONLY) unless is... | 25.823529 | 73 | 0.758542 |
1ace8d4ded95ec4fc1fdcf00ab204a7af96f8d67 | 3,865 | module Ticketbai
module Operations
# In this operation, the document is not signed and it is not encoded in Base64 when making the request to the API as issuance and annulment
# operations, instead it is directly appended to the tag FacturaEmitida of the api payload document.
class IssuanceUnsigned
... | 42.944444 | 149 | 0.682018 |
1d0c29559af7bc0af7d2a83e0e822e4ec6fefaa4 | 5,568 | # Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2011-Present Datadog, Inc.
module Dogapi
class V1 # for namespacing
# Dashboard API
class DashboardSe... | 48.842105 | 121 | 0.574174 |
ede4462205fee6ccca4ff3d05b5e3c470ac35be5 | 1,499 | require "application_system_test_case"
describe "Issues", :system do
let(:issue) { issues(:one) }
it "visiting the index" do
visit issues_url
assert_selector "h1", text: "Issues"
end
it "creating a Issue" do
visit issues_url
click_on "New Issue"
fill_in "Customtargets", with: @issue.cust... | 26.767857 | 57 | 0.691127 |
aceb9fbcaeb155b5ae1743064b9947cb3cfb7177 | 168 | class CreateSellers < ActiveRecord::Migration[5.0]
def change
create_table :sellers do |t|
t.string :name
t.belongs_to :coin_value
end
end
end
| 18.666667 | 50 | 0.672619 |
61d036371897e40639b85a99567d52e567e9ff11 | 190 | # frozen_string_literal: true
module Stator
MAJOR = 0
MINOR = 3
PATCH = 2
PRERELEASE = nil
VERSION = [MAJOR, MINOR, PATCH, PRERELEASE].compact.join(".")
end
| 14.615385 | 63 | 0.6 |
0831b973cbea8d5bf0dcfc551f47fdcf890eac6f | 281 | # frozen_string_literal: true
control 'Docker service' do
title 'should be running and enabled'
describe service('docker') do
it { should be_installed }
it { should be_enabled }
it { should be_running } unless %w[fedora suse].include? platform[:family]
end
end
| 23.416667 | 78 | 0.711744 |
21936a55a4eb4ff2ed4f59bef3566e6d61e5f454 | 86 | require 'application_configurator'
require 'stacks'
Hash.send(:include, HashExtension) | 28.666667 | 34 | 0.837209 |
b9c8cf90dfda15b13317ebde3ab1b2afb7fbcfc3 | 1,165 | require 'test_helper'
class ExplorersControllerTest < ActionController::TestCase
setup do
@explorer = explorers(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:explorers)
end
test "should get new" do
get :new
assert_response :success
... | 23.3 | 112 | 0.713305 |
620301586644dabd7b067310519840825fc64c42 | 1,101 | # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'rack/haproxy_status/version'
Gem::Specification.new do |spec|
spec.name = "rack-haproxy_status"
spec.version = Rack::HaproxyStatus::VERSION
spec.authors = ["Marten Veld... | 44.04 | 153 | 0.683924 |
1c19027f2f4100996a4cdedcd8ad6041917c5db6 | 550 | # frozen_string_literal: true
require 'test_helper'
class CurrentExecutiveTest < Minitest::Test
def test_current_executive_query_contains_position
config = Config.new languages: %w[en es], country_wikidata_id: 'Q16'
executive = Executive.new comment: 'Test Executive',
... | 32.352941 | 106 | 0.64 |
f7af9a704492b5bc08f276ab0b4fb8c0d39c69bf | 2,265 | class Folly < Formula
desc "Collection of reusable C++ library artifacts developed at Facebook"
homepage "https://github.com/facebook/folly"
url "https://github.com/facebook/folly/archive/v2018.09.24.00.tar.gz"
sha256 "99b6ddb92ee9cf3db262b372ee7dc6a29fe3e2de14511ecc50458bf77fc29c6e"
revision 2
head "https:... | 29.038462 | 93 | 0.65298 |
b9eaab868522f732a485a6b28327614196e50b81 | 642 | # Copyright 2012 Trimble Navigation Ltd.
#
# License: Apache License, Version 2.0
require 'sketchup.rb'
module CommunityExtensions
module STL
IS_OSX = ( Object::RUBY_PLATFORM =~ /darwin/i ? true : false )
# Matches Sketchup.active_model.options['UnitsOptions']['LengthUnit']
UNIT_METERS = 4
... | 25.68 | 73 | 0.686916 |
3997d211771331216f168c44afe8768edcb2a495 | 34,895 | #-- copyright
# OpenProject is a project management system.
# Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of ... | 35.462398 | 149 | 0.596733 |
e25fbf453c6fa2e6f463e680762311c749bec708 | 773 | module Mutations
class CreateGrading < GraphQL::Schema::Mutation
argument :submission_id, ID, required: true
argument :grades, [Types::GradeInputType], required: true
argument :feedback, String, required: false
argument :checklist, GraphQL::Types::JSON, required: true
argument :note, String, requi... | 28.62963 | 98 | 0.677878 |
382c825ab5543bf39d52045853247d65d05d8a16 | 328 | RSpec.describe NewRelic::RestApi::ApplicationMetricNames do
describe '.requested_path' do
subject(:requested_path) do
described_class.requested_path(application_id: 1)
end
it 'returns "/applications/:application_id/metrics"' do
expect(requested_path).to eq("applications/1/metrics")
end
... | 27.333333 | 60 | 0.740854 |
287eb9c5c0e8e520f97a4317df074e4bf50206f3 | 87 | class FaradayCalsmock < Faraday::FaradayBase
self.base_url = CALS_API_BASE_URL
end
| 14.5 | 44 | 0.804598 |
61f3c612092d16d3b421064ec5fd787664770cef | 1,464 | class LocationsController < ApplicationController
NEAREST_LIMIT = 5
before_action :set_breadcrumbs
before_action :set_postcode
before_action :send_cache_headers
layout 'full_width_with_breadcrumbs', only: %i(show index)
def index
return render :search unless @postcode.present?
@locations = begin... | 28.153846 | 108 | 0.73224 |
9191f9f336f89322257adedcb35fae5de58a88e9 | 8,602 | gem 'minitest'
require 'minitest/autorun'
require 'ruby2js/filter/rubyjs'
describe Ruby2JS::Filter::RubyJS do
def to_js( string)
Ruby2JS.convert(string, filters: [Ruby2JS::Filter::RubyJS]).to_s
end
describe 'String conversions' do
it "should handle capitalize" do
to_js( 'a.capitalize()' ).mus... | 27.307937 | 80 | 0.582074 |
26b453fc8740c34ca0f6343678f295359bb9523d | 2,672 | class Vnstat < Formula
desc "Console-based network traffic monitor"
homepage "https://humdi.net/vnstat/"
url "https://humdi.net/vnstat/vnstat-2.8.tar.gz"
sha256 "03f858a7abf6bd85bb8cd595f3541fc3bd31f8f400ec092ef3034825ccb77c25"
license "GPL-2.0-only"
head "https://github.com/vergoh/vnstat.git", branch: "mas... | 34.25641 | 93 | 0.666542 |
f8334622aa17ab36a431fdc08be0d253a4b9122a | 221 | class GemOwnershipTransfer < ActiveRecord::Base
belongs_to :old_user, class_name: "User"
belongs_to :new_user, class_name: "User"
belongs_to :ruby_gem
validates :ruby_gem, :old_user, :new_user, presence: true
end
| 31.571429 | 59 | 0.773756 |
21cb0e3f612179be33ccea17f85997788a43107d | 1,788 | # Jekyll Emoji
# https://github.com/chriskempson/jekyll-emoji
#
# A jekyll plug-in that provides a Liquid filter for emojifying text with
# https://github.com/github/gemoji. See http://www.emoji-cheat-sheet.com for
# a full listing of emoji codes.
#
# Usage:
# - Apply the filter wherever needed e.g. {{ content | emoj... | 29.311475 | 114 | 0.639821 |
f832c148e3b07abe7f3b1b76969046e77a64a476 | 257 | module Mongoff
class Selector < Mongoid::Criteria::Selector
def evolve_hash(serializer, value)
value = serializer.evolve_hash(value)
super
end
def multi_selection?(key)
%w($and $or $nor).include?(key.to_s)
end
end
end | 19.769231 | 46 | 0.661479 |
61771e2c97fee3f0e1374be8f8f6aa3c925a1528 | 1,075 | require 'omniauth'
require 'omniauth-google-oauth2'
require 'omniauth-mailchimp'
require 'omniauth-prayer-letters'
require 'omniauth-donorhub'
Auth::Engine.config.middleware.use OmniAuth::Builder do
provider :google_oauth2,
ENV.fetch('GOOGLE_KEY'),
ENV.fetch('GOOGLE_SECRET'),
name: '... | 35.833333 | 150 | 0.683721 |
4a6aa0e07ba3fcc71eb9983906d1db31f58cc452 | 2,819 | require 'spec/spec_helper'
class UnsortableObject
def initialize(id)
@id = id
end
def inspect
@id.to_s
end
def ==(other)
false
end
end
describe "array.should =~ other_array" do
it "should pass if target contains all items" do
[1,2,3].should =~ [1,2,3]
end
it "should pass if target... | 25.862385 | 119 | 0.642072 |
1ad280067a7f8c5115c7c5da72f60eeaea3607e6 | 2,689 | # frozen_string_literal: true
# Copyright (c) 2018 Yegor Bugayenko
#
# 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, co... | 36.337838 | 111 | 0.686872 |
1a9010b899126706bbe25e4fbe940f44628b7e21 | 162 | class AddOriginalBodyToContentBlocks < ActiveRecord::Migration
def change
change_table :content_blocks do |t|
t.text :original_body
end
end
end
| 20.25 | 62 | 0.746914 |
4a5ed3c01a8980a8b837cea28923341a8d0c7d1d | 123 | require 'bundler'
Bundler.setup(:default, :development)
Bundler.require
require 'nominal'
RSpec.configure do |config|
end | 15.375 | 37 | 0.788618 |
18984e70debbc7acdcb41946777e82160ba679c7 | 913 | # == Schema Information
#
# Table name: candidates
#
# id :integer not null, primary key
# place_id :integer
# lat :float
# lon :float
# name :string(255)
# housenumber :string(255)
# street :string(255)
# postcode :string(255)
# city :string(255)
# w... | 19.847826 | 68 | 0.60241 |
bf4faf275d4cd2a953b72e76337b694800aaf03e | 691 | module Spina
module Admin
class AdminController < ::Spina::ApplicationController
before_action :set_admin_locale
before_action :authorize_spina_user
def current_admin_path
request.fullpath[%r{/#{ Spina.config.backend_path }(.*)}, 1]
end
helper_method :current_admin_path
... | 23.827586 | 121 | 0.690304 |
28fc75719bdc16851abbdb458f7efde30cba8dd9 | 977 | Pod::Spec.new do |spec|
spec.name = 'DynamicButtonStack'
spec.module_name = 'DynamicButtonStackKit' # Module name must be different from the class name.
spec.version = '1.0.1'
spec.license = { :type => 'MIT', :file => 'License.txt' }
spec.homepage = 'https://github.com/douglashill/DynamicButtonStack... | 48.85 | 153 | 0.689867 |
d52e8349df50057d192523943012af4e81d1b80d | 339 | class CreateLines < ActiveRecord::Migration
def change
create_table :lines do |t|
t.references :scratchpad, null: false, foreign_key: true
t.integer :order, null: false
t.index [:scratchpad_id, :order], unique: true
t.text :content, null: false
t.timestamps null: false
e... | 19.941176 | 62 | 0.640118 |
bfd62a5aad059e230e338df2fa86a3f7cd79941c | 874 | Pod::Spec.new do |s|
s.name = "CloudCore"
s.summary = "Framework that enables synchronization between CloudKit and Core Data."
s.version = "3.0.1"
s.homepage = "https://github.com/deeje/CloudCore"
s.license = 'MIT'
s.author = { "deeje" => "deeje@mac.c... | 33.615385 | 95 | 0.60984 |
abc3f7d48beafa66c039a680acbdf19c3d73b796 | 948 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.689655 | 74 | 0.734177 |
4a8f6f511d60d59cebbbb9f012b596a95e1b9b6e | 3,945 | # -*- encoding: utf-8 -*-
class UserGroupsController < ApplicationController
add_breadcrumb "I18n.t('page.configuration')", 'page_configuration_path'
add_breadcrumb "I18n.t('page.listing', :model => I18n.t('activerecord.models.user_group'))", 'user_groups_path'
add_breadcrumb "I18n.t('page.new', :model => I18n.t(... | 35.863636 | 159 | 0.709506 |
6a2172fe5716c81c0bf6070bd2d253639d8898a3 | 2,212 | require File.expand_path('../../../../spec_helper', __FILE__)
require 'net/ftp'
require File.expand_path('../fixtures/server', __FILE__)
describe "Net::FTP#status" do
before(:each) do
@server = NetFTPSpecs::DummyFTP.new
@server.serve_once
@ftp = Net::FTP.new
@ftp.connect("localhost", 9921)
end
... | 34.5625 | 103 | 0.710669 |
e22ae3e6e8858a18d67bd6f35dd6b1d7957ecddd | 15,400 | # Requires that an `adaptor` let variable exist with the connected adaptor
RSpec.shared_examples 'Neo4j::Core::CypherSession::Adaptor' do
let(:real_session) do
expect(adaptor).to receive(:connect)
Neo4j::Core::CypherSession.new(adaptor)
end
let(:session_double) { double('session', adaptor: adaptor) }
b... | 35.648148 | 120 | 0.596364 |
bf913eb947be9bd4ee036eebe62a1ba8288a8e29 | 165 | class AddActiveJobIdToTransactions < ActiveRecord::Migration[5.1]
def change
add_column :cangaroo_transactions, :active_job_id, :string, index: true
end
end
| 27.5 | 75 | 0.787879 |
b983b0ca73fd339eb415d32dfebc0fd8dc243594 | 36 | module Edge
VERSION = "0.6.0"
end
| 9 | 19 | 0.638889 |
e22978d5eb93a92f74370851d98fae48e0b86f5e | 331 | cask 'thunderbird-uk' do
version '38.5.1'
sha256 'af35281921fed9b6ca3964106d72c30269f52644101c5e8c8fc855cf61d6aba6'
url "https://download.mozilla.org/?product=thunderbird-#{version}&os=osx&lang=uk"
name 'Mozilla Thunderbird'
homepage 'https://www.mozilla.org/uk/thunderbird/'
license :mpl
app 'Thunderbir... | 27.583333 | 83 | 0.76435 |
398a6c749faced821a7bbfa473e4539acb7cf8c4 | 152 | class CreateHogs < ActiveRecord::Migration
def change
create_table :hogs do |t|
t.string :name
t.integer :user_id
end
end
end
| 13.818182 | 42 | 0.651316 |
d5250d6aca43e815b5527a59211f6a4265c64ae5 | 308 | class Jitsi < Cask
version '2.4'
sha256 'ceb6b2ab04206a51faf1dbffb704a7a60ae2b7c47834b50f87da5557f543ad13'
url 'https://download.jitsi.org/jitsi/macosx/jitsi-2.4-latest.dmg'
appcast 'https://download.jitsi.org/jitsi/macosx/sparkle/updates.xml'
homepage 'https://jitsi.org/'
app 'Jitsi.app'
end
| 28 | 75 | 0.762987 |
268fadee0afc50b1094be09b45823aa37a987274 | 1,342 | # frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190313092516_clean_up_noteable_id_for_notes_on_commits.rb')
RSpec.describe CleanUpNoteableIdForNotesOnCommits do
let(:notes) { table(:notes) }
before do
notes.create!(noteable_type: 'Commit', commit_id: '3d0a... | 38.342857 | 127 | 0.743666 |
91857af4f370503d27c79cfb26ea20d3c01163f7 | 61 | require "addressable/uri"
require 'google_custom_search_api'
| 20.333333 | 34 | 0.852459 |
e2ab68e6aae0e6ec492e214d25886a5d406d68df | 471 | module Spree
Product.class_eval do
translates :name, :description, :meta_description, :meta_keywords, :slug,
:fallbacks_for_empty_translations => true
include SpreeI18n::Translatable
def duplicate_extra(old_product)
duplicate_translations(old_product)
end
private
def duplicate_t... | 23.55 | 77 | 0.726115 |
26245186bd3f7b85d06c9a313c51aca22749f3c8 | 823 | cask 'texstudio-beta' do
version '2.12.18beta1'
sha256 '1dfa02edb649545f4c99f6f121cf395d4f5eec86c347118bacd622ee4950f40d'
# github.com/texstudio-org/texstudio was verified as official when first introduced to the cask
url "https://github.com/texstudio-org/texstudio/releases/download/#{version}/texstudio-#{vers... | 39.190476 | 141 | 0.730255 |
0816c68fbdbfe387c81fc077500d57f6f2598fd2 | 158 | class CreateBlockTypes < ActiveRecord::Migration
def change
create_table :block_types do |t|
t.string :name
t.timestamps
end
end
end
| 15.8 | 48 | 0.683544 |
0844de6a83aca34824175c742de0a1638c71fbb1 | 326 | module Dnsimple
module Commands
class ServiceDescribe
def execute(args, options = {})
short_name = args.shift
service = Service.find(short_name)
puts "\t#{service.name} (short: #{service.short_name}, id: #{service.id})"
puts "\t\t#{service.description}"
end
end
en... | 25.076923 | 82 | 0.616564 |
016bfd14c984831c68a8ca21e6ccf91ecf369d14 | 7,255 | require 'spec_helper'
describe Mongo::Collection::View do
let(:filter) do
{}
end
let(:options) do
{}
end
let(:view) do
described_class.new(authorized_collection, filter, options)
end
after do
authorized_collection.delete_many
end
describe '#==' do
context 'when the other obj... | 21.27566 | 86 | 0.580152 |
7933b2d18961332d8fc7fbdb452e2400df5ec055 | 1,232 | require 'spec_helper'
describe UsersController do
let(:user) { Factory(:user) }
before { login(user) }
context ".dashboard" do
before { get :dashboard }
specify { response.should render_template(:dashboard) }
specify { assigns(:albums).should == user.albums }
specify { assigns(:events).should ... | 26.212766 | 74 | 0.67289 |
18e122333322fd1ee87a7cdfbe6756e78b2889e0 | 1,878 | require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
describe "Enumerable#zip" do
it "combines each element of the receiver with the element of the same index in arrays given as arguments" do
EnumerableSpecs::Numerous.new(1,2,3).zip([4,5,6],[7,8,9]... | 36.115385 | 111 | 0.657082 |
332d1bce33e612db63c4d3d94e02098a6c009c40 | 751 | ## send it to the backends
def Sendit(metricpath, metricvalue, metrictimestamp)
if !$graphiteserver.nil? and !$graphiteserver.empty?
require 'SendGraphite'
# puts metricpath + " " + metricvalue.to_s + " " + metrictimestamp.to_s
SendGraphite metricpath, metricvalue, metrictimestamp
end
if !$gmondse... | 30.04 | 73 | 0.71771 |
872aef34fecbfffa3192bce4a0b453d57c4a5e3a | 22,461 | # Copyright 2016 LINE
#
# LINE Corporation licenses this file to you 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 l... | 31.370112 | 136 | 0.626553 |
f7bcd3e9f99093425857af8eb7458d220878c01d | 325 | describe MiqAeMethodService::MiqAeServiceStorage do
let(:storage) { FactoryGirl.create(:storage) }
let(:svc_storage) { MiqAeMethodService::MiqAeServiceStorage.find(storage.id) }
it "#show_url" do
ui_url = stub_remote_ui_url
expect(svc_storage.show_url).to eq("#{ui_url}/storage/show/#{storage.id}")
end... | 29.545455 | 80 | 0.744615 |
87c01ef6c402c75e65ae80e2f184b9f0a9f1649c | 204 | # frozen_string_literal: true
class Location
include Mongoid::Document
field :name
field :info, type: Hash
field :occupants, type: Array
field :number, type: Integer
embedded_in :address
end
| 18.545455 | 31 | 0.745098 |
d50bd76d3c6d4f4d55e18ea3f6908769f89985a8 | 496 | # Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attac... | 62 | 171 | 0.832661 |
62a7e5f40a6e09f66e5b9bbc6487993bd0a1422b | 381 | require 'forwardable'
class Faraday::CLI::MiddlewareFetcher::Container
#TODO: remove support for adapter set
extend Forwardable
def_delegators :@builder, :use, :request, :response, :adapter
def initialize(builder)
@builder = builder
end
def merge!(file_path)
Dir.chdir(File.dirname(file_path)) do
... | 20.052632 | 63 | 0.721785 |
087ce09dd74cc2e1d3d124f9b947dbf6c0c0e49c | 881 | require 'hiptest-publisher/nodes'
module Hiptest
module GherkinAddon
def walk_call(call)
if call.free_text_arg
@rendered_children[:free_text_arg] = rendered_freetext_arg(call)
end
if call.datatable_arg
@rendered_children[:datatable_arg] = rendered_datatable_arg(call)
end
... | 22.589744 | 81 | 0.685585 |
38884222d08edd83bddb3de652ea025a6144c661 | 16,612 | require "dev-cmd/audit"
require "formulary"
module Count
def self.increment
@count ||= 0
@count += 1
end
end
describe FormulaText do
alias_matcher :have_data, :be_data
alias_matcher :have_end, :be_end
alias_matcher :have_trailing_newline, :be_trailing_newline
let(:dir) { mktmpdir }
def formul... | 27.503311 | 102 | 0.599928 |
f7295efe73abec5524d5d32e84378ad38654c6ad | 474 | # frozen_string_literal: true
describe ProcessDecisionDocumentJob do
context ".perform" do
subject { ProcessDecisionDocumentJob.perform_now(decision_document.id) }
let(:decision_document) { build_stubbed(:decision_document) }
it "processes the decision document" do
allow(DecisionDocument).to rece... | 29.625 | 104 | 0.761603 |
91b961716cd106139d4e28cda345646488651e3a | 278 | class CreateProyectosUsersJoinTable < ActiveRecord::Migration
def change
create_table :proyectos_users, id: false do |t|
t.integer :id_proyecto
t.integer :id_user
end
add_index :proyectos_users, :id_proyecto
add_index :proyectos_users, :id_user
end
end
| 23.166667 | 61 | 0.755396 |
6a3a47df9bacddcaf15a7baaaf47ecd5299fabd0 | 2,721 | # This file is copied to spec/ when you run 'rails generate rspec:install'
require 'spec_helper'
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 Rail... | 45.35 | 86 | 0.751194 |
2621a66970ae42ebabffaa6a08cdcb689917197e | 16,026 | # -*- coding: binary -*-
require 'tempfile'
require 'rex/post/meterpreter'
module Rex
module Post
module Meterpreter
module Ui
###
#
# The file system portion of the standard API extension.
#
###
class Console::CommandDispatcher::Stdapi::Fs
Klass = Console::CommandDispatcher::Stdapi::Fs
include Console::Command... | 25.237795 | 125 | 0.563771 |
ab8f7038d531a61c271e921f55ca7a16c6a98b3d | 8,015 | require 'puppet/util/autoload'
require 'puppet/parser/scope'
# A module for managing parser functions. Each specified function
# is added to a central module that then gets included into the Scope
# class.
#
# @api public
module Puppet::Parser::Functions
Environment = Puppet::Node::Environment
class << self
... | 32.848361 | 179 | 0.650655 |
6157cf186f2c5706e78659f2b43d2f56ebe3f04e | 421 | require 'spec_helper'
describe Opal::Server do
it 'serves source maps only if they are enbled on the Processor' do
original_value = Opal::Processor.source_map_enabled
begin
[true, false].each do |bool|
Opal::Processor.source_map_enabled = bool
expect(subject.source_map_enabled).to eq(bo... | 26.3125 | 69 | 0.705463 |
1a6ee9463cc86a253fc8f464fd14bbf9a97baa79 | 129 | require 'test_helper'
class SpellsComponentTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| 16.125 | 51 | 0.72093 |
08b1694c605c9f1fda2d3ea17bb3c40819f2ecb1 | 1,797 | # 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::EventHub::Mgmt::V2018_01_01_preview
module Models
#
# Properties to configure keyVault Properties
#
class KeyVaultProperties... | 26.043478 | 70 | 0.513077 |
910b2524518da2a5cd95ac14e08bdb790215d498 | 2,714 | # frozen_string_literal: true
module Fourier
module Commands
class Lint < Base
desc "tuist", "Lint the Swift code of the Tuist CLI"
option :fix, desc: "When passed, it fixes the issues", type: :boolean, default: false
def tuist
Services::Lint::Tuist.call(fix: options[:fix])
Serv... | 39.333333 | 91 | 0.651069 |
1a194331e12bdae53b0534bf53d2b05045b0e935 | 21,335 | require 'spree/core/validators/email'
require 'spree/order/checkout'
module Spree
class Order < Spree::Base
PAYMENT_STATES = %w(balance_due credit_owed failed paid void)
SHIPMENT_STATES = %w(backorder canceled partial pending ready shipped)
extend FriendlyId
friendly_id :number, slug_column: :number... | 31.19152 | 145 | 0.685259 |
282042b2f09677db785abed79d663d7b61bf79c1 | 153 | module Applicants
class EmployedForm < BaseForm
form_for Applicant
attr_accessor :employed
validates :employed, presence: true
end
end
| 15.3 | 39 | 0.745098 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.