conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix published boolean attribute error\n"
},
{
"from": "human",
"value": "require_dependency \"kebapress/application_controller\"\n\nmodule Kebapress\n class Hq::PostsController < ApplicationController\n layout 'layouts/hq/application'\n\n def new\n @post... | ruby | chosen |
[
{
"from": "system",
"value": "Store access token in login\n"
},
{
"from": "human",
"value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n def github\n auth = request.env['omniauth.auth']\n raise BadRequest if auth.blank?\n\n id = auth[:uid]\n login = ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix redirect path after signup\n"
},
{
"from": "human",
"value": "class User::RegistrationsController < Devise::RegistrationsController\n before_filter :configure_sign_up_params, only: [:create]\n # before_filter :configure_account_update_params, only: [:update]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Define model_name with route keys for the StorageManager model\n"
},
{
"from": "human",
"value": "#\n# StorageManager (hsong)\n#\n#\n\nmodule ManageIQ::Providers\n class StorageManager < ManageIQ::Providers::BaseManager\n include SupportsFeatureMixin\n suppor... | ruby | chosen |
[
{
"from": "system",
"value": "Use duration rather than length for musical works\n\nHaving a `length` property does not seem to play well with the front end\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass Api::MusicalWorkRepresenter < Api::BaseRepresenter\n\n property :id\n proper... | ruby | chosen |
[
{
"from": "system",
"value": "Rename attributes -> new_attributes in AssetManagerUpdateAssetWorker\n\nI'm about to make some changes to this class and this will make them\neasier.\n"
},
{
"from": "human",
"value": "class AssetManagerUpdateAssetWorker < WorkerBase\n def perform(legacy_url_path, ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade IntelliJ IDEA CE to 15.0.1.\n"
},
{
"from": "human",
"value": "cask :v1 => 'intellij-idea-ce' do\n version '15.0'\n sha256 'e9d0f479e692463cda6ab81deda93d4145fb01968bb802a0d7be35e3e0eee73d'\n\n url \"https://download.jetbrains.com/idea/ideaIC-#{version}-c... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor the capture_stderr helper to capture child processes output\n\nSigned-off-by: Krzysztof Wilczyński <5f1c0be89013f8fde969a8dcb2fa1d522e94ee00@linux.com>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule MagicTestHelpers\n def captur... | ruby | chosen |
[
{
"from": "system",
"value": "Add some tests for the activerecord extension"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ActiveRecordTest < Test::Unit::TestCase\n\n context \"The ActiveRecord extension\" do\n setup do\n @account = ActiveRecordAccount.create\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests on policy team\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass PolicyTeamTest < ActiveSupport::TestCase\n test \"should be invalid without a name\" do\n policy_team = build(:policy_team, name: '')\n refute policy_team.valid?\n e... | ruby | chosen |
[
{
"from": "human",
"value": "Add projects_attributes support ruby class for testing\n"
},
{
"from": "gpt",
"value": "def project_attributes(overrides = {})\n\t{\n\t\tname: \"Test project\",\n\t\tdescription: \"This projects is a test\",\n\t\tcoordinates: \"21.1250° N, 101.6860° W\",\n\t\tdate_be... | ruby | chosen |
[
{
"from": "human",
"value": "Delete existing local authority contact details\n\nWe don't need these any more.\n"
},
{
"from": "gpt",
"value": "class UnsetLocalAuthorityContactDetails < Mongoid::Migration\n def self.up\n LocalAuthority.all.each do |authority|\n authority.unset(:contact_a... | ruby | chosen |
[
{
"from": "human",
"value": "Add format page for Canadian Highlander\n"
},
{
"from": "gpt",
"value": "%p\n %em Canadian Highlander\n is an unofficial competitive non-rotating Singleton Constructed format. It uses 100-card decks without commanders.\n\n%p\n Canadian Highlander's most distinctiv... | ruby | chosen |
[
{
"from": "system",
"value": "Allow robots to crawl reports\n\nAAIB, MAIB and RAIB have now transitioned.\n\nWe now want the reports to appear in Google so they can be found by\nusers.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n include Slimmer::Hea... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for passing along the locale param\n\nI broke this in an earlier commit...\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional allowed parameters name and phone to devise controller (required for Rails 4 strong parameters).\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n\n before_filter :prepare_nav\n\n rescue_from CanCan::AccessDen... | ruby | chosen |
[
{
"from": "system",
"value": "Remove private use unicode characters from names\n"
},
{
"from": "human",
"value": "class BundestagPDFExtractor\n def initialize(paper)\n @contents = paper.contents\n end\n\n ORIGINATORS = /der Abgeordneten (.+?)(?:,\\s+weiterer\\s+Abgeordneter)?\\s+und\\s+der... | ruby | chosen |
[
{
"from": "system",
"value": "Move BlockLayout default_layout scope to class method\n\nRails 6.1 adds a deprecation notice related to class level scopes in\nthis instance.\n"
},
{
"from": "human",
"value": "class BlockLayout < Forest::ApplicationRecord\n include Sluggable\n\n has_many :block_s... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up return statement for readability\n"
},
{
"from": "human",
"value": "class Organization < ActiveRecord::Base\n has_many :organization_users\n has_many :users, through: :organization_users\n has_many :orders\n has_many :addresses\n accepts_nested_attribu... | ruby | chosen |
[
{
"from": "human",
"value": "Add card decorator to unify method last_digits\n"
},
{
"from": "gpt",
"value": "module Spree\n module CreditCardDecorator\n def set_last_digits\n self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1)\n end\n\n end\nend\n\n::Sp... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor StartGame service to use convenience methods play/pickup\n"
},
{
"from": "human",
"value": "class StartGame\n attr_reader :errors\n\n def initialize(game)\n @game = game\n @errors = []\n end\n\n def call\n assert_game_ready &&\n remove_pen... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\nrequire 'filmbuff/version'\n\nGem::Specification.new do |s|\n s.name = 'filmbuff'\n s.version = FilmBuff::VERSION\n s.authors = ['Kristoffer... | ruby | chosen |
[
{
"from": "system",
"value": "Make DatabaseRecordValidator dynamically read tables\n"
},
{
"from": "human",
"value": "module Tasks\n module DatabaseRecordValidator\n class << self\n def validate\n filename = \"tmp/validation_results\"\n puts \"\\e[36mOutput will be written... | ruby | chosen |
[
{
"from": "human",
"value": "Add exception extension to retrieve the stacktrace binding\n"
},
{
"from": "gpt",
"value": "module WebConsole\n module ExceptionExtension\n prepend_features Exception\n\n def set_backtrace(*)\n if caller_locations.none? { |loc| loc.path == __FILE__ }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make repo downloads more important"
},
{
"from": "human",
"value": "class RepositoryDownloadWorker\n include Sidekiq::Worker\n sidekiq_options unique: true\n\n def perform(class_name, name)\n klass = \"Repositories::#{class_name}\".constantize\n klass.updat... | ruby | chosen |
[
{
"from": "system",
"value": "Use simpler SPARQL query that does not require Tracker to have data.\n"
},
{
"from": "human",
"value": "require File.expand_path('../test_helper.rb', File.dirname(__FILE__))\n\ndescribe Tracker::SparqlCursor do\n describe \"#get_string\" do\n before do\n co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error: `'parentViewController' is only available on OS X 10.10 or newer`\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'OAuthSwift'\n s.version = '0.4.0'\n s.license = 'MIT'\n s.summary = 'Swift based OAuth library for iOS and OSX.'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Use munin_plugin to render the plugin\n"
},
{
"from": "human",
"value": "cookbook_file File.join(node['munin']['basedir'], \"plugin-conf.d/omnibus_gitlab_sidekiq_rss.conf\") do\n notifies :restart, \"service[munin-node]\"\nend\n\ncookbook_file File.join(node['munin... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated default_executable gem attribute\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/fit_commit/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"fit-commit\"\n gem.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Remove MIDI :poop: since it's not being used :rainbow:\n"
},
{
"from": "human",
"value": "$: << File.dirname(__FILE__)+'/../lib'\nrequire 'ceely'\nCeely::Assignment.new(\"Assignment 1\", 500, 400).run do\n frequency, duration, amplitude = 440, 5, 50\n stack margi... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation test to session\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../../../test/test_helper'\n\nclass DistributionPluginSessionTest < ActiveSupport::TestCase\n\n def setup\n @profile = Enterprise.create!(:name => \"trocas ve... | ruby | chosen |
[
{
"from": "system",
"value": "Use mattr_accessor and make 5 seconds as constant\n"
},
{
"from": "human",
"value": "require 'httparty'\nrequire 'nokogiri'\nrequire 'ares/version'\nrequire 'ares/errors'\nrequire 'ares/logging'\nrequire 'ares/client'\nrequire 'ico-validator'\n\nmodule Ares\n cattr... | ruby | chosen |
[
{
"from": "system",
"value": "Update regex syntax in gemspec\n\nGemspec was failing builds due to\n\nfork_break.gemspec:14:38: C: Use %r around regular expression.\n gem.test_files = gem.files.grep(/^(test|spec|features)\\//)\n\nUpdated the regular expressions\n"
},
{
"from": "human",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Update requires with jruby example\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire \"bson/document\"\nrequire \"bson/types\"\nrequire \"bson/version\"\n\nbegin\n require \"bson/native\"\nrescue LoadError\n $stderr.puts(\"BSON is using the pure Ruby b... | ruby | chosen |
[
{
"from": "system",
"value": "Call JIRA and fetch issue details\n"
},
{
"from": "human",
"value": "require 'slack-ruby-bot'\n\nclass JiraBot < SlackRubyBot::Bot\n match(/([a-z]+-[0-9]+)/i) do |client, data, issues|\n results = []\n tomatch = data.text\n \n # Remove links from text, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations for Address model\n"
},
{
"from": "human",
"value": "class Address < ActiveRecord::Base\n belongs_to :user\n\n def country_name\n country_iso = ISO3166::Country[country]\n country_iso.translations[I18n.locale.to_s] || country_iso.name\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out use of constantize\n\nSigned-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcolesportfolio.com>\n"
},
{
"from": "human",
"value": "# == Schema Information\n# Schema version: 20081201121936\n#\n# Table name: services\n#\n# id ... | ruby | chosen |
[
{
"from": "system",
"value": "Move to 1.0.3 bugfix release\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'gemfresh'\n s.version = '1.0.2'\n s.platform = Gem::Platform::RUBY\n s.authors = ['Jon Williams']\n s.email = ['jon@jonathannen.com... | ruby | chosen |
[
{
"from": "system",
"value": "Add the new Google entry.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'xml_examples'\nrequire 'sslyze/certificate_validation'\n\ndescribe SSLyze::CertificateValidation do\n include_examples \"XML specs\"\n\n subject { described_class.new(xml.... | ruby | chosen |
[
{
"from": "system",
"value": "Check for Rack >= 1.5\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Rack do\n it 'correctly populates params from a Tempfile' do\n input = Tempfile.new 'rubbish'\n begin\n app = Class.new(Grape::API) do\n format :json\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for notification email\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe AdminNotifierMailer, type: :mailer do\n #pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require... | ruby | chosen |
[
{
"from": "system",
"value": "Add capistrano and capistrano_colors as dependencies.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/capistrano/fanfare/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Fletcher Nichol\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add an initial Kari camping app to the main source tree.\n\ngit-svn-id: e0fade74c25be90edb0606ce8d40d6c0447cda8b@54 7a99d2f0-d533-0410-96fe-f25cb2755c1e\n"
},
{
"from": "gpt",
"value": "require 'camping'\n\nCamping.goes :Kari\n\nmodule Kari\n module Controllers\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up RecentUnlocks code duplication\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nmodule Wanikani\n class RecentUnlocks\n # Gets the recent unlocked items (radicals, Kanji and vocabulary).\n #\n # @param [Integer] limit the total numbe... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor so you don't have to define an output file\n"
},
{
"from": "human",
"value": "# rubocop:disable all\n\n# Usage:\n# From a Burden `gris console`:\n#\n# load '/path/to/this/file.rb'\n# input_file = \"/Users/lancew/Code/bearden/data/outsourcers/artist-rosters/... | ruby | chosen |
[
{
"from": "system",
"value": "Add some dependencies and edit Nehm.start command\n"
},
{
"from": "human",
"value": "require 'colored'\nrequire 'highline'\n\nrequire 'nehm/applescript'\nrequire 'nehm/argument_processor'\nrequire 'nehm/artwork'\nrequire 'nehm/cfg'\nrequire 'nehm/configure'\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Fix weird issue on has_many association with polymorphic\n"
},
{
"from": "human",
"value": "class DeliveryPlugin::Option < Noosfero::Plugin::ActiveRecord\n\n belongs_to :delivery_method, :class_name => 'DeliveryPlugin::Method'\n belongs_to :owner, :polymorphic => ... | ruby | chosen |
[
{
"from": "system",
"value": "Set dependency version for actionview\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'knockout_forms/rails/version'\n\nGem::Specification.new do |spec|\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in Ruby default app\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'redis'\n\nclass CloudCredo < Sinatra::Base\n configure do\n redis_service = JSON.parse(ENV['VCAP_SERVICES'])[\"redis\"]\n credentials = redis_service.first[\"credentials\... | ruby | chosen |
[
{
"from": "system",
"value": "[TTPLAT-1117] Add legal name to organization factories.\n"
},
{
"from": "human",
"value": "FactoryBot.define do\n\n factory :organization do\n customer_id { 1 }\n address1 { '100 Main St' }\n city { 'Harrisburg' }\n state { 'PA' }\n zip { '17120' }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update stylesheets assets files test to check for _settings.scss presence\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Foundation install succeeds' do\n scenario 'stylesheets assets files are added' do\n application_css_file = IO.read(\"#... | ruby | chosen |
[
{
"from": "system",
"value": "Update to use new repository\n\n* Geo specific CI jobs were moved to a separate project\n"
},
{
"from": "human",
"value": "require_relative '../../trigger'\nrequire_relative '../../info'\n\nmodule Build\n class Get\n class Geo\n class TriggerPipeline\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow open timeout to be configurable\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\nmodule BookingLocations\n class Api\n def get(id)\n response = open(\"#{api_uri}/api/v1/booking_locations/#{id}.json\", headers_and_options)\n yield JSON.par... | ruby | chosen |
[
{
"from": "system",
"value": "Add default error handler to fetch\n"
},
{
"from": "human",
"value": "require 'rest-client'\nrequire 'json'\nrequire 'memoist'\n\nmodule Trawler\n module Sources\n class JsonFetcher\n\n class << self\n extend Memoist\n\n def get(url)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow configure a custom endpoint\n"
},
{
"from": "human",
"value": "require 'net/http'\nmodule UniaraVirtualParser\n #\n # This module handle the connections between all services and the\n # UniaraVirtual server\n #\n class Client\n ENDPOINT = 'http://virtu... | ruby | chosen |
[
{
"from": "system",
"value": "Add Shipper Name to Shipper Builder\n"
},
{
"from": "human",
"value": "require 'ox'\n\nmodule UPS\n module Builders\n class ShipperBuilder < BuilderBase\n include Ox\n\n attr_accessor :name, :opts\n\n def initialize(opts = {})\n self.name =... | ruby | chosen |
[
{
"from": "human",
"value": "Introduce a VCR repository for acceptance tests\n\nWe'll use our VCR repository to wrap HTTP backed repositories at\nruntime to provide us with fast, deterministic repositories when we\nperform our acceptance tests.\n"
},
{
"from": "gpt",
"value": "require 'vcr'\n\nm... | ruby | chosen |
[
{
"from": "system",
"value": "Complete description and summary in gemspec.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hijri_date/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude archived repositories from search\n\nResolves #141"
},
{
"from": "human",
"value": "module Kobol::Requests\n class Issues < Kobol::Requests::Base\n PERMITTED = [ :language, :label, :repo ]\n\n def search(properties, page)\n updated_after_date = D... | ruby | chosen |
[
{
"from": "system",
"value": "Fix formatter for options that are nil\n"
},
{
"from": "human",
"value": "module CacheComment\n class CommentFormatter\n\n def initialize key, options\n @key = key\n @options = options.symbolize_keys\n @time = Time.now\n end\n\n def star... | ruby | chosen |
[
{
"from": "human",
"value": "Add locale support to URLs\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe ApplicationController do\n let(:instance) { ApplicationController.new }\n\n describe \"#default_url_options\" do\n let(:locale) { :pirate }\n before { I18n.stub(:l... | ruby | chosen |
[
{
"from": "system",
"value": "fix(ios): Fix source URI in podspec\n\nRNSqlite2.git doesn't exist #55"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = \"RNSqlite2\"\n s.version = \"1.0.0\"\n s.summary = \"RNSqlite2\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'port' argument to doc_browser rake task.\n\nCloses #75\n"
},
{
"from": "human",
"value": "namespace :praxis do\n desc \"Generate API docs (JSON definitions) for a Praxis App\"\n task :api_docs => [:environment] do |t, args|\n require 'fileutils'\n\n Pra... | ruby | chosen |
[
{
"from": "system",
"value": "Change set_search_key_name Configuration method to be a true setter, renamed to search_key=\n\nRelated to #81\n"
},
{
"from": "human",
"value": "require 'ransack/constants'\nrequire 'ransack/predicate'\n\nmodule Ransack\n module Configuration\n\n mattr_accessor ... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.5'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Fix content type spec on Rails 6\n\nRails 6 appends the charset to the content type of the response,\nso we need to parse the content type properly in our test.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Spree::ProductsController, type: :co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test which did not work in all cases."
},
{
"from": "human",
"value": "Rails = Class.new do\n require \"#{File.dirname(__FILE__)}/dummy_app/fake\"\n\n def self.root\n Pathname.new(File.dirname(__FILE__))\n end\n\n def self.env\n 'development'\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Change another view spec to pending\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')\n\ndescribe \"/mentorships/show.html.erb\" do\n include MentorshipsHelper\n before(:each) do\n assigns[:mentorship] = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update MOTD at the beginning of the chef-client run\n"
},
{
"from": "human",
"value": "include_recipe 'chef-marketplace::config'\n\ninclude_recipe 'chef-marketplace::_register_plugin'\n\n# 'server', 'analytics', 'aio', 'compliance'\nrole = node['chef-marketplace']['... | ruby | chosen |
[
{
"from": "system",
"value": "Add custom controller matchers for status\n"
},
{
"from": "human",
"value": "RSpec::Matchers.define :respond_with_redirect_to do |path|\n match do |actual|\n response = actual.call\n response.redirect? && response.location =~ /#{path}$/\n end\nend\n\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Move enrollment_info method into separate module\n\nChange-Id: I74102b677b097a105fb472c6f2c1aea35ed06ee0\n"
},
{
"from": "human",
"value": "module DashboardHelper\n\n if defined?(Diamond)\n include Diamond::ThesesHelper\n\n def theses_header_title\n t(\"... | ruby | chosen |
[
{
"from": "system",
"value": "Set minimum iOS version on `platform` in the podspec file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'KeenClientTD'\n spec.version = '3.2.28'\n spec.license = { :type => 'MIT' }\n spec.platforms = { :ios => \"\"... | ruby | chosen |
[
{
"from": "system",
"value": "Update flexibility order with new flex options\n"
},
{
"from": "human",
"value": "class FlexibilityOrder\n def self.all\n %w(power_to_power\n electric_vehicle\n pumped_storage\n power_to_heat\n power_to_heat_industry\n power_to_gas\... | ruby | chosen |
[
{
"from": "system",
"value": "Make send_file_blob protected, because send_data is also protected.\n"
},
{
"from": "human",
"value": "require 'action_controller'\n\nmodule FileBlobs\n\n# Module mixed into ActionController::DataStreaming.\nmodule ActionControllerDataStreamingExtensions\n ETAG = '... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the creation of linksets without a content item.\n\nWe can only currently speculate about the exact\nworkflows, i.e. whether links might be sent to the\npublishing API before the main content item.\n\nSince we don't have a confirmed need for constraining\nthe order of the... | ruby | chosen |
[
{
"from": "system",
"value": "Make final optimizations for the igbinary recipe\n"
},
{
"from": "human",
"value": "php_pear \"igbinary\" do\n action :install\nend\n\ncookbook_file \"/etc/php5/mods-available/igbinary.ini\" do\n source \"igbinary.ini\"\n mode 0644\n owner \"root\"\n group \"ro... | ruby | chosen |
[
{
"from": "system",
"value": "Add mattr accessor to main module\n"
},
{
"from": "human",
"value": "require \"bandicoot/config\"\nrequire \"bandicoot/attribute\"\nrequire \"bandicoot/version\"\nrequire \"bandicoot/dsl\"\nrequire \"bandicoot/processor\"\nrequire 'active_support/all'\n\n# Your code... | ruby | chosen |
[
{
"from": "system",
"value": "Change the default backup dir\n"
},
{
"from": "human",
"value": "# Dev shit\nif ENV[\"BAK_SHELL_DEV_SHIT\"] == \"devshit\"\n require \"awesome_print\" rescue nil\nend\n\n# Standard lib shit\nrequire \"fileutils\"\n\n# Require gems shit\nrequire \"gli\"\nrequire \"r... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor MARCResponse to return objects we control.\n\nThis should allow us to enrich the output in an OO way.\n"
},
{
"from": "human",
"value": "class AlmaAdapter\n # Responsible for converting an Alma::BibSet to an array of unsuppressed MARC\n # records.\n clas... | ruby | chosen |
[
{
"from": "system",
"value": "Add authz - only admin can download an edition\n"
},
{
"from": "human",
"value": "class Api::EditionsController < ApplicationController\n\n def show\n @edition = FabulatorEdition.find(:first, :conditions => [ \"name = ?\", params[:id] ])\n respond_to do |form... | ruby | chosen |
[
{
"from": "system",
"value": "Set the Cuba application templating engine to Mote.\n\nThat is really all the plugin should do. Nothing more.\n"
},
{
"from": "human",
"value": "# borrowed from:\n# https://github.com/harmoni-io/mote-render/blob/master/lib/mote/render.rb\nmodule Mout\n module Rende... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem dependency at the top\n"
},
{
"from": "human",
"value": "require_relative \"gothonweb/version\"\nrequire_relative \"map\"\nrequire \"sinatra\"\nrequire \"erb\"\n\nmodule Gothonweb\n\n use Rack::Session::Pool\n\n get '/' do\n # this is used to \"setup\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct mapping of PersonNameIdentifier under Name\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule ONIX\n class Name\n include ROXML\n\n xml_name \"Name\"\n\n xml_accessor :person_name_type, :from => \"PersonNameType\", :as => Fixnum, :to_... | ruby | chosen |
[
{
"from": "system",
"value": "Use the host pointer over copying by default when creating a buffer\n\nThis continues to make the contents at the buffer's host pointer\nmodifiable until a kernel actually uses it.\n"
},
{
"from": "human",
"value": "module OpenCL\n class CL\n include FFI::OpenCL... | ruby | chosen |
[
{
"from": "system",
"value": "Remove all Sidekiq-specific stuff from job, enable retries by default\n"
},
{
"from": "human",
"value": "require 'sidekiq'\n\nmodule ActiveJob\n module QueueAdapters\n class SidekiqAdapter\n class << self\n def queue(job, *args)\n item = { '... | ruby | chosen |
[
{
"from": "system",
"value": "Make monitored a keyword argument"
},
{
"from": "human",
"value": "require 'json'\n\nmodule Log\n class Event\n\n def initialize(name, monitored=false, context={})\n @name = name\n @monitored = monitored\n @context = context\n end\n\n def to... | ruby | chosen |
[
{
"from": "system",
"value": "Add deletion dependency to comments\n"
},
{
"from": "human",
"value": "class Link\n include Mongoid::Document\n include Mongoid::Timestamps\n\n field :url, :type => String\n\n references_many :comments\n referenced_in :user\n\n validates :url, :presence => tru... | ruby | chosen |
[
{
"from": "system",
"value": "Add charlatan as a dep\n"
},
{
"from": "human",
"value": "module ROM\n module Model\n class ValidationError < CommandError\n include Charlatan.new(:errors)\n include Equalizer.new(:errors)\n end\n end\nend\n\nrequire 'rom/rails/model/params'\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Add voted_on? method and tomdoc all methods\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n include ActiveModel::ForbiddenAttributesProtection\n include Gravtastic\n\n attr_accessor :login\n \n # Include default devise modules. Others avail... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Miss and add Dr to honorifics\n"
},
{
"from": "human",
"value": "class User < ApplicationRecord\n HONORIFICS = %w(\n Miss\n Mr.\n Mrs.\n Ms.\n ).freeze\n\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :t... | ruby | chosen |
[
{
"from": "system",
"value": "Sort DNS results for less config file updates\n"
},
{
"from": "human",
"value": "require \"srvrouter/version\"\nrequire \"resolv\"\n\nmodule SRVRouter\n class HAProxyConfig\n attr_accessor :frontend_port, :backends, :service\n\n def initialize(service, fronte... | ruby | chosen |
[
{
"from": "system",
"value": "Add link to author decorator\n"
},
{
"from": "human",
"value": "class AuthorDecorator < ApplicationDecorator\n decorates :user\n\n delegate_all\n\n def email\n source.try :email || \"No Email\"\n end\n\n def name\n source.try :name || \"Anonymous\"\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Add output variable for Tilt (tizoc).\n"
},
{
"from": "human",
"value": "require \"tilt\"\n\nclass Cuba\n module Render\n def self.setup(app)\n app.settings[:template_engine] ||= \"erb\"\n app.settings[:views] ||= File.expand_path(\"views\", Dir.pwd)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set ADA colour theme correctly.\n"
},
{
"from": "human",
"value": "Themenap::Config.active = ! ADAPT::CONFIG['adapt.theme.old']\nThemenap::Config.server = 'http://178.79.149.181'\nThemenap::Config.snippets =\n [ { :css => 'title',\n :text => '<%= yield :title ... | ruby | chosen |
[
{
"from": "system",
"value": "Save api key as well.\n"
},
{
"from": "human",
"value": "require \"json\"\nrequire \"sinatra\"\nrequire \"haml\"\nrequire \"sass\"\nrequire \"bootstrap-sass\"\nrequire File.expand_path(\"location\", __dir__)\n\nclass CarGuard < Sinatra::Base\n configure do\n set... | ruby | chosen |
[
{
"from": "system",
"value": "Raise an exception if API call returns an error\n"
},
{
"from": "human",
"value": "require 'httparty'\n\nmodule Dynadot\n class Api\n include HTTParty\n base_uri 'https://api.dynadot.com/api2.html'\n\n def initialize(key = nil)\n raise ArgumentError, ... | ruby | chosen |
[
{
"from": "system",
"value": "Use `...` instead of ellipsis and only output if TTY.\n"
},
{
"from": "human",
"value": "module CaskTapMigration\n def initialize(user, repo)\n super\n\n return unless user == \"caskroom\"\n\n # TODO: Remove this check after migration.\n return unless r... | ruby | chosen |
[
{
"from": "system",
"value": "Add attr_reader for team and issues\n"
},
{
"from": "human",
"value": "require \"httparty\"\nrequire \"pry\"\n\nrequire \"githubber/version\"\nrequire \"githubber/pull_requests\"\nrequire \"githubber/issues\"\nrequire \"githubber/search\"\nrequire \"githubber/teams\... | ruby | chosen |
[
{
"from": "human",
"value": "Add a basic Event class.\n"
},
{
"from": "gpt",
"value": "# Copyright 2014 Noel Cower\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licen... | ruby | chosen |
[
{
"from": "system",
"value": "Load application configuration parameters from file.\n"
},
{
"from": "human",
"value": "# Defines our constants\nRACK_ENV = ENV['RACK_ENV'] ||= 'development' unless defined?(RACK_ENV)\nPADRINO_ROOT = File.expand_path('../..', __FILE__) unless defined?(PADRINO_ROOT)... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.