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
7960e18d826ac5dde2a620eaaa7e108732bdb0ea
118
class AddSummaryToBird < ActiveRecord::Migration[5.1] def change add_column :birds, :summary, :string end end
19.666667
53
0.737288
e8e44c5bc910d77fcec2701378e6d9072798f25a
309
class CreateProjects < ActiveRecord::Migration[5.2] def change create_table :projects do |t| t.string :title t.string :description t.text :body t.string :language t.string :country t.references :user t.references :category t.timestamps end end end
19.3125
51
0.634304
01b52cea5bccb6c2fffce4cc63af24c04490fda2
169
require File.expand_path('../../../../spec_helper', __FILE__) describe "Gem::Installer#run_post_install_hooks" do it "needs to be reviewed for spec completeness" end
28.166667
61
0.745562
1d293bde906a6833596b7beace7577d62b165831
1,416
class DeviseCreatePatrons < ActiveRecord::Migration[5.0] def change create_table :patrons do |t| ## Database authenticatable t.string :email, null: false, default: "" t.string :encrypted_password, null: false, default: "" ## Recoverable t.string :reset_password_token ...
30.782609
104
0.65678
f8516d6c4fad3f0a4bc7f26e59e13a36de604647
1,047
class Pdsh < Formula desc "Efficient rsh-like utility, for using hosts in parallel" homepage "https://github.com/chaos/pdsh" url "https://github.com/chaos/pdsh/releases/download/pdsh-2.33/pdsh-2.33.tar.gz" sha256 "7368087429d6269f0a6313c406ef38c6a6a947bc003ca7368fc6481b139d942f" revision 1 head "https://git...
26.175
93
0.69532
f7cad283f25d1ab15e4a3ac32b1c16ac61c5cbcb
4,067
require 'securerandom' module Packer module Config class VSphereBase def initialize(administrator_password:, source_path:, mem_size:, num_vcpus:, skip_windows_update: false, http_proxy:, https_proxy:, bypass_list:, os:, output_directory:, vm_prefix: '', mount_ephemeral_disk: false) @administrator_p...
35.99115
247
0.539218
1a85289a04fd2a7eaba38b4f09e7df355a780cdb
3,940
# frozen_string_literal: true class PrometheusService < MonitoringService include PrometheusAdapter # Access to prometheus is directly through the API prop_accessor :api_url boolean_accessor :manual_configuration # We need to allow the self-monitoring project to connect to the internal # Prometheus inst...
24.779874
121
0.732995
4ad86d1363b5fcb49f61b8f1715004f59ca44d23
219
require "exchange_rate" require "fxer/exchange" require "fxer/fetcher" require "fxer/version" module Fxer FXER_BASE_PATH = Pathname(__dir__).parent FXER_CONFIGURATION_PATH = File.join(FXER_BASE_PATH, "config") end
21.9
63
0.794521
1a221eb1181ef12843939eb1cbd1f56ed16ebffa
1,147
# 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' require 'aws-sigv4' require_relative 'aws-sdk-acm/types' require_relative 'aws-sdk-acm/c...
23.895833
91
0.736704
393b298e107203ac32b1a4d98c700163be2d9a73
462
module MysqlInspector class Column < Struct.new(:name, :sql_type, :nullable, :default, :auto_increment) include MysqlInspector::TablePart def to_sql parts = [] parts << quote(name) parts << sql_type parts << (nullable ? "NULL" : "NOT NULL") parts << "DEFAULT #{default}" if defa...
21
83
0.599567
1dd5c99c2db637bf7784d976809613afbc870507
3,528
# frozen_string_literal: true class String # If you pass a single integer, returns a substring of one character at that # position. The first character of the string is at position 0, the next at # position 1, and so on. If a range is supplied, a substring containing # characters at offsets given by the range ...
33.283019
90
0.589853
3934c936f20e8dec46b9ff5589a708742d6de1a2
9,788
require 'spec_helper' feature 'Expand and collapse diffs', js: true, feature: true do include WaitForAjax let(:branch) { 'expand-collapse-diffs' } before do login_as :admin project = create(:project) # Ensure that undiffable.md is in .gitattributes project.repository.copy_gitattributes(branch)...
33.067568
131
0.641602
61411e1d93738721c4e99e3af416f668b0da407c
1,287
class User < ApplicationRecord # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable, devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :omniauthable, omniauth_providers: [:github,...
37.852941
125
0.731935
abfb6c20416fa6d9427aef18724e5b0e3838f9a2
12,557
# -*- coding: binary -*- # # Author:: Michael Neumann # Copyright:: (c) 2005 by Michael Neumann # License:: Same as Ruby's or BSD # require 'postgres_msf' require 'postgres/buffer' require 'rex/io/stream' # Monkeypatch to preserve original code intent # (postgres-pr originally defined read_exactly_n_byte...
23.040367
110
0.66019
87710d3f74f4d9322502ac9f48692071526901c3
1,787
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'User API', :type => :request do let(:user) { create :user } let(:headers) do { 'Accept' => 'application/json', 'Content-Type' => 'application/json', 'Authorization' => user.uuid } end let(:params) do { :...
23.513158
85
0.615557
4a95a7b518228bcaf922210e4ac71770c4620fe1
2,187
module ViewModel module Cepc800 class CommonSchema < ViewModel::BaseViewModel def assessment_id xpath(%w[RRN]) end def date_of_expiry xpath(%w[Valid-Until]) end def report_type xpath(%w[Report-Type]) end def address_line1 xpath(%w[Proper...
19.881818
63
0.597622
39332fe3bde09b6e93bfe7bfea805933f0141d43
313
class CreateSongs < ActiveRecord::Migration[5.1] def change create_table :songs do |t| t.string :name t.integer :duration t.integer :genre_id t.boolean :featured, default: false t.string :featured_hero_image_url t.text :featured_text t.timestamps end end end
22.357143
48
0.661342
acee0356ddb9946dc91d7d75a1d5c60b62da7369
2,499
Rollbar.configure do |config| # Without configuration, Rollbar is enabled in all environments. # To disable in specific environments, set config.enabled=false. # Here we'll disable in 'test': if Rails.env.test? || Rails.env.development? config.enabled = false end # By default, Rollbar will try to call...
44.625
93
0.738695
5ddcc90ff890be7d8dd39d6bddf243c38b8ceb89
987
class ReviewComponent < GovukComponent::Base attr_reader :id renders_one :heading, "HeadingComponent" renders_one :body def initialize(id:, classes: [], html_attributes: {}) super(classes: classes, html_attributes: html_attributes.merge(id: id)) @id = id end private def default_classes %w...
21.933333
98
0.66464
33d7a5177e4a7363abf53de1986903e67373937c
18,535
# # # module ImportService require 'csv' # given an id from the pending table return a list of people that could be a match def self.getPossibleMatches(pending_id) people = Arel::Table.new(:people) pending_import_people = Arel::Table.new(:pending_import_people) peoplesources = Arel::Table.new(:peop...
38.857442
211
0.653197
08f0b64bb53ed3e9051cbf84cd35e0dd230bf90a
915
require_relative '../../../automated_init' context "Raw Output" do context "Context" do context "Styling" do output = Output::Raw.new output.verbose = true output.writer.enable_styling! control_fixture = Controls::Fixture.example(output) control_fixture.instance_exec do ...
21.27907
72
0.610929
61f5924d501c8e6edab8c53166b0af44d903ee85
480
class Conference @@all = [] attr_accessor :name def initialize(name) @name = name save end def save @@all << self end def self.all @@all end def self.find_or_create_by_conference(name) conference_finder = self.all.find{|conference| conference....
16.551724
79
0.55625
03de4b3c60db0e73e7c536f33d19f340e499a182
4,037
module Api module V1 class CommoditiesController < ApiController before_filter :find_commodity, only: [:show, :changes] def show @measures = MeasurePresenter.new(@commodity.measures_dataset.eager({geographical_area: [:geographical_area_descriptions, ...
64.079365
164
0.395591
28b45f71e62bfdddd2e1ab359816e6542ce4c045
1,668
# Copyright 2016 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
32.076923
115
0.688249
334b9cf9f51fc84e2283c5cee7cabd7f80295951
1,203
# frozen_string_literal: true # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
27.976744
74
0.657523
e243419cedac9c0ca0b4b55c83b2445502e90ff8
728
module Arango class Database module Transactions # === TRANSACTION === def transaction(action:, intermediate_commit_count: nil, intermediate_commit_size: nil, lock_timeout: nil, max_transaction_size: nil, params: nil, read: [], wait_for_sync: nil, write: []) Arango::Tran...
48.533333
152
0.667582
39566524c7ad6f63e0e55e6cdb30a382115ed88a
9,899
require 'spec_helper' describe Spree::InventoryUnit, :type => :model do let(:stock_location) { create(:stock_location_with_items) } let(:stock_item) { stock_location.stock_items.order(:id).first } let(:line_item) { create(:line_item, variant: stock_item.variant) } context "#backordered_for_stock_item" do ...
32.13961
114
0.696636
0140048a520b285cd23f72a03d45055e9e3dacdc
1,562
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
36.325581
86
0.727273
79c15192adf4e36a6105d6503326886bd10b8c0b
365
Rails.application.routes.draw do get 'outlay/index' get 'outlay/new' devise_for :users root 'users#profile' resources :outlays, only: %i[index new create index_no_group] resources :groups get 'sign_up', to: 'users#new' get 'outlays/index_no_group', to: 'outlays#index_no_group' get 'external', to: 'out...
28.076923
63
0.728767
7a957314a52256379240e362b68c422dcf74c6c4
674
cask :v1 => 'sookasa' do version '3.13.9' sha256 'bf6683e024d62700c879501a8db2dd1d36718c0898ccb6d8b76999f4e6a31d93' # cloudfront.net is the official download host per the vendor homepage url "https://d2rs8uj3cnos4.cloudfront.net/mac-apps/releases/Sookasa_#{version}.pkg" name 'Sookasa' appcast 'https://s3.a...
37.444444
102
0.750742
ffce5115bbfe290f72376f55ffb2c533aff772b7
1,794
Puppet::Type.newtype(:jboss_resourceadapter) do @doc = "Manages resource adapters on JBoss Application Server" ensurable newparam(:name) do desc "The name/ID of resource adapter." isnamevar isrequired end newproperty(:archive) do desc "The resource adapter archive." isrequired end ...
22.148148
65
0.697324
26943be13e68b59c15f7e3c2ca5e0e89bca602fc
1,298
# 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-fsx/typ...
24.037037
78
0.730354
87ddfcfb34c7d07c97a47bc68f3734334d6560b5
2,331
module Locomotive class PagePresenter < BasePresenter ## properties / collections ## properties :title, :slug property :parent_id property :parent_fullpath, only_setter: true property :position, type: 'Integer' properties :handle, :response_type, :cache_strategy property ...
28.084337
87
0.686401
1cecfb2e39e7053c838752ef6c5f1ef4eaf4e864
1,560
# # Be sure to run `pod lib lint login.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 = 'login' s.ve...
36.27907
101
0.633333
086522fd0799b5703d5120a1d62bb16c383f8001
85
ACCESS_TOKEN_SALT = "S4828341189aefiasd#ASDF" RG_IV = "PPKLKAJDKGHALDJL482823458028"
28.333333
45
0.847059
7930f65db41d1aa3521614508b741ae6d814ef32
527
cask 'kite' do version '0.20170531.0' sha256 '1170e3c338423c8dd73f52cd1fc98000bbe0a3d1528e14bcba3778a2c78afcd4' # s3-us-west-1.amazonaws.com/kite-downloads was verified as official when first introduced to the cask url "https://s3-us-west-1.amazonaws.com/kite-downloads/Kite-#{version}.dmg" appcast 'https://r...
32.9375
104
0.764706
ed32f7e9f1d82dc7de7c025cb0fcc922cf309587
11,521
require 'test_helper' class RemoteTransFirstTransactionExpressTest < Test::Unit::TestCase def setup @gateway = TransFirstTransactionExpressGateway.new(fixtures(:trans_first_transaction_express)) @amount = 100 @declined_amount = 21 @credit_card = credit_card('4485896261017708') @check = check ...
32.637394
119
0.735092
e24ca20f2993970ac39083241029c5a85aeb2400
1,842
require "test_helper" class Standard::FormatterTest < UnitTest Offense = Struct.new(:corrected?, :line, :real_column, :message) def setup @some_path = path("Gemfile") @io = StringIO.new @subject = Standard::Formatter.new(@io) end def test_no_offenses_prints_nothing @subject.file_finished(@so...
29.709677
80
0.687296
6ac8ff7e9eb4a625bc12b8c320224c5da224b8e4
355
cask 'adventure' do version '2.1' sha256 '743c6912a29cb225a4e44bdf59f65286fd00ada32e7747e83c8379bb532f9f5d' url 'https://www.lobotomo.com/products/downloads/Adventure.dmg' appcast 'https://www.lobotomo.com/products/Adventure/profileInfo.php' name 'Adventure' homepage 'https://www.lobotomo.com/products/Adve...
29.583333
75
0.780282
28b511c7c27b7103f29bcc5a9195291b140533a5
704
# frozen_string_literal: true module DesignManagement class CopyDesignCollectionWorker include ApplicationWorker sidekiq_options retry: 3 feature_category :design_management tags :exclude_from_kubernetes idempotent! urgency :low def perform(user_id, issue_id, target_issue_id) use...
23.466667
73
0.710227
261fbc223fa7fba0e79be575a5b31a4b3205407a
1,940
class Jenkins < Formula desc "Extendable open source continuous integration server" homepage "https://jenkins-ci.org" url "http://mirrors.jenkins-ci.org/war/1.653/jenkins.war" sha256 "48e33fab851459c0e81fc2d6f36f1795490d862d1d1f3d3a79c46c945bdb44fc" head do url "https://github.com/jenkinsci/jenkins.git" ...
26.575342
106
0.618557
11783a74a9a065532e2369fbb84fa5bc2e8e4549
1,159
class WorldCuisines::Recipe attr_accessor :name, :picture_url,:url, :number_servings, :cookig_time, :ingredients, :instructions @@all = [] def self.all @@all end def initialize(recipe_hash) recipe_hash.each {|key, value| self.send(("#{key}="), value)} @@all << self end def self.new_from_col...
21.072727
101
0.612597
26590dc3da6b0a8f1a7d3df6e9fd3396baaf2fc0
1,413
# 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-apigate...
26.166667
86
0.754423
ab218b8910c78f0d8d93900915483a98bc4bbc9e
2,667
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.652174
87
0.774278
bf42f931d372775565782a9328faab78c6e7910d
1,125
cask "macupdater" do version "2.1.1,12344" sha256 "2d92aefeb5705f23be1eaaa692549ee4f3bc49b076bf13d1c7e94dd3cc9f252c" url "https://www.corecode.io/downloads/macupdater_#{version.csv.first}.dmg" name "MacUpdater" desc "Track and update to the latest versions of installed software" homepage "https://www.corec...
34.090909
77
0.750222
ed37e44e201cab0e2be6b44d7a87278dffafd6d2
728
# frozen_string_literal: true class AddPostgresReindexActionsTable < ActiveRecord::Migration[6.0] include Gitlab::Database::MigrationHelpers DOWNTIME = false disable_ddl_transaction! def up create_table :postgres_reindex_actions, if_not_exists: true do |t| t.datetime_with_timezone :action_start, n...
26.962963
70
0.75
2120a8a6ce9d460dbb517270275334fcd93522f3
683
#!/usr/bin/env rspec require 'spec_helper' describe 'cloudera::cdh5::whirr', :type => 'class' do # context 'on a non-supported operatingsystem' do # let :facts do { # :osfamily => 'foo', # :operatingsystem => 'bar' # } # end # it 'should fail' do # expect { # should raise_er...
22.766667
85
0.582723
18eb5ecca21e2a39db80a853fc07b391fff6b8c6
6,496
# frozen_string_literal: true # 1/ check if ENV key exist then validate and set # 2/ if no check in credentials then validate and set # 3/ if no generate display warning, raise error in production, and set require 'barong/app' require 'barong/keystore' private_key_env = ENV['JWT_PRIVATE_KEY'] private_key_path = ENV...
42.736842
126
0.690733
bfe3b3bf6ee71b1699593daf76403d9ce2edc098
22,574
require 'rails_helper' require 'date' require 'common/format' describe UserTrainingsController, type: :controller do it_behaves_like( "(generic CRUD controller actions)", "user_trainings", "TrainingDecorator" ) describe '[AJAX #json_list]' do context "unlogged user" do it "displays always the Login p...
47.42437
160
0.615708
1d329de8fd4c5c39dfec9d0bb091185d76621c90
1,568
OpenFarm::Application.configure do config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = false config.assets.js_compressor = :uglifier config.assets.compile = true config.assets.d...
43.555556
77
0.65051
e8c187721cd7ae36ad6a32553ea3f335dbac6807
669
class TechnologyRelatedTechnology < ApplicationRecord include HasContentLinking belongs_to :user, optional: true belongs_to :technology belongs_to :related_technology, class_name: Technology.name after_create do self.reciprocate relation: :technology_related_technologies, parent_object_ref: :technology,...
33.45
134
0.804185
038855977009ba65485b1d31aec19a017bfd4233
1,320
class CustomersController < ApplicationController def index customers = Customer.order(:created_at) render json: customers end def create customer = Customer.new(customer_params) if not customer.valid? render json: { error: true, message: 'Bad Request' }, status: 400 return end ...
26.4
98
0.686364
5d80a872aa6c62566382d01ef47859293e6f432f
1,963
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient def initialize(info={}) super(update_info(info, 'Nam...
27.263889
95
0.537952
ac46145259facacafc59add1ae0870cc17d4e429
7,832
class Location < ActiveRecord::Base belongs_to :user belongs_to :cat has_and_belongs_to_many :posts @@dist_threshold = 200 @@word_pct_threshold = 0.7 @@google_client = GooglePlacesAPI.new def self.filter_stopwords(array) array.delete_if {|word| STOP_WORDS.member?(word.downcase) } end ...
38.019417
132
0.58427
ffd0658770fa8b12cb5d2ed5b9cea7173ed0fc05
1,464
class UsersController < ApplicationController before_action :logged_in_user, only:[:index, :edit, :update, :destroy] before_action :correct_user, only:[:edit, :update] before_action :admin_user, only: :destroy def index @users = User.paginate(page: params[:page]) end def show @user = User.fi...
20.054795
82
0.634563
ff245f21de0e096bacad1c265870d51f03950fec
59,648
# 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_06_01 # # Azure EventGrid Management Client # class Domains include MsRestAzure # # Creates and in...
44.881866
154
0.700459
1a93881c9cfce22fd8c9bb7627cbc6a5c06cf54a
1,427
# frozen_string_literal: true require_relative 'lib/state_machine/version' Gem::Specification.new do |spec| spec.name = 'state_machine' spec.version = StateMachine::VERSION spec.authors = ['Felipe Gentil'] spec.email = ['cdigentil@gmail.com'] spec.summary = 'A very simple...
40.771429
87
0.678346
3817525117678588a8be6fdd90ebbc97105c5e3b
392
cask :v1 => 'todotxt' do version '1.5.1' sha256 'c848d808d2ea7147cd6f822f518cfcf622041a1d907406be56bb9caf58e5ca4c' url "https://github.com/mjdescy/TodoTxtMac/releases/download/#{version}/TodoTxtMac.app.zip" appcast 'https://github.com/mjdescy/TodoTxtMac/releases.atom' name 'TodoTxtMac' homepage 'https://mj...
30.153846
93
0.762755
b9bf3f7de20d75114aa948bc99adc750c7f86410
380
Rails.application.routes.draw do namespace :api do namespace :v1 do resources :challenger, only: [:index, :show, :create, :challenge] end end namespace :api do namespace :v1 do resources :products, only: [:index, :show, :create] end end # For details on the DSL available within thi...
27.142857
102
0.684211
4a7b74ba36083be12fa6a27bfd4a9bfe9e42c563
709
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
30.826087
78
0.748942
1aad399f4ca447260c4881e21111c20a764c6d43
3,853
namespace :backgroundrb do require 'yaml' desc 'Setup backgroundrb in your rails application' task :setup do script_dest = "#{Rails.root}/script/backgroundrb" script_src = File.dirname(__FILE__) + "/../../script/backgroundrb" FileUtils.chmod 0774, script_src defaults = {:backgroundrb => {:ip => ...
37.048077
126
0.688814
116de88c7f9f81e3a152c2c1ba68bd68b87633f3
200
module Travis::API::V3 class Queries::Gdpr < Query def export(user_id) GdprClient.new(user_id).export end def purge(user_id) GdprClient.new(user_id).purge end end end
16.666667
36
0.66
e270233d32a10f7cd6ea45834a692af7fb6f8639
739
cask "milanote" do version "2.2.24" sha256 "113228205b9af2f808d26a1d432449b6b07c022340f231d548c6004cdd01f3a2" # milanote-app-releases.s3.amazonaws.com/ was verified as official when first introduced to the cask url "https://milanote-app-releases.s3.amazonaws.com/Milanote-#{version}.dmg" appcast "https://www....
33.590909
102
0.729364
6a3bca46645d5999f71635fb9990dc4af7c812aa
1,044
module Poper class ConfigFile EMPTY = { 'disallow_single_word' => { 'enabled' => true }, 'character_limit' => { 'enabled' => true, 'number' => 72 }, 'summary_character_limit' => { 'enabled' => true, 'number' => 50 }, 'disallow_gener...
21.306122
80
0.505747
01bef32607abca900bf4f3659fc73576fc101606
3,247
module Spree class Zone < ActiveRecord::Base has_many :zone_members, dependent: :destroy, class_name: "Spree::ZoneMember" has_many :tax_rates, dependent: :destroy has_and_belongs_to_many :shipping_methods, :join_table => 'spree_shipping_methods_zones' validates :name, presence: true, uniqueness: true...
31.221154
117
0.650139
390ca05e72f2d7ec69f368517098795723be759b
1,474
class AppimageTmuxAT30a < Formula desc "AppImage package of Terminal multiplexer" homepage "https://tmux.github.io/" tmux_version = "3.0a" appimage_version = "v3.2a-eaw-appimage-0.1.5" url "https://github.com/z80oolong/tmux-eaw-appimage/releases/download/#{appimage_version}/tmux-eaw-#{tmux_version}-x86_64.Ap...
33.5
133
0.721167
08bedc0a74fae6b64a8a007fa2f44f722a4da9ce
3,248
# # Be sure to run `pod spec lint CCAPI.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/C...
30.35514
96
0.580973
91a060d08970fffdcb1aa298e4afbe1bbd6a8499
2,079
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
35.237288
86
0.759981
21dd9e452a04f078c8255f74422ca501f4ba82a0
896
# This code is free software; you can redistribute it and/or modify it under # the terms of the new BSD License. # # Copyright (c) 2008-2012, Sebastian Staudt require 'steam-condenser/servers/packets/rcon/base_packet' module SteamCondenser::Servers::Packets::RCON # This packet class represents a SERVERDATA_AUTH re...
28
77
0.742188
87fa8f55ae984ee28ce3e66c5b668c45687ceefc
367
require "bundler/setup" require "heroku_tool" RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_with ...
24.466667
66
0.754768
21d35755104fe10fc3b9439a489d3fb9b56a350f
387
module Dry module Metadata module AST module Struct # base class for ast builders class Base attr_reader :type attr_reader :key def initialize(key, type) @key = key @type = type end def to_ast raise 'Not ...
16.826087
37
0.485788
edb2def8e80ef01d8d153fe6a84e608117c5fd12
2,113
cask "google-chrome-canary" do arch = Hardware::CPU.intel? ? "" : "universal/" version "97.0.4674.2" sha256 :no_check url "https://dl.google.com/chrome/mac/#{arch}canary/googlechromecanary.dmg" name "Google Chrome Canary" desc "Web browser" homepage "https://www.google.com/chrome/canary/" livecheck d...
37.732143
144
0.691907
abf6445262faf9c1ad722b96bdf0aa70e35a56b6
2,044
# see the URL below for information on how to write OpenStudio measures # http://nrel.github.io/OpenStudio-user-documentation/reference/measure_writing_guide/ # start the measure class CreateAndAssignThermalZonesForUnassignedSpaces < OpenStudio::Ruleset::ModelUserScript # human readable name def name return "...
31.446154
135
0.744129
bfde2b5bc37d024a27943e2673ec45d9a5ba1a02
132
class AddEndDateToVolunteers < ActiveRecord::Migration[5.2] def change add_column :volunteers, :end_date, :datetime end end
22
59
0.765152
1a731262097a4826b8cd59a8324f17d58f47d5fd
1,364
# -*- encoding: utf-8 -*- # stub: crass 1.0.4 ruby lib Gem::Specification.new do |s| s.name = "crass".freeze s.version = "1.0.4" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Ryan Grove".freeze] ...
36.864865
112
0.659824
d56e5a799967c53a87358f97c65c0f2cb73060a8
13,913
require "cases/helper" require 'models/post' require 'models/author' require 'models/developer' require 'models/project' require 'models/comment' require 'models/category' require 'models/person' require 'models/reference' class RelationScopingTest < ActiveRecord::TestCase fixtures :authors, :developers, :projects, ...
32.969194
115
0.730252
d5a0486a3e4dfe354ec2ac7bd9ea702b600d7163
1,795
require 'fileutils' module Sass module CacheStores # A backend for the Sass cache using the filesystem. class Filesystem < Base # The directory where the cached files will be stored. # # @return [String] attr_accessor :cache_location # @param cache_location [String] ...
29.42623
100
0.564345
e86b329fca15ffb71c7dfc2b0197da87c797da33
240
class CreateCondominios < ActiveRecord::Migration def change create_table :condominios do |t| t.string :nome, limit: 80, null: false t.string :cnpj, limit: 15, null: false t.timestamps null: false end end end
21.818182
49
0.670833
91f08dbad5d2985a86fe2225e49b00bf9bc2dd59
2,105
require 'spec_helper' describe 'Admin::Hooks', :js do before do @project = create(:project) sign_in(create(:admin)) @system_hook = create(:system_hook) end describe 'GET /admin/hooks' do it 'is ok' do visit admin_root_path page.within '.nav-sidebar' do click_on 'Hooks' ...
23.651685
83
0.650831
5d82804c4aa73de62eb265cb446f864858cf7688
2,812
require 'cases/sqlserver_helper' require 'models_sqlserver/sql_server_natural_pk_data' require 'models_sqlserver/sql_server_natural_pk_data_schema' class SchemaTestSqlserver < ActiveRecord::TestCase setup do @connection = ActiveRecord::Base.connection end def read_schema_name(table_name) ActiveRecord::...
38
105
0.73293
798ce1f8ab5bc2677771f31e5c4aef633fd51b82
560
require 'rails_helper' RSpec.describe "planifications/new", type: :view do before(:each) do assign(:planification, Planification.new( :year => 1, :user => nil, :possibility => nil )) end it "renders new planification form" do render assert_select "form[action=?][method=?]", pl...
22.4
76
0.651786
61595eb0209ce14260db9ebc707ec62ac0977494
134
json.extract! race, :id, :name, :details, :date, :address, :distance, :created_at, :updated_at json.url race_url(race, format: :json)
44.666667
94
0.716418
2160255362d8f7cf0805f70a334db5ad56c1fed8
143
class AddMetaKeywordsToComfyCmsPages < ActiveRecord::Migration def change add_column :comfy_cms_pages, :meta_keywords, :string end end
23.833333
62
0.804196
ed8435d0ef813fe9656abe2a031b237595aed9ce
2,785
# Run Coverage report require 'simplecov' SimpleCov.start do add_group 'Controllers', 'app/controllers' add_group 'Helpers', 'app/helpers' add_group 'Mailers', 'app/mailers' add_group 'Models', 'app/models' add_group 'Views', 'app/views' add_group 'Libraries', 'lib' end # Configure Rails Environment ENV['R...
32.011494
124
0.759785
bb393111ce9b602b6de6dc78fd26396e555e3cfa
550
# frozen_string_literal: true require "metanorma/document/basic_document/contribmetadata/integrity_value" module Metanorma; module Document; module BasicDocument # Digital signature. class Signature < IntegrityValue register_element do # Algorithm used to derive digital signature, as defined in ISO 1488...
27.5
76
0.745455
1cd7d017a6ca1c9e93c042a9a1ea279d64d61e4c
300
# frozen_string_literal: true class ChangeRelationBetweenGroupsAndRecommendations < ActiveRecord::Migration[4.2] def change drop_join_table :groups, :recommendations add_reference :recommendations, :group, index: true, type: 'uuid' add_foreign_key :recommendations, :groups end end
27.272727
82
0.783333
e8d7e24968ff6db18da3b00fb34779f4e9eb4753
1,569
module Spreader # Class to get information on a meme from the subreddit class Meme def initialize(data) @data = data end attr_accessor :data alias_method :raw, :data # True/False if video or not # @return [Boolean] def is_video...
22.098592
59
0.447419
e8b3fcb13d4d5d6635a0bec7f58ea1259d8ec631
11,173
## # WARNING: Metasploit no longer maintains or accepts meterpreter scripts. # If you'd like to imporve this script, please try to port it as a post # module instead. Thank you. ## #Meterpreter script for ping sweeps on Windows 2003, Windows Vista #Windows 2008 and Windows XP targets using native windows commands. #...
30.527322
122
0.545422
18b07b59693db77c2036b4cc38e0b8cc51787669
827
require 'html5/constants' require 'html5/filters/base' module HTML5 module Filters class WhitespaceFilter < Base SPACE_PRESERVE_ELEMENTS = %w[pre textarea] + RCDATA_ELEMENTS SPACES = /[#{SPACE_CHARACTERS.join('')}]+/m def each preserve = 0 __getobj__.each do |token| ...
22.351351
77
0.548972
bff583063d4cec70e02d1e1a72c548863be27fe1
14,638
#!/usr/bin/env ruby require 'open-uri' require 'nokogiri' require 'json' require 'fileutils' require 'parallel' require 'ruby-progressbar' require "webvtt" class SessionInfo attr_accessor :title, :genre, :url, :m3uUrl, :summaryText, :sessionDetail def initalize() @title = "" @genre = "" @url = "" ...
27.107407
152
0.656715
39ed51d181140025411bb6e16831c55aab5b6ee4
2,385
# frozen_string_literal: true require_dependency "#{Rails.root}/lib/training_progress_manager" require_dependency "#{Rails.root}/lib/training_library" require_dependency "#{Rails.root}/lib/data_cycle/training_update" class TrainingController < ApplicationController layout 'training' def index @focused_librar...
31.8
86
0.769392
d5c983fac810dbe91eaa5656e12dd31785f657f8
1,586
# cookies_api # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module CookiesApi # Describes physical location info. class Location < BaseModel SKIP = Object.new private_constant :SKIP # Street address. # @return [Address] attr_accessor :addres...
23.671642
70
0.558008
624a77a4a117c2f35677e78f8362c887a471cce9
552
class Operator::AdditionalInfo < ActiveRecord::Base belongs_to :info , class: ::Operator::Info belongs_to :color_info , class: ::Design::Color::Info belongs_to :railway_line_code_info , class: ::Operator::CodeInfo belongs_to :station_code_info , class: ::Operator::CodeInfo [ :railway_line , :station ].each ...
26.285714
77
0.641304
113d6b4311ca78123bd69781b39f4be8412a5a5e
157
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run OctoCat::Application
31.4
67
0.770701
038858f4368f7ced5b0ed114f7452973a4469c42
814
require 'test_helper' class MicropostsControllerTest < ActionDispatch::IntegrationTest def setup @micropost = microposts(:orange) end test 'should redirect create when not logged in' do assert_no_difference 'Micropost.count' do post microposts_path, params: { micropost: { content: 'blah' } } e...
26.258065
70
0.738329
d508827373706b83c4a3bf961254a78460d700e4
1,233
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" # require "active_job/railtie" require "active_record/railtie" # require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" # require "action_mailbox/engine" # require "action...
30.825
79
0.76399
26cf8338f55a9411a2f800dd3751e666388c037c
780
Pod::Spec.new do |s| s.name = "OmerM" s.version = "0.0.7" s.summary = "A nice logger tool in Swift." s.description = <<-DESC A nice logger tool in Swift. Cheers DESC s.homepage = "https://github.com/omerm-inmanage/OmerM.git" s.license = { :type => "MIT", :f...
26.896552
98
0.59359
8749cf27357b0eb3ea41635b2919bf9659165363
484
class FontAlegreya < Cask # version '1.003' version 'latest' sha256 :no_check url 'https://github.com/w0ng/googlefontdirectory/trunk/fonts/alegreya', :using => :svn, :revision => '50', :trust_cert => true homepage 'http://www.google.com/fonts/specimen/Alegreya' font 'Alegreya-Blac...
25.473684
73
0.681818
acc29ccada4dfbdf2ada78ce28436981b11d0992
610
Pod::Spec.new do |s| s.name = "FSExtendedAlertKit" s.version = "0.1.0" s.summary = "Block based alert views and action sheets, with activity indicator and progress view support." s.homepage = "https://github.com/ellneal/FSExtendedAlertKit" s.license = { :type => 'BSD', :file => 'LIC...
40.666667
114
0.618033
f8ec28e3e4e1f7b9cd76195c51c89bb1ac162a4b
715
module Search class RefreshAuthTokensService attr_reader :errors def initialize(params) @search_query = params[:q] @order_query = params[:o] @direction_query = params[:d] @params = params @records = RefreshAuthToken.all end def execute paginate order ...
18.815789
67
0.6