conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use caskroom path defined in Hbc\n"
},
{
"from": "human",
"value": "BREW_HOME = `brew --repository`.strip\nCASK_HOME = \"#{BREW_HOME}/Library/Taps/caskroom/homebrew-cask\"\n$LOAD_PATH.unshift(\"#{CASK_HOME}/lib\")\n\nrequire 'vendor/homebrew-fork/global'\nrequire 'h... | ruby | chosen |
[
{
"from": "system",
"value": "Add task for repos:bootstrap, and let :update take a limit argument"
},
{
"from": "human",
"value": "namespace :repos do\n desc \"Update repositories with live info from GitHub\"\n task :update => [:environment] do\n require 'repository_updater'\n Repository... | ruby | chosen |
[
{
"from": "system",
"value": "Check import_level in rake task\n"
},
{
"from": "human",
"value": "task :enqueue_feed_eater_worker, [:feed_onestop_ids, :import_level] => [:environment] do |t, args|\n begin\n if args.feed_onestop_ids.present?\n array_of_feed_onestop_ids = args.feed_onestop... | ruby | chosen |
[
{
"from": "system",
"value": "Use User.prolific to sort authors on index.\n"
},
{
"from": "human",
"value": "class AuthorsController < ApplicationController\n def index\n @authors = AuthorDecorator.decorate_collection User.author\n end\n\n def show\n @author = User.author.find(params[:i... | ruby | chosen |
[
{
"from": "system",
"value": "Create the search and send_request actions \n\n"
},
{
"from": "human",
"value": "class FriendsController < ApplicationController\n\n before_action :authenticate_user!\n before_action :set_user\n before_action :user_owner\n\n layout \"user-feed\"\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct object when rendering errors in record controller.\n"
},
{
"from": "human",
"value": "class RecordsController < ApplicationController\n\n # PATCH/PUT /records/1\n # WARNING: This does not work like a typical update - it's updating an array-like data st... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning about already initialized TEXT_DOMAIN constant\n\nThis would happen during application start with rails engines / plugins\nusing their own gettext catalogs\n\n$ rails console\nlib/vmdb/gettext/domains.rb:6: warning: already initialized constant\nVmdb::Gettext::Domai... | ruby | chosen |
[
{
"from": "system",
"value": "Add load_all method to Alki::Loader\n"
},
{
"from": "human",
"value": "module Alki\n class Loader\n def self.load(config_file)\n Fiber.new do\n Kernel.load config_file\n Thread.current[:alki_loader_current]\n end.resume\n end\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add a few puts statements for debugging\n"
},
{
"from": "human",
"value": "require \"email_trail/version\"\nrequire \"email_trail/railtie\" if defined?(Rails::Railtie)\n\nmodule EmailTrail\n class Base\n\n def self.delivering_email(message)\n puts message.i... | ruby | chosen |
[
{
"from": "human",
"value": "Add Broadcast With This Tool\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'butt' do\n version '0.1.14'\n sha256 'f12eac6ad2af8bc38717cccde3f7f139d426b6d098ef94f7dcd6ae7d1225f6ad'\n\n url \"http://downloads.sourceforge.net/sourceforge/butt/butt-#{version}/butt-#{ve... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"change faraday dependency to 0.9\"\n\nThis reverts commit 21229f2dc2282bbfd23244698853d9e7bc413927.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Debug - specify HTTParty version\n"
},
{
"from": "human",
"value": "require 'httparty'\nrequire 'open-uri'\n\nclass Sub\n include Cinch::Plugin\n\n match /(sub) (.+)/, prefix: /^(\\.)/\n match /(help sub)$/, method: :help, prefix: /^(\\.)/\n\n def execute(m, com... | ruby | chosen |
[
{
"from": "system",
"value": "Send the current status label with the ajax response\n"
},
{
"from": "human",
"value": "json.extract! @osc_job, :name, :batch_host, :script_path, :staged_script_name, :staged_dir, :created_at, :updated_at, :status\njson.set! 'fs_root', Filesystem.new.fs(@osc_job.sta... | ruby | chosen |
[
{
"from": "system",
"value": "Move the Mixins into the Reel module\n"
},
{
"from": "human",
"value": "module HTTPVersionsMixin\n\n HTTP_VERSION_1_0 = '1.0'.freeze\n HTTP_VERSION_1_1 = '1.1'.freeze\n DEFAULT_HTTP_VERSION = HTTP_VERSION_1_1\nend\n\nmodule ConnectionMixin\n\n # Obtain t... | ruby | chosen |
[
{
"from": "system",
"value": "Load of fielded search by default\n"
},
{
"from": "human",
"value": "\nmodule SearchTree\nend\n\nrequire 'search_tree/payload'\nrequire 'search_tree/node'\nrequire \"search_tree/version\"\n"
},
{
"from": "gpt",
"value": "\nmodule SearchTree\nend\n\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for presenting authority in the UI\n"
},
{
"from": "human",
"value": "module Users\n class User < Mustache::Railstache\n def init\n self[:graph_user] = self[:user].graph_user\n end\n\n def id\n self[:user].id\n end\n\n def graph_id\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra tests to support_facility_fta\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe \"assets/_support_facility_fta.html.haml\", :type => :view do\n\n it 'fta info' do\n test_asset = create(:administration_building, :fta_funding_type_id ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle new attachment replacement params\n"
},
{
"from": "human",
"value": "class Admin::PolicyAdvisoryGroupsController < Admin::BaseController\n def index\n @policy_advisory_groups = PolicyAdvisoryGroup.order(:name)\n end\n\n def new\n @policy_advisory_gro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in podspec name.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NimbusKit Basics\"\n s.version = \"1.2.0\"\n s.license = { :type => 'BSD' }\n s.summary = \"One file, plenty of basics.\"\n s.description = <... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for SSL browsing\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n#--\n# Copyright (C) 2011 Gitorious AS\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public Li... | ruby | chosen |
[
{
"from": "system",
"value": "Update AddEventSpec to trigger autocomplete via focus and keydown events"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Event Creation' do\n scenario 'User begins typing a venue name', js: true do\n create(:venue, title: 'New Relic')\n cr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix omniauth and omniauth-oauth2 gems version\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/omniauth-thebase/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Masahiro Saito\"]\n gem.email = [\"camelmasa@... | ruby | chosen |
[
{
"from": "human",
"value": "Add fitness prof profile migration\n"
},
{
"from": "gpt",
"value": "class CreateFitnessProfessionalProfiles < ActiveRecord::Migration\n def change\n create_table :fitness_professional_profiles do |t|\n t.string :ethnicity\n t.string :training_location\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make ref return the internal symbol.\n\nWe delegate to_sym to the internal symbol, which we've already called to_sym on in\ninitialize, so we don't need to do that.\n\nWe also know to_sym will never return a falsy value, so we'll never hit to_s.\n\nJust return the symbolized sy... | ruby | chosen |
[
{
"from": "system",
"value": "Update ember-rails to fix compile bug\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"neo4j/meta_model/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reference to self.id parameter\n\n"
},
{
"from": "human",
"value": "module Dspace\n\tclass CommunityPresenter\n\t\tattr_accessor :id\n\n\t\tdef initialize(id = nil)\n\t\t\tself.id = id\n\t\tend\n\n\t\tdef root_communities\n\t\t\t@root_communities ||= Dspace::Com... | ruby | chosen |
[
{
"from": "system",
"value": "Use `defaults' instead of `save_default' for default settings.\n"
},
{
"from": "human",
"value": "Setting.save_default(:ctf_name, 'Parasol')\nSetting.save_default(:submit_burst_count, 10)\nSetting.save_default(:submit_burst_time, 10)\nSetting.save_default(:cooling_d... | ruby | chosen |
[
{
"from": "system",
"value": "Add encryption functionality to generator\n"
},
{
"from": "human",
"value": "require './test/test_helper'\n\nclass GeneratorTest < TestHelper\n def setup\n @gen = setup_test[:gen]\n end\n\n def test_it_generates_a_random_password_of_default_12_chars\n passw... | ruby | chosen |
[
{
"from": "system",
"value": "Add `optional: true` to `belongs_to` to retain the rails<5 behaviour.\n"
},
{
"from": "human",
"value": "class Spree::Slide < ActiveRecord::Base\n\n has_and_belongs_to_many :slide_locations,\n class_name: 'Spree::SlideLocation',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update api-docs to pull from new s3 bucket\n"
},
{
"from": "human",
"value": "require \"sinatra\"\nrequire 'net/http'\nrequire \"open-uri\"\nrequire \"json\"\n\nget '/' do\n begin\n travis = URI.parse(\"https://api.travis-ci.org/repos/cloudfoundry/cloud_controll... | ruby | chosen |
[
{
"from": "system",
"value": "Add twitter gem to dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubo/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix off by one issue in race helper\n"
},
{
"from": "human",
"value": "module RaceHelper\n RACES = {\n 1 => \"Aluvian\",\n 2 => \"Gharu'ndim\",\n 3 => \"Sho\",\n 4 => \"Viamontian\",\n 5 => \"Shadowbound\",\n 6 => \"Gearknight\",\n 7 => ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Rubocop version pin from 0.23.0 -> 0.24.1\n\nThis didn't result in any new lints.\n\nChange-Id: I21d0d4b8f6f7afb4ed2a2ead6f6fe58fefe9abd3\nReviewed-on: http://gerrit.causes.com/40446\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by:... | ruby | chosen |
[
{
"from": "system",
"value": "Change cookbook name to meet specification\n"
},
{
"from": "human",
"value": "name 'Universe on Ubuntu'\nmaintainer 'Alexandro de Oliveira'\nmaintainer_email 'alexandro.oliveira@holbertonschool.com'\nlicense 'all_rights'\ndescription 'Installs/Configures Universe on... | ruby | chosen |
[
{
"from": "system",
"value": "Update DeepStruct spec to use expect\n"
},
{
"from": "human",
"value": "require 'yelp/deep_struct'\n\ndescribe DeepStruct do\n let(:hash) do\n { foo: 1,\n bar: {\n baz: 2,\n bender: {\n bending: {\n rodriguez: true\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set chef file cache path for tests\n\nWe were making an expecation on the path that wasn't necessarily true\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'chefspec'\nrequire 'chefspec/librarian'\n\nRSpec.configure do |config|\n config.platform =... | ruby | chosen |
[
{
"from": "system",
"value": "Set an empty test to a skip.\n"
},
{
"from": "human",
"value": "# Copyright 2015 Australian National Botanic Gardens\n#\n# This file is part of the NSL Editor.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow testing with bundler 2\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib/\", __FILE__)\n$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)\nrequire \"thor/version\"\n\nGem::Specification.new do |spec|\n spec.add_developme... | ruby | chosen |
[
{
"from": "system",
"value": "Make tests pass for other people\n"
},
{
"from": "human",
"value": "require_relative '../lib/ciso.rb'\n\ndescribe CISO do\n describe \"compression\" do\n\n end\n\n subject { CISO::Deflate.new(File.expand_path(\"~/Desktop/memtest86+-5.01.iso\")) }\n\n before do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use is.gd instead of tinyurl.com\n"
},
{
"from": "human",
"value": "service :twitter do |data, payload|\n repository = payload['repository']['name']\n url = URI.parse(\"http://twitter.com/statuses/update.xml\")\n\n payload['commits'].each do |commit|\n commit ... | ruby | chosen |
[
{
"from": "system",
"value": "Update readme from rdoc to markdown in gemspec\n"
},
{
"from": "human",
"value": "# Provide a simple gemspec so you can easily use your enginex\n# project in your rails apps through git.\nGem::Specification.new do |s|\n s.name = \"rqrcode-rails3\"\n s.summa... | ruby | chosen |
[
{
"from": "human",
"value": "Add Formula for ROOT 5.34.36\n"
},
{
"from": "gpt",
"value": "class Root5 < Formula\n homepage \"http://root.cern.ch\"\n\n stable do\n version \"5.34.36\"\n sha256 \"fc868e5f4905544c3f392cc9e895ef5571a08e48682e7fe173bd44c0ba0c7dcd\"\n url \"https://ro... | ruby | chosen |
[
{
"from": "system",
"value": "Change the gem email to use the opensource"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"simple_form/version\"\n\nGem::Specification.new do |s|\n s.name = \"simple_form\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": ":sparkles: Put arguments as arguments, not as an array\n"
},
{
"from": "human",
"value": "require \"entraceable/version\"\n\nmodule Entraceable\n def entraceable(method, tag: nil, level: :debug)\n alias_name = Entraceable.alias_name_for method\n class_eval <<... | ruby | chosen |
[
{
"from": "system",
"value": "Add the default middleware on top os the stack\n"
},
{
"from": "human",
"value": "module Frankie\n class App\n extend ClassLevelApi\n\n RouteNotFoundError = Class.new StandardError\n RES_NOT_FOUND = Response.new '', 404\n\n def initialize app=nil\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change string characters to %{ } and remove unnecessary trailing slashes\n"
},
{
"from": "human",
"value": "require \"proteus/version\"\nrequire \"thor\"\n\nmodule Proteus\n class Kit < Thor\n include Thor::Actions\n\n desc \"url\", \"gets the git url\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add importing required libs to module\n"
},
{
"from": "human",
"value": "require \"steam_stats/version\"\nrequire \"steam_stats/user\"\n\nmodule SteamStats\nend\n"
},
{
"from": "gpt",
"value": "require 'nokogiri'\nrequire 'open-uri'\nrequire 'json'\n\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing fles in the gem\n"
},
{
"from": "human",
"value": "#\n# @ Seevibes 2015\n# Author Thomas Landspurg\n#\n# thomas@seevibes.com\n#\n#\nrequire 'oauth'\nrequire 'multi_json'\n\n\n# Usage:\n# Initialisation\n#\n# ads=TwitterAds::Client.new({consumer_key :\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix adapter variables in worker\n"
},
{
"from": "human",
"value": "class PingWorker\n include Sidekiq::Worker\n def perform(message)\n puts message\n end\nend\n"
},
{
"from": "gpt",
"value": "class PingWorker\n include Sidekiq::Worker\n def perfo... | ruby | chosen |
[
{
"from": "system",
"value": "Change plugin common methods to class methods\n"
},
{
"from": "human",
"value": "<% exploded_class_name do %>\n class Engine < ::Rails::Engine\n isolate_namespace <%= class_name %>\n\n config.autoload_paths << root.join('lib').to_s\n\n def vmdb_plugin?\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create migration for new model programs\n"
},
{
"from": "gpt",
"value": "class CreatePrograms < ActiveRecord::Migration\n def change\n create_table :programs do |t|\n \tt.string :program_code\n \tt.string :program_name\n \tt.string :dbn\n \tt.string :... | ruby | chosen |
[
{
"from": "system",
"value": "Fix path for license file.\n\nSigned-off-by: Ryan Hass <7a1efea0847aa10fda44596a4a622bd3187d968e@users.noreply.github.com>\n"
},
{
"from": "human",
"value": "include_recipe 'chef-marketplace::_server_enable'\n\ndirectory '/etc/delivery'\n\nprivate_key '/etc/delivery... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct ENV var for pnp spec\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\ndescribe \"yarn pnp hello world\" do\n it \"zero-install with NODE_MODLES_CACHE=false should deploy successfully\" do\n app = Hatchet::Runner.new(\n \"s... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for farm relation insertions.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Farm do\n before { @farm = build(:farm) }\n\n it \"should be a valid\" do\n expect(@farm).to be_valid\n end\n\n it \"geocodes the location when being ... | ruby | chosen |
[
{
"from": "system",
"value": "Add \"stall\" vs attributes spec\n"
},
{
"from": "human",
"value": "\n#\n# specifying flor\n#\n# Tue May 17 06:57:16 JST 2016\n#\n\nrequire 'spec_helper'\n\n\ndescribe 'Flor procedures' do\n\n before :each do\n\n @executor = Flor::TransientExecutor.new\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Use a light beginning with Test\n"
},
{
"from": "human",
"value": "require 'rspec'\nrequire 'lifx'\nrequire 'lifx/utilities'\n\nshared_context 'integration', integration: true do\n include LIFX::Utilities\n\n def lifx\n $lifx ||= begin\n options = if ENV['... | ruby | chosen |
[
{
"from": "system",
"value": "Use RACK_ENV instead of deprecated PADRINO_ENV\n"
},
{
"from": "human",
"value": "PADRINO_ENV = 'test'\nPADRINO_ROOT = File.dirname(__FILE__) unless defined?(PADRINO_ROOT)\nrequire 'rubygems' unless defined?(Gem)\nrequire 'bundler'\nBundler.require(:default, PADRINO... | ruby | chosen |
[
{
"from": "system",
"value": "Remove RSpec 10 profile examples"
},
{
"from": "human",
"value": "require 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\nrequire 'simplecov'\nSimpleCov.start do\n add_filter \"/spec/\"\nend\n\nrequire 'loco_bot'\n\nRSpec.configure do |config|\n co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix byebug dependency in spec helper\n"
},
{
"from": "human",
"value": "# CodeClimate\nrequire 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'bayonet'\nrequire 'pry-byebug'\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Add description and things to gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'gitfyncy/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add -dev flag for non-silent exception throwing\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nBundler.require(:default)\n\nrequire './lib/bot/core'\n\n$restart = false\n\n# Loads .rb patches intended to be run only once.\npatch_dir ... | ruby | chosen |
[
{
"from": "system",
"value": "Update initiatives grid to make use of baby_sqeel\n"
},
{
"from": "human",
"value": "class InitiativesGrid\n include Datagrid\n\n scope do\n Initiative\n end\n\n filter(:id, :string, :multiple => ',')\n filter(:name, :string) do |value|\n where.has {name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix URIs of memory databases.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'alf-sequel'\nrequire \"rspec\"\nrequire 'path'\nrequire_relative 'fixtures/sap.rb'\n\nmodule Helpers\n\n def sequel_database_path\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add root module require in spec helper\n"
},
{
"from": "human",
"value": "RSpec.configure do |config|\n # Many RSpec users commonly either run the entire suite or an individual\n # file, and it's useful to allow more verbose output when running an\n # individual ... | ruby | chosen |
[
{
"from": "system",
"value": "Set testing log level to error, to remove deprecation spam\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nat_exit { ChefSpec::Coverage.report! }\n"
},
{
"from": "gpt",
"value": "require 'chefspec'\nrequire 'chefspe... | ruby | chosen |
[
{
"from": "system",
"value": "Use simplecov default \"test_frameworks\" profile\n"
},
{
"from": "human",
"value": "# Setup for test coverage instrumentation (e.g. simplecov, codeclimate)\n# MUST happen before any other code is loaded\nrequire 'simplecov'\nSimpleCov.start do\n add_filter '/spec'... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade rspec, so we are using the new matchers\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rspec/matchers_test/version'\n\nGem::Specification.new d... | ruby | chosen |
[
{
"from": "system",
"value": "Change conn to correct connection instance\n"
},
{
"from": "human",
"value": "module Firering\n module Instantiator\n\n def instantiate(conn, data, base_key = nil, &callback)\n instance = new\n instance.connection = conn\n\n attributes = data.is_a... | ruby | chosen |
[
{
"from": "system",
"value": "Rename screen_name: Docker Hub automated build -> Docker Hub\n"
},
{
"from": "human",
"value": "module Idobata::Hook\n class DockerHub < Base\n screen_name 'Docker Hub automated build'\n icon_url hook_image_url('mono_vertical_small.png')\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add ActiveRecord Base Transaction into import of samples from file\n"
},
{
"from": "human",
"value": "require 'roo'\nclass Import::ImportSamples\n\n def self.import_samples_from_file(file_path, collection_id)\n xlsx = Roo::Spreadsheet.open(file_path)\n rows =... | ruby | chosen |
[
{
"from": "human",
"value": "Remove bad URLs for Number10 and DPMO from search\n\nhttps://www.pivotaltracker.com/story/show/48925175\n"
},
{
"from": "gpt",
"value": "Rummageable.delete('/government/organisations/the-prime-ministers-office-number-10', Whitehall.government_search_index_path)\nRumm... | ruby | chosen |
[
{
"from": "system",
"value": "Make private_profile flag true by default.\n\nChange the expression index to match the usual query for it.\n"
},
{
"from": "human",
"value": "class AddPrivateProfileToUsers < ActiveRecord::Migration\n def change\n add_column :users, :private_profile, :boolean, i... | ruby | chosen |
[
{
"from": "system",
"value": "Change rake task to use .available instead of out_of_date_at (sometimes\n\na product is unavailable for a reason other than its out_of_date_at\nfield)\n"
},
{
"from": "human",
"value": "config_file = ::Rails.root.join('config/elasticsearch.yml')\nindex_config = ::Ra... | ruby | chosen |
[
{
"from": "system",
"value": "Fix AeroFS cask url (now v0.0.32)\n"
},
{
"from": "human",
"value": "class Aerofs < Cask\n url 'https://dsy5cjk52fz4a.cloudfront.net/AeroFSInstall.dmg'\n homepage 'https://www.aerofs.com/'\n version 'latest'\n no_checksum\n link 'AeroFS.app'\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug with reloading in development mode"
},
{
"from": "human",
"value": "module Astaire\n class Rails < Rails::Railtie\n config.to_prepare do\n ApplicationController.class_eval { include Astaire::DSL }\n end\n\n initializer \"astaire.cascade_rout... | ruby | chosen |
[
{
"from": "system",
"value": "Set defaults in WebpackSupportRails module\n"
},
{
"from": "human",
"value": "require \"webpack_support_rails/version\"\nrequire 'webpack_support_rails/railtie' if defined?(Rails)\n\nmodule WebpackSupportRails\n mattr_accessor :update_webpack_manifest_every_request... | ruby | chosen |
[
{
"from": "system",
"value": "Make pypy3 work again by switching to the 3.3 compat alpha, which works with pip 9."
},
{
"from": "human",
"value": "#\n# Copyright 2015-2016, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem dependencies dropped by Discourse\n"
},
{
"from": "human",
"value": "# name: discourse-backups-to-dropbox\n# about: Backups discourse backups in dropbox\n# version: 0.0.2\n# authors: Rafael dos Santos Silva <xfalcox@gmail.com>\n# url: https://github.com/xfal... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to_json for Integer and Bignum instances under 1.9.3"
},
{
"from": "human",
"value": "Solid::MethodWhitelist\n\t.allow(\n\t\tBasicObject => [:!, :!=, :==],\n\t\tObject => [:present?, :blank?, :in?, :to_json],\n\t\tKernel => [:nil?, :!~],\n\t\tModule => [:==],\... | ruby | chosen |
[
{
"from": "system",
"value": "Update the MockController code to work with Rails 4\n"
},
{
"from": "human",
"value": "class MockController\n attr_writer :action_name\n\n def _routes\n self\n end\n\n def action_name\n defined?(@action_name) ? @action_name : \"edit\"\n end\n\n def url_f... | ruby | chosen |
[
{
"from": "system",
"value": "Add syncReference as optional field in credit creation.\n"
},
{
"from": "human",
"value": "module Rubill\n class Customer < Base\n def self.find_by_name(name)\n record = active.detect do |d|\n d[:name] == name\n end\n\n raise NotFound unles... | ruby | chosen |
[
{
"from": "system",
"value": "[JRO] Update error w/correct rake task to run\n\nIf there's no data and you visit the dummy app server you will get this\nerror. The previous error message had the incorrect rake task in the\nerror message - this fixes that.\n"
},
{
"from": "human",
"value": "module... | ruby | chosen |
[
{
"from": "system",
"value": "Manage permissions on tomcat directories\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: jvogt_tomcat\n# Recipe:: default\n#\n\ngroup node['jvogt_tomcat']['group']\n\nuser node['jvogt_tomcat']['user'] do\n group node['jvogt_tomcat']['group']\nend\n\npackage node... | ruby | chosen |
[
{
"from": "system",
"value": "Make it compatible with rails 3.2\n"
},
{
"from": "human",
"value": "module Hyphenify\n module Rails\n module ActionView\n module Base\n extend ActiveSupport::Concern\n\n included do\n alias_method_chain :tag_option, :hyphen\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add starlight to a new comment's entry.\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n def create\n raise \"Empty comment!\" if params[:comment][:body].blank?\n @entry = Entry.find params[:entry_id]\n created_comment ... | ruby | chosen |
[
{
"from": "system",
"value": "Change DNS matcher to allow underscores. Caused failing specs if you've got certain things in your hosts file\n"
},
{
"from": "human",
"value": "class BeValidDNSName\n # http://stackoverflow.com/questions/106179/regular-expression-to-match-hostname-or-ip-address\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove organisation from allowed params.\n"
},
{
"from": "human",
"value": "class ProfilesController < ApplicationController\n before_action :ensure_user\n\n def edit\n @user = current_user\n end\n\n def update\n current_user.update! profile_params\n re... | ruby | chosen |
[
{
"from": "human",
"value": "Change field type for feedback\n"
},
{
"from": "gpt",
"value": "class ChangeFeedbackFieldToInteger < ActiveRecord::Migration\n def self.up\n feedbacks = Feedback.all\n feedbacks.each do |f|\n case f.feedback\n when 'positive'\n f.feedback ... | ruby | chosen |
[
{
"from": "human",
"value": "Drop index on course_section_id from enrollments\n\ncloses: KNO-408\n\ntest plan\n - migrations should run\n - specs should pass\n\nChange-Id: I3414d55110f9cb84e0d99d03796f0613081af7e1\nReviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234401\nReviewed-by: James William... | ruby | chosen |
[
{
"from": "system",
"value": "Update breadrcumbs formatting not to include link on the last node\n"
},
{
"from": "human",
"value": "module SeoCms\n module ArticlesHelper\n def generate_breadcrumbs(breadcrumbs_info)\n breadcrumbs_info.map { |breadcrumb| link_to breadcrumb[:label], breadc... | ruby | chosen |
[
{
"from": "system",
"value": "Add license format, disable ARC and add deployment targets to podspec\n\nAlso fixes format of tag version string. Passes `pod spec lint` validation.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Expecta'\n s.version = '0.2.4'\n s.licens... | ruby | chosen |
[
{
"from": "human",
"value": "Add temporary gemspec so that the gem can be built via URL\n"
},
{
"from": "gpt",
"value": "require 'rake/file_list'\n\nGem::Specification.new do |spec|\n spec.name = \"ruby-gumbo\"\n spec.version = \"1.1.0.rc1\"\n spec.summary = \"Ruby bindings for the gumbo html... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the logic for ensuring the filtering Enumerable adapter has properly processed a filtering instruction\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative '../attribute_instruction'\nrequire_relative './enumerable_strategy'\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable route logging in production\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'sinatra'\nrequire 'sinatra/multi_route'\nrequire 'sinatra/namespace'\nrequire \"sinatra/streaming\"\nrequire 'sinatra/r18n'\nrequire 'sinatra/flash'\n\nrequire 'haml'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a correct return to webhooks\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.require\n\nrequire './config.rb'\nrequire './helpers/database.rb'\nrequire './helpers/pay.rb'\n\nconfigure {set :server, :puma}\nFaye::WebSocket.load_adapter('puma')\norde... | ruby | chosen |
[
{
"from": "system",
"value": "Update the solution so that the script now prompts the user.\n"
},
{
"from": "human",
"value": "require \"reverse_string/version\"\n\nmodule ReverseString\n\n def self.reverse_string(string)\n string.reverse\n end\n\nend\n"
},
{
"from": "gpt",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Complete rake task for adding existing achievements to FB as badges.\n\nReferences Coursemology/coursemology.org#192.\n"
},
{
"from": "human",
"value": "namespace :db do\n\n task add_achievements_to_fb: :environment do\n\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Use new origin and deprecate it\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Lock-GooglePlus\"\n s.version = \"1.0.1\"\n s.summary = \"Google+ Native Integration for Auth0 Lock\"\n s.description = <<-DES... | ruby | chosen |
[
{
"from": "system",
"value": "Hide edit and destroy links from sidenav\n"
},
{
"from": "human",
"value": "class Vendors::SimpleNavigation::Renderer::TwitterSidenav < SimpleNavigation::Renderer::Base\n def render(item_container)\n content, first_item_selected = '', false\n \n item_con... | ruby | chosen |
[
{
"from": "system",
"value": "Update Scalate to release 1.4.1.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Scalate <Formula\n url 'http://repo.fusesource.com/nexus/content/repositories/publi... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.