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
1d74a901f9be23360286296d0d3037a986e3096a
936
require File.expand_path '../../test_helper', __dir__ # Test class for List Deployment Request class TestListDeployment < Minitest::Test def setup @service = Fog::Resources::AzureRM.new(credentials) @client = @service.instance_variable_get(:@rmc) @deployments = @client.deployments @resource_group = '...
36
124
0.745726
1aebff9717060c338a651fdc3c74bfaa55e2e205
1,120
# frozen_string_literal: true require 'rainbow' module Root module Display # Handle logic for showing the victory points # Either stack, or all one square? # Some way to handle it so it's not shifting constantly. class Hand attr_reader :hand def initialize(hand) @hand = hand ...
21.132075
79
0.551786
79e50dd53fe9021266fbadaecaa972a194c1d6b2
812
Gem::Specification.new do |s| s.name = 'jekyll-rushed-analytics' s.version = '0.1.15.pre' s.date = '2021-11-16' s.summary = "Jekyll plugin that handle analytic like google analytic, adsense, mpuls, piwik etc" s.description = "Plugin to easily add web analytics to your jekyll site without...
54.133333
163
0.667488
8723427b5afa4e890cbbc124a6016169a0ed1b8e
473
require 'skeptick/sugar/compose' require 'skeptick/sugar/write' require 'skeptick/sugar/draw' require 'skeptick/sugar/canvas' require 'skeptick/sugar/font' require 'skeptick/sugar/text' require 'skeptick/sugar/geometry' require 'skeptick/sugar/clone' require 'skeptick/sugar/delete' require 'skeptick/sugar/swap' require...
31.533333
46
0.82241
9154887ab2865d6aae9b3990cfe6d371bd818fd7
8,556
require 'rbconfig' # ruby 1.8.7 doesn't define RUBY_ENGINE ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' ruby_version = RbConfig::CONFIG["ruby_version"] path = File.expand_path('..', __FILE__) $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby" $:.unshift "...
80.716981
113
0.669822
6a4463f2989ef575313125b5f9fe8ab43b3c459c
5,355
Pod::Spec.new do |s| s.name = 'FirebaseRemoteConfig' s.version = '8.1.0' s.summary = 'Firebase Remote Config' s.description = <<-DESC Firebase Remote Config is a cloud service that lets you change the appearance and behavior of your app without requiring users to download an ...
43.893443
117
0.689823
795d1fbc560fcc0039185bde72192cecd1bc18b2
19,843
# frozen_string_literal: true module ActiveRecord module ConnectionAdapters # :nodoc: module DatabaseStatements def initialize super reset_transaction end # Converts an arel AST to SQL def to_sql(arel_or_sql_string, binds = []) sql, _ = to_sql_and_binds(arel_or_sq...
36.143898
134
0.632918
874483511e567a1fafac8a84540956bff465b232
5,983
#%Header { ############################################################################## # # File adanaxis-data/spaces/level21/space.rb # # Copyright: Andy Southgate 2002-2007, 2020 # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (t...
30.682051
102
0.615912
87c02d4ba9ad7967d9366d388def973d3f78035c
1,323
# frozen_string_literal: true lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'at_coder_friends/version' Gem::Specification.new do |spec| spec.name = 'at_coder_friends' spec.version = AtCoderFriends::VERSION spec.authors = ['nejiko9...
32.268293
74
0.662132
f7eef5252d63572266f41cdc314ac18536ac6039
2,197
class PlosFulltext < Agent def get_query_url(options = {}) query_string = get_query_string(options) return {} unless query_string.present? url % { query_string: query_string } end def get_provenance_url(options = {}) query_string = get_query_string(options) return {} unless query_string.pres...
33.8
158
0.617205
380fa763e24b0f15e23e7ecff18f3ed8db14a847
18,607
# encoding: UTF-8 module GoodData module Model class ProjectBlueprint attr_accessor :data # Instantiates a project blueprint either from a file or from a string containing # json. Also eats Hash for convenience. # # @param spec [String | Hash] value of an label you are looking for ...
35.173913
227
0.614876
6a9698328fd748a006ce9710fc3283a2017ef8da
1,216
module CatarsePagarme class Configuration attr_accessor :api_key, :slip_tax, :credit_card_tax, :interest_rate, :host, :subdomain, :protocol, :max_installments, :minimum_value_for_installment, :credit_card_cents_fee, :pagarme_tax, :stone_tax, :stone_installment_tax, :cielo_tax, :cielo_installment_diner...
36.848485
117
0.712993
e935285cafa62e3c55d7d0950acdf4a2b4ef01db
4,595
require_relative "../test_helper" class ManageApiUsersTest < ActionDispatch::IntegrationTest context "as Superadmin" do setup do @application = create(:application, with_supported_permissions: %w[write]) @superadmin = create(:superadmin_user) visit new_user_session_path signin_with(@supe...
39.612069
160
0.692492
bfa2aeeb05f099c1a34c6287cc39924704e3f9b0
358
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) require "jruby-jolt" def spec_path "#{File.expand_path("../../", __FILE__)}/spec" end def fixtures_path "#{spec_path}/fixtures" end def fixture_path(file) fixtures_path + '/' + file end def fixture(file) File.read(fixture_path(file)) end def parse_...
15.565217
58
0.706704
e8d4c7bb6d28d9fa8dc202bb2ab337d6ab49561d
49
module ActsAsRequestable VERSION = "0.0.1" end
12.25
24
0.734694
d56f8b0015deb2fd0682f8a7112da568db17a12a
784
describe 'locomotive/translations/edit', type: :view do helper(Locomotive::BaseHelper, Locomotive::SitesHelper, Locomotive::Engine.routes.url_helpers) helper(Locomotive::TestViewHelpers) let(:site) { build('test site', locales: [:en, :fr]) } let(:translation) { create(:translation) } let(:nav) ...
31.36
111
0.697704
870870f2fa43066b28318ee6bdb73526dc2e757f
564
require_relative '../../../spec_helper' require 'stringio' require 'zlib' describe "Zlib::GzipFile#close" do it "finishes the stream and closes the io" do io = StringIO.new "".b Zlib::GzipWriter.wrap io do |gzio| gzio.close gzio.closed?.should == true -> { gzio.orig_name }.should \ ...
25.636364
65
0.620567
793d050b973d4bc8c5b0653d5b62a16385f23b55
822
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{domino} s.version = "0.1.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Kalafarski"] s.date = %q{2009-02-06} s.description = %q{TODO} s.email = %q{chris@far...
29.357143
105
0.671533
7a57255763104e35abeffd65cf97a2061bfb92e5
1,023
# Generated with JReleaser 1.0.0-M2 at 2022-06-02T01:04:44.629395287Z class KfkClusterState < Formula desc "Kafka: CLI: Topic List: Expand Kafka topic listing with Offsets and more." homepage "https://github.com/jeqo/kafka-cli" version "0.3.0" license "Apache-2.0" if OS.linux? && Hardware::CPU.intel? url...
36.535714
127
0.733138
01a93556d2a398df9bc75c593b5ee26d53ecd955
1,934
#!/usr/bin/env ruby require 'bundler/setup' require 'html/pipeline' require_relative 'HHVM/UserDocumentation/SyntaxHighlightFilter.rb' require_relative 'HHVM/UserDocumentation/IncludeExamplesFilter.rb' require_relative 'HHVM/UserDocumentation/IncludeGuidesGeneratedMarkdownFilter.rb' require_relative 'HHVM/UserDocumen...
36.490566
94
0.791624
2181846b6a0fee74545fe68db864d5cc91126fab
356
# # It is auto-generated content. # Do not do required for this file in your application. # module Application def self.quit end def self.minimize end def self.restore end def self.getVersion end def self.applicationEvent=(argument) end def self.versionEvent=(argument) end def ...
14.833333
55
0.688202
f875d695a4d02b554ecdcc14e27c38b5796e0a40
203
require File.dirname(__FILE__) + '/../../test_helper' class Admin::InterviewControllerTest < ActionController::TestCase # Replace this with your real tests. def test_truth assert true end end
22.555556
65
0.743842
7990dfdea200336033e9ab201e6da8c858c6dc97
812
# frozen_string_literal: true require 'shaf/yard/base_method_handler' module Shaf module Yard # Handles call to Shaf::Serializer::link class LinkMethodHandler < BaseMethodHandler handles method_call(:link) def object LinkObject.new(serializer_namespace, name).tap do |link| lin...
20.3
64
0.554187
e926ec937603085bded1c432841f575a5b838439
1,134
# == Schema Information # # Table name: illustration_categories # # id :integer not null, primary key # name :string(32) not null # created_at :datetime # updated_at :datetime # # Indexes # # index_illustration_categories_on_name (name) # class IllustrationCategory < ActiveRecord::Ba...
25.2
97
0.693122
e9740eb3ffa14f700e4a1f8f03763071063b3f94
2,025
require "open-uri" require "nokogiri" require "mechanize" require "pry" require "byebug" require "io/console" require_relative "./profile" require_relative "./challenge" GH_OAUTH_SIGNIN_URL = "https://www.codewars.com/users/preauth/github/signin" def get_gh_authenticated_connection mech = Mechanize.new @username ...
23.275862
76
0.728889
ab5b5f71ec046406e0a5a03b99a4e474eadcffa0
1,038
class OccasionsController < ApplicationController def new @occasion = Occasion.new if session[:user_id] @user = User.find_by_id(session[:user_id]) if @user.admin render "new" end end end def create @occasion = Occasion.cr...
22.085106
54
0.55973
f869c517a20ac13420207da044b8469e35a5c1ec
969
require "yaml" require "securerandom" require "storageMemory/DeviceManagerMemory" module Hub class DeviceManagerYaml < DeviceManagerMemory def initialize(filename = nil) super() if filename == nil then @filename = SecureRandom.hex + ".yaml" else ...
22.534884
54
0.480908
393baf8cf5f3974be772add748a04f3b23efebeb
180
class RegistrationsController < Devise::RegistrationsController protected def after_sign_up_path_for(resource) '/pets/new' # Or :prefix_to_your_route end end
25.714286
63
0.744444
1d23c72cc0f83f447b94c0fbd4955d4055f996aa
971
# frozen_string_literal: true module Api module V1 class UsersController < ::ApplicationController skip_before_action :authenticate_user!, :authorize_action, :set_conference before_action :doorkeeper_authorize! def show json_user = current_user.as_json(only: %i[ ...
29.424242
98
0.584964
bf7ce4e27fa9e57279c5a98c75fc63954480d52b
1,113
# frozen_string_literal: true class HearingsForAppeal def initialize(appeal_id) @appeal_id = appeal_id end # This method is optimized to avoid calling VACOLS for legacy appeals. def held_hearings if Appeal::UUID_REGEX.match?(appeal_id) Appeal.find_by_uuid!(appeal_id).hearings.where(disposition: ...
33.727273
119
0.743935
e91f546dfa5561183f435a8f3b97455ae696d360
1,056
require_relative 'boot' require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module FAODatabase class Application < Rails::Application # Initialize configuration defaults for originally generated Rai...
33
82
0.713068
ed8b8559b5a6e1db9f87fbcdea1eba1466044956
1,735
cask 'parallels-desktop11' do version '11.2.2-32651' sha256 'f0af6eafb8fd468f84a7ce6dd21d7465589901d2215766f2989add5d5a61ca12' url "https://download.parallels.com/desktop/v#{version.major}/#{version}/ParallelsDesktop-#{version}.dmg" name 'Parallels Desktop' homepage 'https://www.parallels.com/products/deskto...
38.555556
107
0.58098
1c98dd53a6aa8063c1f507975f8eb688a35714fd
1,326
require_relative 'lib/denso/calendar/version' Gem::Specification.new do |spec| spec.name = 'denso-calendar' spec.version = Denso::Calendar::VERSION spec.authors = ['Tatsuya Sato'] spec.email = ['satoryu.1981@gmail.com'] spec.summary = 'A parser DENSO calendar' spec.descr...
40.181818
87
0.659879
ab63ea248bedb5411e8b2156861f00d8f4b91371
1,496
class Enscript < Formula desc "Convert text to Postscript, HTML, or RTF, with syntax highlighting" homepage "https://www.gnu.org/software/enscript/" url "https://ftp.gnu.org/gnu/enscript/enscript-1.6.6.tar.gz" mirror "https://ftpmirror.gnu.org/enscript/enscript-1.6.6.tar.gz" sha256 "6d56bada6934d055b34b6c9039...
42.742857
92
0.762701
793541742b010a9565414a363214a18402c32150
91
class BatchEditsController < ApplicationController include Hydra::BatchEditBehavior end
18.2
50
0.857143
26ac6794ecdbdb5c860366018bf6669a5e933292
5,267
# frozen_string_literal: true module Kanrisuru module Core module IP def ip_route(action, opts) case action when 'show', 'list' version = ip_version.to_i command = ip_route_show(opts, version) when 'flush' command = ip_route_flush(opts) when 'ad...
34.424837
75
0.604519
b972c482b3002ebb80c88981d2fd8d6884a0c24e
594
class User < ActiveRecord::Base has_secure_password validates :email, presence: true, uniqueness: true, format: /@/ before_create { generate_token(:auth_token) } def self.authenticate(email, password) user = find_by email: email user if user && user.authenticate(password) end def gener...
23.76
65
0.713805
abb0fb2ffc5acb16c897c0c796be54049d1a3ced
528
# 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 module Aws::ElasticsearchService class Resource # @param options ({}) ...
19.555556
74
0.683712
bbd48fa6f7e9f437664ff741383f9128f1194772
137
class MuiPassword::Javascripts < MuiPassword::Application only_provides :js def password render :layout => false end end
15.222222
57
0.715328
6a44aa17e8d2b2bdc44fab6e7a9ca663046d58f5
2,168
# frozen_string_literal: true require 'spec_helper' RSpec.describe Slack::Surfaces::Home do let(:image_url) { 'https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg' } describe '#as_json' do context 'with blocks argument' do subject(:instance) { described_class.new(blocks: blocks) } ...
24.359551
92
0.535517
38b21b7a926ce5b4beda882dbdeb584b82588a30
197
class RemoveUnusedStuffs < ActiveRecord::Migration[5.0] def change remove_column :links, :logo remove_column :links, :order remove_column :restaurants, :plain_opening_hours end end
24.625
55
0.756345
bb97e20bee4e5373693a7cfaa0900e5bdf14fbdf
340
require 'formula' class Vramsteg < Formula homepage 'http://tasktools.org/projects/vramsteg.html' url 'http://taskwarrior.org/download/vramsteg-1.0.1.tar.gz' sha1 'bbc9f54e6e10b3e82dbbac6275e2e611d752e85d' depends_on 'cmake' => :build def install system "cmake", ".", *std_cmake_args system "make", ...
22.666667
61
0.720588
bf520b07c13164b324e1ae2ea338dea0f3111d4a
222
Rails.application.config.assets.version = '1.0' Rails.application.config.assets.precompile = ['*.js', '*.css', '*.png', '*.eot', '*.woff', '*.ttf'] Rails.application.config.assets.paths << Rails.root.join('vendor/assets')
55.5
99
0.68018
bf3c34836a1de50deb682d8b8c3ef1f644ff5602
498
require 'active_support/concern' module GrapeV0_14_0 module DSL module API extend ActiveSupport::Concern include GrapeV0_14_0::Middleware::Auth::DSL include GrapeV0_14_0::DSL::Validations include GrapeV0_14_0::DSL::Callbacks include GrapeV0_14_0::DSL::Configuration include G...
24.9
49
0.7249
abc4ed95675480ce50a021df9264375d43142c15
162
class MeetupSerializer < ActiveModel::Serializer attributes :id, :name, :location, :day, :time belongs_to :group has_many :tags, through: :meetup_tags end
23.142857
48
0.746914
6a7d5ff42a40ea2fc50f12b03700cbe04b663297
4,675
# encoding: utf-8 module PhoneNumberMiner require 'mechanize' class AngkorThom require 'google/transliterate' require 'phony' # Gets data from the following catalogue pages # http://akt-media.com/friendship.php?f=2 # http://akt-media.com/friendship.php?f=3 BASE_URL = "http://akt-media.co...
27.339181
73
0.558075
912bd3bed52efdc2d54a0f6c08a616d9a4ea9736
1,928
# # Copyright:: Copyright 2013-2016, 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-...
29.661538
100
0.681017
7937c88438c6bde68f40421a515f14290a64f411
42
module NewScience VERSION = "0.1.0" end
10.5
19
0.690476
4a2cea927ffcce8855d5963ef398934c524581f7
23,884
require 'date' require 'time' require 'bigdecimal' module DataMapper # :include:QUICKLINKS # # = Properties # Properties for a model are not derived from a database structure, but # instead explicitly declared inside your model class definitions. These # properties then map (or, if using automigrate, gene...
35.279173
146
0.643401
bb326d0d392a74408792b03057a6cb58bddf7b93
2,478
require 'digest' module PragmaticTokenizer module PreProcessor def pre_process(language: Languages::Common) @urls = {} url_to_md5! remove_non_breaking_space! shift_various_characters! replace_colon_in_url! shift_remaining_colons! shift_hashtag! convert_double_quote...
26.645161
119
0.608959
ab0b8ac0257ea701246e7aaf1b81d6eeb29e38f2
57
module Exist class Attributes < Hashie::Mash end end
11.4
33
0.736842
796df7b5724637b77f8d96aaed1b0fad93693da4
1,285
# 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 Gem::Specification.new do |spec| spec.name = 'aws-sdk-personalize'...
38.939394
115
0.670039
ab1fc569ae38ac225b0a304a93172eb1f119bf33
5,961
require 'spec_helper' describe 'tuskar::logging' do let :params do { } end let :log_params do { :logging_context_format_string => '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s', :logging_default_format_string => '%...
40.55102
160
0.685623
7a361411ec7e259178b26ecca67c44be41b26e0e
2,336
# frozen_string_literal: true %w[htmlbeautifier tty-markdown].each do |optional_dep| require optional_dep rescue LoadError warn "The #{optional_dep} gem is unavailable. Install it as a dependency in your project, if you'd like to use it." end module Html2rss module Configs ## # A collection of methods h...
29.948718
117
0.589041
62fb126e505164274a78b458ae02200b27d541d4
3,094
require "jumunge/version" module Jumunge module Utils def remaining_trails @remaining_trails ||= @trails.join('.') end end class JuValue def initialize(object, trail, trails) @object = object @trail = trail @trails = trails end def perform @object[key_name] = ...
17.68
74
0.587589
9129dda53b1f8d050f43db63af3bc94f37e58d35
1,055
Lit::Engine.routes.draw do if Lit.api_enabled namespace :api do namespace :v1 do get '/last_change' => 'localizations#last_change' resources :locales, :only=>[:index] resources :localization_keys, :only=>[:index] resources :localizations, :only=>[:index] do get 'l...
21.530612
68
0.598104
bf3eebcd78c6aa4a130bc4cc79f3fe3239ceeff1
1,176
class ConsoleBridge < Formula desc "Robot Operating System-independent package for logging" homepage "https://wiki.ros.org/console_bridge/" url "https://github.com/ros/console_bridge/archive/0.4.2.tar.gz" sha256 "f44641bed7268d72354476c8c5ff936f0e600e4170e1ff7f61a4b6e1f3fc20ff" bottle do cellar :any ...
30.947368
94
0.709184
4a1d6f0aa01b721bafc3370bfcdae5bd931faf58
1,488
require 'spec_helper' describe "redact" do let(:node) { 'test.example.com' } let(:facts) { { :fqdn => 'test.example.com', } } let(:params) { { :param => 'a param', :redacted => 'to be redacted', :replaced => 'to be replaced', } } it { is_expected.to contain_class('redact').with({ ...
28.615385
94
0.572581
285b0d7c80c3a9fa49437d3d674b94f8f6899277
1,146
# frozen_string_literal: true class HearingAdminActionForeignVeteranCaseTask < HearingAdminActionTask def self.label "Foreign Veteran case" end def available_actions(user) hearing_admin_actions = available_hearing_user_actions(user) if (assigned_to &.== user) || HearingsManagement.singleton.user_ha...
27.95122
85
0.756545
2665431967cb0fcc602be376592f7bdb80fad80f
101
class BoardSerializer < ActiveModel::Serializer attributes :id, :name, :date has_many :props end
20.2
47
0.762376
b93be96891728caf3dd7aca1979d14c2bd3c5bea
1,114
module HotPotato # Workers manipulate data from other workers or faucets. Examples include: Calculate Scores, Merge # Data, and Filter Data. Each worker is a ruby file in the app directory that extends HotPotato::Worker # and implements the perform(message) method. For each message the worker wants to send...
27.85
111
0.641831
3345266d2fe126981446b0e91208fdaad239d273
2,330
# Custom tags for JSDuck 5.x # See also: # - https://github.com/senchalabs/jsduck/wiki/Custom-tags # - https://github.com/senchalabs/jsduck/wiki/Custom-tags/7f5c32e568eab9edc8e3365e935bcb836cb11f1d require 'jsduck/tag/tag' class CommonTag < JsDuck::Tag::Tag def initialize @html_position = POS_DOC + 0.1 @repe...
22.621359
98
0.608155
ffdda4d88db567f4dc7819bcfaa2fd91d51c6508
762
module Mandate module CallInjector def self.extended(base) # Defining call allows us to do use the syntax: # Foobar.(some, args) # which internally calls: # Foobar.new(some, args).call() class << base def call(*args) # If the last argument is a hash and the last...
31.75
95
0.564304
5d2b78b44e064ad9f0e03104af50af1e982be36d
2,832
# myExperiment: db/migrate/018_savage_beast_tables.rb # # Copyright (c) 2007 University of Manchester and the University of Southampton. # See license.txt for details. class SavageBeastTables < ActiveRecord::Migration def self.up # create_table "forums", :force => true do |t| # t.column "name", :s...
35.4
110
0.631356
6206e5f49dab92c68c8fd57f405aa8d7e60ce308
957
Pod::Spec.new do |s| s.name = "KCProtocolKit" s.version = "0.1.101" s.summary = "A short description of KCProtocolKit." s.license = 'MIT' s.author = { "Emil Wojtaszek" => "emil@appunite.com" } s.source = { :git => "git@git.appunite.com:newmedia/chat...
29.90625
112
0.607106
5d0b002b9f218adf525b4f2c8813eef354a0e834
10,462
#-- encoding: UTF-8 #-- 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,...
31.70303
100
0.646721
61dae1b32fe6472ecbe2fc979abb274a4afad131
51
def self.foo(a, *) end def bar puts "hello" end
7.285714
18
0.627451
bf27ae085ec25a3a0eababb698024a09441fd289
1,070
# 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...
38.214286
86
0.737383
618acd1f4ab2e36e8bf9e68a7f9e2b660bc8faa6
305
class DashboardController < ApplicationController breadcrumb "Dashboard", :dashboard_path def show @user = UserPresenter.new(current_user) journeys = Journey.not_remove.includes(:category).where(user_id: current_user.id) @journeys = journeys.map { |j| JourneyPresenter.new(j) } end end
30.5
85
0.754098
62c3c9355e9887d52e9c9e01693589a1833c603d
1,003
module Ammitto class Document attr_reader :type, :number, :country, :note, :doc_name def initialize(doc) @type = doc["type"] if doc["type"].is_a?(String) @number = doc["number"] if doc["number"].is_a?(String) @country = doc["country"] if doc["country"].is_a?(String) @note = doc["note"...
27.861111
63
0.605184
ac366159a3456570c619753e71900a1053456a37
797
cask 'brave-browser-beta' do version '0.70.112' sha256 'b80765721888bd0873032dc801b5875839f3e0bb73a6dadeab6d1282fe74d319' # github.com/brave/brave-browser was verified as official when first introduced to the cask url "https://github.com/brave/brave-browser/releases/download/v#{version}/Brave-Browser-Beta.dmg"...
36.227273
99
0.711418
bfa34a19e69b6156befaf5d714df889bf1c0878d
30,202
module Typelib # In Typelib, a registry contains a consistent set of types, i.e. the types # are that are related to each other. # # As mentionned in the Typelib module documentation, it is better to # manipulate value objects from types from the same registry. That is more # efficient, as it re...
38.133838
246
0.524402
7a6d8abe33829eeb5a8480bcfbce2e96d67b9148
1,133
# frozen_string_literal: true require 'get_process_mem' module RssObserver # Class containing the Rails Middleware that class Middleware UnsupportedHandlerError = Class.new(RssObserver::Error) # @param app [Object] Rails middleware instance # @param handler [Object] Handler that accepts memory change...
26.97619
102
0.708738
5d8bcada2970f22e0fb0b5375debb02d4c45ef1f
2,371
# Copyright 2011-2019, The Trustees of Indiana University and Northwestern # University. 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 # # ...
33.394366
157
0.694222
21ed70e9df5210c164596df90e4e32402ac5bd6d
2,156
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__) require "vcr/version" Gem::Specification.new do |s| s.name = "vcr" s.homepage = "http://github.com/myronmarston/vcr" s.authors = ["Myron Marston"] s.summary = "Record your test suite's HTTP interactions and replay them during future test runs for fast, de...
41.461538
202
0.69295
e8114a4e519725c9b2046b3437a5c0a2f6309f7d
2,184
require 'test_helper' class BuildProxyTest < Test::Unit::TestCase context "with a class to build" do setup do @class = Class.new @instance = mock('built-instance') @association = mock('associated-instance') @class. stubs(:new). returns(@instance) @instance.stubs(:a...
27.3
74
0.604853
33e0f1a966cd6a60f8da67aec3a8f817efb42a82
1,533
require 'spec_helper' RSpec.describe GeneSystem::Generators do describe '::TEMPLATE_MANIFEST' do let(:name) { 'my_dev_setup' } before do @manifest = Hashie::Mash.new( described_class::TEMPLATE_MANIFEST.call(name) ) end it 'has expected name' do expect(@manifest.name).to eq...
23.227273
71
0.637312
21c5a45ca7cf09f37feeacd5227d716c4e3e893c
2,601
# Copyright © 2011-2020 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 l...
46.446429
146
0.761246
281bee581b4dc255b13865a4c854e53bfb9a0843
4,189
# require 'puppet' # require 'rspec' require 'rspec-puppet' require 'spec_helper' require 'puppetlabs_spec_helper/puppetlabs_spec/puppet_internals' # Ubintu, static describe 'l23network::examples::bond_lnx_old_style', :type => :class do let(:module_path) { '../' } #let(:title) { 'bond0' } let(:params) { { :b...
32.984252
89
0.652184
39edf3caac5e10498ae2a0514b1dfd7c3861394a
1,368
# Copyright (c) 2015, Hothza # 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 follow...
48.857143
80
0.782164
0141731529b496c355e803454ff7e0c57fffe11d
1,315
# frozen_string_literal: true require 'spec_helper' RSpec.describe WorkItems::Widgets::Hierarchy do let_it_be(:work_item) { create(:work_item) } describe '.type' do subject { described_class.type } it { is_expected.to eq(:hierarchy) } end describe '#type' do subject { described_class.new(work_i...
24.811321
87
0.706464
5d0dc82bdf654fb2991ca3765d5b2a0353b998b4
10,949
require 'active_support/core_ext/string/access' module ActiveMerchant module Billing class DataCashGateway < Gateway self.default_currency = 'GBP' self.supported_countries = ['GB'] self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro] self.homepage...
36.016447
161
0.612476
e29f9667b7bc10b7e724134211812293d2404288
138
json.extract! material, :id, :nome, :valor, :tipo, :cor, :origem, :created_at, :updated_at json.url material_url(material, format: :json)
46
90
0.724638
21bf32fc1de6becbf3f71dd29d4e1c1ffede7722
160
require 'serverspec' set :backend, :exec %w{ zip unzip wget git openssl }.each do | pkg | describe package(pkg) do it { should be_installed } end end
16
48
0.68125
1c87c125ff0e66e6045a39205ea36eb36b23acf6
436
# coding: US-ASCII # frozen_string_literal: true Capybara::SpecHelper.spec '#save_screenshot' do let(:image_path) { File.join(Dir.tmpdir, 'capybara-screenshot.png') } before do @session.visit '/' end it 'should generate PNG file', requires: [:screenshot] do path = @session.save_screenshot image_path ...
22.947368
71
0.699541
1853f64bd02d73421eac967a7a20f414956e17ce
10,547
module Fog module Compute class VcloudDirector class Real # List operating systems available for use on virtual machines owned by # this organization. # # @return [Excon::Response] # * body<~Hash>: # # @see http://pubs.vmware.com/vcd-51/topic/com.vmw...
43.945833
134
0.453494
38933a98b8288a19b692295a0d59c639fc4f8c8e
2,030
require 'fileutils' module BuildPack class Installer class << self def install(build_dir, cache_dir) init_paths(build_dir, cache_dir) make_dirs Downloader.download_latest_lib_to(@lib_mysql_pkg) unless cached? Downloader.download_latest_client_to(@mysql_pkg) unless cached? ...
25.696203
118
0.618719
f74aab72991a336c40be55f538e465698c2c864d
93,760
# 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, ...
41.671111
130
0.627005
61e59820cd08829fb422d9307090d55ffcc52d9e
807
module Api class SizeController < BaseController caches_action :average_sizes def average_sizes() @data = {} ReportInteger.where(ReportInteger.arel_table[:integer].gt(0)).scoping do @data = { t('.size') => ReportInteger.where({:key => 'Reports::Size'}).average(:integer).floor(),...
33.625
127
0.60223
b9fa9844e69cf462ccb7d88a10e9e68c44377f3b
2,456
class Array # call-seq: # array.shuffle!(random: Random) -> array # # Shuffles the elements of +self+ in place. # a = [1, 2, 3] #=> [1, 2, 3] # a.shuffle! #=> [2, 3, 1] # a #=> [2, 3, 1] # # The optional +random+ argument will be used as the random number generator: # a...
35.085714
79
0.567997
26edd8ac28180c55f28c5638d3a63d3ae697ff29
538
# frozen_string_literal: true require 'spec_helper' RSpec.describe Ializer::DateDeSer do describe '#serialize' do it 'serializes values to string' do expect(described_class.serialize(Date.new(2018, 4, 4))).to eq '2018-04-04' end end describe '#parse' do it 'parses values to date' do exp...
24.454545
80
0.680297
f8ab5411ba6233de7a302945b1029c170607087a
4,797
require 'log4r' require 'vagrant' require 'git' require 'fileutils' require "log4r" require_relative 'errors' module VagrantPlugins module Saltdeps class Provisioner < Vagrant.plugin('2', :provisioner) def initialize(machine, config) super @logger = Log4r::Logger.new("vagrant::prov...
35.272059
132
0.612258
bf13573b754af075f36c2d135e74774ced39c50e
4,045
require 'typhoeus' require_relative "../interface_topology_provider.rb" require_relative "../../network_entities/topology.rb" require_relative '../../network_entities/abstracts/path.rb' class OpendaylightTopologyProvider < ITopologyProvider attr_accessor :uri_resource def initialize(new_uri_resource) ...
35.79646
143
0.651422
2893b8433eee8f6a2ebaf4af807d2ad46ab6fa20
17,397
# frozen_string_literal: false DEBUG = false # Rank Position Total Global Points # Bronze 981 1,127 13.51 # Bronze 994 1,158 13.90 # Bronze 592 1,167 26.85 # Bronze 611 1,209 27.30 # Bronze 591 1,212 27.85 # Bronze 4...
21.061743
127
0.575387
28e78af074749d132eba3fc20c865a7467d47b7a
1,184
class Wellington < Formula desc "Project-focused tool to manage Sass and spriting" homepage "https://getwt.io/" url "https://github.com/wellington/wellington/archive/v1.0.5.tar.gz" sha256 "e2379722849cdd8e5f094849290aacba4b789d4d65c733dec859565c728e7205" license "Apache-2.0" head "https://github.com/welling...
33.828571
94
0.709459
08f4c97f8ceb5907c4ea20954e0993466295e0ca
1,110
# # SonarQube, open source software quality management tool. # Copyright (C) 2008-2014 SonarSource # mailto:contact AT sonarsource DOT com # # SonarQube is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; e...
31.714286
79
0.752252
ed073df28a1fca7551589b7a29cbc935c14eb849
83
json.extract! @grade, :id, :studentID, :courseID, :value, :created_at, :updated_at
41.5
82
0.722892
910205a9e61b7ba5257a92d6491b5caca98b3a70
826
# coding: utf-8 class PDF::Reader module WidthCalculator # Type0 (or Composite) fonts are a "root font" that rely on a "descendant font" # to do the heavy lifting. The "descendant font" is a CID-Keyed font. # see Section 9.7.1, PDF 32000-1:2008, pp 267 # so if we are calculating a Type0 font width, w...
26.645161
83
0.657385
ab55f0e34d83ee0f1d2eb432610f05255bc0f0cf
1,346
class Tmate < Formula desc "Instant terminal sharing" homepage "https://tmate.io/" url "https://github.com/tmate-io/tmate/archive/2.4.0.tar.gz" sha256 "62b61eb12ab394012c861f6b48ba0bc04ac8765abca13bdde5a4d9105cb16138" license "ISC" head "https://github.com/tmate-io/tmate.git" bottle do cellar :any ...
32.047619
95
0.71471
6a3eb324a17143d14019554ed2d9c4b358a83861
400
module Notifiers class Slack def self.notify(text:, username: 'Informative Parrot', emoji: ':gentleman_parrot:', channel: '#taxonomy') message_payload = { username: username, icon_emoji: emoji, text: text, mrkdwn: true, channel: channel, } HTTP.post(ENV["...
25
109
0.63