conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Increase podspec versin to 0.0.14\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DFImageManager\"\n s.version = \"0.0.13\"\n s.summary = \"Complete solution for fetching, preheating, caching and adjusting images\"\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "[vcloud_director] Make test be less chatty.\n"
},
{
"from": "human",
"value": "Shindo.tests('Compute::VcloudDirector | organization requests', ['vclouddirector']) do\n\n @service = Fog::Compute::VcloudDirector.new\n\n tests('#get_organizations').data_matches_schem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a missing version attribute\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# Chef Server Core\nchef_ingredient 'chef-server' do\n version node['test']['chef-server-core']['version']\n config <<... | ruby | chosen |
[
{
"from": "system",
"value": "Update example to match README\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"deterministic\"\nrequire \"deterministic/core_ext/either\"\n\ndescribe Deterministic::CoreExt::Either do\n it \"does something\" do\n h = {}\n h.extend(Determ... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs to ensure add_to_group is sending emails\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Events::UserAddedToGroup do\n let(:membership){ create :membership }\n let(:memberships) { [create(:membership), create(:membership)] }\n let(... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new Ruby 1.9 hash syntax.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nmodule Socializer\n RSpec.describe PeopleController, type: :routing do\n routes { Socializer::Engine.routes }\n\n describe 'routing' do\n it 'routes to #index'... | ruby | chosen |
[
{
"from": "system",
"value": "Test if each_object(singleton_class) works, since JRuby added it.\n\nFixes #22376.\n\nJRuby 9.0.5.0 will support ObjectSpace.each_object against a\nclass's singleton class, since that's essentially just walking an\ninternal subclasses structure we already maintain. This test wa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug that caused stickies to be stickied to the, uh, bottom\n"
},
{
"from": "human",
"value": "require_dependency \"feeder/application_controller\"\n\nmodule Feeder\n class FeedsController < ApplicationController\n def index\n @items = Item.order(stick... | ruby | chosen |
[
{
"from": "system",
"value": "Change showing records on the home page from 30 to 20\n"
},
{
"from": "human",
"value": "class StaticPagesController < ApplicationController\n def home\n @songs = Song.paginate(page: params[:page])\n end\n\n def stats\n if params[:y]\n start = Date.new... | ruby | chosen |
[
{
"from": "system",
"value": "Add more non-interactive options to apt-get\n\nEven when `DEBIAN_FRONTEND=noninteractive` and `-y` is given,\n`apt-get install` requests user input on some cases.\n\n```\n$ sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y lxc-docker=1.4.1\nReading package lists... Don... | ruby | chosen |
[
{
"from": "system",
"value": "Add rails_db files to precompiled list\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy a data key's values when it is destroyed\n"
},
{
"from": "human",
"value": "module Voynich\n module ActiveRecord\n class DataKey < ::ActiveRecord::Base\n self.table_name_prefix = 'voynich_'\n\n attr_writer :plaintext\n\n has_many :values, ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to minor 2.5"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'stream_rails/version'\n\nGem::Specification.new do |gem|\n gem.name = 'stream_rails'\n gem.version = StreamRails::VERSION\n gem.platform... | ruby | chosen |
[
{
"from": "system",
"value": "Test we aren't slugging in 21-bit unicode space\n"
},
{
"from": "human",
"value": "require_relative '../test_helper'\n\nclass SanitizedTest < ActiveSupport::TestCase\n include DC::Sanitized\n \n it \"should strip non-characters & replace them with dashes\" do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Update promotion rule names on db\n\nAfter\nhttps://github.com/solidusio-contrib/solidus_subscriptions/pull/215\nupdate promotion rule names on db to avoid STI errors.\n"
},
{
"from": "gpt",
"value": "class UpdatePromotionRuleNames < ActiveRecord::Migration[5.2]\n T... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Cell Migration to maintain positions\n\nActs as list will modify the element's position when assigning them to a\nnew parent. This change stops that from happening, so that the order of\nelements within a cell is not modified when it is migrated to a fixed\nelement.\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Update docker installer to work on custom kernels\n\nThe current docker installer attempt to install the linux-image-extra-`uname -r` DEB package on Debian systems.\r\nThis package may not exist, for example on custom kernels (e.g., Linode servers).\r\nIf this happens, Vagrant ... | ruby | chosen |
[
{
"from": "system",
"value": "Change to fix file reference on jruby\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\ndesc 'Load gem inside irb console'\ntask :console do\n require 'irb'\n require 'irb/completion'\n require File.join(__FILE__, '../../lib/tty-screen')\n ARGV.clear\n IR... | ruby | chosen |
[
{
"from": "system",
"value": "Add contributor instuctions to docs\n"
},
{
"from": "human",
"value": "require 'rake'\nrequire 'rake/clean'\n\nCLOBBER.include('doc', '.yardoc')\nCLOBBER.uniq!\n\nbegin\n require 'yard'\n require 'yard/rake/yardoc_task'\n\n namespace :doc do\n desc 'Generate Y... | ruby | chosen |
[
{
"from": "system",
"value": "Handle active_record scopes in the Filter processor adapter\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative '../adapter_activerecord'\nrequire_relative '../processor_base'\nrequire_relative '../../helpers/throws'\n\nclass ActiveS... | ruby | chosen |
[
{
"from": "system",
"value": "Add constraints for topics migration\n"
},
{
"from": "human",
"value": "class CreateTopics < ActiveRecord::Migration\n def change\n create_table :topics do |t|\n t.string :name\n t.references :language\n t.references :level\n\n t.timestamps n... | ruby | chosen |
[
{
"from": "system",
"value": "Update Gemspec summary and homepage\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'animatedgifme/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Make bills_help? method return a boolean\n\nThe `:bills_help` symbol is not used anywhere and the method is always used as\nif it was returning a boolean.\n"
},
{
"from": "human",
"value": "module SmartAnswer::Calculators\n class EnergyGrantsCalculator\n include... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Return empty dataset instead of array\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'ditty/policies/application_policy'\n\nmodule Ditty\n class IdentityPolicy < ApplicationPolicy\n def register?\n !['1', 1, 'true', true, '... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec that can't grouping by Array\n"
},
{
"from": "human",
"value": "require_relative './helper.rb'\n\nclass ArrayTest < Test::Unit::TestCase\n test \"Array equality\" do\n msg = \"invalidQuery: Equality is not defined for arguments of type ARRAY<INT64> at... | ruby | chosen |
[
{
"from": "system",
"value": "Allow 6 as well as 7 digits in main part of Google Analytics code - some older codes have only 6 digits\n"
},
{
"from": "human",
"value": "class Website < ActiveRecord::Base\n validates_uniqueness_of :google_analytics_code\n validates_format_of :google_analytics_c... | ruby | chosen |
[
{
"from": "system",
"value": "Return an empty array if no events exist for the category\n"
},
{
"from": "human",
"value": "module Planvine\n class CategoriesBuilder\n def self.build(category, api)\n Category.new(\n :photo => (category[\"photo\"] ? category[\"photo\"][\"url\"] : '... | ruby | chosen |
[
{
"from": "system",
"value": "Add ECDH attributes to Suite\n"
},
{
"from": "human",
"value": "require 'ssl_labs/util'\n\nclass SslLabs\n\n class EndpointData\n\n class Details\n\n class Suite\n\n ATTRS = [\n :id,\n :name,\n :cipher_strength,\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"removing old image controller\"\n\nThis reverts commit 5943ec6beed390607ed7ad31c1af75e69c636fe8.\n"
},
{
"from": "gpt",
"value": "module Ems\n class ImagesController < ApplicationController\n load_and_authorize_resource :class => Ems::Image\n # GET /i... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to enforce student_id on discipline incidents\n"
},
{
"from": "gpt",
"value": "class DisciplineIncidentsConstraints < ActiveRecord::Migration[5.2]\n def change\n # This was nullable before and it shouldn't be.\n change_column :discipline_incident... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra 'has been' from the deprecation message\n\n- [ci skip]\n"
},
{
"from": "human",
"value": "require 'active_support/deprecation'\n\nActiveSupport::Deprecation.warn(\"ActionDispatch::Assertions::TagAssertions has been has been extracted to the rails-dom-te... | ruby | chosen |
[
{
"from": "system",
"value": "Fix explain test on sqlite 3.36.0\n\nExplain output changed in 3.36.0\n\nhttps://www.sqlite.org/releaselog/3_36_0.html\n\nCo-authored-by: Dinah Shi <f868e84a9b4be0533243aec38e5104eee4d410b8@github.com>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite I/O redirection more generically\n"
},
{
"from": "human",
"value": "require 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class UpdateGlibc < Base\n def apply\n sh.fold \"fix.CVE-2015-7547\" do\... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'true' option to boolean field builder\n"
},
{
"from": "human",
"value": "module AggregateBuilder\n class FieldBuilders::BooleanFieldBuilder < FieldBuilders::PrimitiveFieldBuilder\n\n def self.cast(field, value)\n if [TrueClass, FalseClass, NilClass].in... | ruby | chosen |
[
{
"from": "system",
"value": "Add a link to the home page\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def main_navigation\n secondary_navigation do |n|\n n.item \"Create a Page\", new_page_path\n end\n end\n\n def format_text(text)\n text = text.split(\"\\n\").... | ruby | chosen |
[
{
"from": "system",
"value": "Create helper to generate the title tag content\n"
},
{
"from": "human",
"value": "module ApplicationHelper\nend\n"
},
{
"from": "gpt",
"value": "module ApplicationHelper\n # Returns the full title on a per-page basis.\n def full_title(page_title = '')... | ruby | chosen |
[
{
"from": "system",
"value": "Set ruby version 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 'todotxt/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to setup twitter test provider and add test provider param.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire File.dirname(__FILE__) + '/../spec_helper'\n\ndescribe SessionsController do\n describe '#create' do\n before do\n request.env['... | ruby | chosen |
[
{
"from": "system",
"value": "Fix subject in trigger presenter tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Ci::TriggerPresenter do\n set(:user) { create(:user) }\n set(:project) { create(:project) }\n\n set(:trigger) do\n create(:ci_trigger, token: '123456789... | ruby | chosen |
[
{
"from": "system",
"value": "TEST CASE: Trying to delete a sequence used within an `_if` block.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Api::SequencesController do\n before :each do\n request.headers[\"accept\"] = 'application/json'\n end\n\n include Devise::T... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error with converting nil to markdown\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n#= Helpers for campaigns views\nmodule CampaignHelper\n def nav_link(link_text, link_path)\n class_name = current_page?(link_path) ? 'active' : ''\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for usage of a api key with google books\n"
},
{
"from": "human",
"value": "require 'googlebooks'\n\nclass GoogleBookData < ActiveRecord::Base\n belongs_to :book\n\n def self.book_from_isbn(isbn)\n GoogleBookData.new(\n description: \"\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use stop analyzer for search synonyms\n\nThis is so we match on lower case and missing stop words\nElastic Search will need to be indexed\n"
},
{
"from": "human",
"value": "class SearchReference < Sequel::Model\n include Tire::Model::Search\n\n HEADING_IDENTITY_RE... | ruby | chosen |
[
{
"from": "system",
"value": "Define list of files to be included into the gem package\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'lib/chainer/version'\n\nGem::Specification.new do |s|\n s.name = 'chainer'\n s.version = ::Chainer::VERSION\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec testing users promotion rule search\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Promotion with user rule', js: true do\n stub_authorization!\n\n given(:promotion) { create :promotion }\n\n background do\n visit spree.edit_admi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issues with files with plus and other symbols in them.\n"
},
{
"from": "human",
"value": "class FileUploader < CarrierWave::Uploader::Base\n POSSIBLE_IMG_EXTENSIONS = %w(jpg jpeg gif png)\n POSSIBLE_DOC_EXTENSIONS = %w(chm csv diff doc docx dot dxf eps gml ics... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant `begin` block in SnapshotWorker\n\nAs pointed out by rubocop, this `begin` block is redundant. Removing it\nto simplify.\n\nChange-Id: I4ad6e81daa844ad33ac57bcbae993b51848dc447\n"
},
{
"from": "human",
"value": "# Base class for workers that operate... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for user agent matcher\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe TestWrangler::Cohort::Matchers::UserAgentMatcher do\n let(:matcher){TestWrangler::Cohort::Matchers::UserAgentMatcher.new(['Mobile user agent', /Mobile/])}\n describe... | ruby | chosen |
[
{
"from": "system",
"value": "Disable logging in prep for conan\n"
},
{
"from": "human",
"value": "class Resource < ActiveRecord::Base\n\n before_save :default_plan_to_test\n\n def webhook_url\n if Rails.env.production?\n \"https://webhookshield.com/webhooks/#{id}\"\n else\n \"... | ruby | chosen |
[
{
"from": "system",
"value": "Edit methods to edit votes instead of deleting\n"
},
{
"from": "human",
"value": "module Voteable\n def downvote(user)\n delete_old_vote(user) if vote_exists?(user)\n self.votes.create(value: false, user_id: user.id)\n end\n\n def upvote(user)\n delete_o... | ruby | chosen |
[
{
"from": "system",
"value": "Add a list of tokens to the Session\n"
},
{
"from": "human",
"value": "module Ldash\n # Discord user\n class User\n attr_accessor :username, :id, :discriminator, :avatar\n\n # server ID => [role IDs]\n attr_accessor :roles\n\n attr_accessor :game, :sta... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec so the gem can actually build.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"bootstrap_haml_helpers/version\"\n\n# Describe your gem and declare its dependencies:\nGem::S... | ruby | chosen |
[
{
"from": "system",
"value": "Update coveralls and prawn gems\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/dot_grid/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Scott LaBounty\"]\n gem.email = [\"slabo... | ruby | chosen |
[
{
"from": "system",
"value": "Add update Route for Lessons Under Courses\n\nUpdate the routing file to include an update route for Lessons nested\nunder Courses.\n"
},
{
"from": "human",
"value": "Ifsimply::Application.routes.draw do\n devise_for :users, :controllers => { :registrations => 'reg... | ruby | chosen |
[
{
"from": "system",
"value": "Make a todo for the next documentation task"
},
{
"from": "human",
"value": "class MyAttributeHandler < YARD::Handlers::Ruby::AttributeHandler\n handles method_call(:add_attributes)\n namespace_only # just to be safe\n\n\n process do\n puts statement.parameter... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for operating/operating_level on interstate lines.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe InterstateLine do\n it { should belong_to :incoming_region }\n it { should belong_to :outgoing_region }\n it { should belong_to :line_... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing spec for authorization\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe 'Authorization' do\n context 'with an unauthorized user' do\n let(:user) { FactoryBot.create(:user) }\n\n context 'when visiting a restricted page like... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing test due to using the empty group profile.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"Issues in a group subdomain\" do\n include_context \"signed in as a group member\"\n include_context \"with current group subdomain\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Handle exceptions in `Unpublishing` data migration\n\nIt seems there are one or more invalid `Unpublishing` objects in the\nWhitehall DB. Who'd have thought it...\n"
},
{
"from": "human",
"value": "#Unpublishing was allowing alternative_url with trailing whitespace.... | ruby | chosen |
[
{
"from": "system",
"value": "Add provisioning support to Lenovo::PhysicalInfraManager\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Lenovo::PhysicalInfraManager < ManageIQ::Providers::PhysicalInfraManager\n include ManageIQ::Providers::Lenovo::ManagerMixin\n include_concern 'O... | ruby | chosen |
[
{
"from": "system",
"value": "Update ruby-kafka dependency to v0.3.9\n\nruby-kafka 0.3.9 improves producer performance so updating lower version is better."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.authors = [\"Hidemasa Togashi\"]\... | ruby | chosen |
[
{
"from": "system",
"value": "Update AppCode EAP to build 141.2000\n\nThe previous EAP build has expired so this commit updates the version\nto include the latest build, as well as the sha256 stanza.\n"
},
{
"from": "human",
"value": "cask :v1 => 'appcode-eap' do\n version '141.1399.2'\n sha25... | ruby | chosen |
[
{
"from": "system",
"value": "Reorganize to allow non-include usage\n\nThe new organization seems a little stilted, but it's functionally better.\n"
},
{
"from": "human",
"value": "module TransactionalCapybara\n module AjaxHelpers\n def wait_for_ajax\n wait_until { finished_all_ajax_req... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hard link dissociation bug\n\nstrip unlinks the file first, breaking hard links, so we detect instances where we are about to strip a file with many linkages and prevent it.\n\nThis fixes the libexec non executable bug in the git package.\n\nTook me a long time to figure ou... | ruby | chosen |
[
{
"from": "system",
"value": "Update publication queue status on acceptance of first eid\n"
},
{
"from": "human",
"value": "module Actions\n class UpdateEvidenceItemStatus\n include Actions::Transactional\n attr_reader :evidence_item, :originating_user, :new_status\n\n def initialize(e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix podspec to point to Sources folder\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Fusuma\"\n s.version = \"0.5\"\n s.summary = \"Instagram-like photo browser with a few line of code written in Swift\"\n s.h... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec auth helper to reflect change in UI\n"
},
{
"from": "human",
"value": "module AuthenticationHelper\n def stub_sign_in(user = create(:user))\n session[:remember_token] = user.remember_token\n end\n\n def sign_in_as(user)\n stub_oauth(user.github_... | ruby | chosen |
[
{
"from": "system",
"value": "Add file download to document resource\n"
},
{
"from": "human",
"value": "class DocumentsController < ApplicationController\n\n @@storage_location = '/tmp/rails'\n\n # POST /documents\n def create\n file = params[:file]\n file_name = sanitize_filename(file.... | ruby | chosen |
[
{
"from": "system",
"value": "Call page on our questions\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n before_filter :authenticate_user!\n respond_to :html, :js, :json\n\n def index\n @questions = Question.all\n end\n\n def show\n @question = Q... | ruby | chosen |
[
{
"from": "system",
"value": "Add query to sum votes to question controller\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n\n\n def index\n @questions = Question.last(10)\n end\n\n def new\n @question = Question.new\n end\n\n def create\n para... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant as_json from ApplicationDecorator\n"
},
{
"from": "human",
"value": "class ApplicationDecorator < Draper::Decorator\n\n delegate_all\n\n def as_json(*args)\n model.as_json(*args)\n end\n\n def markdown(text)\n MKD_SAFE_RENDERER.render(text... | ruby | chosen |
[
{
"from": "human",
"value": "Add test script for cleaning student data\n"
},
{
"from": "gpt",
"value": "require 'smarter_csv'\n\nall_data = SmarterCSV.process('db/student_info.csv')\n\n# all_data = SmarterCSV.process('db/student_info.csv',\n# {:remove_unmapped_keys => true, :skip_lines => 1,\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Use Marshal serializer for faraday_http_cache\n\nThe default JSON serializer was causing an exception on certain pages. Marshal seems to fix the issue.\n"
},
{
"from": "human",
"value": "cache_store = ActiveSupport::Cache.lookup_store(:dalli_store)\n\nstack = Farada... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest as development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'desktop/version'\n\nGem::Specification.new do |spec|\n spec.name... | ruby | chosen |
[
{
"from": "system",
"value": "Include product assemblies in product list.\n"
},
{
"from": "human",
"value": "Spree::ProductsController.class_eval do\n respond_override :index => {\n :html => {\n :success => lambda do\n @products.sort!{|a,b| b.available_on <=> a.available_on rescu... | ruby | chosen |
[
{
"from": "system",
"value": "Add workspace cleanup and createrepo step to app-release\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: js-nginx\n# Recipe:: default\n#\n# Copyright (C) 2016 YOUR_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\npackage 'nginx' do\n action :instal... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect url 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 'deferring/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add code to determine screenshots directory\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'net/http'\nrequire 'json'\n\n\nclass ScreenshotUpdater\n def ci_token\n @ci_token ||= begin\n ENV['CIRCLE_CI_TOKEN'] or\n fail '''\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change permissions destruction in test\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule GobiertoAdmin\n module GobiertoCore\n class IndexTemplatesTest < ActionDispatch::IntegrationTest\n def setup\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Nancy to email list.\n"
},
{
"from": "human",
"value": "class LoadMailer < ApplicationMailer\n def send_notification(load_event)\n emails = ['garrett@sturdy.work']\n\n if ENV['EMAIL_DUKE_TEAM']\n emails << 'sheri.tibbs@duke.edu'\n emails << 'wil... | ruby | chosen |
[
{
"from": "system",
"value": "Make the API serve the same stuff it was serving before Related Items changed to an Array\n"
},
{
"from": "human",
"value": "class RelatedItem\n attr_accessor :item\n private :item=, :item\n def initialize item\n self.item = item\n end\n\n def id\n item.s... | ruby | chosen |
[
{
"from": "system",
"value": "Convert MatchAttributeValue to use the operator\n"
},
{
"from": "human",
"value": "class MatchAttributeValue < QueryStringSearch::AbstractMatcher\n def match?(data)\n match_with_contingency do\n QueryStringSearch::Comparator.does(desired_value).equal?(actua... | ruby | chosen |
[
{
"from": "system",
"value": "Add celluloid & logging as a dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hollywood'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing license info to gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"underscore-rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"underscore-rails\"\n s.version... | ruby | chosen |
[
{
"from": "system",
"value": "Handle exception differencies between 1.8 and 1.9\n\n* This solution should also work for jruby, rbx etc.\n"
},
{
"from": "human",
"value": "shared_examples_for 'a #freeze method' do\n it_should_behave_like 'an idempotent method'\n\n it 'returns object' do\n sh... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for mandatory field helpers\n\nThese ensure we are returning the correct error for all mandatory field\nvalidations in the EU Funding form.\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\nRSpec.describe MandatoryFieldHelper, type: :helper do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix AMQP argument error in integration tests\n\nThe `exchange` and `topic` arguments to GovukSeedCrawler::Seeder::seed\nshould be called `amqp_exchange` and `amqp_topic`. Otherwise we raise an\nerror in GovukSeedCrawler::UrlPublisher::publish_urls that the exchange (and\nlater ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the summary in .podspec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SloppySwiper\"\n s.version = \"0.1.0\"\n s.summary = \"UINavigationController's delegate that allows swipe back gesture to be started ... | ruby | chosen |
[
{
"from": "system",
"value": "Change Piv::Helpers::Login to use thor native prompt methods"
},
{
"from": "human",
"value": "module Piv\n module Helpers\n module Login\n def user_wants_to_preserve_session?(istream = $stdin, ostream = $stdout)\n msg = \"#{current_session.name} has ... | ruby | chosen |
[
{
"from": "system",
"value": "Use ||= for initializing variables\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Quandl\n class ApiConfig\n API_KEY_THREAD_KEY = 'quandl_api_key'.freeze\n API_BASE_THREAD_KEY = 'quandl_api_base'.freeze\n API_VERSION_THREAD_KEY ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 2v2 max rating data source.\n"
},
{
"from": "human",
"value": "module Audit\n class PvPData\n\n def self.add(character, data)\n character.data['honor_level'] = character.details[\"honor_level\"] || \"-\"\n character.data['honorable_kills'] = data['... | ruby | chosen |
[
{
"from": "system",
"value": "Add task to remove all translations\n"
},
{
"from": "human",
"value": "namespace :lit do\n desc 'Exports translated strings from lit to config/locales/lit.yml file.'\n task export: :environment do\n if yml = Lit.init.cache.export\n path = Rails.root.join('... | ruby | chosen |
[
{
"from": "system",
"value": "Use gems that work with Rails 4.2\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"registration_engine\"\n s.version = \"0.0.1\"\n s.authors = [ \"Scott Willson\" ]\n s.email = [ \"scott.willson@gmail.com\" ]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary variable in initialization\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'unit/validations/attribute_validation_test'\n\nclass AddErrorValidator\n def initialize(_subject)\n end\n\n def validate(errors)\n errors << Error.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix crash in color indicator count condition\n"
},
{
"from": "human",
"value": "class ConditionColorCountExpr < ConditionSimple\n def initialize(a, op, b)\n @a = a.downcase\n @op = op\n @b = b.to_i\n end\n\n def match?(card)\n if @a == \"c\"\n a ... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak usage for brew switch\n"
},
{
"from": "human",
"value": "require 'formula'\nrequire 'keg'\n\nif ARGV.named.length != 2\n onoe \"Two parameters are expected, the formula name and version to link.\"\n exit 1\nend\n\nname = ARGV.shift\nversion = ARGV.shift\n\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Update AR logger subscriber for Notifications subscriber args change\n"
},
{
"from": "human",
"value": "require 'active_support/notifications'\n\nActiveSupport::Notifications.subscribe(\"sql\") do |event|\n ActiveRecord::Base.connection.log_info(event.payload[:sql]... | ruby | chosen |
[
{
"from": "system",
"value": "Fix user account deface override not applied\n\n`Object.const_defined?(\"Spree::User\")` didn't return true even if we had a `Spree::User`, as it hadn't been loaded yet. This fixes it.\n"
},
{
"from": "human",
"value": "if Object.const_defined?(\"Spree::User\")\n D... | ruby | chosen |
[
{
"from": "system",
"value": "Change license to just mit\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n name = \"SHKeyValueObserverBlocks\"\n url = \"https://github.com/seivan/#{name}\"\n git_url = \"#{url}.git\"\n s.name = name\n s.version = \"0.1.0\"\n s.su... | ruby | chosen |
[
{
"from": "system",
"value": "Fix symlinked path for git blame\n"
},
{
"from": "human",
"value": "module CodeHunter\n class GitBlamer\n def initialize(args)\n @path = args[:path]\n @line = args[:line]\n end\n\n def blame\n parse(invoke)\n end\n\n def parse(str)\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.