conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update url and license for MacPaw Gemini.app\n" }, { "from": "human", "value": "cask :v1 => 'macpaw-gemini' do\n version :latest\n sha256 :no_check\n\n # devmate.com is the official download host per the vendor homepage\n url 'http://dl.devmate.com/download/com....
ruby
chosen
[ { "from": "system", "value": "Update Google Play Music Manager\n\nUpdated Music Manager from an old version that no longer works.\n" }, { "from": "human", "value": "cask :v1 => 'music-manager' do\n version '1.0.104.6528'\n sha256 'a1e4e48e008958f9a725bfee1e2d8360dc8efad38ef2532fc1b3e4b9c3df8f0...
ruby
chosen
[ { "from": "system", "value": "Refactor the validate_request_status callback to leverage the\nrequest.active? logic.\n" }, { "from": "human", "value": "class MessagesController < UserActionsController\n before_action :set_request, :verify_association\n before_action :validate_request_status, on...
ruby
chosen
[ { "from": "system", "value": "Return 500 status when reading not created successfully\n" }, { "from": "human", "value": "class ReadingsController < ApplicationController\n protect_from_forgery except: :create\n\n def create\n reading = Reading.create_from_params(strong_params)\n render ...
ruby
chosen
[ { "from": "system", "value": "Work on getting login to work\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n def signin\n @user = User.find_by(id: params[:id])\n\n if @user && @user.authenticate(password: params[:password])\n # redirect to members...
ruby
chosen
[ { "from": "system", "value": "Make URL look like an URL\n\n- Add scheme (http)\n- Use 127.0.0.1 to address the node itself, not 0.0.0.0\n\nThis should fix:\n\n```\nubuntu1604-64-1 06:39:31$ /bin/sh -c curl\\ -s\\ -S\\ 0.0.0.0:80/users/sign_in\ncurl: (3) URL using bad/illegal format or missing URL\n```\n" ...
ruby
chosen
[ { "from": "system", "value": "Make sure root can log in\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Make sure a password is set IMAGE-459\ndescribe command(\"cat /etc/master.passwd | grep Charlie | awk -F':' '{print $2;}'\") do\n it { should_not return_stdout \"\" }\nend\n\n# ...
ruby
chosen
[ { "from": "human", "value": "Add tests to image based captchas\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nusername = CREDENTIALS['username']\npassword = CREDENTIALS['password']\npath2 = './captchas/2.jpg' # path of the captcha (Coordinates API)\npath3_grid = '...
ruby
chosen
[ { "from": "system", "value": "Add more cases to Iep Storer spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe IepStorer, type: :model do\n class FakeAwsClient\n def self.put_object(args)\n {\n server_side_encryption: 'AES256'\n }\n end\n end...
ruby
chosen
[ { "from": "system", "value": "Add step for removing queue in chapters request spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'chapters' do \n let(:user) { create_user! }\n before do\n @book = Book.create(:title => \"Rails 3 in Action\", \...
ruby
chosen
[ { "from": "human", "value": "Add specs for addresses:assign command.\n" }, { "from": "gpt", "value": "require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')\n\ndescribe \"addresses:assign command\" do\n def cli\n @cli ||= HP::Cloud::CLI.new\n end\n\n before(:all) do\n ...
ruby
chosen
[ { "from": "human", "value": "Patch in our own raise on potential false positives\n" }, { "from": "gpt", "value": "module RSpec\n module Matchers\n module BuiltIn\n class RaiseError\n def warn_about_bare_error\n raise %(\n Using the `raise_error` matcher withou...
ruby
chosen
[ { "from": "system", "value": "Update Payment source_type to Spree::CreditCard in migration\n" }, { "from": "human", "value": "class RenameCreditcardsToCreditCards < ActiveRecord::Migration\n def change\n rename_table :spree_creditcards, :spree_credit_cards\n end\nend\n" }, { "from":...
ruby
chosen
[ { "from": "system", "value": "Set display_aspect_ratio to default of 4:3 if ratio can't be found.\n" }, { "from": "human", "value": "class AddDisplayAspectRatioToMasterFile < ActiveRecord::Migration\n def up\n MasterFile.find_each({},{batch_size:5}) do |masterfile|\n if masterfile.is_vi...
ruby
chosen
[ { "from": "system", "value": "Update reference to Raizlabs in podspec.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"BonMot\"\n s.version = \"5.4.1\"\n s.summary = \"Beautiful, easy attributed strings in Swift\"\n s.swift_versions = [\"...
ruby
chosen
[ { "from": "system", "value": "Add test for checking status.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Ruzai2 do\n it 'has a version number' do\n expect(Ruzai2::VERSION).not_to be nil\n end\n\n describe Ruzai2::RuzaiList do\n describe \".ban\" do\n subject...
ruby
chosen
[ { "from": "system", "value": "FIX the spec to be in-line with the now playing functionality\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\ndescribe Robut::Plugin::Rdio::Server do \n include Rack::Test::Methods\n\n def app\n @app ||= R...
ruby
chosen
[ { "from": "system", "value": "Update the render spec helper to work with view paths that do not start with an initial slash.\n" }, { "from": "human", "value": "ENV['RACK_ENV'] = 'test'\n\nrequire 'eee'\nrequire 'spec'\nrequire 'spec/interop/test'\nrequire 'sinatra/test'\n\nrequire 'webrat'\nrequ...
ruby
chosen
[ { "from": "system", "value": "Load the appropriate adapter depending on which tests are running\n" }, { "from": "human", "value": "# TODO Load and unload particular backends for backend-specific tests\nrequire 'memdash/active_record'\n\nDir[File.expand_path('../support/*.rb', __FILE__)].each{|f|...
ruby
chosen
[ { "from": "system", "value": "Work around Active Support load order bug\n\nSee https://github.com/rails/rails/issues/28918\n" }, { "from": "human", "value": "require 'bundler/setup'\n\nrequire 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [\n ...
ruby
chosen
[ { "from": "system", "value": "Allow old syntax for rspec-mock\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\n# our gem\nrequire 'remote_database_cleaner'\n\nRSpec.configure do |config|\n\nend\n\ndef configure_remote_database_cleaner(remote_name: nil,\n ...
ruby
chosen
[ { "from": "system", "value": "Fix output on fixtures loading\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'codeclimate-test-reporter'\nrequire 'bundler/setup'\n\nSimpleCov.start do\n add_filter '/spec/'\nend\nBundler.require\n\nRSpec.configure do |config|\n config.expect_wit...
ruby
chosen
[ { "from": "system", "value": "Remove rails/test_help not to call Minitest.autorun\n" }, { "from": "human", "value": "require \"simplecov\"\nSimpleCov.start\n\n# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\n\n# Configure Rails Environment\nENV[\"DB\"] ||= \"mysql\"\n\nrequire File....
ruby
chosen
[ { "from": "system", "value": "Remove unused CodeClimate unit test comments\n" }, { "from": "human", "value": "# require 'codeclimate-test-reporter'\n# CodeClimate::TestReporter.start\n\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\n\nRSpec.configure do |config|\n # Prohibit using the should...
ruby
chosen
[ { "from": "system", "value": "Add author information to gemspec\n" }, { "from": "human", "value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_prize'\n s.version = '2.2.2'\n s.summary = 'Giveaways for Spree'\n s.des...
ruby
chosen
[ { "from": "system", "value": "Mark as deprecated in podspec" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DTXcodeUtils\"\n s.version = \"0.1.1\"\n s.summary = \"Useful helper functions for writing Xcode plugins\"\n s.homepage = \"htt...
ruby
chosen
[ { "from": "system", "value": "Update VisIt cask version to 2.7.0.\n\nUpdate VisIt cask version to 2.7.0, the current release.\n" }, { "from": "human", "value": "class Visit < Cask\n url 'http://portal.nersc.gov/svn/visit/trunk/releases/2.6.3/VisIt-2.6.3-x86_64-installer.dmg'\n homepage 'https:...
ruby
chosen
[ { "from": "system", "value": "Update version for pods release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"OOPhotoBrowser\"\n s.summary = \"Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress a...
ruby
chosen
[ { "from": "system", "value": "Remove spurious line from ESI fund spec\n\nThis seems to have been copy-pasta'd from the medical safety alert spec.\n" }, { "from": "human", "value": "require \"fast_spec_helper\"\nrequire \"formatters/esi_fund_publication_alert_formatter\"\n\nRSpec.describe EsiFund...
ruby
chosen
[ { "from": "system", "value": "Update the outdated podspec file\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MarqueeLabel\"\n s.version = \"3.1.0\"\n s.summary = \"A drop-in replacement for UILabel, which automatically adds a scrolling marquee effect w...
ruby
chosen
[ { "from": "system", "value": "Remove encoding comment from gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire_relative 'lib/abstract_class/version'\n\nGem::Specification.new do |s|\n s.name = 'abstract_class'\n s.version = AbstractClass::Version\n s.platform ...
ruby
chosen
[ { "from": "system", "value": "Move license up higher in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire_relative 'lib/abstract_class/version'\n\nGem::Specification.new do |s|\n s.name = 'abstract_class'\n s.version = AbstractClass::Version\n s.platform = G...
ruby
chosen
[ { "from": "system", "value": "Add new method in admin/staffmembers\n" }, { "from": "human", "value": "class Admin::StaffMembersController < Admin::Base\n def index\n @staff_members = StaffMember.order(:family_name_kana, :given_name_kana)\n end\n\n def show\n staff_member = StaffMember.f...
ruby
chosen
[ { "from": "system", "value": "Update podfile and demo app\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftSpinner\"\n s.version = \"2.0.0\"\n s.summary = \"A beautiful activity indicator written in Swift\"\n s.description = <<-DESC...
ruby
chosen
[ { "from": "system", "value": "Correct name of hash key\n" }, { "from": "human", "value": "#\n# Cookbook:: build_cookbook\n# Recipe:: set_up_build\n#\n# Copyright:: 2017, Jp Robinson, All Rights Reserved.\n\n# Steps to set up a build of the correct apache version\nbuild_config = ab_load_config(no...
ruby
chosen
[ { "from": "system", "value": "Resolve merge conflict with mixlib-shellout change\n" }, { "from": "human", "value": "# x86-mingw32 Gemspec #\ngemspec = eval(IO.read(File.expand_path(\"../chef.gemspec\", __FILE__)))\n\ngemspec.platform = \"x86-mingw32\"\n\ngemspec.add_dependency \"ffi\", \"1.3.1\"...
ruby
chosen
[ { "from": "system", "value": "Stop cleaning up water quality data\n" }, { "from": "human", "value": "# frozen_string_literal: true\nnamespace :cleanup do\n desc 'Remove forecasts that are in the past'\n task prune_past_forecasts: :environment do\n SurflineLola.unscoped.where('timestamp < no...
ruby
chosen
[ { "from": "system", "value": "Remove load_config as application.rb config is used\n" }, { "from": "human", "value": "require 'active_record'\n#require_dependency 'active_record/migration'\n\nnamespace :noosfero do\n namespace :plugins do\n\n plugin_migration_dirs = Dir.glob(Rails.root.join('...
ruby
chosen
[ { "from": "system", "value": "Allow to use \"a\\nb\".lines.each syntax in ruby 1.8\n" }, { "from": "human", "value": "#\n# Author:: Adam Jacob (<adam@opscode.com>)\n# Copyright:: Copyright (c) 2008 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Ve...
ruby
chosen
[ { "from": "system", "value": "Deploy twitter spec to its own context to reduce spec race conditions for root context\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# A remote group nested within a local one\ndescribe \"end-to-end twitter testing\" do \n\n # Deploy our apps\n deplo...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for Seeder class\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe GovukSeedCrawler::Seeder do\n subject { GovukSeedCrawler::Seeder }\n\n let(:mock_get_urls) do\n double(:mock_get_urls, :urls => true)\n end\n\n let(:mock_publish...
ruby
chosen
[ { "from": "system", "value": "Rewrite be_link_like matcher for rspec 3.x\n" }, { "from": "human", "value": "module RunnablesLinkMatcher\n class BeLinkLike\n def initialize(href, css_class, image, link_text)\n @href, @css_class, @image, @link_text = href, css_class, image, link_text\n ...
ruby
chosen
[ { "from": "system", "value": "Clean up type-fixing migration script\n" }, { "from": "human", "value": "class FixTypeColumnName < ActiveRecord::Migration\n def change\n rename_column :documents, :type, :file_type\n rename_column :submissions, :type, :file_type\n end\nend\n" }, { "...
ruby
chosen
[ { "from": "system", "value": "Add enum to Bookmark model for source_types\n" }, { "from": "human", "value": "class Bookmark < ApplicationRecord\n has_many :bookmark_tags\n has_many :tags, through: :bookmark_tags\n\n enum source_type: { \"Post\" => 0, \"Publication\" => 1, \"Video\" => 2, \"Th...
ruby
chosen
[ { "from": "system", "value": "Update cDock 9.5 -> cDock2 0.9.7\n" }, { "from": "human", "value": "cask :v1 => 'cdock' do\n version '9.5'\n sha256 'db92068d04b538bf1fb20f7b5d79151ce619befefb20929178a143a73f4e99cc'\n\n url \"https://github.com/w0lfschild/cDock/releases/download/v#{version}/cDoc...
ruby
chosen
[ { "from": "human", "value": "Create cask for Vectr 0.1.7 app\n" }, { "from": "gpt", "value": "cask :v1 => 'vectr' do\n version '0.1.7'\n sha256 '8416736f29f1b2e72d8d4595386bce554bb4ccbc49b27f92a86c6febabfbc35e'\n\n url \"http://download.vectr.com/desktop/vectr-mac-#{version}.zip\"\n name 'Ve...
ruby
chosen
[ { "from": "system", "value": "Delete dead code brought from spree\n" }, { "from": "human", "value": "module Spree\n module Admin\n class TaxRatesController < ResourceController\n before_action :load_data\n\n update.after :update_after\n create.after :create_after\n\n priv...
ruby
chosen
[ { "from": "system", "value": "Fix commit for directory named tags\n\nThe previous commit was not working properly for all cases.\n\nI have to admit I was drawing a boolean table to solve this issue :-)\n" }, { "from": "human", "value": "require 'rubygems/command'\n\nclass Gem::Commands::CtagsCom...
ruby
chosen
[ { "from": "system", "value": "Put the orders into a transaction so we do not double import upon errors\n" }, { "from": "human", "value": "module SpreeAmazonMws\n class OrderImporter\n attr_accessor :amazon_orders\n\n def import_recent_orders(since=1.day.ago)\n @amazon_orders = order_...
ruby
chosen
[ { "from": "system", "value": "Update wake formula for v0.2.1\n" }, { "from": "human", "value": "require \"formula\"\n\nclass Wake < Formula\n url \"https://github.com/MichaelRFairhurst/wake-compiler/archive/v0.2.0.tar.gz\"\n homepage \"http://www.wakelang.com\"\n sha1 \"0fefebc5c5c28f2adcabc4...
ruby
chosen
[ { "from": "system", "value": "Remove route naming simplification - was confusing things\n" }, { "from": "human", "value": "CarbonDiet::Application.routes.draw do\n \n root :to => 'main#index'\n \n match '/m' => 'main#mobile'\n\n # Connection for public profiles\n match '/profile/:login' =>...
ruby
chosen
[ { "from": "system", "value": "Update mount configuration for JasmimeRails engine.\n" }, { "from": "human", "value": "Teikei::Application.routes.draw do\n\n namespace :api, defaults: {format: :json} do\n namespace :v1 do\n resources :farms, except: [:new, :edit]\n resources :depots,...
ruby
chosen
[ { "from": "system", "value": "Set reasonable parent for new MTB Novice cats\n" }, { "from": "human", "value": "class AddCat3ToMtbNovice < ActiveRecord::Migration\n def change\n Race.all.each do |race|\n if race.event.discipline == \"Mountain Bike\" && race.name[\"Novice\"] && !race.name...
ruby
chosen
[ { "from": "system", "value": "Fix the broken delete feature for posts\n" }, { "from": "human", "value": "module BBS\n class PostsController\n\n def create(hash, user)\n if validate_params(hash)\n\n category = CategoriesController.new.create(hash[\"category\"])\n hash.delete...
ruby
chosen
[ { "from": "system", "value": "Fix syntax when raising error message\n" }, { "from": "human", "value": "require 'govuk_mirrrorer/indexer'\n\nmodule GovukSeedCrawler\n class GetUrls\n attr_reader @urls\n\n def initialize(:site_root)\n unless :site_root raise \"No :site_root defined\"\n...
ruby
chosen
[ { "from": "system", "value": "Handle special case for Essex council\n" }, { "from": "human", "value": "# Parser for loading FixMyStreet contacts data\n\nclass Parsers::FmsContactsParser \n\n def csv_options\n { :quote_char => '\"', \n :col_sep => \",\", \n :row_sep =>:auto, \n ...
ruby
chosen
[ { "from": "system", "value": "Reset buffer when last is read.\n" }, { "from": "human", "value": "require \"monitor\"\n\nclass ThreadQueues::StringBuffer\n def initialize(queue)\n @queue = queue\n @buffer = \"\"\n @mutex = Monitor.new\n end\n\n def gets\n @mutex.synchronize do\n ...
ruby
chosen
[ { "from": "system", "value": "Send input_capacity with the converter stats\n" }, { "from": "human", "value": "module Api\n module V3\n class ConverterStatsPresenter\n ATTRIBUTES = [\n :demand,\n :electricity_output_capacity,\n :number_of_units\n ].freeze\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add acceptance test for sensu_check\n" }, { "from": "gpt", "value": "require 'spec_helper_acceptance'\n\ndescribe 'sensu_check', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do\n context 'default' do\n it 'should work without errors' do\n pp =...
ruby
chosen
[ { "from": "system", "value": "Add a few more specs to Mdm::Service\n\nMdm::Service had no specs, so added some additional coverage\nTests all associations and scopes on the model\n\n[Story #49167601]\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Mdm::Service do\n\n contex...
ruby
chosen
[ { "from": "system", "value": "Fix typos in ModelMacros module\n" }, { "from": "human", "value": "module ModelMacros\n # Create a new emotional model\n def followable(klass_name, &block)\n spawn_model klass_name, ActiveRecord::Base do\n acts_as_followable\n instance_exec(&block) if...
ruby
chosen
[ { "from": "human", "value": "Add some functional tests for value conversions." }, { "from": "gpt", "value": "require 'test_helper'\n\nclass QueryTest < Test::Unit::TestCase\n \n def setup\n @connection = Vertica::Connection.new(TEST_CONNECTION_HASH.merge(:row_style => :array))\n\n @conne...
ruby
chosen
[ { "from": "system", "value": "Update version number to 0.1.3" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'sonic-pi-cli'\n s.version = '0.1.1'\n s.date = '2016-11-10'\n s.summary = \"Sonic Pi CLI\"\n s.description = \"A simple command line ...
ruby
chosen
[ { "from": "system", "value": "Define Document apart from Widget.\n" }, { "from": "human", "value": "module Cucumber\n module Salad\n module Widgets\n class Document < Widget\n include WidgetContainer\n\n root 'body'\n\n def initialize(options)\n self.widget...
ruby
chosen
[ { "from": "system", "value": "Fix message format of pong message\n" }, { "from": "human", "value": "module IrcTools\n class PongMessage < Message\n def initialize(options = {})\n super(options.merge(:type => :pong))\n @validator = MessageTypes::PONG_MATCHER\n end\n\n protecte...
ruby
chosen
[ { "from": "system", "value": "Add demo token to quandl\n" }, { "from": "human", "value": "class Backend::Cells::QuandlCellsController < Backend::Cells::BaseController\n\n def show\n start = Date.today << 12\n finish = start >> 12 - 1\n #params[:threshold] = 183.50\n dataset = params...
ruby
chosen
[ { "from": "system", "value": "Fix section note relation in admin section serializer\n" }, { "from": "human", "value": "module Api\n module Admin\n module Chapters\n class SectionSerializer\n include FastJsonapi::ObjectSerializer\n\n set_type :section\n\n set_id :id\...
ruby
chosen
[ { "from": "system", "value": "Use a more direct way to signal the current process in Process::Status::exitstatus specs\n" }, { "from": "human", "value": "require_relative '../../../spec_helper'\n\ndescribe \"Process::Status#exitstatus\" do\n before :each do\n ruby_exe(\"exit(42)\")\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Bring back old hashie dependency\n" }, { "from": "human", "value": "require File.expand_path('../lib/arrow_payments/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"arrow_payments\"\n s.version = ArrowPayments::VERSION.dup\n s.summary ...
ruby
chosen
[ { "from": "system", "value": "Add check for grade being an integer\n" }, { "from": "human", "value": "class StudentSectionGradeRow < Struct.new(:row, :school_ids_dictionary)\n # Represents a row in a CSV export from Somerville's Aspen X2 student information system.\n # This structure represent...
ruby
chosen
[ { "from": "system", "value": "Refactor files inclusion on gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'exception_notification'\n s.version = '2.5.1'\n s.authors = [\"Jamis Buck\", \"Josh Peek\"]\n s.date = %q{2011-08-29}\n s.summary = \"Exception noti...
ruby
chosen
[ { "from": "system", "value": "Make Readline::HISTORY.[]= spec test return value\n" }, { "from": "human", "value": "require File.expand_path('../../../../spec_helper', __FILE__)\n\nprocess_is_foreground do\n with_feature :readline do\n require 'readline'\n\n describe \"Readline::HISTORY.[]...
ruby
chosen
[ { "from": "system", "value": "Add Rob to gem authors.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"plan_executor\"\n s.summary = \"A Gem for handling FHIR test executions\"\n s.description = \"A Gem for handling FHIR test execution...
ruby
chosen
[ { "from": "human", "value": "Add 'team create' feature test\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe \"Create a team\", type: :feature do\n let(:team) { build(:team) }\n before do\n login_as create(:user)\n visit new_team_url\n end\n\n context \"whit valid at...
ruby
chosen
[ { "from": "system", "value": "Fix false positive due to factory\n\n#74\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe GeocodeWorker do\n describe '#perform' do\n it \"should geocode the object's address\", :vcr do\n user = FactoryGirl.create(:user)\n Geocode...
ruby
chosen
[ { "from": "system", "value": "Make Procedo serialize dates using ISO8601 standard\n" }, { "from": "human", "value": "module Procedo\n module Engine\n class Intervention\n class WorkingPeriod\n include Reassignable\n\n DEFAULT_DURATION = 2.hours\n\n attr_accessor :st...
ruby
chosen
[ { "from": "system", "value": "Use ActiveRecord instead of sql\n" }, { "from": "human", "value": "class FixServiceOrderPlacedAt < ActiveRecord::Migration[5.0]\n class ServiceOrder < ActiveRecord::Base; end\n\n def up\n update <<-SQL\n UPDATE \"service_orders\"\n SET \"placed_at\" =...
ruby
chosen
[ { "from": "human", "value": "Add support for RPM based install\n" }, { "from": "gpt", "value": "include_recipe 'omnibus_updater::set_remote_path'\n\nremote_file \"chef omnibus_package[#{File.basename(node[:omnibus_updater][:full_uri])}]\" do\n path File.join(node[:omnibus_updater][:cache_dir], ...
ruby
chosen
[ { "from": "system", "value": "Break early on bad response\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'rest-client'\nrequire 'optparse'\nrequire 'dotenv'\n\nDotenv.load\n\noptions = {}\n\nOptionParser.new do |opts|\n opts.banner = 'Usage: ./bonus-blast.rb [options]'\n\n o...
ruby
chosen
[ { "from": "system", "value": "Revert \"migration 17 now runs against sqlite3 backend\"\n\nThis reverts commit 090b836162e84cb311f59cf9389dc67b31c9ce2e.\n" }, { "from": "human", "value": "require 'digest/sha1'\nrequire_relative 'migration_helper'\n\nSequel.migration do\n change do\n self[:pac...
ruby
chosen
[ { "from": "system", "value": "Fix sorting on search api" }, { "from": "human", "value": "class Api::SearchController < Api::ApplicationController\n before_action :check_api_key\n\n def index\n @query = params[:q]\n @search = Project.search(params[:q], filters: {\n platform: current_...
ruby
chosen
[ { "from": "system", "value": "Add a param (?score) to get project score v2 in the bulk check api\n" }, { "from": "human", "value": "class Api::StatusController < Api::ApplicationController\n before_action :require_api_key\n\n def check\n if params[:projects].any?\n @projects = params[:...
ruby
chosen
[ { "from": "system", "value": "Fix Posts not being deleted\n" }, { "from": "human", "value": "class JodelCityController < ApplicationController\n def index\n @jodel_cities = JodelCity.all\n end\n\n def self.update_cities\n handler = JodelHandler.new(\"a44549e5-8f61-4db7-acbf-d9c4673f53ff...
ruby
chosen
[ { "from": "system", "value": "Make migrations Rails 5.0 compatible\n" }, { "from": "human", "value": "class AddTemporalExtensionToImpressions < ActiveRecord::Migration[5.1]\n def self.up\n enable_extension 'btree_gist' unless extension_enabled?('btree_gist')\n change_table :impressions, t...
ruby
chosen
[ { "from": "system", "value": "Remove all legacy category-related methods in PostDecorator\n" }, { "from": "human", "value": "module Georgia\n class PostDecorator < Georgia::PageDecorator\n\n def template_path\n \"posts/templates/#{model.template}\"\n end\n\n def url options={}\n ...
ruby
chosen
[ { "from": "system", "value": "Bring gemspec in line with rails.gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"code_metrics/version\"\n\nGem::Specification.new do |s|\n s.name = \"code_metrics\"\n s.version = CodeMetrics::VERSIO...
ruby
chosen
[ { "from": "human", "value": "Create automate service for Lenovo\n" }, { "from": "gpt", "value": "module MiqAeMethodService\n class MiqAeServicePhysicalServer < MiqAeServiceModelBase\n expose :ext_management_system, :association => true\n\n expose :turn_on_loc_led\n expose :turn_off_loc...
ruby
chosen
[ { "from": "human", "value": "Add simple tests for JSON reports\n" }, { "from": "gpt", "value": "JSON_REPORT = JSON.parse(Brakeman.run(\"#{TEST_PATH}/apps/rails3.2\").report.to_json)\n\nclass JSONOutputTests < Test::Unit::TestCase\n def setup\n @json = JSON_REPORT\n end\n\n def test_for_ren...
ruby
chosen
[ { "from": "system", "value": "Fix terminal message spacing to make everything aligned\n" }, { "from": "human", "value": "Then(/^.*$/) do\n Cucumber.trap_interrupt\n key = capture_key\n unless skipped?(key)\n unless pass?(key)\n print \"\\nDescribe the problem:\\n\"\n puts \"Notes...
ruby
chosen
[ { "from": "system", "value": "Remove file write script from html mini test\n" }, { "from": "human", "value": "# html 2.0 writer tests - document\n\n# History:\n# Stan Smith 2017-03-22 original script\n\nrequire 'minitest/autorun'\nrequire 'json'\nrequire 'adiwg-mdtranslator'\n\nclass TestHtmlD...
ruby
chosen
[ { "from": "system", "value": "Update HandbrakeCLI Nightly to v7105svn\n\nHandBrakeCLI Nightly v7105svn built 2015-04-20.\n" }, { "from": "human", "value": "cask :v1 => 'handbrakecli-nightly' do\n version '7073svn'\n sha256 '50a374f8b8984735e8f2b49d5be78f2dc713d433e3982ce539697c31fea190de'\n\n ...
ruby
chosen
[ { "from": "system", "value": "Update WebStorm Bundled to 11.0.0\n" }, { "from": "human", "value": "cask :v1 => 'webstorm-bundled-jdk' do\n version '10.0.4'\n sha256 '539e8505c47e1f96349316ebc6441ef8f87c8b461fd6db88608a2269ba95246d'\n\n url \"https://download.jetbrains.com/webstorm/WebStorm-#{...
ruby
chosen
[ { "from": "human", "value": "Add submitted timestamps for epix users in report uploads\n" }, { "from": "gpt", "value": "class AddSubmittedTimestampsForEpixUsersToAnnualReportUploads < ActiveRecord::Migration\n def change\n add_column :trade_annual_report_uploads, :epix_submitted_by, :integer...
ruby
chosen
[ { "from": "system", "value": "Update file specs in gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\nrequire 'rename_params/version'\n\nGem::Specification.new do |s|\n s.name = 'rename_params'\n s.version = RenameParams::VERSION.dup\n s.date ...
ruby
chosen
[ { "from": "system", "value": "Put sync_order and save within a lock\n\nIn order to make sure the task is saved with the highest order possible,\nwe must be sure `sync_order` and `save!` are thread-safe.\n\nThe lock is acquired for a given user since order can be duplicated for\ntwo different users.\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add full_name field to the reverse_dependencies payload\n" }, { "from": "human", "value": "class Api::V1::VersionsController < Api::BaseController\n respond_to :json, :xml, :yaml\n before_filter :find_rubygem\n\n def show\n if @rubygem.public_versions.count.no...
ruby
chosen
[ { "from": "system", "value": "Fix pahts in for OA links\n" }, { "from": "human", "value": "class AuthenticationsController < ApplicationController\n \n def index\n @authentications = current_user.authentications if current_user\n end\n\n def create\n omniauth = request.env[\"omniauth.a...
ruby
chosen
[ { "from": "system", "value": "Use default branch when displaying list of badges\n" }, { "from": "human", "value": "class Projects::BadgesController < Projects::ApplicationController\n layout 'project_settings'\n before_action :authorize_admin_project!, only: [:index]\n before_action :no_cache...
ruby
chosen
[ { "from": "system", "value": "Add all image formats to precompile array" }, { "from": "human", "value": "module Blogue\n class Engine < ::Rails::Engine\n isolate_namespace Blogue\n\n initializer 'blogue.append_asset_path' do |app|\n app.config.assets.paths << (\n File.expand_p...
ruby
chosen
[ { "from": "system", "value": "Support Erlang 17.0 with kerl\n\nAlso drop support for the previous Erlang 17.0 release candidates." }, { "from": "human", "value": "default[:kerl][:releases] = %w(R14B02 R14B03 R14B04 R15B R15B01 R15B02 R15B03 R16B R16B01 R16B02 R16B03 R16B03-1 17.0-rc1 17.0-rc2)\n...
ruby
chosen