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 |
|---|---|---|---|---|---|
61ddb8768a31ca4d9f4b94adea9fb52822d95e90 | 403 | require 'open-uri'
require 'nokogiri'
require 'pry'
class Scraper
def scrape_index_page(user_input)
html = open("http://www.behindthename.com/name/#{user_input}")
doc = Nokogiri::HTML(html)
result = doc.css("div.namemain").first.text
# binding.pry
if result == "There was no name definition found for #{user... | 21.210526 | 81 | 0.694789 |
4a0bbf0e5a8ac2ea7969a64ea6d116fcf973670a | 540 | require "codeunion/http_client"
module CodeUnion
# Intent-revealing methods for interacting with Github with interfaces
# that aren't tied to the api calls.
class GithubAPI
def initialize(access_token)
@access_token = access_token
@http_client = HTTPClient.new("https://api.github.com")
end
... | 27 | 72 | 0.67037 |
1ddf0e88f5954c28249620886d01faf5d2af2ce4 | 278 | require 'spec_helper'
require 'elastic/stats/naive-bayes/set'
describe Elastic::Stats::NaiveBayes::Set do
subject do
Elastic::Stats::NaiveBayes::Set.new(
'transactions', 'training', 'category', 'subject'
)
end
context '#tokens' do
it 'works'
end
end
| 18.533333 | 55 | 0.676259 |
08fcf89bfe489a1f9eb1c60e7996430662b8b333 | 132 | class AddExtentToManifestation < ActiveRecord::Migration[4.2]
def change
add_column :manifestations, :extent, :text
end
end
| 22 | 61 | 0.765152 |
5db9d637721c510a69e0c623707d2df666f5731f | 1,675 | #
# Author:: Seth Chisamore (<schisamo@opscode.com>)
# Cookbook Name:: windows
# Provider:: feature_dism
#
# Copyright:: 2011, Opscode, 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
#
... | 33.5 | 133 | 0.724776 |
f84c8bdf4c9d4a0bd59223d509152ae9b121df1e | 25,528 | require 'spec_helper'
require 'token_helper'
describe ReverseXSLT do
include TokenHelper
it 'has a version number' do
expect(ReverseXSLT::VERSION).not_to be nil
end
describe '.parse_node(doc)' do
let(:for_each_node) { %q[<xsl:for-each select="//a:przeprowadza_wapolnie_podmiot/a:podmiot[not(../../../..... | 34.969863 | 202 | 0.57388 |
280f2924f3d4280cbdde2568d82fdfa762c8b64f | 788 | class OsmPbf < Formula
desc "Tools related to PBF (an alternative to XML format)"
homepage "https://wiki.openstreetmap.org/wiki/PBF_Format"
url "https://github.com/scrosby/OSM-binary/archive/v1.3.3.tar.gz"
sha256 "a109f338ce6a8438a8faae4627cd08599d0403b8977c185499de5c17b92d0798"
revision 4
bottle do
ce... | 31.52 | 92 | 0.769036 |
bf1d05e7c96b2d29f513a491c378ca24ce08d4e8 | 124 | require 'test_helper'
class ApiVersionTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| 15.5 | 46 | 0.709677 |
ed371dcfd4f5ce10c94d9e9c8d5fe4a409176bba | 397 | class RenderComponent < HyperComponent
param :component_name
param :random_key
before_update { @errors = false }
after_error do |error, info|
puts "error = #{error}"
puts "info = #{info}"
@errors = true
end
render do
return if @errors
Hyperstack::Component::ReactAPI.create_element(
... | 18.904762 | 51 | 0.65995 |
d51112be01c3d75ec3c2df218265ea2d295ea88a | 204 | class CreateReviews < ActiveRecord::Migration
def change
create_table :reviews do |t|
t.string :name
t.string :email
t.text :text
t.timestamps null: false
end
end
end
| 17 | 45 | 0.642157 |
03ac01a0abf91cdbd4a9051a99fb97b03a6d014e | 5,686 | # -*- encoding : ascii-8bit -*-
require 'test_helper'
class StateTest < Minitest::Test
include Ethereum
run_fixtures "StateTests", except: /stQuadraticComplexityTest|stMemoryStressTest|stPreCompiledContractsTransaction/
def on_fixture_test(name, data)
config_overrides = get_config_overrides(name)
chec... | 32.678161 | 166 | 0.646852 |
39136610f32d6961a7b42afaf98ebca7adac945f | 4,442 | # frozen_string_literal: true
require 'httparty'
require_relative 'api'
# https://api.darwinex.com/store/apis/info?name=DarwinInfoAPI&version=2.0&provider=admin#/
module Darwinex::Api
class InfoApi < Api
BASE_URI = 'https://api.darwinex.com/darwininfo/2.0'
base_uri BASE_URI
def initialize(config:, lo... | 31.062937 | 116 | 0.682575 |
ab073c832b3935c2bf6c9c1d4a8624910187ed8a | 1,615 | namespace :release do
desc "Release of version RELEASE_VERSION in staging of the full CTA system"
task :"cta:staging" => [:"login:staging"] do
puts "Initiating CTA release to staging"
Rake::Task["deploy:cta:staging"].invoke
end
desc "Release of the tier metadata to staging"
task :"tier_metadata:stagin... | 42.5 | 77 | 0.725077 |
d55c9ba3f74b54a86fd369cc10cd95bc820379a6 | 459 | namespace :tokens do
desc "Removes expired committee member tokens from db."
task remove_expired: :environment do
expired_tokens = CommitteeMemberToken.where("token_created_on <= ? ", (Date.today - 2.years))
expired_tokens_count = expired_tokens.count
CommitteeMemberToken.destroy(expired_tokens.map(&:id... | 45.9 | 125 | 0.766885 |
399ad54d88fa55018c41552f1aafaeba1270af3e | 430 | require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the BlogsHelper. For example:
#
# describe BlogsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# ... | 26.875 | 71 | 0.704651 |
ab627772dfa1aabfd48cbcf2ffa0e69768bd46bd | 216,918 | # WARNING ABOUT GENERATED CODE
#
# This file is generated. See the contributing guide for more information:
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
require 'seahorse/client/plugins/content_length.rb'
require 'aws-sdk-core/plugins/credentials_configuration.rb'
... | 42.658407 | 205 | 0.662398 |
4a877af134017050b528eaeaee73227c6b90b52e | 1,513 | require 'mustermann'
require 'webrick'
require 'faye/websocket'
module Pluggy
class App
attr_accessor :server, :router, :settings, :wsstack_collection
def initialize(server: Pluggy::Server, router: Pluggy::Router, route: Pluggy::Router::Route, view: Pluggy::View, matcher: Mustermann, settings: [])
@se... | 28.018519 | 151 | 0.604759 |
91de8ba6c929dc57c2278eae2b1afba1f06d5c90 | 1,292 | require 'rails_helper'
module MnoEnterprise
RSpec.describe Jpi::V1::CurrentUsersController, type: :routing do
let!(:user) { build(:user, :with_deletion_request, :with_organizations) }
routes { MnoEnterprise::Engine.routes }
it 'routes to #show' do
expect(get('/jpi/v1/current_user')).to route_t... | 38 | 138 | 0.718266 |
d5e0fc73d126d6efa6adc34735ceb0240d8a7dcb | 479 | cask :v1 => 'istat-menus' do
version :latest
sha256 :no_check
url 'http://download.bjango.com/istatmenus/'
appcast 'http://bjango.com/istatmenus/appcast/appcast2.xml',
:sha256 => '4780e5d8414c45e00e3ac792d67bd8ba0b1d59f1e9394ee1db0478352b040db2'
name 'iStats Menus'
homepage 'http://bjango.com/mac... | 34.214286 | 115 | 0.736952 |
1c89dd3cad53c769e34348f195214beb633d9293 | 343 | # frozen_string_literal: true
# Public part of posts component
class PostsController < ApplicationController
# get /posts
def index
@collection = Post.page_for_visitors(current_page)
end
# get /posts/:id-:slug
def show
@entity = Post.list_for_visitors.find_by(id: params[:id])
handle_http_404 if ... | 21.4375 | 61 | 0.731778 |
f8d825258d2bd0dbf6c7e67d97daf854398b923d | 218 | name 'code_generator'
maintainer 'Logan Koester'
maintainer_email 'logan@logankoester.com'
license 'MIT'
description 'Generates Chef code for Chef DK'
long_description 'Generates Chef code for Chef DK'
version '1.0.0'
| 27.25 | 50 | 0.802752 |
1c7facfc4c05c17a85bb44696434d1fc120f20f7 | 1,570 | # frozen_string_literal: true
module BootstrapForm
module Components
module Validation
extend ActiveSupport::Concern
private
def error?(name)
object.respond_to?(:errors) && !(name.nil? || object.errors[name].empty?)
end
def required_attribute?(obj, attribute)
retu... | 25.322581 | 81 | 0.601274 |
26804b38db8f8b3ad2824036e1c510d603053a7e | 10,325 | # frozen_string_literal: true
FactoryBot.define do
factory :merge_request, traits: [:has_internal_id] do
title { generate(:title) }
association :source_project, :repository, factory: :project
target_project { source_project }
author { source_project.creator }
# $ git log --pretty=oneline feature... | 28.133515 | 99 | 0.662567 |
21e0e945199e4a992c52488a7f31008e496db4bd | 702 | require "active_support"
require "active_support/core_ext/object/blank"
VALUES = [
nil, false, true, "", "\n", "Hello", 0, 1.25, [], [nil, false], [1, 2], {}, { colour: nil }
]
puts `ruby -v`
puts `rails -v`
puts
puts "All Values: #{VALUES}"
puts
puts "Truthy: #{VALUES.select { |v| !!v == true } }"
puts "Falsey: ... | 29.25 | 93 | 0.571225 |
bf5fce2ad25f9fa24f019c434d7ddd3fe2c4364d | 2,051 | # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# dat... | 41.857143 | 95 | 0.696246 |
61eb1ab6b972d5bf44f3cbd4b1c0e3c48e32c696 | 837 | cask "c0re100-qbittorrent" do
version "4.3.4.10"
sha256 "6fc61b87914c13bc22427dc3a3738a6279d6b56711dc65d109d15f2e45ef6b2f"
url "https://github.com/c0re100/qBittorrent-Enhanced-Edition/releases/download/release-#{version}/qBittorrent-#{version}.dmg"
name "qBittorrent Enhanced Edition"
homepage "https://github... | 29.892857 | 127 | 0.721625 |
bb864427f4f0baabb10d927aa7451c3d002a7711 | 26,387 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/contactcenterinsights/v1/resources.proto
require 'google/protobuf'
require 'google/api/field_behavior_pb'
require 'google/api/resource_pb'
require 'google/protobuf/duration_pb'
require 'google/protobuf/timestamp_pb'
require 'google/api/... | 64.515892 | 221 | 0.759768 |
1d644352e84285ee15c98112385c87a2721b175b | 5,243 | # This code lets us redefine existing Rake tasks, which is extremely
# handy for modifying existing Rails rake tasks.
# Credit for this snippet of code goes to Jeremy Kemper
# http://pastie.caboo.se/9620
unless Rake::TaskManager.methods.include?(:redefine_task)
module Rake
module TaskManager
def redefine_ta... | 35.187919 | 97 | 0.641808 |
ed11b4bc014eccb11cb118766bad71c6f188ce60 | 2,260 | class Fizz < Formula
desc "C++14 implementation of the TLS-1.3 standard"
homepage "https://github.com/facebookincubator/fizz"
url "https://github.com/facebookincubator/fizz/releases/download/v2020.12.14.00/fizz-v2020.12.14.00.tar.gz"
sha256 "e84f4b89abd6bc50f324fb39b4f2918a8b9bf171fbb8ae0b64eb8985cc40df9d"
li... | 36.451613 | 109 | 0.638496 |
7927ac47d0bfd069d446421639900583ed3c4abb | 3,144 | require "spec_helper"
describe HitList::Counter do
let(:connection) { double "connection" }
let(:name) { 'article' }
let(:days_of_interest) { 7 }
subject { described_class.new(connection, name, days_of_interest) }
before(:each) do
allow(connection).to receive(:get) { '' }
allow(connection).to recei... | 35.325843 | 124 | 0.663804 |
bbdb12ebc6c83530666307c1cceaea8665c7b904 | 4,180 | require "pathname"
require "log4r"
require "vagrant/util/platform"
require "vagrant/util/scoped_hash_override"
module VagrantPlugins
module Parallels
module Action
class ShareFolders
include Vagrant::Util::ScopedHashOverride
def initialize(app, env)
@logger = Log4r::Logger.new(... | 31.908397 | 86 | 0.549282 |
79c3e284626dec0e1b7f7d0c2ac20576f22d36e4 | 612 | module Mongoid
module Validations
module Macros
extend ActiveSupport::Concern
# Validates the size of a collection.
#
# @example
# class Person
# include Mongoid::Document
# has_many :addresses
#
# validates_collection_size_of :addresses, minimu... | 24.48 | 94 | 0.614379 |
038dbe42bd1885538febe37fe7b61097d6c69fd1 | 2,313 | require 'spec_helper'
RSpec.describe 'Bitubu integration specs' do
let(:client) { Cryptoexchange::Client.new }
let(:ltc_btc_pair) { Cryptoexchange::Models::MarketPair.new(base: 'ltc', target: 'btc', market: 'bitubu') }
it 'fetch pairs' do
pairs = client.pairs('bitubu')
expect(pairs).not_to be_empty
... | 32.577465 | 109 | 0.712495 |
91ba46129b0dadd5c0ed4714d2c1cdb881aaa68d | 1,815 | Pod::Spec.new do |s|
s.name = 'YHCommonSDK'
s.version = '1.1.1.6'
s.summary = '易惠基础组件:基础配置,项目基类。'
s.description = '修改点:新增SM4加密,SM3验签。'
s.homepage = 'https://120.42.37.94:2443/svn/APP/iOS/YHComponent/YHCommonSDK'
# s.screenshots = 'www.example.com/screenshots_1... | 43.214286 | 122 | 0.555923 |
91ee2ea8f56c687599d7e8a38e24ba3232801e86 | 1,743 | module ActionView #:nodoc:
# = Action View PathSet
#
# This class is used to store and access paths in Action View. A number of
# operations are defined so that you can search among the paths in this
# set and also perform operations on other +PathSet+ objects.
#
# A +LookupContext+ will use a +PathSet+ t... | 22.346154 | 77 | 0.602983 |
f7521e0ed28de367af459fe27ef1a9326d14d0ce | 1,077 | # install base packages
["ntp", "which", "tar", "zip", "unzip", "bzip2", "sysstat",
"autoconf", "automake", "libtool", "bison"].each do |pkg|
if (node.platform == "centos" && node.platform_version == "5.8") &&
( pkg == "git" || pkg == "git-core" )
Chef::Log.info("no git package on centos 5.8")
... | 21.117647 | 81 | 0.579387 |
28cf6613e372b9203fe30c3b4689e1dcd8e1f833 | 449 | # frozen_string_literal: true
Puppet::Type.newtype(:elasticsearch_user_roles) do
desc 'Type to model Elasticsearch user roles.'
ensurable
newparam(:name, namevar: true) do
desc 'User name.'
end
newproperty(:roles, array_matching: :all) do
desc 'Array of roles that the user should belong to.'
d... | 19.521739 | 57 | 0.699332 |
5df1db780b8d25055dcb2d0c5585eccd47367de9 | 22,068 | require 'test_helper'
class PersonTest < ActiveSupport::TestCase
fixtures :users, :people
# Replace this with your real tests.
def test_work_groups
p=Factory(:person_in_multiple_projects)
assert_equal 3,p.work_groups.size
end
def test_can_be_edited_by?
admin = Factory(:admin)
project_mana... | 30.907563 | 177 | 0.704368 |
874f2661a9b2190ad4ebdb19bc1944cdbc8b5eb5 | 2,144 | # 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::EventGrid::Mgmt::V2019_02_01_preview
module Models
#
# Information about the webhook destination for an event subscription
#
... | 28.210526 | 76 | 0.553638 |
4a852501741556c8dc5f6b4dda0ff1b40766fbe4 | 2,303 | # -*- encoding: utf-8 -*-
# stub: rake 12.3.3 ruby lib
Gem::Specification.new do |s|
s.name = "rake".freeze
s.version = "12.3.3"
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.2".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Hiroshi SHIBATA".... | 52.340909 | 613 | 0.699088 |
6214aa565af8323bf8f407bd358579711430c45d | 500 | class Rfc < Formula
desc "Bash tool to read RFCs from the command-line"
homepage "https://github.com/bfontaine/rfc#readme"
url "https://github.com/bfontaine/rfc/archive/v0.2.6.tar.gz"
sha256 "724c47827ff1009359919a6fbdc9bb73d35c553546173f65058febca722f9931"
head "https://github.com/bfontaine/rfc.git"
def ... | 26.315789 | 75 | 0.716 |
21490f993c7fcfe127f7c61cc1dd9d2164553669 | 3,617 | # frozen_string_literal: true
require 'spec_helper'
RSpec.describe Security::CiConfiguration::SastParserService do
describe '#configuration' do
include_context 'read ci configuration for sast enabled project'
let(:configuration) { described_class.new(project).configuration }
let(:secure_analyzers_prefi... | 46.974026 | 123 | 0.679845 |
7a707a39bfa3c29dfc3ee474897efb1b3117a638 | 216 | require 'airbrake/sidekiq'
warn "DEPRECATION WARNING: Requiring 'airbrake/sidekiq/error_handler' is " \
"deprecated and will be removed in the next MAJOR release. Require " \
"'airbrake/sidekiq' instead."
| 36 | 76 | 0.736111 |
e23fe7c03503651a932dc83bca093c9531a46453 | 1,492 | # frozen_string_literal: true
# WARNING ABOUT GENERATED CODE
#
# This file is generated. See the contributing guide for more information:
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
require 'aws-sdk-core'
require 'aws-sigv4'
require_relative 'aws-sdk-persona... | 27.62963 | 93 | 0.763405 |
26ba5a53f7b48a3b4cc212df611170c87b97e556 | 663 |
Pod::Spec.new do |s|
s.name = "RNZeroconf"
s.version = "1.0.0"
s.summary = "RNZeroconf"
s.description = "A Zeroconf discovery utility for react-native"
s.homepage = "https://github.com/balthazar/react-native-zeroconf"
s.license = "MIT"
# s.license = { :type => "MIT", :fil... | 30.136364 | 105 | 0.579186 |
6a7153241cf6260672e063f800bc4e26c8740cff | 4,413 | # Copyright © 2011-2019 MUSC Foundation for Research Development
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this list... | 45.030612 | 163 | 0.744845 |
ff36a9d82c0f49256dc2e9f638a431c75fcadb4d | 422 | module SignInHelpers
def sign_in(user)
visit '/admin/users/sign_in'
fill_in 'Email', :with => user.email
fill_in 'Password', :with => 'password'
click_button 'Sign in'
page.should have_content("Du er nu logget ind.")
end
def sign_out
click_link 'Sign out'
page.should have_content("Du ... | 22.210526 | 52 | 0.680095 |
ede39a23d3df6dbd8228a4708e1f018baea33210 | 168 | class AddAncestryToMicroposts < ActiveRecord::Migration[5.0]
def change
add_column :microposts, :ancestry, :string
add_index :microposts, :ancestry
end
end
| 24 | 60 | 0.755952 |
b9f32eb8a110337a7621cdd7c58e6fb75dee3a3c | 243 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
module Azure end
module Azure::Serialconsole end
module Azure::Serialconsole::Mgmt end
| 34.714286 | 94 | 0.802469 |
6135e308d63459f37f9e57d8da5407ebe73dd057 | 1,320 | # frozen_string_literal: true
module Codebreaker
module Validation
def check_user_name(name)
check_type(name, String)
check_name_length(name)
end
def check_guess_code(code)
check_code_length(code)
check_code_value(code)
end
def check_type(object, expected_class)
ra... | 33 | 108 | 0.625758 |
622852cc44275ef411211a6d89296b058f37a813 | 2,130 | module Powertools::HistoryTracker
extend ActiveSupport::Concern
included do
if defined? self.has_many
attr_accessor :pt_changes
has_many :histories, as: :associated, class_name: 'PtHistory'
has_many :histories_without_scope, as: :trackable, class_name: 'PtHistory'
after_update :set_pt_c... | 32.769231 | 97 | 0.700939 |
331ea8d135d46ffa414f05210675f3837f9e8545 | 436 | require ('sinatra')
require ('sinatra/reloader')
require('./lib/stylist')
require('./lib/client')
require('pg')
also_reload('lib/**/*.rb')
get('/') do
@stylists = Stylist.all()
erb(:index)
end
# get('/stylist') do
# @stylists = Stylist.all()
# erb(:stylist)
# end
post('/new_stylist') do
name = params.fetc... | 16.769231 | 56 | 0.62844 |
33f4aa67de0b6118b7a255368a16b27de0bd9a2d | 379 | module LifxFaraday
class Light
include Api::Connection.new LifxFaraday::API
def initialize(selector: 'all')
@selector = selector
end
def set_state(state_options)
raise 'needs a selector' unless selector && selector.to_s != ''
connection.put "lights/#{selector}/state", state_options... | 19.947368 | 69 | 0.6781 |
62231c2361a8653dd99dbc6827833a3e29021ac5 | 1,254 | class E2fsprogs < Formula
desc "Utilities for the ext2, ext3, and ext4 file systems"
homepage "https://e2fsprogs.sourceforge.io/"
url "https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.44.3/e2fsprogs-1.44.3.tar.gz"
sha256 "c2ae6d8ce6fb96b55886cf761411fc22ab41976f4f8297fc54c706df442483be"
head "... | 38 | 101 | 0.753589 |
114d4af49215168722bec4a39a6ef6e4823499ea | 802 | Given /^the following manage_searches:$/ do |manage_searches|
ManageSearch.create!(manage_searches.hashes)
end
When /^I delete the (\d+)(?:st|nd|rd|th) manage_search$/ do |pos|
visit manage_searches_path
within("table tr:nth-child(#{pos.to_i+1})") do
click_link "Destroy"
end
end
Given /^I redirect to the ... | 25.0625 | 88 | 0.733167 |
28e265dbf574d74a8918cfb0b3f111f6c6f84829 | 1,096 | require 'rails_helper'
RSpec.describe Variant, type: :model do
let(:product) { create(:product) }
let(:variant) { product.variants.create(price: 100) }
describe 'create variant' do
before { product.variants.create(price: 100) }
it 'adds new variant' do
expect(product.variants.count).to eq(2)
... | 23.826087 | 64 | 0.671533 |
1ca0c02760652de7ce79d8874de36ce912119b43 | 763 | class Scrape
# Scrapes a given webpage and returns a Nokogiri instance
# filtered according to a CSS selector string
# .scrape_page : (String, String) -> Nokogiri: instance
def self.scrape_page(url, css)
html = HTTParty.get(url)
scraped_page = Nokogiri::HTML(html)
scraped_page.css(css)
end
# Give... | 29.346154 | 76 | 0.647444 |
ab807278314157568a4de8666811731fac90a302 | 52 | module TransamReporting
VERSION = "2.17.0-rc"
end
| 13 | 23 | 0.730769 |
e21734724f8816ad1cbd140a146488495ce687ce | 1,216 | # -*- encoding: utf-8 -*-
# stub: irb 1.4.1 ruby lib
Gem::Specification.new do |s|
s.name = "irb".freeze
s.version = "1.4.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Keiju ISHITSUKA".freeze]
... | 34.742857 | 112 | 0.686678 |
d54cc5221c6a0aacfd6386f5c89b8aefc238c69b | 589 | $:.push File.expand_path("lib", __dir__)
# Maintain your gem's version:
require "sandbox_mail/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "sandbox_mail"
s.version = SandboxMail::VERSION
s.authors = ["Yuji Yaginuma"]
s.email = ["yuuji.y... | 28.047619 | 83 | 0.65365 |
18f28ce8cf9789d609aec42c38c327a015f4baf0 | 712 | class OpenshiftClient < Formula
desc "Red Hat OpenShift command-line interface tool"
homepage "https://www.openshift.com/"
license "Apache-2.0"
if OS.mac?
url "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.9.10/openshift-client-mac-4.9.10.tar.gz"
sha256 "141bd92e16e210db41823f53c15e30b970c3... | 30.956522 | 111 | 0.75 |
1121f5571ec043979f9ffdf692c0ce1fdd5ebea8 | 66 | require_relative '../config/environment'
module H4ck3rReader
end
| 13.2 | 40 | 0.818182 |
ed00d4765971e1891dbffb12b9dd5ed2ef8b64b2 | 345 | cask :v1 => 'font-angkor' do
version '3.10'
sha256 '9435dde7754d90813e017217c7143b92b9cfd7906926cc7c7ee6bd7a0ebb4ea1'
url 'https://googlefontdirectory.googlecode.com/hg-history/67342bc472599b4c32201ee4a002fe59a6447a42/ofl/angkor/Angkor.ttf'
homepage 'http://www.google.com/fonts/specimen/Angkor'
license :ofl
... | 31.363636 | 124 | 0.794203 |
035b900051dfe68ebe5488934f7fc4757158a3de | 5,208 | require 'rails_helper'
RSpec.describe 'When I visit auditorium index', type: :feature do
it 'I can view all information for a selected auditorium' do
Auditorium.destroy_all
auditorium_1 = Auditorium.create( name: "East 1",
capacity: 100,
... | 38.577778 | 76 | 0.52957 |
7a3f6fe828d8c0efb88346d31ac0146c66004453 | 483 | require 'ar_finder_form/attr'
module ArFinderForm
module Attr
class Static < Base
attr_reader :values
def initialize(column, name, values, options)
super(column, name, options)
@values = values || {}
end
def setup
# do nothing
end
def build(context)
... | 19.32 | 57 | 0.569358 |
08f22f2f10b32343af0cb24567b3bfb3a95780be | 784 | class HousesController < ApplicationController
include ApplicationHelper
before_action :authenticate_and_set_user
def create
house = House.create!(post_params)
if house
render json: {
status: :created,
image_url: house.url
}
else
render json: house.errors, status: :... | 17.818182 | 62 | 0.632653 |
18a2fc6f6dfb109b456d5d368975615912173ff1 | 1,213 | lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'fidor_api/version'
Gem::Specification.new do |spec|
spec.name = 'fidor_api'
spec.version = FidorApi::VERSION
spec.authors = ['Fidor Solutions AG']
spec.email = ['connect@fidor.co... | 39.129032 | 74 | 0.657049 |
112372dcca1e20c983a64246916c7826adbfbea4 | 2,136 | # frozen_string_literal: true
require 'spec_helper'
require 'aca_entities/medicaid/contracts/medicaid_magi_income_eligibility_basis_contract'
RSpec.describe ::AcaEntities::Medicaid::Contracts::MedicaidMagiIncomeEligibilityBasisContract, dbclean: :after_each do
let(:required_params) do
{
status_code: "Com... | 28.105263 | 118 | 0.649345 |
ac80e31ce15b4b8d06c9eb003e5f706331a6d724 | 1,031 | require "formula"
class Librem < Formula
homepage "http://www.creytiv.com"
url "http://www.creytiv.com/pub/rem-0.4.6.tar.gz"
sha1 "9698b48aee5e720e56440f4c660d8bd4dbb7f8fa"
bottle do
cellar :any
sha1 "e1089e53d13bd264d8a6b95cce0401c7ae5b6aed" => :mavericks
sha1 "8da4a993fa287e444b649b045fdfb48718b... | 27.864865 | 69 | 0.599418 |
d5ca56aae26ef68737b4169f6f4d221f2c07d46c | 2,878 | =begin
This file is part of MAMBO, a low-overhead dynamic binary modification tool:
https://github.com/beehive-lab/mambo
Copyright 2013-2016 Cosmin Gorgovan <cosmin at linux-geek dot org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | 27.673077 | 85 | 0.649757 |
ff456daa73d71ef44098ee19d91212ec138915d4 | 7,228 | require "test_helper"
require "shrine/plugins/entity"
describe Shrine::Plugins::Entity do
before do
@attacher = attacher { plugin :entity }
@shrine = @attacher.shrine_class
@entity_class = entity_class(:file_data)
end
describe "Attachment" do
describe ".<name>_attacher" do
it "returns a... | 27.907336 | 85 | 0.643331 |
79c4a96bd454d7f50c47dd2a87b49a449a027808 | 1,605 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 47.205882 | 72 | 0.778816 |
6a4fc7813265c5d7ca25fb6ee62d0c9323f51e9a | 164 | # Provide some default implementations of these to make life easier
class Wx::DataObjectSimple
def get_data_size(format)
get_data_here(format).size
end
end
| 23.428571 | 67 | 0.792683 |
61095ad51f178153a3751cc0a49bde01bfe387d4 | 4,972 | class ErlangAT18 < Formula
desc "Programming language for highly scalable real-time systems"
homepage "https://www.erlang.org/"
url "https://github.com/erlang/otp/archive/OTP-18.3.4.9.tar.gz"
sha256 "25ef8ba3824cb726c4830abf32c2a2967925b1e33a8e8851dba596e933e2689a"
bottle do
cellar :any
sha256 "35ca0... | 37.954198 | 117 | 0.709574 |
332e540a386874d220b49a5d275e3c0116b7ba0d | 4,628 | require 'rails_helper'
RSpec.describe EphemeraProjectsController, type: :controller do
let(:valid_attributes) { { name: "Test Project" } }
let(:invalid_attributes) { { name: nil } }
let(:user) { FactoryGirl.create(:admin) }
before do
sign_in user
end
describe "GET #index" do
it "assigns all ephem... | 37.024 | 100 | 0.705704 |
390cb73895abb2ce349e982f5f615ad7999d8ece | 2,789 | require 'economic/entity'
module Economic
# Represents an account.
#
# API documentation: http://e-conomic.github.com/eco-api-sdk-ref-docs/Documentation/
#
# Examples
#
# # Find account
# account = economic.accounts.find(1000)
#
# # Creating an account
# account = economic.accounts.build... | 31.337079 | 141 | 0.657583 |
f8279f10d6474d7e712cb1d2d82e59fb315864a7 | 2,079 | require_relative "env"
module CypressRails
class Config
attr_accessor :dir,
:host,
:port,
:base_path,
:transactional_server,
:cypress_cli_opts,
:cypress_path,
:cypress_base_url,
... | 37.125 | 107 | 0.589226 |
5d4e579c6abf6dda20e76f5c7749d63f846953f0 | 507 | module ApplicationHelper
# Mapping from devise flast type to corresponding bootstrap class
def bootstrap_class_for(flash_type)
if flash_type == "success"
return "alert-success" # Green
elsif flash_type == "error"
return "alert-danger" # Red
elsif flash_type == "alert"... | 26.684211 | 67 | 0.609467 |
28247da7d66eb72e399d2a26db459f8259689c79 | 6,235 | module Elastic
module API
module Actions
# Return documents similar to the specified one.
#
# Performs a `more_like_this` query with the specified document as the input.
#
# @example Search for similar documents using the `title` property of document `myindex/mytype/1`
#
... | 48.333333 | 122 | 0.561508 |
f821a9021302f7d9f3a8932b95d3180fb559287d | 1,843 | #-- copyright
# OpenProject is a project management system.
# Copyright (C) 2012-2018 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 ... | 34.773585 | 91 | 0.716224 |
ff54bc951af68b93c43d818fa349ff664f4a16b1 | 773 | module VagrantPlugins
module Vmck
class Plugin < Vagrant.plugin('2')
name "Vmck"
config :vmck, :provider do
require_relative 'config'
Config
end
provider :vmck do
setup_logging
require_relative 'provider'
Provider
end
def self.setup_... | 18.853659 | 60 | 0.552393 |
fffe99ff1f9b5a44687c95d616c440715024e240 | 422 | require_relative '../../support/feature_helper'
describe "NPM Dependencies" do
# As a Node developer
# I want to be able to manage NPM dependencies
let(:node_developer) { LicenseFinder::TestingDSL::User.new }
specify "are shown in reports" do
LicenseFinder::TestingDSL::NpmProject.create
node_develope... | 28.133333 | 70 | 0.748815 |
1a7e7a672533be6ae73eb57aab1a3248b3c4108e | 211 | class CreateShows < ActiveRecord::Migration
def change
create_table :shows do |t|
t.string :date
t.integer :venue_id
t.string :url
t.timestamps null: false
end
end
end
| 17.583333 | 43 | 0.625592 |
08644777919d3456d5d35b92dc4ce3070b4a4046 | 524 | module VueCli
module Rails
module Helper
def vue_entry(entry)
assets = VueCli::Rails::Configuration.instance.entry_assets(entry)
raise(ArgumentError, "Vue entry (#{entry}) not found!") if assets.blank?
tags = ''.dup
(assets['css'] || []).each do |css|
tags << %{<li... | 26.2 | 80 | 0.534351 |
26bb09b8fbd7c99fccd2c79d09d09ba7ae43ab99 | 509 | class Admin::PetitionDepartmentsController < Admin::AdminController
before_action :fetch_petition
def show
render 'admin/petitions/show'
end
def update
if @petition.update(petition_params)
redirect_to [:admin, @petition], notice: :petition_updated
else
render 'admin/petitions/show'
... | 19.576923 | 67 | 0.719057 |
1a41f9dbeb6929e72fbdbf571e113fae9c00103d | 593 | require 'spec_helper'
describe "member_agents_nodes_photo_spot", type: :feature, dbscope: :example do
let(:site) { cms_site }
let(:layout) { create_cms_layout }
let(:node) { create :member_node_photo_spot, layout_id: layout.id, filename: "node" }
context "public" do
let!(:item) { create :member_photo_... | 26.954545 | 89 | 0.667791 |
33f15b3bad41d4a1664e6b4c04e935cde156cc38 | 1,149 | class Game
attr_gtk
def method1 num
method2 num
end
def method2 num
method3 num
end
def method3 num
method4 num
end
def method4 num
if num == 1
puts "UNLUCKY #{num}."
state.unlucky_count += 1
if state.unlucky_count > 3
raise "NAT 1 finally occurred. Check ap... | 21.277778 | 94 | 0.604003 |
f7d4516191ef505efd3f93a204081a529f35c3f9 | 40 | module Mailtime
VERSION = "0.0.1"
end
| 10 | 19 | 0.675 |
6a7dae642ece6687d78903f4fc6822849232cd33 | 2,433 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.requi... | 42.684211 | 99 | 0.728319 |
285b35fefcaf2b0a38f6a5f6f49c0d1e8a0e8909 | 2,906 | # frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'layouts/nav/sidebar/_admin' do
shared_examples 'page has active tab' do |title|
it "activates #{title} tab" do
render
expect(rendered).to have_selector('.nav-sidebar .sidebar-top-level-items > li.active', count: 1)
expect(ren... | 26.418182 | 102 | 0.694425 |
7a5d0c0ad2a54dfbbc7f9233af8c202f532d55d8 | 1,736 | require 'spec_helper'
describe Ravelin::Order do
describe '#items=' do
let(:order) { described_class.new(order_id: 1, items: items, status: { stage: 'cancelled', reason: 'buyer' }) }
context 'argument not an array' do
let(:items) { 'a string' }
it 'raises ArgumentError' do
expect { orde... | 28.933333 | 115 | 0.607143 |
2121b5dc1e30e4953e531054725346ff06a9d6c3 | 12,711 | # Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmat... | 48.888462 | 154 | 0.74998 |
ffc320fd3bd043040b8faf400f0e327c46143b17 | 1,355 | module SimpleGdrive
# Uploads file
class Uploader < Base
FOLDER_MIME_TYPE = 'application/vnd.google-apps.folder'.freeze
OPTIONS = {retries: 5}.freeze
def initialize(base_folder_id:)
@base_folder_id = base_folder_id
end
def call(full_filename, upload_source, content_type:, mime_type: nil)... | 24.636364 | 108 | 0.64428 |
f76ed18d7181d028cb1eae62e77efee51f3292cd | 220 | require "spec_helper"
describe HonorificPrefixable do
it "has a version number" do
expect(HonorificPrefixable::VERSION).not_to be nil
end
it "does something useful" do
expect(false).to eq(true)
end
end
| 18.333333 | 54 | 0.736364 |
6a230b422f853280f2c8f481c8bc4c4b5d849eb9 | 2,558 | require 'spec_helper'
RSpec.describe Steps::Details::HasRepresentativeForm do
let(:arguments) { {
tribunal_case: tribunal_case,
has_representative: has_representative
} }
let(:tribunal_case) { instance_double(TribunalCase, has_representative: nil) }
let(:has_representative) { nil }
subject { describ... | 30.452381 | 80 | 0.667318 |
e90105541ea195743da595dae904a359cdd5c498 | 2,185 | # coding: utf-8
require 'spec_helper'
describe ActiveInteraction::InputProcessor do
describe '.reserved?(name)' do
it 'returns true for anything starting with "_interaction_"' do
expect(described_class.reserved?('_interaction_')).to be_truthy
end
# rubocop:disable Metrics/LineLength
it 'retur... | 25.705882 | 92 | 0.587643 |
62f2cb81a71b344ea5588f49f2290a2095e3d84d | 1,020 | # Copyright:: Copyright (c) 2015 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | 40.8 | 74 | 0.767647 |
f765c8dcefbc1dbac3a78ba4edfc4bf9d8ae54a2 | 100 | # frozen_string_literal: true
module RgGen
module PluginTemplate
VERSION = '0.1.0'
end
end
| 12.5 | 29 | 0.72 |
264043cd0230b8cbf7bdf0ee3b5af045274796a6 | 144 | require 'simplecov'
SimpleCov.start
RSpec.configure do |config|
config.color = true
end
Dir['./spec/support/**/*.rb'].each { |f| require f } | 18 | 52 | 0.6875 |
1cb94a6fa0f98f88bb7b9362d7ca04dd352ddec0 | 2,130 | require 'active_support/core_ext/integer/time'
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is 'scratch space' for the test suite and is wiped
# and recreated between test runs. Don't rely on the data the... | 38.035714 | 85 | 0.778873 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.