conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add a progress for 100 percent\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def progress_percentage(percentage)\n if percentage.to_i < 10\n \"progress-danger\"\n elsif percentage.to_i > 10 && percentage.to_i < 40\n \"progress-warn... | ruby | chosen |
[
{
"from": "system",
"value": "Include the sender's name in mailings\n"
},
{
"from": "human",
"value": "require 'mailgun_headers'\n\nclass ApplicationMailer < ActionMailer::Base\n include MailgunHeaders\n\n default from: 'appointments@pensionwise.gov.uk'\n\n layout 'mailer'\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Change to show returend value\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire_relative \"../lib/tty-prompt\"\n\nprompt = TTY::Prompt.new\n\nanswer = prompt.ask('Password?', echo: false) do |q|\n q.validate(/^[^\\.]+\\.[^\\.]+/)\nend\n\n#puts answer\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert hardcoding of version number\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n# $:.push File.expand_path(\"../lib\", __FILE__)\n# require \"solidus_cmd/version\"\n\nGem::Specification.new do |s|\n s.name = \"solidus_cmd\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Open upload that are not an image in a new window\"\n\nThis reverts commit a0648eb99f22df49c2219f2a2468083a39c4c921.\n"
},
{
"from": "human",
"value": "module UploadsHelper\n \n def upload_primer(project)\n render 'uploads/primer', :project => project\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix retirement plan bug creating a plan without a payment\n"
},
{
"from": "human",
"value": "class RetirementPlan < ActiveRecord::Base\n include MyplaceonlineActiveRecordIdentityConcern\n include AllowExistingConcern\n \n RETIREMENT_PLAN_TYPES = [\n [\"myplac... | ruby | chosen |
[
{
"from": "system",
"value": "Fix step indentation when step is first displayed for testing\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'cucumber/formatter/pretty'\nrequire 'cucumber/formatter/html'\n\nmodule Crudecumber\n # Custom formatter that inherits from the standard Cu... | ruby | chosen |
[
{
"from": "system",
"value": "Use a dummy API key in the test suite\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nrequire 'rspec'\nrequire 'authy'\nrequire 'pry'\n\n# Requires supporting files ... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust for switch to Circle CI.\n"
},
{
"from": "human",
"value": "require 'serverspec'\nrequire 'docker'\n\nset :backend, :docker\n\n# Setup Docker URL and certificates if running via a remote Docker Host.\nif ENV['DOCKER_HOST']\n docker_host = ENV['DOCKER_HOST'].... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure only Travis wears Coveralls\n\n[ci skip]\n"
},
{
"from": "human",
"value": "require \"coveralls\"\nCoveralls.wear!\n\nrequire \"interactor\"\n\nDir[File.expand_path(\"../support/*.rb\", __FILE__)].each { |f| require f }\n"
},
{
"from": "gpt",
"... | ruby | chosen |
[
{
"from": "system",
"value": "chore: Add logger only while test\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'chatwork'\nrequire 'dotenv'\nrequire 'simplecov'\n\nDotenv.load\n\nSimpleCov.start do\n add_filter \"/vendor/\"\n add_filter \... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the test meta-data from the SKU model.\n"
},
{
"from": "human",
"value": "class Sku < ActiveRecord::Base\n include IslayShop::MetaData\n include IslayShop::Statuses\n\n belongs_to :product\n has_many :sku_assets, :order => 'position ... | ruby | chosen |
[
{
"from": "system",
"value": "Add url to github page\nOther apps complaining about configuration\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"jobs_view/version\"\n\n# Describe your gem and declare its dependencies:... | ruby | chosen |
[
{
"from": "system",
"value": "Correct the slugs and type in the RPA migration\n\nThe migration was intended to remove some unused tags, but had an\nincorrect tag type and an incorrect slug, so failed to work in\nproduction.\n\nThis migration was run on staging, but not on production, and the\ndatabase has b... | ruby | chosen |
[
{
"from": "system",
"value": "Fix M/O price chart migration to set unit\n"
},
{
"from": "human",
"value": "class AddOutputElementsForMerit < ActiveRecord::Migration\n def change\n merit_order_price_curve = OutputElement.create!(\n group: 'Merit',\n key: 'merit_order_price_curve',\n... | ruby | chosen |
[
{
"from": "system",
"value": "Check if complete run is true\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'turbotlib'\n\n$:.unshift File.dirname(__FILE__)\nrequire 'hello_kitty'\n\nTurbotlib.log(\"Starting run...\")\n\nif ENV['COMPLETE_RUN']\n last_run = DateTime.parse(\"2014-01-01... | ruby | chosen |
[
{
"from": "system",
"value": "Add expected versions as ENV params to cucumber specs\n"
},
{
"from": "human",
"value": "# Generated by cucumber-sinatra. (2012-04-30 07:36:14 -0400)\nrequire \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\nENV['RACK_ENV'] = 'test'\n\nrequire File.... | ruby | chosen |
[
{
"from": "system",
"value": "C: Use a guard clause instead of wrapping the code inside a conditional expression\n"
},
{
"from": "human",
"value": "require 'net/ssh'\nrequire 'stringio'\n\ndef sshcmd(command, host: ENV['TESTHOST'], user: 'root', ignore_err: false)\n # Execute a command on the r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix head call to return an empty body.\n"
},
{
"from": "human",
"value": "require 'fog/core/collection'\nrequire 'fog/hp/models/storage/shared_file'\n\nmodule Fog\n module Storage\n class HP\n\n class SharedFiles < Fog::Collection\n\n attribute :shar... | ruby | chosen |
[
{
"from": "human",
"value": "Add command to inject changing the exception app\n"
},
{
"from": "gpt",
"value": "require 'rails/generators/base'\n\nmodule Errdo\n\n module Generators\n\n class InstallGenerator < Rails::Generators::Base\n\n desc \"Creates an errdo initializer and sets the ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove additioanl licence in gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire 'capistrano/puppetize/version'\n\nGem::Specification.new do |spec|\n spec.name = 'capistrano-ext-puppetize'\n spec.version = Capistran... | ruby | chosen |
[
{
"from": "system",
"value": "Update transit_facility_fta tests because of changes in e4fadaf\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe \"assets/_transit_facility_fta.html.haml\", :type => :view do\n\n it 'fta info' do\n test_asset = create(:bus_shelter, :fta_fund... | ruby | chosen |
[
{
"from": "system",
"value": "Allow teaching staff to manage survey conditions\n\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Course::ConditionsAbilityComponent\n include AbilityHost::Component\n\n def define_permissions\n allow_teaching_staff_manage_conditions i... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec file for version 0.0.3\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'BSSegmentPagingView'\n s.version = '0.0.2'\n s.summary = 'An paging view for iOS'\n s.license = { :type => 'MIT', :file => 'LICENCE' }\n s.homepage = 'ht... | ruby | chosen |
[
{
"from": "system",
"value": "Create shared examples for generic feature buttons with disabled\n"
},
{
"from": "human",
"value": "shared_examples_for 'a generic feature button' do\n include_examples 'a generic feature button after initialization'\n\n describe '#visible?' do\n subject { butt... | ruby | chosen |
[
{
"from": "human",
"value": "Add ruby object code for albums and songs\n"
},
{
"from": "gpt",
"value": "#Album class\nclass Album # Albums have an artist, title and tracks\n attr_reader :artist, :title\n attr_accessor :tracks\n\n @@collection = []\n\n def initialize(artist:, title:)\n @ar... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct resource attributes for ark\n"
},
{
"from": "human",
"value": "ark 'neo4j' do\n url node['travis_build_environment']['neo4j_url']\n checksum node['travis_build_environment']['neo4j_checksum']\n version node['travis_build_environment']['neo4j_version']... | ruby | chosen |
[
{
"from": "system",
"value": "Break the `tag` and `revision` onto their own lines\n"
},
{
"from": "human",
"value": "class GitlabRunner < Formula\n desc \"The official GitLab CI runner written in Go\"\n homepage \"https://gitlab.com/gitlab-org/gitlab-ci-multi-runner\"\n url \"https://gitlab.c... | ruby | chosen |
[
{
"from": "system",
"value": "Use an oldstyle migration so integer keys work\n\nChange the version of the github_integrations migration to 5.0 so that\nthe users_id column is an int and is compatible with extant user tables\n"
},
{
"from": "human",
"value": "class CreateGithubIntegrations < Acti... | ruby | chosen |
[
{
"from": "system",
"value": "Use copy/delete/mkdir builtin Builder methods\n"
},
{
"from": "human",
"value": "name 'loom-ui'\ndefault_version 'develop'\n\ndependency 'nodejs'\n\nsource :git => 'git://github.com/continuuity/loom.git'\nrelative_path 'ui'\n\nbuild do\n command \"mkdir -p #{instal... | ruby | chosen |
[
{
"from": "system",
"value": "Fix db:migrate after removing photo slugs\n"
},
{
"from": "human",
"value": "class AddSlugToPhotos < ActiveRecord::Migration\n def change\n add_column :photos, :slug, :string\n add_index :photos, :slug\n\n Photo.initialize_urls\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 500 error when registering pre-existing accounts on accident\n"
},
{
"from": "human",
"value": "module Users\n class Create < Mutations::Command\n required do\n string :name\n string :email\n string :password\n string :password_confirmati... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for latest WillPaginate version.\n"
},
{
"from": "human",
"value": "module WillPaginate\n module ViewHelpers\n # This class does the heavy lifting of actually building the pagination\n # links. It is used by +will_paginate+ helper internally.\n class L... | ruby | chosen |
[
{
"from": "system",
"value": "Change email format regex anchors\n"
},
{
"from": "human",
"value": "require 'bcrypt'\n\nmodule Authem::BaseUser\n extend ::ActiveSupport::Concern\n\n included do\n validates_uniqueness_of :email\n validates_format_of :email, with: /^\\S+@\\S+$/\n validat... | ruby | chosen |
[
{
"from": "system",
"value": "Make the parameter call benchmark more computationally intensive\n\nStill kind of lame though\n"
},
{
"from": "human",
"value": "require_relative 'bench_helper'\n\nclass Parametered\n include Typedeaf\n\n def method_with_params(buffer)\n buffer.size\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warnings from redefined constant in tests\n"
},
{
"from": "human",
"value": "Then(/^the stdout should be one of:$/) do |table|\n LATEST_CHEF = \"11.12.4\"\n # table is a Cucumber::Ast::Table\n data = table.rows_hash\n begin\n puts \"unknown Chef version, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ` Avoid comma after the last item of a hash.`\n"
},
{
"from": "human",
"value": "module Buoys\n class Link\n attr_accessor :text, :options, :options_for_config\n attr_reader :current\n\n CONFIG = {\n current_class: (Buoys::Config.current_class || ... | ruby | chosen |
[
{
"from": "human",
"value": "Add cleanup script for fixing revisions that point to wrong wiki\n\nI've run this for the two courses that reported problems with revisions pointing to the wrong wiki.\n"
},
{
"from": "gpt",
"value": "course = Course.find(18956)\n\ncourse.revisions.includes(:article)... | ruby | chosen |
[
{
"from": "system",
"value": "Change default commands for Windows and macOS\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Textbringer\n CONFIG[:mournmail_directory] = File.expand_path(\"~/.mournmail\")\n CONFIG[:mournmail_accounts] = {}\n CONFIG[:mournmail_charset... | ruby | chosen |
[
{
"from": "system",
"value": "Allow tasks to be defined dynamically in 1.8 and 1.9\n"
},
{
"from": "human",
"value": "$:.unshift File.join(File.dirname(__FILE__), \"..\", \"lib\")\nrequire 'rubygems'\nrequire 'bundler'\nrequire 'actor'\nBundler.setup\n\ndef in_order_to name, &block\n\n m = Modu... | ruby | chosen |
[
{
"from": "system",
"value": "Add skeleton henson install command\n\nCurrently just contains docs on expected behavior, doesn't include any\nimplementation of that behavior.\n"
},
{
"from": "human",
"value": "require 'henson/friendly_errors'\nrequire 'thor'\n\nmodule Henson\n class CLI < Thor\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add version to Bundler dependency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire_relative 'lib/ddplugin/version'\n\nGem::Specification.new do |s|\n s.name = 'ddplugin'\n s.version = DDPlugin::VERSION\n s.homepage = 'http://github.co... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Memcached setting until it is enabled in Heroku admin.\n"
},
{
"from": "human",
"value": "# Settings specified here will take precedence over those in config/environment.rb\n\n# The production environment is meant for finished, \"live\" apps.\n# Code is not r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rails zero config for heroku.\n"
},
{
"from": "human",
"value": "require 'rails_zero/drivers/poltergeist'\n\nRailsZero.configure do |c|\n c.site.add_path '/'\n c.deployment.url = 'git@github.com:cocoa-tree/cocoa-tree.github.io.git'\n c.deployment.git_binary =... | ruby | chosen |
[
{
"from": "system",
"value": "Add TTL to logged events so that (hopefully) Elasticsearch will auto-delete them. Stop logging caching events as that has never been useful.\n"
},
{
"from": "human",
"value": "if Rails.env.test? && Rails.logger.level == 0\n ActiveSupport::Notifications.subscribe(/f... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for nil links attribute\n"
},
{
"from": "human",
"value": "module Subjoin\n # Generically construct and handle {Links} objects\n module Linkable\n @links = nil\n\n def links\n @links ||= {}\n end\n\n # Load the object's links\n # @param d... | ruby | chosen |
[
{
"from": "system",
"value": "Use `no-cache` in development mode for assets. Using `must-revalidate`, which is\nRails' default, seems to have Chrome sometimes not request assets in development\nmode even though it's supposed to revalidate every time.\n"
},
{
"from": "human",
"value": "require \"... | ruby | chosen |
[
{
"from": "system",
"value": "Read _deconst.json from source, not always pwd\n"
},
{
"from": "human",
"value": "require \"jekyll\"\nrequire \"jekyll-assets\"\nrequire \"bundler\"\nrequire \"bundler/cli\"\nrequire \"bundler/cli/install\"\n\nrequire \"preparermd/version\"\nrequire \"preparermd/con... | ruby | chosen |
[
{
"from": "system",
"value": "Implement a cute spinner to enhance your patience while waiting for box transitions. Show how much time it really took afterwards.\n"
},
{
"from": "human",
"value": "require 'rjiffy'\nrequire 'thor'\nrequire 'pp'\n\nrequire 'rjiffy/cli/version'\nrequire 'rjiffy/cli/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad require in the recipe\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require \"chef-sugar\" if Gem::Requirement.new(\">= 12.10.48\").satisfied_by?(Gem::Version.new(Chef::VERSION))\n"
},
{... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake seed and ressed methods.\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\ndesc \"Clear all magazines from resource db/magazines\"\nnamespace :db do\n task :clear do\n FileUtils.rm Dir['db/magazines/*.yml']\n end\nend\n"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "human",
"value": "Add in data migration to populate doc series summary\n\nExpect ~ 986 to be updated\n\nhttps://www.pivotaltracker.com/story/show/49582421\nhttps://www.pivotaltracker.com/story/show/49119183\n"
},
{
"from": "gpt",
"value": "puts \"Updating document series: \"\ncount = ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename respond_to? method to respond_to_missing? to fix warning\n"
},
{
"from": "human",
"value": "module RailsEmailPreview::MainAppRouteDelegator\n # delegate url helpers to main_app\n def method_missing(method, *args, &block)\n if main_app_route_method?(metho... | ruby | chosen |
[
{
"from": "system",
"value": "Install pkgconf instead of pkg-config\n\nMSYS2 replaced pkg-config by pkgconf in https://github.com/msys2/MINGW-packages/issues/7263 .\nWe follow this move.\n\nFixes #222\n"
},
{
"from": "human",
"value": "module RubyInstaller\nmodule Build # Use for: Build, Runtime... | ruby | chosen |
[
{
"from": "system",
"value": "Allow server info without auth\n"
},
{
"from": "human",
"value": "module Smartsheet\n class ServerInfo\n attr_reader :client\n private :client\n\n def initialize(client)\n @client = client\n end\n\n # TODO: Should be able to run this unauthentic... | ruby | chosen |
[
{
"from": "human",
"value": "Add index to SpreeStockItem variant_id\n\nFixes #6050\n"
},
{
"from": "gpt",
"value": "class AddIndexToSpreeStockItemsVariantId < ActiveRecord::Migration\n def up\n unless index_exists? :spree_stock_items, :variant_id\n add_index :spree_stock_items, :variant... | ruby | chosen |
[
{
"from": "system",
"value": "3712: Allow flag to not be in config\n\nBuild is failing because 'allow_continue_on_failed_registration' is not\nset in the verify-frontend-federation-config configuration. This change\nallows for the flag not being set, returning empty array instead of nil.\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Deploy from the final tag."
},
{
"from": "human",
"value": "set :application, \"omnominator\"\nset :repository, \"git@github.com:railsrumble/rr09-team-174.git\"\nset :branch, \"release\"\nset :scm, :git\nset ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix /ops/heartbeat returns svg format with curl\n"
},
{
"from": "human",
"value": "KomachiHeartbeat::Engine.routes.draw do\n get \"heartbeat\", :to => \"heartbeat#index\"\n get \"version\", :to => \"heartbeat#version\"\n\n get \"stats/worker\", :to => \"stats#wor... | ruby | chosen |
[
{
"from": "system",
"value": "Add more retries for collecting test results.\n"
},
{
"from": "human",
"value": "require 'sidekiq'\n\nmodule EmberSecureBuilder\n class CrossBrowserTestBatchResultsWorker\n include Sidekiq::Worker\n\n def perform(build, times_requeued = 0)\n batch_result... | ruby | chosen |
[
{
"from": "system",
"value": "Create new route for new items\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n get '/items', to: 'items#index'\n get '/items/:id', to: 'items#show', as: 'item'\n # For details on the DSL available within this file, see http://guides.rubyonra... | ruby | chosen |
[
{
"from": "system",
"value": "Update routing so rails 4 doesn't get crabby\n"
},
{
"from": "human",
"value": "if(Rails.version.split('.').first.to_i < 3)\n ActionController::Routing::Routes.draw do |map|\n map.open_window 'window_rails/open_window', :controller => :window_rails, :action => :... | ruby | chosen |
[
{
"from": "system",
"value": "Add comments as a child resource of ideas.\n"
},
{
"from": "human",
"value": "BBYIDX::Application.routes.draw do\n root :to => \"home#index\"\n\n devise_for :users\n # resources :users\n\n match '/index' => 'home#index', via: 'get', :as => :home_index\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update spinach to take care of some other edge cases. Finalize when undefined step bug is solved\n"
},
{
"from": "human",
"value": "require 'aruba/api'\n\nFeature \"Display run summary\" do\n include Integration::SpinachRunner\n\n Given \"I have a feature that has... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test that used to pass due to test contamination\n\nFailure:\n\n 1) layouts/listnav/_cloud_tenant.html.haml link to parent cloud provider uses restful path\n Failure/Error: = render_quadicon(@record, :mode => :icon, :size => 72, :typ => :listnav)\n\n ActionView::Te... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for inheritance of Interrupt\n\nSee also https://github.com/ruby/spec/pull/298#discussion_r81414942\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Interrupt.new\" do\n it \"returns an instance of... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug - Swing Timer defaults to repeating."
},
{
"from": "human",
"value": "class Gui::EventQueue\n include Singleton\n\n import 'javax.swing.SwingUtilities'\n import 'javax.swing.Timer'\n\n def sync_exec(&callback)\n SwingUtilities.invokeAndWait(&callback)... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 10.0 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Update Better Window Manager to 1.11.12\n"
},
{
"from": "human",
"value": "cask :v1 => 'better-window-manager' do\n version '1.11.12'\n sha256 '6cf65ca37259a3702001b62e677052c2f69b0a35ebfb50d2157891df14ff3bfe'\n\n url \"http://gngrwzrd.com/BetterWindowManager-#{v... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Little Snitch Nightly to 3.4 4208\n"
},
{
"from": "human",
"value": "class LittleSnitchNightly < Cask\n version '3.4-nightly-(4205)'\n sha256 '2ee5eb87cdb548d4dce67c27dcc03e3560e2efc67210d1cdb6813119311e5e22'\n\n url \"http://www.obdev.at/downloads/little... | ruby | chosen |
[
{
"from": "system",
"value": "Make the search URLs include a marker.\n\n\n"
},
{
"from": "human",
"value": "module GeocoderHelper\n def result_to_html(result)\n html_options = {}\n #html_options[:title] = strip_tags(result[:description]) if result[:description]\n html_options[:href] = ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for charge.receipt in mailer\n"
},
{
"from": "human",
"value": "module Pay\n class UserMailer < ApplicationMailer\n def receipt(user, charge)\n @user, @charge = user, charge\n\n attachments[charge.filename] = charge.receipt.render\n mail(\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add requires_new to ActiveRecord to use savepoints\n"
},
{
"from": "human",
"value": "class PathReservation < ActiveRecord::Base\n validates :base_path, absolute_path: true\n validates :publishing_app, presence: true\n\n def self.reserve_base_path!(base_path, pub... | ruby | chosen |
[
{
"from": "system",
"value": "Add Permitted params for Doorkeeper::Application\n"
},
{
"from": "human",
"value": "class PermittedParams < Struct.new(:params, :user)\n\n # Public: Permitted Session Parameters.\n # Returns an instance of strong parameters.\n def session\n PermittedSessionPar... | ruby | chosen |
[
{
"from": "system",
"value": "Fix an error when adding page parts."
},
{
"from": "human",
"value": "module Chronicle::ResourceControllerExtensions\n def self.included(base)\n base.class_eval do\n alias_method_chain :load_model, :version\n alias_method_chain :clear_model_cache, :dra... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Force Enable TCP MTU probing @ UCL\"\n\nThis reverts commit b1ced9fbdbe88a53f3b96236ea82cb85f85262cc.\n"
},
{
"from": "human",
"value": "name \"ucl\"\ndescription \"Role applied to all servers at UCL\"\n\ndefault_attributes(\n :location => \"Slough, Englan... | ruby | chosen |
[
{
"from": "system",
"value": "Remove hhvm repo for images used by enterprise\n"
},
{
"from": "human",
"value": "\nrequire 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class FixHhvmSource < Base\n def apply\n sh.if \"$(command -v ls... | ruby | chosen |
[
{
"from": "system",
"value": "Add encoding comment for Ruby.\n"
},
{
"from": "human",
"value": "require 'ffi'\n\nmodule StringTools\n extend FFI::Library\n ffi_lib \"../target/debug/libstringtools.so\"\n attach_function :count_substrings, [:string, :string], :int\nend\n\nputs StringTools.coun... | ruby | chosen |
[
{
"from": "system",
"value": "Make Engines::FastJaccardSimilarity a default engine\n"
},
{
"from": "human",
"value": "module Likes\n # Job: Understands patterns in people likings\n class Set\n # Default engine - simplest one\n #\n # @see Engines::BestIntersectionSize\n DEFAULT_ENGI... | ruby | chosen |
[
{
"from": "system",
"value": "Make compatible with Rails 4\n"
},
{
"from": "human",
"value": "require \"priceable/version\"\n\nmodule Priceable\n SUFFIXES = [\"_in_cents\", \"_in_pennies\", \"_as_integer\"]\n def priceable(*price_fields)\n price_fields.each do |price_field|\n suffix = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Mapping for Charles && GuillaumeG\n"
},
{
"from": "human",
"value": "class Mapping\n\n attr_reader :priority, :assignee, :status\n\n def initialize\n end\n\n def priority\n {\n 3 => \"Low\",\n 4 => \"Normal\",\n 5 => \"High\",\n 6 =... | ruby | chosen |
[
{
"from": "system",
"value": "Increase Unicorn timeout -- many requests are able to complete in the\noriginal time\n"
},
{
"from": "human",
"value": "worker_processes Integer(ENV[\"WEB_CONCURRENCY\"] || 3)\ntimeout 15\npreload_app true\n"
},
{
"from": "gpt",
"value": "worker_processe... | ruby | chosen |
[
{
"from": "system",
"value": "Improve variable name, nodes shall be nodes not xml\n"
},
{
"from": "human",
"value": "module UWDC\n class Mets\n extend HTTPClient::IncludeClient\n include_http_client\n \n def initialize(id)\n @id = id\n end\n \n def get\n begin\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem dependencies to newest version.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path(\"../lib/lingohub/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'lingohub'\n gem.version = Lin... | ruby | chosen |
[
{
"from": "system",
"value": "Move mock logic to method to DRY up test\n"
},
{
"from": "human",
"value": "require_relative '../../test_helper'\n\nmodule Git::Duo\n class RepoTest < MiniTest::Test\n def setup\n @repo = Repo.new '~/code/mynewsdesk'\n end\n attr_reader :repo\n\n d... | ruby | chosen |
[
{
"from": "human",
"value": "Add start of specs for extension\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"project extension\" do\n it \"provides an 'bnd:print' task\" do\n Rake::Task.tasks.detect{|task| task.to_s == \"bnd:print\"}... | ruby | chosen |
[
{
"from": "system",
"value": "Use sha1 instead of md5 (deprecated).\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Chgems < Formula\n\n url 'https://github.com/downloads/postmodern/chgems/chgems-0.2.4.tar.gz'\n homepage 'https://github.com/postmodern/chgems#readme'\n md5 '51fd2... | ruby | chosen |
[
{
"from": "human",
"value": "Test script for integration with ZohoProjects\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../helper', __FILE__)\n\nclass ZohoProjectsTest < Service::TestCase\n \n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n \n def data\n {... | ruby | chosen |
[
{
"from": "human",
"value": "Add check to ensure ask prompt converts answer to hash type\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nRSpec.describe TTY::Prompt::Question, \"convert to hash\" do\n subject(:prompt) { TTY::Prompt::Test.new }\n\n it \"converts answer to a has... | ruby | chosen |
[
{
"from": "system",
"value": "Fix default setting of base price and description\n"
},
{
"from": "human",
"value": "# Invoice queue\n\nWhen /^the attendee invoicer runs$/ do\n # Invoice\n @invoice_description ||= SecureRandom.hexdigest(32)\n @base_price ||= SecureRandom.number(9999)\n Invoice... | ruby | chosen |
[
{
"from": "human",
"value": "Create script for generating sponsor files\n\nThis ruby script basically reads in a city config file and creates the sponsor file associated with it. It will NOT create the images, naturally, but this will make it somewhat easier.\n"
},
{
"from": "gpt",
"value": "req... | ruby | chosen |
[
{
"from": "system",
"value": "Add file watcher as dependency"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rusic/version'\n\nGem::Specification.new do |spec|\n spec.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage to avoid warning on `gem build`\n\nOn `gem build ember-dev.gemspec` the following warning is shown:\n\n```\nWARNING: no homepage specified\n```\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/ember-dev/ver... | ruby | chosen |
[
{
"from": "system",
"value": "Remove random debug message. Oops.\n"
},
{
"from": "human",
"value": "require 'mkmf'\n\ndir_config(\"balance_tags_c\")\nputs \"here we are\"\ncreate_makefile(\"balance_tags_c\")\n"
},
{
"from": "gpt",
"value": "require 'mkmf'\n\ndir_config(\"balance_tags... | ruby | chosen |
[
{
"from": "system",
"value": "Add to_s method to SQLServer::Type::Char::Data object\n"
},
{
"from": "human",
"value": "module ActiveRecord\n module ConnectionAdapters\n module SQLServer\n module Type\n class Char < String\n\n def type\n :char\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Load VCR if running in the test environment.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nrequire 'vcr'\n\nVCR.config do |c|\n c.stub_with :webmock\n c.cassette_library_dir = 'fixtures/vcr_cassettes'\n c.default_cassette_options = { :record => :none }\... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for search box\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.feature \"Musics\", type: :feature do\n let!(:user) { create :user }\n let!(:music_1) { create(:hard_music) }\n let!(:music_2) { create(:hard_music) }\n let!(:music_3) ... | ruby | chosen |
[
{
"from": "system",
"value": "Add constraints for running custom range validators\n\nIn spite of having the numericality validator the IntervalValidator and\nRangeOverlappingValidtor would always run, due to rails conventions.\n\nWhen the beginning or end of the range were not numerical, an exception\nwas r... | ruby | chosen |
[
{
"from": "system",
"value": "Implement caching to minimize weather underground API calls\n"
},
{
"from": "human",
"value": "class WeatherMan\n @w_api = Wunderground.new(ENV[\"WUNDERGROUND_API_KEY\"])\n\n def self.current_outdoor_temp(zip_code)\n Rails.cache.fetch(\"current_outdoor_temp\", ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow iframes to use the button\n-This removes restrictions that set X-Frame-Options\nto ‘SAMEORIGIN’."
},
{
"from": "human",
"value": "class HelloWorldApp < Sinatra::Base\n get '/' do\n \"Hello, world!\"\n end\n\n get '/button' do\n @color = params[:col... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.