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
bbe36b27476dbde080c946765c420f6e5377ca4e
688
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "piggybak_variants/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "piggybak_variants" s.version = PiggybakVariants::VERSION s.authors = ["Tim Case, Steph Skardal"...
32.761905
86
0.665698
ac58a0a50116c4c0958ea6b38f6dc590c231aceb
628
cask 'flash-player' do version '31.0.0.153' sha256 '6a34978100dabdbb8653e9e9d707adb196f2300d4a7caacb8df1fc11770c2d1e' url "https://fpdownload.adobe.com/pub/flashplayer/updaters/#{version.major}/flashplayer_#{version.major}_sa.dmg" appcast 'https://fpdownload.adobe.com/pub/flashplayer/update/current/xml/version...
36.941176
114
0.727707
ff491f13ffd7b11cd34a952f8bebb81b6a883a8a
908
Pod::Spec.new do |s| s.name = 'Hyperconnectivity' s.version = '1.1.0' s.swift_version = '5.0' s.summary = 'Modern replacement for Apple\'s Reachability written in Swift and made elegant using Combine' s.description = <<-DESC Hyperconnectivity provides Internet connectiv...
50.444444
117
0.623348
2644abcc468547ac142da258fd9c49d2549b1099
965
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'cocoapods-dependManager/gem_version.rb' Gem::Specification.new do |spec| spec.name = 'cocoapods-dependManager' spec.version = CocoapodsDependmanager::VERSION spec.authors ...
38.6
75
0.672539
b95e642749edce8bc077c19dd47e608e05029c33
6,488
# frozen_string_literal: true require_relative '../spec_helper' RSpec.shared_examples 'installs successfully using pip' do it 'installs successfully using pip' do app.deploy do |app| expect(app.output).to include('Installing requirements with pip') expect(app.output).to include('Successfully install...
41.324841
118
0.657676
b991b8a53e2322644692e6c5d196bde6ea947c25
110
## # IndexError ISO Test assert('IndexError', '15.2.33') do assert_equal Class, IndexError.class end
15.714286
39
0.681818
794e69443bc77abc62517a5f51e7f24edf2924a7
872
class SessionsController < ApplicationController def new end def create user = User.find_by(email: params[:session][:email].downcase) if user && user.authenticate(params[:session][:password]) if user.activated? log_in user params[:session][:remember_me] == '1' ? remember(user) : f...
26.424242
79
0.629587
33e4460f626dad64e8c2c39e49bc4a45dd38a51d
1,677
describe Solargraph::Pin::Attribute do it "is a kind of attribute/property" do source = Solargraph::Source.load_string(%( class Foo attr_reader :bar end )) map = Solargraph::SourceMap.map(source) pin = map.pins.select{|p| p.kind == Solargraph::Pin::ATTRIBUTE}.first expect(pin)....
38.113636
108
0.674419
38238ee3cdf5e3f46b7816dfa2cd577fc1f08587
225
# Example: # require "client_library" module TerraspacePluginGitlab module Clients extend Memoist # Example: # def client_resource # ClientResource.new # end # memoize :client_resource end end
15
30
0.688889
114f438c50c7bc608cb356ecf5b19a052ece681f
747
cask "font-sarasa-gothic" do version "0.34.7" sha256 "b307c09577231edda407de67cc6cef155348ff9f3232404c8ad8fca01644e11b" url "https://github.com/be5invis/Sarasa-Gothic/releases/download/v#{version}/sarasa-gothic-ttc-#{version}.7z" name "Sarasa Gothic" name "更纱黑体" name "更紗黑體" name "更紗ゴシック" name "사라사고딕" ...
29.88
111
0.745649
e22f55ef9886d75de4d43f2bf48d39684ef5eec8
548
module NumbersAndWords module Strategies module ArrayJoiner module Languages class Base include Languages::Families::Base attr_accessor :strategy, :elements, :translations, :strings, :options def initialize strategy @strategy = strategy @elemen...
21.92
79
0.580292
910dbd22f15123404140830dcd78514b9fc96e25
4,073
open_regex = /^You open|^That is already open\.$|^There doesn't seem to be any way to do that\.$|^What were you referring to\?|^I could not find what you were referring to\./ get_regex = /^You (?:shield the opening of .*? from view as you |discreetly |carefully |deftly )?(?:remove|draw|grab|reach|slip|tuck|retrieve|alr...
58.185714
520
0.669286
d534d7fa8a0aba43ab933cdecc03987ba66a3eb1
273
class CreateFoods < ActiveRecord::Migration[6.1] def change create_table :foods do |t| t.string :name t.integer :calories t.integer :protein t.integer :fat t.integer :carb t.float :servinginoz t.timestamps end end end
18.2
48
0.622711
4a56c5129b79cc32dbfe93973c740ca9a6a9a23c
1,342
# encoding: utf-8 class ProfileUploader < CarrierWave::Uploader::Base # Include RMagick or MiniMagick support: # include CarrierWave::RMagick # include CarrierWave::MiniMagick # Choose what kind of storage to use for this uploader: # storage :file # storage :fog # Override the directory where uploaded...
27.387755
81
0.69225
bbfd215567ed8231ce446ccd559048fd79c501c8
413
cask 'google-earth-web-plugin' do version :latest sha256 :no_check url 'http://r2---sn-po4vapo3-j3ae.c.pack.google.com/edgedl/earth/plugin/current/googleearth-mac-plugin-intel.dmg' name 'Google Earth plug-in' homepage 'https://www.google.com/intl/en/earth/explore/products/plugin.html' license :gratis pk...
29.5
115
0.755448
e9d673440af8a9bb321c79de57aefa7ca31d0387
17,178
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
36.012579
156
0.651124
792c2c91cb956e5e4c47768de0061395527da93b
184
# The controller to hand the /Schedule requests. class ScheduleController < ApplicationController before_action :valid_patient_check def index get_fhir("/Schedule") end end
20.444444
48
0.782609
d5590b0f357697f287f066da179ed97a919b8479
3,779
# coding: utf-8 require 'test_helper' describe "JSON Parsing" do TESTS = { %q({"data": "G\u00fcnter"}) => {"data" => "Günter"}, %q({"html": "\u003Cdiv\\u003E"}) => {"html" => "<div>"}, %q({"returnTo":{"\/categories":"\/"}}) => {"returnTo" => {"/categories" => "/"}}, ...
41.076087
188
0.463879
ac8c93628c3fbbf2dd209cf67a1426ab85afc9eb
504
# frozen_string_literal: true class ApplicationController < ActionController::Base before_action :configure_permitted_parameters, if: :devise_controller? protected def configure_permitted_parameters devise_parameter_sanitizer.permit(:sign_up, keys: %i[fullname mobile_no address]) devise_parameter_sanit...
28
92
0.791667
38ba924b9f3b96bac47eb2297934859052dfe52d
1,849
# frozen_string_literal: true require 'git_snip/printer' RSpec.describe GitSnip::Printer do [ [:force_option_needed, '-f option is needed to delete branches.', :red], [:deleting_branches, "Deleting the following branches...\n\n", :green], [:no_branches_deleted, 'No branches were deleted.', :green], ...
33.017857
82
0.636019
1cbd10309d198666d5cbfc307a5b2bb1668f3ea6
810
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "action_bouncer/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "action_bouncer" s.version = ActionBouncer::VERSION s.authors = ["Oswaldo Ferreira"] s.email ...
32.4
89
0.7
d5944ee64d945929f60ec3835a306f4183d74624
1,064
require_relative 'boot' require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module RubyxWebpage class Application < Rails::App...
34.322581
82
0.716165
e937c5e0786aa9f921f708bb96398a6632e2945f
1,501
# # Be sure to run `pod lib lint PersistentValue.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'Per...
42.885714
128
0.65956
e22a5880718c0eaeae9908324713261cb95ded7a
20,578
require 'test_helper' describe BrBoleto::Conta::Caixa do subject { FactoryGirl.build(:conta_caixa) } it "deve herdar de Conta::Base" do subject.class.superclass.must_equal BrBoleto::Conta::Base end context "valores padrões" do it "deve setar a carteira da carteira com 14'" do subject.class.new.carteira.mu...
62.737805
183
0.738507
ed75fab1aff3b31cf0d44761b603ce2b982b112c
1,165
class BoardsController < ApplicationController before_filter :authorize skip_before_action :verify_authenticity_token def new @board = Board.new render json: @board end def index @boards = Board.all.where("user_id = ?", User.current_user.id) render json: @boards end def create @bo...
19.745763
87
0.650644
2164f9ef248dc92a20100a1217444c8a549ff4d0
1,725
require_relative '../mikrotik_api' Puppet::Type.type(:mikrotik_tool_netwatch).provide(:mikrotik_api, :parent => Puppet::Provider::Mikrotik_Api) do confine :feature => :mtik mk_resource_methods def self.instances watches = Puppet::Provider::Mikrotik_Api::get_all("/tool/netwatch") instances = watch...
29.237288
111
0.608116
abe8419d565a229188a624fa251d13252f3edbdd
303
class Admin::BlogPostsCustomNewAndEditController < ApplicationController layout 'admin' admin_assistant_for BlogPost do |a| a.actions :index, :show, :destroy end def new render :text => 'custom form for new' end def edit render :text => 'custom form for edit' end end
18.9375
72
0.689769
1ce91655f3138088466e268d55be7077723c5fb1
291
require 'stringio' require 'zlib' describe "Zlib::GzipWriter#<<" do before :each do @io = StringIO.new end it "returns self" do Zlib::GzipWriter.wrap @io do |gzio| (gzio << "test").should equal(gzio) end end it "needs to be reviewed for spec completeness" end
17.117647
49
0.649485
1caa0a9187c09f8658fdf952b58eabd65d7dbd0a
13,242
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. require 'azure_mgmt_peering' module Azure::Peering::Profiles::Latest module Mgmt LegacyPeerings = Azure::Peering::Mgmt::V2019_08_01_preview::LegacyPeerings ...
48.863469
255
0.738786
ff9e9c9068ab4f4bf30987098e195c6f12a5a302
499
# 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.375
174
0.833667
333b35a2d9c51a4f4561f1f664b5de60a6ae9236
445
# frozen_string_literal: true class User attr_reader :attributes def initialize @attributes = {} end def method_missing(name, *args, &block) if name.end_with?("=") @attributes[name.to_s[0..-2].to_sym] = args.first else @attributes[name] end end def respond_to?(name) true ...
15.344828
55
0.660674
7987fe4614917832b363532ba6bee583259b52b8
49
module ImBoredCliProject VERSION = "0.1.0" end
12.25
24
0.734694
1dd828747a600716579e8775270cfd52bd731b8e
1,616
# Copyright (c) Universidade Federal Fluminense (UFF). # This file is part of SAPOS. Please, consult the license terms in the LICENSE file. # Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :role do sequence :name do |name| "Role_#{name}" end sequence...
31.686275
96
0.67698
b99fb3a99a77f9536be02360ba9238d90be98417
1,558
class OfficerAssignment < ApplicationRecord belongs_to :account belongs_to :officer belongs_to :user attr_accessor :start_date_str, :end_date_str scope :active, ->{ where(arel_table[:end_date].eq(nil).or(arel_table[:end_date].gteq(Time.now))) } scope :inactive, ->{ where(arel_table[:end_date].lt(Time...
28.851852
103
0.665597
624d01a196bbd1bb0d0d95a65a19899eb3872fbe
1,325
# # Be sure to run `pod lib lint RubyCore.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'RubyCore' ...
37.857143
103
0.639245
f747525eed8bd99360fe01d35cc7a1609c7d304c
266
# frozen_string_literal: true require "#{File.dirname(__FILE__)}/../../test_helper" module BlogEngine class ImageTest < ActiveSupport::TestCase fixtures :images # Replace this with your real tests. def test_truth assert true end end end
17.733333
53
0.703008
ab393c304cf1a33fca4c01483588526073ab4c73
108
require 'rubygems' require 'redis' $TESTING = true $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
27
57
0.694444
5da9db83a8e3a1fcaeffba544bae52c5e15a528b
5,020
# # Be sure to run `pod spec lint ownspec.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://github.com...
36.376812
93
0.587849
1ad6879df327d0da182955f5a1e343ce1647bdb9
1,328
# frozen_string_literal: true require 'jekyll' require 'jekyll-fa-icons/version' # TODO : # * deal with other tags like color, etc. # * make DEFAULT_ICONS configurable from _config.yaml / Jekyll.configuration({}) class FontAwesomeIcons < Liquid::Tag DEFAULT_ICONS = { 'gh' => 'fab fa-brands fa-github', ...
31.619048
82
0.558735
62d250f50508fb87bf702e5e273575f9bd4cc0c0
45
module TestRedditkit VERSION = "0.0.1" end
11.25
20
0.711111
03f675b690c754e58f9f344f2e4dd98be42d4dbe
16,468
# encoding: utf-8 # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. require 'azure_mgmt_machine_learning_services' module Azure::Profiles::Latest module MachineLearningServices module Mgmt Operations =...
56.013605
156
0.716723
2177d9ae74d2fac6728899a49f39e360065a9b76
430
cask 'robofont' do version '3.1' sha256 '82e03426bcae68c0712b6733f177c1f5b4376508eee67836be1729dbbc7ca77e' # static.typemytype.com/robofont was verified as official when first introduced to the cask url 'http://static.typemytype.com/robofont/RoboFont.dmg' appcast 'https://doc.robofont.com/appcast.xml' name...
28.666667
93
0.760465
4a6fc84828b35beffa52b2670aebf41115a8c492
2,062
module Prawn module AutoLayout class FrameLayouter def initialize(document, &block) @document = document @contents = block end def layout(bounds) within_bounding_box(bounds) do do_layout(bounds) end end private def do_layout(bounds)...
19.271028
99
0.587779
877641a5509dddd63eceae8e7d4688cda2baeaa0
9,288
require 'addressable' require 'active_support/core_ext/object/try' require 'active_support/core_ext/module/attribute_accessors' require 'cdo/aws/s3' require 'honeybadger' # # BucketHelper # class BucketHelper cattr_accessor :s3 def initialize(bucket, base_dir) @bucket = bucket @base_dir = base_dir se...
38.222222
173
0.725345
f8e3f35aa45dbf598f4ff9b8c33823de34289a67
206
require 'uri' require 'date' module Postmates module Utils def urlify(href) URI(href) if href end def timeify(timestamp) DateTime.iso8601 timestamp if timestamp end end end
14.714286
45
0.674757
ffaab0701c4b88f0e2119970957e53038670ee71
168
class AddExpenseItemMaxPerRegistrant < ActiveRecord::Migration[4.2] def change add_column :expense_items, :maximum_per_registrant, :integer, default: 0 end end
28
76
0.791667
875aa386feb33a18bbb4ac280f51c34fa4cc8940
419
# frozen_string_literal: true module Shrink module Wrap module Transformer class Base ATTRIBUTES = %i[ options ].freeze attr_accessor(*ATTRIBUTES) def initialize(opts = {}) self.options = opts end def transform(_input) raise N...
17.458333
75
0.577566
1853564cfca8bb729cdfaa96c5d94c51b22e01be
5,776
module Erp::Deliveries class Delivery < ApplicationRecord belongs_to :creator, class_name: "Erp::User" belongs_to :employee, class_name: "Erp::User" if Erp::Core.available?("orders") after_save :order_update_cache_delivery_status belongs_to :order, class_name: "Erp::Orders::Order" #...
27.504762
157
0.599377
61f25e54acf905bad48cecb706f83dfff4c4a904
1,659
# frozen_string_literal: true require_relative "lib/ruby_mal_client/version" Gem::Specification.new do |spec| spec.name = "ruby_mal_client" spec.version = RubyMalClient::VERSION spec.authors = ["Miguel Pat"] spec.email = ["miguel.pat.dev@gmail.com"] spec.summary = "Ruby c...
38.581395
102
0.678722
7adff945e2ca5f930e07e30cb408c526c765c7be
425
# frozen_string_literal: true require 'rspec' require 'sqlite3' require 'active_record' class Record < ActiveRecord::Base end ActiveRecord::Base.establish_connection( adapter: 'sqlite3', database: ':memory:' ) ActiveRecord::Schema.define do create_table :records, force: true do |t| t.string :name end en...
16.346154
44
0.734118
5db64434ac3cb10cf4b06e5c66ac3500d11db283
445
require "rails_helper" require_relative "../../../../support/api/v1/views/index" describe "api/v1/videos/index.json.jbuilder" do before(:each) do assign(:resources, [create(:video), create(:video)]) render end it_behaves_like "an index view", 2, [ :id, :artist, :instrument, :title, :...
17.8
57
0.613483
e87bc70109df60e6a0d5cd7590eba67165621895
62
module SectionInfoConfigure module SectionsHelper end end
12.4
27
0.83871
7947e5dc33b8dbffa35385f9332ac7816ae38361
2,075
require_relative '../../app/models/series_list' describe SeriesList do def h(n) # just an abbreviation to keep the tests readable { all: n, online: nil } end it 'does basic grouping and sorting' do grouped = SeriesList.new({ 'MOUSE' => 1, 'cat' => 1, ...
36.403509
74
0.333012
87824fd482b518e8fbcc291843b3bf2d6545f7c8
2,746
require "multi_level_logger/version" include Logger::Severity module MultiLevelLogger class MLogger def self.create(opts) Logger.class_eval do define_method "add" do |severity, message = nil, progname = nil, &block| severity ||= UNKNOWN progname ||= @progname if message.nil? if block_given? ...
38.138889
168
0.653314
3369a0491fbf664ac676473e9a7119dd102dc8b8
956
module AnalyticalValue class Dynamics attr_reader :value, :prev delegate :positive?, :negative?, :zero?, :abs, to: :difference_signed def initialize(prev, value) @prev = prev @value = value end def percentage return nil if undefined? return 0 if empty? return 100 if...
18.745098
73
0.59728
7afe0a09270dc1a7acea61eb285800db5cbeb262
17,466
require File.dirname(__FILE__) + "/../test_helper.rb" class MediaFileTest < ActiveSupport::TestCase def test_simple item = AssetType.first asset = Asset.first assert !item.simple.is_full? assert_difference "::AssetRelation.count" do assert_difference "item.simple.size" do item.simple ...
32.52514
124
0.694206
e24ad0a2df06c3bafff142d8c8886f0e184c80ac
1,020
def failed_not_contains_message file, contents msg = "Expected #{file} to contain:\n\t#{contents.gsub("\n", "\n\t")}\nWhen" if File.file?(file) msg += " it contained:\n#{File.read(file)}".gsub("\n", "\n\t") else msg += ' it did not exist.' end msg end RSpec::Matchers.define :have_in_result do |...
22.666667
78
0.685294
1a6b6f136a3dbac3447ba226a633b7ac806e2922
458
cask 'zesarux' do version '4.2' sha256 '63608613276db8062d8688b0a8f9f9aa7445e73be695be3d2a81599226c96d78' url "https://downloads.sourceforge.net/zesarux/ZEsarUX_bin-#{version}-MountainLion_or_higher.dmg.gz" appcast 'https://sourceforge.net/projects/zesarux/rss', checkpoint: '5687bee64ebde5d8c48533c17...
35.230769
102
0.790393
ffa6d5842d2df86a6ae7261d90b8ba60bba11d5a
273
class CreateCharacters < ActiveRecord::Migration[6.0] def change create_table :characters do |t| t.integer :user_id t.integer :class_id t.integer :race_id t.string :name t.integer :level, default: 1 t.timestamps end end end
19.5
53
0.644689
91e9df091ac3e7156e1dd3ec7d0774c0098203ea
17,585
# 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 'aws-sdk-core/waiters' module Aws::DatabaseMigrationService module Waiters # Wait until testing ...
32.266055
84
0.464771
79d630e03685259f15c9bc79414582050c1a5f1d
738
module Api class PinBindingsController < Api::AbstractController def index maybe_paginate pin_bindings end def show render json: pin_binding end def destroy mutate PinBindings::Destroy.run(pin_binding: pin_binding) end def create mutate PinBindings::Create.run(ra...
19.421053
77
0.681572
03ab35a36d262b15553794bc6bc3cd2376ccaacd
258
describe Fastlane::Actions::XamversionAction do describe "#run" do it "prints a message" do expect(Fastlane::UI).to receive(:message).with("The xamversion plugin is working!") Fastlane::Actions::XamversionAction.run(nil) end end end
25.8
89
0.705426
5d0fe8d08be434e09532068de25bd4ad649ae58a
2,591
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
33.217949
138
0.719799
eda52646c44b75ae65c9cb26a8f0e2496600fbb5
92
module <%= class_name %> helpers do def helper_hello 'hello' end end end
10.222222
24
0.586957
4a92a76f6a8b2f8ca59f3773f52c5cc45d7fbe68
1,767
# frozen_string_literal: true describe ::EthereumGateway::Collector do subject { described_class.new(ethereum_client) } let(:peatio_transaction) do Peatio::Transaction.new( currency_id: 'eth', amount: 12, from_address: '123', to_address: '145', block_number: 1, status: 'pen...
30.465517
88
0.609508
18572357204090b4c4ee5736bb9f245b0a97192c
619
Pod::Spec.new do |s| s.name = 'PullUpController' s.version = '0.8.0' s.summary = 'Pull up controller with multiple sticky points like in iOS Maps.' s.homepage = 'https://github.com/MarioIannotta/PullUpController' s.license = { :type => 'MIT', :file => 'LICENSE' }...
47.615385
114
0.597738
261e2f905e2e10405882fbe66befc57b01d92648
261
class ManageIQ::Providers::StorageManager::CinderManager::EventCatcher < ::MiqEventCatcher require_nested :Runner def self.ems_class ManageIQ::Providers::StorageManager::CinderManager end def self.settings_name :event_catcher_cinder end end
21.75
90
0.785441
ac5224a07f82606050c901a2c26d25ed550d093c
817
cask "cookie" do version "6.5.2" sha256 :no_check url "https://sweetpproductions.com/products/cookieapp/Cookie.dmg" name "Cookie" desc "Protection from tracking and online profiling" homepage "https://sweetpproductions.com/" livecheck do url "https://sweetpproductions.com/products/cookieapp/appcast....
29.178571
70
0.738066
e8cbbde21123b0765b9985558322830abfd1365b
1,813
# frozen_string_literal: true require 'test_helper' describe Vissen::Parameterized::Value do subject { TestHelper::ValueMock } let(:value_mock) { subject.new } describe '.new' do it 'accepts an initial value' do value = subject.new 42 assert_equal 42, value.value end it 'defaults to th...
23.545455
79
0.676779
1dbe4640e29c9f9b18e779a34919018d9920f1cb
1,578
module Fog module Compute class HPV2 class Real # List metadata for specific collections # # ==== Parameters # * 'collection_name'<~String> - name of the collection i.e. images, servers for which the metadata is intended. # * 'parent_id'<~Integer> - id of the collect...
27.684211
120
0.524715
e9fedaf507802b42681fa7896d6f3888e0b1cbe6
813
RailsAdmin.config do |config| config.main_app_name = Proc.new { |controller| [ "OneBnb", "Admin - #{controller.params[:action].try(:titleize)}" ] } ## == Devise == config.authenticate_with do warden.authenticate! scope: :user end config.current_user_method(&:current_user) config.authorize_with do ...
23.228571
119
0.644526
ac80e41b8e14c0f461ba5bf8831c6466a517c41c
1,327
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: MIT # DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN. # vapi - vAPI is an extensible API Platform for modelling and delivering APIs/SDKs/CLIs. require 'spec_helper' require 'json' require 'date' # Unit tests...
30.159091
102
0.752826
ff911d02d7b555482de228f4ad0e53e41a3444e0
1,127
# frozen_string_literal: true require "faraday" require "faraday_middleware" require "oj" unless defined?(JRUBY_VERSION) require "faraday_middleware/multi_json" require "oauth2" require "yaml" require "hashie" require "vkontakte_api/version" require "vkontakte_api/error" require "vkontakte_api/execute_error" require ...
25.044444
59
0.786158
ac07369b4a5427e640dde43301e18bd1ab0cbc09
2,613
# # Copyright 2011-2013, Dell # Copyright 2013-2014, SUSE LINUX Products GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
30.741176
116
0.669346
bb0906123664ddabdb558f9c1b9720b9fafc6a82
1,779
# == Schema Information # # Table name: users # # id :bigint not null, primary key # admin :boolean # current_sign_in_at :datetime # current_sign_in_ip :inet # email_bidx :string # email_ciphertext :string # encrypted_password :string ...
35.58
71
0.634064
79021e706a0bedee4d1d239e12bd8d644d94571b
3,309
# frozen_string_literal: true require 'spec_helper' describe Spree::ProductsController, type: :controller do let!(:product) { create(:product, available_on: 1.year.from_now) } let(:taxon) { create(:taxon) } # Regression test for https://github.com/spree/spree/issues/1390 it 'allows admins to view non-active ...
36.362637
174
0.703234
e8b177283bbbe21b8a80de59d824ca32c528aa4a
4,976
require_dependency "user_impersonate/application_controller" module TinderfieldsUserImpersonate class ImpersonateController < ApplicationController before_filter :authenticate_the_user, except: ["destroy"] before_filter :current_user_must_be_staff!, except: ["destroy"] # Display list of all users, excep...
29.796407
88
0.683079
1d372f1ee80a6fb1e483033d7d28946ed4858882
2,980
# frozen_string_literal: true require 'spec_helper' describe RuboCop::Cop::Style::YodaCondition, :config do let(:cop_config) { { 'EnforcedStyle' => 'all_comparison_operators' } } subject(:cop) { described_class.new(config) } let(:error_message) { 'Reverse the order of the operands `%s`.' } # needed because o...
29.50495
77
0.62651
33620245e7456e830b339ba81afa6bb3012a5a1b
1,071
module Spine module Restrictions class Registration attr_reader :restriction, :restrictions, :exceptions def initialize(restriction) @restriction = restriction @exceptions = {} @restrictions = {} end def restrict(action, resource) add(restrictions, action,...
22.3125
58
0.611578
08b4651b69657a7316b2454f8c1246c9449de4ab
9,754
# Ports from Dalli(https://github.com/mperham/dalli/blob/master/test/test_rack_session.rb) require 'spec_helper' describe Rack::Session::Memcached do let(:incrementor_proc) { ->(env) { env['rack.session']['counter'] ||= 0 env['rack.session']['counter'] += 1 Rack::Response.new(env['rack.session...
33.176871
90
0.611852
1d314c59f9666e6ce43fb40c34a3294db2a2f707
2,640
#-- 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 ChiliProj...
33.417722
91
0.65947
915cdfb4931835f1edfe0ec1a3129fadf837ad0e
4,834
### ### Code originated from Julien Sobrier's excellent safebrowsing client: ### https://github.com/juliensobrier/google-safe-browsing-lookup-ruby ### # Author:: Julien Sobrier (mailto:julien@sobrier.net) # Copyright:: Copyright (c) 2015 Julien Sobrier # License:: Distributes under the same terms as Ruby require 'u...
26.707182
300
0.629293
6ab32d8bec32aafe8929e397a712ca2671c26822
349
class CreateSpreeReturnAuthorizationInventoryUnit < ActiveRecord::Migration def change create_table :spree_return_authorization_inventory_units do |t| t.integer :return_authorization_id t.integer :inventory_unit_id t.integer :exchange_variant_id t.datetime :received_at t.timestamps ...
26.846154
75
0.762178
d55bf5c54e53ba777e28a5807e4b4d97ee26a62a
44
module DanarchyJaml VERSION = "0.1.0" end
11
19
0.704545
91a3f882b0dbbb0b9f4697cc6a01bff491ae6f26
211
require "hotel_beds/model" module HotelBeds module Model class Destination include HotelBeds::Model # attributes attribute :code, String attribute :name, String end end end
15.071429
30
0.672986
18531c58eaf2184f4792226dd0f10518c0d4f7d4
7,123
require 'spec_helper' describe Pubnub::Subscribe do around(:each) do |example| @response_output = StringIO.new @message_output = StringIO.new @callback = lambda { |envelope| Pubnub.logger.debug 'FIRING CALLBACK FROM TEST' @response_output.write envelope.response @message_output.write ...
51.244604
347
0.609013
d518f3a8961eff669766b5940cbb5443c9ceb577
271
require Rails.root.join('features', 'steps', 'groups') class Spinach::Features::Groups < Spinach::FeatureSteps # EE only step step 'I go to "Audit Events"' do page.within '.sidebar-wrapper' do find(:link, 'Audit Events').trigger('click') end end end
24.636364
55
0.671587
ed9c910be3103fd4a8ec5028b0820a2c8746b8da
8,502
=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-ap...
25.45509
198
0.620677
28631608edd99d57818b8169240f5d10d98137aa
1,060
require 'rails_helper' RSpec.describe Admin::BannersController do before { signin_user } describe 'already had a banner' do let(:banner) { create :banner } it 'GET /admin/banners' do get '/admin/banners' expect(response).to be_success end it 'GET /admin/banners/new' do get '/ad...
24.090909
70
0.637736
ac6e549ac181fde992a0e7c010ab7d70667dedcc
722
ENV["RAILS_ENV"] = "test" require "rspec" require "byebug" require File.expand_path("../../spec/dummy/config/environment.rb", __FILE__) ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../spec/dummy/db/migrate", __FILE__)] # Load support files Dir[File.join(File.dirname(__FILE__), 'support', '**', '*...
27.769231
101
0.743767
035cf5bec5886e7e301eab7cee84a323a750878f
1,176
module RuboCop module Cop module Airbnb # Cop to tell developers to use :class => "MyClass" instead of :class => MyClass, # because the latter slows down reloading zeus. class FactoryClassUseString < Cop MSG = 'Instead of :class => MyClass, use :class => "MyClass". ' \ "This en...
29.4
87
0.583333
1a61494130580ecd45d696c976d3625fb1b7dcc3
840
# frozen_string_literal: true RSpec.describe "bundle package" do before do gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G end context "with --cache-path" do it "caches gems at given path" do bundle :package, "cache-path" => "vendor/cache-foo" expect(bundled_app...
25.454545
69
0.65
62df7ea79fe1bdb5292cec3ccc55ba1992789e85
13,935
require "inspec/utils/deprecation" # For backwards compatibility during the rename (see #3802), # maintain the Inspec::Attribute namespace for people checking for # Inspec::Attribute::DEFAULT_ATTRIBUTE module Inspec class Attribute # This only exists to create the Inspec::Attribute::DEFAULT_ATTRIBUTE symbol with...
33.021327
164
0.582777
e2e5b26a767c87861f87011b8eb0d5bf8979080c
1,671
require File.dirname(__FILE__) + '/test_helper' class ActsAsRDocTest < ActsAsMarkupTestCase context 'acts_as_rdoc' do setup do @rdoctext = "== RDoc Test Text" class ::Post < ActiveRecord::Base acts_as_rdoc :body end @post = Post.create!(:title => 'Blah', :body => @rdoctext) en...
28.322034
99
0.619988
e81373fc2c793ab56456dee7a9f73468cd00c4c3
1,025
cask 'bartender' do version '2.1.6' sha256 '013bb1f5dcc29ff1ecbc341da96b6e399dc3c85fc95bd8c7bee153ab0d8756f5' url "https://macbartender.com/B2/updates/#{version.dots_to_hyphens}/Bartender%20#{version.major}.zip", referer: 'https://www.macbartender.com' appcast 'https://www.macbartender.com/B2/updates/upd...
34.166667
104
0.723902
79321dde7d06224cd9cf04963c995d04bdd284bd
250
# frozen_string_literal: true class AddProtectedFieldAndRestrictedFieldToFieldTests < ActiveRecord::Migration[5.0] def change add_column :field_tests, :restricted_field, :string add_column :field_tests, :protected_field, :string end end
27.777778
84
0.8
7a72aefba207197217c38bc52dc2566c9f20f75a
601
class ShowingsController < ApplicationController before_filter :manager_authorized?, :find_listing def create showing = Showing.new(params[:showing]) showing.listing_id = @listing.id showing.save flash[:notice] = 'Showing created successfully.' to_listing end def edit @showing = @list...
20.033333
52
0.705491
5d68703f6f845b4445fef7c6c299d744c5d7bec9
82
class ChildMailer < ParentMailer has_history message: false, only: [:other] end
20.5
44
0.768293
7ad2bf73767b4304fca8f82b767607c122762fc3
752
# frozen_string_literal: true module FlagIconsRails class << self def load! if rails? register_rails_engine else configure_sass end end def root @root ||= File.expand_path('..', File.dirname(__FILE__)) end def rails? defined?(::Rails) end p...
16.711111
62
0.62367
ff97f964ae4bcd60fe201912f3c2f4e8b34c490a
232
class Recipe < ActiveRecord::Base has_and_belongs_to_many(:categories) has_and_belongs_to_many(:ingredients) validates(:title, {:presence => true}) # private # def rating_sort # Recipe.order(rating: asc) # end end
19.333333
40
0.719828