conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Create tmp dirs on Travis.\n"
},
{
"from": "human",
"value": "task :travis => %w[check db:drop db:migrate spec:all js:test js:lint spec:coverage:ensure]\n\n"
},
{
"from": "gpt",
"value": "task :travis => %w[\n check\n db:drop\n db:migrate\n tmp:creat... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust rake task to read UPPERCASE environment values\n\n..since this is the default on unixes anyway. Also warms up *all*\nmemoized methods that are configured on that class by default."
},
{
"from": "human",
"value": "namespace :db_memoize do\n desc \"generates m... | ruby | chosen |
[
{
"from": "system",
"value": "Remove test suite from build\n"
},
{
"from": "human",
"value": "activate :livereload\nactivate :syntax\nactivate :relative_assets\nactivate :directory_indexes\n\nset :markdown_engine, :redcarpet\nset :markdown, :fenced_code_blocks => true, :smartypants => true\nset ... | ruby | chosen |
[
{
"from": "system",
"value": "Exit with failure code for any error\n"
},
{
"from": "human",
"value": "require 'thor'\n\nmodule Vim\n module Flavor\n class CLI < Thor\n def self.common_options_to_deploy\n method_option :vimfiles_path,\n :desc => 'Where to install Vim plug... | ruby | chosen |
[
{
"from": "human",
"value": "Add query params monkey patches.\n"
},
{
"from": "gpt",
"value": "module OshparkArrayExtensions\n def to_multipart key\n prefix = \"#{key}[]\"\n collect {|a| a.to_multipart(prefix)}.flatten.compact\n end\n\n def to_query key\n prefix = \"#{key}[]\"\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Update Window to use pixel dimensions\n"
},
{
"from": "human",
"value": "class Window < Gosu::Window\n\n include Poke\n include Dimensions\n\n attr_reader :current_map, :controls\n attr_accessor :paused\n\n def initialize\n @width = WIDTH * GRID\n @heigh... | ruby | chosen |
[
{
"from": "system",
"value": "Add the runner class into the report message\n"
},
{
"from": "human",
"value": "require 'pronto'\nrequire 'haml_lint'\n\nmodule Pronto\n class Haml < Runner\n def initialize\n @runner = ::HamlLint::Runner.new\n end\n\n def run(patches, _)\n retur... | ruby | chosen |
[
{
"from": "system",
"value": "Save worker pid's for better management\n"
},
{
"from": "human",
"value": "require 'socket'\n\nmodule Yarn\n class Server\n\n include Logging\n\n attr_accessor :host, :port, :socket\n\n def initialize(app=nil,options={})\n # merge given options with d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove append_view_path from api ControllerSetup\n\nThat line was preventing us from overriding templates within other\napplication or extensions\n\nFixes #3450\n"
},
{
"from": "human",
"value": "require 'spree/api/responders'\n\nmodule Spree\n module Api\n modu... | ruby | chosen |
[
{
"from": "system",
"value": "Add path check to prevent hang on cat\n"
},
{
"from": "human",
"value": "require 'knife-cloudformation'\n\nmodule KnifeCloudformation\n module Utils\n\n # Helper methods for SSH interactions\n module Ssher\n\n # Retrieve file from remote node\n #\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change method index to signin\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n def index\n \t\n end\nend\n"
},
{
"from": "gpt",
"value": "class WelcomeController < ApplicationController\n def signin\n\t\tif user_si... | ruby | chosen |
[
{
"from": "system",
"value": "Use schemaless URL for GitHub's gists"
},
{
"from": "human",
"value": "module Onebox\n module Engine\n class GithubGistOnebox\n include Engine\n\n matches do\n http\n with(\"gist.\")\n domain(\"github\")\n tld(\"com\")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Send press/release twice since the first event seems to be ignored\n"
},
{
"from": "human",
"value": "module RAutomation\n module Adapter\n module Win32\n class Mouse\n def initialize(window)\n @window = window\n end\n\n def mo... | ruby | chosen |
[
{
"from": "system",
"value": "Include additional Python dependencies for Molly\n"
},
{
"from": "human",
"value": "include_recipe \"mollyproject::install_git_master\"\n\ndirectory node.manchesterio.root\ndirectory \"#{node.manchesterio.root}/conf\"\ndirectory \"#{node.manchesterio.root}/compiled_... | ruby | chosen |
[
{
"from": "system",
"value": "Change expense create method to accept multiple expenses\n"
},
{
"from": "human",
"value": "class ExpensesController < ApplicationController\n\n def index\n @expense = Expense.new\n end\n\n def new\n find_user\n @expense = Expense.new\n end\n\n def sho... | ruby | chosen |
[
{
"from": "system",
"value": "Revert notification text change from merge\n"
},
{
"from": "human",
"value": "class MessagesController < ApplicationController\n\n def index\n @messages = Message.all\n \n if current_user\n Analytics.track(user_id: current_user.id, event: 'Listed Me... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure @user is set.\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n\n skip_before_action :authorize\n\n def new\n end\n \n def create\n user = User.where('lower(email) = ?', params[:email].try(:strip).try(:downcase))... | ruby | chosen |
[
{
"from": "system",
"value": "Edit de profile de user funcionando ok\n"
},
{
"from": "human",
"value": "class Api::Users::ProfileController < Api::ApiController\n\n def show\n\n @profile = Profile.find_by!( user_id: params[:id].to_i )\n\n @nationality = Nationality.find_by!( profile_id: @... | ruby | chosen |
[
{
"from": "system",
"value": "Disable coverage in JRuby tests.\n"
},
{
"from": "human",
"value": "# Test helper.\n\n# Test coverage if enabled.\n\nif ENV[ 'COVERAGE' ]\n require \"simplecov\"\n SimpleCov.start\nend\n\nbegin\n require \"codeclimate-test-reporter\"\n CodeClimate::TestReporter.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix order of string casing."
},
{
"from": "human",
"value": "module S3Relay\n module UploadsHelper\n\n def s3_relay_field(parent, association, opts={})\n file_field = file_field_tag(:file, opts.merge(class: \"s3r-field\"))\n progress_table = conten... | ruby | chosen |
[
{
"from": "system",
"value": "Update Podspec to point to LN repo\n"
},
{
"from": "human",
"value": "version = '2.3.3'\n\nPod::Spec.new do |s|\n s.name = \"RoundaboutKit\"\n s.version = version\n s.summary = \"A collection of asynchronous programming abstractions, utility fun... | ruby | chosen |
[
{
"from": "system",
"value": "Make visible My Filters in Datastores\n\nfixing\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1398748\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1382768\n\nMake created filters (not global) in Compute -> Infrastructure ->\n-> Datastores visible under My Filters in accordion.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow reselect for nodes in TreeBuilderStorage\n"
},
{
"from": "human",
"value": "class TreeBuilderStorage < TreeBuilder\n private\n\n def tree_init_options(_tree_name)\n {:leaf => \"Storage\"}\n end\n\n def set_locals_for_render\n locals = super\n loca... | ruby | chosen |
[
{
"from": "human",
"value": "Add the Pairing exercise 6.5 bested arrays\n"
},
{
"from": "gpt",
"value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]\n\n# attempts:\n# 1) array[1][2][0]\n# 2) a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning in fixture application\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Read the Guide for Upgrading Ruby on Rails for more inf... | ruby | chosen |
[
{
"from": "human",
"value": "Create spec examples for SvcCatalogProvision button class\n"
},
{
"from": "gpt",
"value": "describe ApplicationHelper::Button::SvcCatalogProvision do\n let(:view_context) { setup_view_context_with_sandbox({}) }\n let(:record) { FactoryGirl.create(:service_template,... | ruby | chosen |
[
{
"from": "human",
"value": "Add Album model that inherits Enclosure\n"
},
{
"from": "gpt",
"value": "require 'pink_spider'\nclass Album < Enclosure\n def get_content\n PinkSpider.new.fetch_album(id)\n end\n\n def fetch_content\n @content = get_content\n end\n\n def title\n fetch_c... | ruby | chosen |
[
{
"from": "system",
"value": "Use strings instead of symbols\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: rights\n#\n# id :integer not null, primary key\n# resource :string(255)\n# operation :string(255)\n# created_at :datetime not ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require in sequel plugin spec\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nreturn unless defined?(Sequel)\n\ndescribe Mobility::Plugins::Sequel, orm: :sequel, type: :plugin do\n plugins do\n sequel\n end\n\n it \"raises TypeError u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix no Tweeting of certain characters\n\nhttps://dev.twitter.com/issues/137"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'twitter'\n\nTwitter.configure do |config|\n config.consumer_key = ENV['EVERYUNICODE_CONSUMER_KEY']\n config.consumer_secret = E... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify an example for FilterParser\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'spec_helper'\n\ndescribe Net::LDAP::Filter::FilterParser do\n\n describe \"#parse\" do\n context \"Given ASCIIs as filter string\" do\n let(:filter_string) {... | ruby | chosen |
[
{
"from": "system",
"value": "Make debug_ip_address account for the nil case\n\nOtherwise we get a nil ip address in the localhost case and the link\nsuggestion breaks (it shows \"you're next to es/location/change2\").\n"
},
{
"from": "human",
"value": "# encoding : utf-8\nmodule GeoHelper\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix extra backquotes in pod spec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SPTDataLoader\"\n s.version = \"1.0.1\"\n s.summary = \"SPTDataLoader is Spotify's HTTP library for Objective-C\"\n\n s.description =... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake and bundler to the gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'artifactory/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix building of associations on interim claims controller\n"
},
{
"from": "human",
"value": "class ExternalUsers::Litigators::InterimClaimsController < ExternalUsers::ClaimsController\n\n skip_load_and_authorize_resource\n\n def new\n @claim = Claim::InterimCla... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up alias controller script\n"
},
{
"from": "human",
"value": "class AliasesController < ApplicationController\n def index\n @aliases = Alias.all\n respond_to do |format|\n format.html {}\n format.json { render json: @aliases }\n end\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Add search method in welcome controller.\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n def index\n @questions = Question.all.order('created_at DESC')\n end\n\n def show\n\n end\nend"
},
{
"from": "gpt",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Make the GetContentCollection support live items without drafts…\n\nPreviously, the query made an assumption that every\nlive content item would have an associated draft.\nThis is no longer the case, so update the query\naccordingly."
},
{
"from": "human",
"value": ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing specs for Compressor\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe AssetTrip::Compressor do\n let(:compressor) do\n AssetTrip::Compressor.new(Pathname.new(\"css\"))\n end\n\n describe \"#compress\" do\n it \"builds a com... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for product pages translation\n"
},
{
"from": "gpt",
"value": "RSpec.feature \"Translations\" do\n context 'product' do\n let!(:product) do\n create(:product, name: 'Antimatter',\n translations: [\n Spree::Product::Translat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the tested method names\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Oboe::Inst::Mongo do\n it 'Stock Mongo should be loaded, defined and ready' do\n defined?(::Mongo).should_not == nil \n defined?(::Mongo::DB).should_not == nil\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some simple tests for group prefs.\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: group_prefs\n#\n# id :integer not null, primary key\n# group_id :integer not null\n# me... | ruby | chosen |
[
{
"from": "system",
"value": "Use .rb since we're checking if File.exist?\n"
},
{
"from": "human",
"value": "require \"fileutils\"\n\nbegin\n require 'spec'\nrescue LoadError\n require 'rubygems'\n gem 'rspec'\n require 'spec'\nend\n\nThread.abort_on_exception = true\n\nrequire \"#{File.dirn... | ruby | chosen |
[
{
"from": "system",
"value": "Add private methods to the controller\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nclass UrlRequest\n def initialize (url)\n @uri = URI.parse(url)\n end\n\n def get\n Net::HTTP.get_response(@uri)\n end\n\n def is_redirected?\n get.code == \... | ruby | chosen |
[
{
"from": "system",
"value": "Install system-info local gem manually\n\nas chef 12.10+ automatically adds `--local` when using `gem_package` with a\nlocal source, which is a design decision ... that doesn't work for this case.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: travis_system... | ruby | chosen |
[
{
"from": "human",
"value": "Test for actions stuff ...\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\nclass ActionsTest < ActiveSupport::TestCase\n\n include Typus::Actions\n\n context \"add_resource_action\" do\n\n should \"work\" do\n output = add_resource_action(\"some... | ruby | chosen |
[
{
"from": "system",
"value": "Allow any parameters to be specified via an env.variable for hr:sync rake task."
},
{
"from": "human",
"value": "namespace :hr do\n\n desc 'Synchronizes all attributes locally cached by has_remote'\n task :sync => :environment do\n models = ENV['MODELS'].nil? ?... | ruby | chosen |
[
{
"from": "system",
"value": "Add root path accessor to base module\n"
},
{
"from": "human",
"value": "require 'i18n'\nrequire 'json'\nrequire 'active_support/hash_with_indifferent_access'\n\nrequire \"apipie/routing\"\nrequire \"apipie/markup\"\nrequire \"apipie/apipie_module\"\nrequire \"apipi... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for new depedencies\n"
},
{
"from": "human",
"value": "require 'select2-rails'\nrequire 'will_paginate'\nrequire 'bootstrap-datepicker-rails'\n\nmodule Binco\n class Engine < ::Rails::Engine\n end\n\n class << self\n mattr_accessor :breadcr... | ruby | chosen |
[
{
"from": "system",
"value": "Change expectations to match reality\n"
},
{
"from": "human",
"value": "require 'parslet'\n\nmodule Rip::Compiler\n class AST < Parslet::Transform\n attr_reader :origin\n\n def initialize(origin)\n @origin = origin\n end\n\n protected\n\n def lo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"ZMQ error: got read event without associated reader\""
},
{
"from": "human",
"value": "module DCell\n # Servers handle incoming 0MQ traffic\n class Server\n include Celluloid::ZMQ\n\n # Bind to the given 0MQ address (in URL form ala tcp://host:port)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add asset precompilation for all assets\n"
},
{
"from": "human",
"value": "require \"backbone-rails\"\nrequire \"bootstrap-sass-rails\"\nrequire \"ejs\"\nrequire \"font-awesome-rails\"\nrequire \"geocens-js-api-rails\"\nrequire \"haml\"\nrequire \"jquery-rails\"\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Rename dl_url to url in Artwork\n"
},
{
"from": "human",
"value": "# Artwork objects contains all needed information of track's artwork\nclass Artwork\n def initialize(track)\n @track = track\n end\n\n def dl_url\n hash = @track.hash\n url =\n if ha... | ruby | chosen |
[
{
"from": "system",
"value": "Use pathname for file loading\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire 'yaml'\nrequire 'active_support/core_ext/hash/keys.rb'\nrequire 'active_support/core_ext/string/inflections.rb'\n\nmodule Setty\n MissingEnviromentError = Class.new(RuntimeError... | ruby | chosen |
[
{
"from": "system",
"value": "Change error message for missing team name\n"
},
{
"from": "human",
"value": "require \"slack-notify/version\"\nrequire \"slack-notify/error\"\n\nrequire \"json\"\nrequire \"faraday\"\n\nmodule SlackNotify\n class Client\n def initialize(team, token, options={})... | ruby | chosen |
[
{
"from": "system",
"value": "Utils: Add a method for checking if an expression is empty"
},
{
"from": "human",
"value": "require 'irb/ruby-lex'\nrequire 'stringio'\n\nmodule Temple\n module Utils\n extend self\n \n LITERAL_TOKENS = [RubyToken::TkSTRING, RubyToken::TkDSTRING]\n \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move mail gem to runtime dependencies"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'mandrill_dm'\n s.version = '1.3.2'\n s.date = '2016-06-21'\n s.summary = 'A basic Mandrill delivery method for Rails.'\n s.description = 'A basic Ma... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Offer unread scope to use 'NOT read'\n\n"
},
{
"from": "human",
"value": "class Application < ApplicationRecord\n belongs_to :offer, required: true\n belongs_to :candidate, required: true\n has_one :company, through: :offer\n scope :unread, -> { where(r... | ruby | chosen |
[
{
"from": "system",
"value": "Allow positive fractions less than 1\n"
},
{
"from": "human",
"value": "class BasketItem < ActiveRecord::Base\n validates_numericality_of :quantity, greater_than_or_equal_to: 1\n validates_presence_of :basket_id\n\n belongs_to :basket, inverse_of: :basket_items, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - which triangle is that?\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/564d398e2ecf66cec00000a9\n# --- iteration 1 ---\ndef type_of_triangle(a, b, c)\n return \"Not a valid triangle\" unless [a, b, c].all? { |x| x.is_a? Integer }... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migrations to run from blank database.\n"
},
{
"from": "human",
"value": "class AddSlugToPeople < ActiveRecord::Migration\n def change\n add_column :people, :slug, :string\n add_index :people, :slug, unique: true\n Person.observers.disable :all do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add initial spec for signup workflow.\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\nrequire 'capybara/rspec'\n\nRSpec.describe 'the signup process', type: :feature do\n fixtures :users\n\n context 'with valid information' do\n it 'signs me up' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Configure subdir for generated images.\n"
},
{
"from": "human",
"value": "# Require any additional compass plugins here.\nrequire 'bootstrap-sass'\n\n# Set this to the root of your project when deployed:\nhttp_path = \"/\"\ncss_dir = \"css\"\nsass_dir = \"scss\"\nim... | ruby | chosen |
[
{
"from": "system",
"value": "Stop wasting time with warnings in compass\n"
},
{
"from": "human",
"value": "# Require any additional compass plugins here.\nrequire \"sassy-math\"\nrequire \"modular-scale\"\nrequire \"compass\"\nrequire \"zurb-foundation\"\n\n# Set this to the root of your projec... | ruby | chosen |
[
{
"from": "system",
"value": "Add source_type to source suggestion datatable\n"
},
{
"from": "human",
"value": "class SourceSuggestionBrowseRowPresenter\n attr_reader :suggestion\n\n def initialize(source_suggestion)\n @suggestion = source_suggestion\n end\n\n def as_json(opts = {})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove MaxMind character encoding conversion.\n\nEither do it consistently across Ruby versions, or don't do it at all.\nPlus, it didn't seem to work.\n"
},
{
"from": "human",
"value": "require 'geocoder/lookups/base'\nrequire 'geocoder/results/maxmind'\nrequire 'cs... | ruby | chosen |
[
{
"from": "human",
"value": "Move git operations for UpdateRemoteMirrorService into Gitlab::Git\n"
},
{
"from": "gpt",
"value": "module Gitlab\n module Git\n class RemoteMirror\n def initialize(repository, ref_name)\n @repository = repository\n @ref_name = ref_name\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Apply patch to work around Buildr password encoding issue\n"
},
{
"from": "gpt",
"value": "raise 'Patch already integrated into buildr code' unless Buildr::VERSION.to_s == '1.5.6'\n\nclass URI::HTTP\n private\n\n def write_internal(options, &block)\n options ||=... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the search query used to perform a search for a go server\n"
},
{
"from": "human",
"value": "default['gocd']['agent']['go_server_host'] = nil\ndefault['gocd']['agent']['go_server_port'] = 8153\ndefault['gocd']['agent']['daemon'] = true\n\ndefault['gocd']... | ruby | chosen |
[
{
"from": "system",
"value": "[0.9.1] Change homepage to GitHub repo\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"ffxiv\"\n s.version = \"0.9.0\"\n s.date = \"2014-09-29\"\n s.summary = \"An unofficial FFXIV ARR toolkit for Ruby, featuri... | ruby | chosen |
[
{
"from": "system",
"value": "Use github.user and github.token if available.\nUse --private switch if given.\nShow res.body.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'net/http'\nrequire 'uri'\n\ndef print_help_and_exit\n puts \"#{$0} <dir or file> [dir or file...]\"\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing coverage to `help untracevar` command\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule Byebug\n #\n # Tests gloabal variable untracing functionality.\n #\n class UntracevarTest < TestCase\n def tes... | ruby | chosen |
[
{
"from": "system",
"value": "Set date range metadata for balances.\n"
},
{
"from": "human",
"value": "module Api\n class BalancesController < BaseController\n include DateRangeParams\n\n def index\n begin\n account = Account.find(params[:account_id])\n @balances = Bala... | ruby | chosen |
[
{
"from": "system",
"value": "Stop nil checking on safe_append=\n\nERB compiler guarantees safe_append= will be called with a string, so\nnil checks don't make sense. Anything else calling this method should\ncheck for nil themselves before calling\n"
},
{
"from": "human",
"value": "require 'ac... | ruby | chosen |
[
{
"from": "system",
"value": "Put all level logic in the Levels class\n"
},
{
"from": "human",
"value": "require 'csv'\nclass Array\n def col(name)\n offset = self.class.column(name)\n self[offset]\n end\n\n class << self\n def columns=(colnames)\n @columns = {}\n colnames.... | ruby | chosen |
[
{
"from": "human",
"value": "Add extremely basic WebKit example.\n"
},
{
"from": "gpt",
"value": "# Based on http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/\n$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')\nrequire 'gir_ffi'\n\nGirFFI.setup :Gtk\nGirFFI.setup :WebKit\n... | ruby | chosen |
[
{
"from": "system",
"value": "WIP: Add a counter DOM element\n"
},
{
"from": "human",
"value": "class CharacterLimitedInput < SimpleForm::Inputs::TextInput\n def input_html_options\n super.merge(maxlength: Student::CHARACTER_LIMIT)\n end\nend\n"
},
{
"from": "gpt",
"value": "cla... | ruby | chosen |
[
{
"from": "system",
"value": "Use the asset manager bearer token from ENV\n"
},
{
"from": "human",
"value": "# This file is overwritten on deployment. In order to authenticate in dev\n# environment with asset-manager any random string is required as bearer_token\nrequire \"gds_api/asset_manager\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix argument error in request\n"
},
{
"from": "human",
"value": "module Stellae\n module Request\n class ImportLineListRequest\n def initialize(\n line_list_rows: line_list_rows\n )\n @line_list_rows = line_list_rows\n end\n\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependencies to gemspec\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'state_machine/version'\n\nGem::Specification.new do |s|\n s.name = \"state_machine\"\n s.version = State... | ruby | chosen |
[
{
"from": "human",
"value": "Disable the Router API client during Cucumber\n"
},
{
"from": "gpt",
"value": "require 'gds_api/router'\n# We never have to go to the Router during Feature tests. Disable.\nGdsApi::Router.any_instance.stubs(:add_route).returns true\nGdsApi::Router.any_instance.stubs(... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to set up delayed job\n"
},
{
"from": "gpt",
"value": "class AddUploadUsageDataDelayedJob < ActiveRecord::Migration\n def up\n Delayed::Job.enqueue UploadUsageData, { :priority => 5, :run_at => DateTime.now.tomorrow.change(:hour => 2, :min => 00) }\... | ruby | chosen |
[
{
"from": "system",
"value": "Expand tests for the tomcat_docs install\n"
},
{
"from": "human",
"value": "describe file('/opt/tomcat_helloworld_8_0_32/LICENSE') do\n it { should be_file }\n it { should be_owned_by 'tomcat_helloworld' }\nend\n\ndescribe user('tomcat_helloworld') do\n it { shou... | ruby | chosen |
[
{
"from": "system",
"value": "Fix doc_test_with_no_title to expect nil\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DocumentTest < Test::Unit::TestCase\n # setup for test\n def setup\n @doc = Asciidoctor::Document.new(File.readlines(sample_doc_path(:asciidoc_index)))\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add WebCT wording to new Import Content page\n\nCANVAS-240\n"
},
{
"from": "gpt",
"value": "# CANVAS-240 Add WebCT wording to new Import Content page\n# This overrides Canvas' own course_copy_importer in /lib/canvas/plugins/default_plugins.rb\nRails.configuration.to_... | ruby | chosen |
[
{
"from": "system",
"value": "Add folders app and config to the engine's gemspec if they're available\n"
},
{
"from": "human",
"value": "# Provide a simple gemspec so you can easily use your\n# project in your rails apps through git.\nGem::Specification.new do |s|\n s.name = \"<%= name %>\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Blind Date categories for 2016\n"
},
{
"from": "human",
"value": "module Competitions\n class BlindDateAtTheDairyOverall < Overall\n def self.parent_event_name\n \"Blind Date at the Dairy\"\n end\n\n def category_names\n [\n \"Begin... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the columns show on delivery update admin\n"
},
{
"from": "human",
"value": "ActiveAdmin.register DeliveryUpdate do\n permit_params :study_id, :data_analysis_status_id,\n :data_collection_status_id,\n :interpretation_and_write_... | ruby | chosen |
[
{
"from": "system",
"value": "Allow 'destination' and 'plugins' directories to be set in _config.yml\n"
},
{
"from": "human",
"value": "require 'guard'\nrequire 'guard/guard'\n\nrequire 'jekyll'\n\nmodule Guard\n class Jekyll < Guard\n\n VERSION = '0.0.2'\n\n def initialize(watchers=[], o... | ruby | chosen |
[
{
"from": "system",
"value": "Remove model reload scope of first since persistance fell outside\n"
},
{
"from": "human",
"value": "require 'hashid/rails/version'\nrequire 'hashids'\nrequire 'active_record'\n\nmodule Hashid\n module Rails\n\n # Get configuration or load defaults\n def self... | ruby | chosen |
[
{
"from": "system",
"value": "Change a day with a match LiveScore test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FCReminder::Providers::LiveScore do\n subject(:provider) { FCReminder::Providers::LiveScore.new }\n let(:team_name) { \"Barcelona\" }\n\n describe \"#ini... | ruby | chosen |
[
{
"from": "system",
"value": "Change name to configure_with_defaults for clarity\n"
},
{
"from": "human",
"value": "require 'locotimezone/version'\nrequire 'locotimezone/locotime'\nrequire 'locotimezone/geolocate'\nrequire 'locotimezone/timezone'\nrequire 'locotimezone/configuration'\nrequire 'l... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rails 3 deprecation warning\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\ngem 'mongo', '0.18.3'\ngem 'mongo_ext', '0.18.3'\ngem 'durran-validatable', '2.0.1'\ngem 'leshill-will_paginate', '2.3.11'\n\nrequire 'mongo'\nrequire 'activesupport'\nrequire '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove newlines from start of logs\n\nCurrently if using a single line logger, this causes the time stamp and\nlog message to be on separate lines which is not common to how most\nother logging works.\n"
},
{
"from": "human",
"value": "require 'active_support/log_su... | ruby | chosen |
[
{
"from": "system",
"value": "Make upgrades easier to see in output.\n"
},
{
"from": "human",
"value": "require 'rake'\n\nnamespace :brew do\n task :refresh do\n puts \"#{time}: Checking if any brew upgrades are required ...\"\n if brew_outdated?\n `brew upgrade && brew cleanup`\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update TG Pro.app to v2.7.2\n"
},
{
"from": "human",
"value": "cask :v1 => 'tg-pro' do\n version '2.7.1'\n sha256 'b44547b1c76eb69441c3f41eb3975301ec59c405b645f16d835c4243b82031eb'\n\n url \"http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')... | ruby | chosen |
[
{
"from": "system",
"value": "Switch all-docs query to new *:* syntax\n\ngit-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@510345 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "# Copyright:: Copyright (c) 2007 Apache Software Foundation\n# License:: Apache Version 2... | ruby | chosen |
[
{
"from": "system",
"value": "Support rails 5.2 relation signature\n"
},
{
"from": "human",
"value": "require_relative \"helper\"\n\ndescribe ActiveRecord::Relation do\n let(:relation) {\n if ActiveRecord::VERSION::MAJOR > 4\n ActiveRecord::Relation.new(klass, stub, stub)\n else\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'pathogen' command for downloading pathogen from tpope/vim-pathogen repo\n"
},
{
"from": "human",
"value": "require 'pvim/version'\n\nmodule Pvim\n class CLI < Thor\n desc 'version', 'Prints version'\n def version\n puts Pvim::VERSION\n end\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in Command::Matcher (hidden dependancy)\n\nThis Module is dependant on ::Base and ::Place since it calls\n.constatns() on self, thus expects those constatnts to be defined.\n\nSolution is to require those modules at top of file. Better design\nis the way to solve this i... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.