conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Handle visitors (count) arg as a String (again)\n" }, { "from": "human", "value": "require \"celluloid\"\nrequire_relative \"session\"\nrequire_relative \"target\"\nrequire_relative \"visitor_group\"\n\nCelluloid.logger = nil\n\nmodule CelluloidBenchmark\n # Run a ...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.1.0.0 to 0.1.0.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'metrics-stream-divergence'\n s.version = '0.1.0.0'\n s.summary = 'Measurement of divergence in time of the he...
ruby
chosen
[ { "from": "system", "value": "Move endpoint notice filtering into base class\n" }, { "from": "human", "value": "class ManageIQ::Providers::Amazon::ContainerManager::RefreshWorker::WatchThread < ManageIQ::Providers::Kubernetes::ContainerManager::RefreshWorker::WatchThread\n private\n\n def noop...
ruby
chosen
[ { "from": "system", "value": "Fix links to ontologies inside the repository view\n" }, { "from": "human", "value": "require 'json'\n\nclass OntologyBeanListFactory\n\n attr_reader :bean_list\n\n def initialize\n @bean_list = []\n end\n\n def add_small_bean(ontology)\n @bean_list.push(m...
ruby
chosen
[ { "from": "system", "value": "Fix the DSL name for rds_event_subscription\n\nAdd example usage of the resource based on Amazon's CF documentation.\n" }, { "from": "human", "value": "require_relative '../resource'\n\nmodule Convection\n module Model\n class Template\n class Resource\n ...
ruby
chosen
[ { "from": "system", "value": "Update DepositCashBackList to inherit from sublist\n" }, { "from": "human", "value": "module NetSuite\n module Records\n class DepositCashBackList\n include Support::Fields\n include Namespaces::TranBank\n\n fields :deposit_cash_back\n\n def ...
ruby
chosen
[ { "from": "system", "value": "[CS] Make builtin grammar specs fail nicer with interpretation mismatch\n" }, { "from": "human", "value": "require 'rspec/expectations'\n\nRSpec::Matchers.define :not_match do |input|\n match do |grammar|\n RubySpeech::GRXML::Matcher.new(grammar).match(input).is...
ruby
chosen
[ { "from": "system", "value": "Allow resetting the Tropo1 environment" }, { "from": "human", "value": "module Tropo2Utilities\n class Tropo1Driver\n require 'net/http'\n require 'uri'\n require 'countdownlatch'\n\n attr_accessor :script_content, :result, :drb\n\n def initialize(ur...
ruby
chosen
[ { "from": "human", "value": "Add Grayskull stub terminus for node\n\nStoredconfigs requires node/facts/resource/catalog to all support the\nspecified backend terminus. So for now, we provide a Grayskull terminus for\nnode which simply does nothing but cause storedconfigs to not fail.\n" }, { "from":...
ruby
chosen
[ { "from": "system", "value": "Add Rails routes to the allowed routes list\n" }, { "from": "human", "value": "module StrongRoutes\n module Rails\n class Railtie < ::Rails::Railtie\n config.strong_routes = ::StrongRoutes.config\n\n initializer 'strong_routes.initialize' do |app|\n ...
ruby
chosen
[ { "from": "system", "value": "Save branches in lower groups\n" }, { "from": "human", "value": "namespace :build do\n namespace :migrate do\n task :branch do\n require 'travis'\n Travis::Database.connect\n\n branches = Hash.new { |h, k| h[k] = [] }\n\n Build.pushes.include...
ruby
chosen
[ { "from": "system", "value": "Allow running tests in Chrome on Windows XP when not logged in as administrator. (Richard Quadling)\n" }, { "from": "human", "value": "module UnittestJS\n module Browser\n class Chrome < Abstract\n def initialize(path = nil)\n @path = path || File.jo...
ruby
chosen
[ { "from": "system", "value": "Test album creation from edit mode\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'deletion', :type => :feature do\n before(:each) do\n @me = create(:user_with_images)\n login_as(@me, :scope => :user)\n\n visit \"/users/#{ @me.usernam...
ruby
chosen
[ { "from": "system", "value": "Fix farms spec (not sure if this is the desired behavior).\n\n+ Change required role to admin.\n+ Localize \"Farms\" link.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Manage farms' do\n\n context 'when the user is signed in' do\n\n befo...
ruby
chosen
[ { "from": "human", "value": "Add min and recommended to admin product list\n" }, { "from": "gpt", "value": "Deface::Override.new(:virtual_path => \"spree/admin/products/index\",\n :replace => \"table#listing_products\",\n :text => '<table class=\"index\" i...
ruby
chosen
[ { "from": "system", "value": "Change wording of image upload view\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'homepage behaviour', :type => :feature do\n before { visit '/' }\n it \"loads a page with the site's name\" do\n expect(page).to have_content 'No more idea...
ruby
chosen
[ { "from": "human", "value": "Revert \"someone doesn't save his files as UTF8 :\\\"\n\nThis reverts commit c84f76717437567dbc74d19df0e40de258f040a7.\n" }, { "from": "gpt", "value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3...
ruby
chosen
[ { "from": "system", "value": "Add create_commit and add_to_index methods to RepositoryHelper\n\n#add_to_index provides a way to add files to the repository's index\n\n#create_commit creates a commit off the state of the repository's index\n\nThe flow of using the RepositoryHelper is:\n\n create_repository\n...
ruby
chosen
[ { "from": "human", "value": "Add basic specs for tso\n" }, { "from": "gpt", "value": "#!/usr/bin/env rspec\n#\nrequire 'spec_helper'\n\nprovider_class = Puppet::Type.type(:ethtool).provider(:linux)\n\ndescribe provider_class do\n let(:resource) do\n Puppet::Type.type(:ethtool).new(\n :n...
ruby
chosen
[ { "from": "system", "value": "Add a comment to \"PrecedenceAdjustmentSpecification\" class\n" }, { "from": "human", "value": "module Sastrawi\n module Stemmer\n module ConfixStripping\n class PrecedenceAdjustmentSpecification\n def satisfied_by?(value)\n regex_rules = [\...
ruby
chosen
[ { "from": "system", "value": "Remove exlibris-aleph requirement since it's no longer a dependency\n" }, { "from": "human", "value": "require 'authpds'\nrequire 'exlibris-aleph'\nrequire 'require_all'\nrequire_all \"#{File.dirname(__FILE__)}/authpds-nyu/\"\nAuthlogic::Session::Base.send(:include,...
ruby
chosen
[ { "from": "system", "value": "Add :allowed_methods and :lock_timeout_period mattr_accessors\n" }, { "from": "human", "value": "require 'calligraphy/rails/mapper'\nrequire 'calligraphy/rails/web_dav_requests_controller'\n\nrequire 'calligraphy/xml/builder'\nrequire 'calligraphy/xml/namespace'\nre...
ruby
chosen
[ { "from": "system", "value": "Create separate OptionParser for each subcommand\n" }, { "from": "human", "value": "require 'dbp/pub/version'\n\nrequire 'ostruct'\nrequire 'optparse'\nrequire 'pathname'\n\nmodule DBP\n module Pub\n module CLI\n def help\n parser.help\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Update to Ohai 7.x API" }, { "from": "human", "value": "#\n# Author:: Noah Kantrowitz <noah@coderanger.net>\n#\n# Copyright 2014, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complianc...
ruby
chosen
[ { "from": "system", "value": "Fix a typo in the Gem::Version initializer: prelease -> prerelease.\n" }, { "from": "human", "value": "class Gem::Version\n include Comparable\n\n attr_reader :version\n\n def initialize version=nil\n self.version = version\n end\n\n def version= value\n ...
ruby
chosen
[ { "from": "system", "value": "Call host_inventory of Specinfra if the key does not exist\n" }, { "from": "human", "value": "require 'itamae'\nrequire 'hashie'\nrequire 'json'\n\nmodule Itamae\n class Node < Hashie::Mash\n def reverse_merge(other_hash)\n Hashie::Mash.new(other_hash).merg...
ruby
chosen
[ { "from": "system", "value": "Make XTrace validation case insensitive\n" }, { "from": "human", "value": "# Copyright (c) 2013 AppNeta, Inc.\n# All rights reserved.\n\nmodule Oboe\n module XTrace\n class << self\n\n ##\n # Oboe::XTrace.valid?\n #\n # Perform basic valida...
ruby
chosen
[ { "from": "system", "value": "Use read instead of readchar\n\nIO#readchar returns an Int on 1.8\n" }, { "from": "human", "value": "require 'stringio'\n\nmodule OTNetstring\n def self.parse(io)\n io = StringIO.new(io) if io.respond_to? :to_str\n length, byte = \"\", \"0\"\n while byte =...
ruby
chosen
[ { "from": "system", "value": "Fix instance variable to class variable\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire \"json\"\n\nmodule Rbitter\n @env = Hash.new\n\n class ConfigFileError < StandardError; end\n\n def self.[](k)\n @env[k]\n end\n\n module_function\n def ...
ruby
chosen
[ { "from": "system", "value": "Determine Regtest version and add it to development dependencies only if\nit is not yet set in Rakefile.\n" }, { "from": "human", "value": "# -- encoding: utf-8 --\nrequire 'regtest/task'\n\nclass Rim\n # ALL regtest files incl. sample files, results files\n # and...
ruby
chosen
[ { "from": "system", "value": "Add user_signed_in? check to AdminController\n" }, { "from": "human", "value": "class AdminController < ApplicationController\n before_action :validate_admin_user!\n\n private\n\n def validate_admin_user!\n redirect_to root_path unless current_user.admin?\n e...
ruby
chosen
[ { "from": "system", "value": "Add action new on picks controller\n" }, { "from": "human", "value": " class PicksController < ApplicationController\n \n def create\n @user = User.find_or_create_by(params[:user])\n @pick = Pick.new(params[:pick])\n if @pick.save \n @user.picks...
ruby
chosen
[ { "from": "system", "value": "Add join number method and new params handler\n" }, { "from": "human", "value": " class PicksController < ApplicationController\n\n def create\n @user = User.find_by(email: params[:pick][:email])\n if !@user\n @user = User.create(email: params[:pick...
ruby
chosen
[ { "from": "system", "value": "Add flash error message to update action of users controller.\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n before_action :set_user, \n only: [\n :show,\n :edit,\n ...
ruby
chosen
[ { "from": "system", "value": "Send welcome email when Twitter update\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n\t\n\tdef get\n\t \t@user = current_user\n\tend\n\n\tdef update\n\t\t@user = current_user\t\n\t\t@user.update_attributes(params[:user])\n\t\tredi...
ruby
chosen
[ { "from": "system", "value": "Add split_names attribute to EventSerializer.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass EventSerializer < BaseSerializer\n attributes :id, :course_id, :organization_id, :name, :start_time, :home_time_zone, :start_time_in_home_zone, :...
ruby
chosen
[ { "from": "system", "value": "Add specs related to files daemon creates.\n" }, { "from": "human", "value": "require 'serverspec'\nset :backend, :exec\n\n# Traivs specified.\n# IPAddress on Ruby: http://qiita.com/suu_g/items/a03af621f5d6985879e0\nrequire 'socket'\nprivate_ip = Socket.getifaddrs.s...
ruby
chosen
[ { "from": "system", "value": "Add reference feed to Feed factory\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: feeds\n#\n# id :integer not null, primary key\n# onestop_id :string\n# url ...
ruby
chosen
[ { "from": "system", "value": "Add parent_url no parent test.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'compo'\n\n# Mock implementation of UrlReferenceable.\nclass MockUrlReferenceable\n include Compo::UrlReferenceable\nend\n\ndescribe MockUrlReferenceable do\n before(:...
ruby
chosen
[ { "from": "system", "value": "Return an actual regexp from regex_from_redis_pattern\n" }, { "from": "human", "value": "# Simple mock Redis library. Only implements GET, INCR, MGET, KEYS, and\n# EXPIRE. (EXPIRE is implemented as a noop, so don't rely on it.)\n\nclass MockRedis\n def initialize\n...
ruby
chosen
[ { "from": "system", "value": "Split updating state and executing" }, { "from": "human", "value": "class Cb::CircuitBreaker\n def initialize(opts)\n @state = :closed\n @last_failure_time = nil\n end\n\n def execute\n if @state == :open\n if @last_failure_time + 10 < Time.now\n ...
ruby
chosen
[ { "from": "system", "value": "Add a hook for Rails controllers to define a render method for view models\n" }, { "from": "human", "value": "require \"cerego_view_models/version\"\nrequire 'view_model'\n\nmodule CeregoViewModels\nend\n" }, { "from": "gpt", "value": "require \"cerego_v...
ruby
chosen
[ { "from": "system", "value": "Fix a couple bugs in last commit\n\nLooks like the test suite didn't cover this code.\n" }, { "from": "human", "value": "require_relative 'operators/operator'\n\nmodule ConceptQL\n class Nodifier\n def create(scope, operator, *values)\n unless operators[ope...
ruby
chosen
[ { "from": "system", "value": "Switch back to string interpolation\n\nString#prepend is mutable, and caused hash.fetch(key) to look for non-existent keys\n" }, { "from": "human", "value": "module DesignerNews\n class Story\n include StoryFormatter\n\n attr_reader :title, :badge\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Refactor GithubGist.user_token. Rename GithubGist.home_directory to GithubGist.token_directory\n" }, { "from": "human", "value": "require 'httparty'\nrequire 'hirb'\n\nmodule Gistify\n class GithubGist\n GISTS_URL = 'https://api.github.com/gists'\n\n include ...
ruby
chosen
[ { "from": "human", "value": "Add missing specs for Forecasting\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe BaseCrm::Forecasting do\n\n subject do\n BaseCrm::Forecasting.new({})\n end\n\n describe \"endpoint\" do\n\n it \"uses the production endpoint\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Add acount credits pending spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Ivapi::Client::Account do\n\n before do\n @client = Ivapi::Client.new(username: 'foo', password: 'bar')\n end\n\n it 'returns account information' do\n stub...
ruby
chosen
[ { "from": "system", "value": "Fix the \"can't modify frozen array\" error with Rails 3\n" }, { "from": "human", "value": "# Add a callback - to be executed before each request in development,\n# and at startup in production - to patch existing app classes.\n# See http://stackoverflow.com/questio...
ruby
chosen
[ { "from": "system", "value": "Fix Xcode 6 support by adding header search path\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MXGSynchronizeTest\"\n s.version = \"1.0.0\"\n s.summary = \"Easily synchronize your async tests.\"\n s.description = <<-DESC...
ruby
chosen
[ { "from": "system", "value": "Add reference to schools field\n" }, { "from": "human", "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 :printe...
ruby
chosen
[ { "from": "system", "value": "Add test for output path is incorrect\n" }, { "from": "human", "value": "require 'rspec'\nrequire_relative '../lib/doc_builder_testing'\n\ndescribe 'My behaviour' do\n let(:builder) { DocBuilderWrapper.new }\n\n it 'should raise correct error if input file is inco...
ruby
chosen
[ { "from": "system", "value": "Add a helpful warning when facets isn't around\n" }, { "from": "human", "value": "require \"facets/string/pathize\"\n\nmodule Using\n unless defined?(LOAD_SCHEMES)\n LOAD_SCHEMES = [:require, :load, :autoload]\n\n module DefaultLoadSchemes\n def reset_de...
ruby
chosen
[ { "from": "system", "value": "Fix @value already unpacked in embl/binary.rb\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\n#\n# Distributed under the MIT license\n# see the file COPYING for details\n# or visit http://www.opensource.org/licenses/mit-license.php\n#\n# $Id: matroska.rb 782 2...
ruby
chosen
[ { "from": "system", "value": "Remove compat_resource; we don't need it anymore\n\nSigned-off-by: Julian C. Dunn <4730376567945fe1299889de81539a66f8d09104@chef.io>\n" }, { "from": "human", "value": "name 'chef-vault'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense...
ruby
chosen
[ { "from": "system", "value": "Update to `git` cookbook `~> 3.0`\n" }, { "from": "human", "value": "name 'omnibus'\nmaintainer 'Opscode, Inc.'\nmaintainer_email 'cookbooks@opscode.com'\nlicense 'Apache 2.0'\ndescription 'Prepares a machine to be an Omnibus bui...
ruby
chosen
[ { "from": "system", "value": "Bump version to 1.2.0 for supermarket push\n" }, { "from": "human", "value": "name 'supermarket-omnibus-cookbook'\nmaintainer 'Irving Popovetsky'\nmaintainer_email 'irving@chef.io'\nlicense 'all_rights'\ndescription 'Installs and Conf...
ruby
chosen
[ { "from": "system", "value": "Use higher then 13 instead of 13.7\n" }, { "from": "human", "value": "name 'memcached'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache-2.0'\ndescription 'Installs memcached and includes me...
ruby
chosen
[ { "from": "system", "value": "Include mysql-community-server mysql57 for centos only\n" }, { "from": "human", "value": "# Encoding: utf-8\n\nname 'flywaydb'\nmaintainer 'Dennis Hoer'\nmaintainer_email 'dennis.hoer@gmail.com'\nlicense 'MIT'\ndescription 'Installs and configures flywaydb database ...
ruby
chosen
[ { "from": "system", "value": "Allow to configure prefix before each resource\n" }, { "from": "human", "value": "#\n# Copyright:: 2011, Joshua Timberman <chefcode@housepub.org>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complianc...
ruby
chosen
[ { "from": "human", "value": "Add the model (missed from the previous commit)\n" }, { "from": "gpt", "value": "# Top level module for the core Cyclid code.\nmodule Cyclid\n # Module for the Cyclid API\n module API\n # Model for UserPermissions\n class Userpermission < ActiveRecord::Base\n...
ruby
chosen
[ { "from": "system", "value": "Move geoip gem check to the initialize function.\n\nLookups are always loaded even when they aren't used. So the geoip gem was being checked even when user wouldn't like to use the maxmind_local lookup.\n" }, { "from": "human", "value": "require 'geocoder/lookups/ba...
ruby
chosen
[ { "from": "system", "value": "Document can be 100% Loofah\n" }, { "from": "human", "value": "require 'action_view/helpers' if defined?(Rails)\nrequire 'action_view/context' if defined?(Rails)\nrequire 'nokogiri'\nrequire 'loofah'\n\nmodule InlineSvg\n module ActionView\n module Helpers\n ...
ruby
chosen
[ { "from": "system", "value": "Make Scoped namespace-aware, as all adapters should be\n" }, { "from": "human", "value": "require_relative 'adapter'\n\nmodule Moltrio\n module Config\n\n # Work around circular dependency between Adapter and this class\n Adapter.class_eval do\n def scop...
ruby
chosen
[ { "from": "system", "value": "Remove (broken) warning about rails 4\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire \"rails_4_session_flash_backport/version\"\n\ncase Rails.version.to_i\nwhen 2\n require 'rails_4_session_flash_backport/rails2/flash_hash'\n require 'rails_4_sessio...
ruby
chosen
[ { "from": "system", "value": "Add Rake to the gems list\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'nfg-client/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Use skip instead of pending to fix spec failing\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe NetSuiteRails::RecordSync::PollManager do\n include ExampleModels\n\n # TODO fake a couple items in the list\n\n let(:empty_search_results) { Open...
ruby
chosen
[ { "from": "system", "value": "Revert \"Marks 'should show the courses tray upon clicking' as pending\"\n\nThis reverts commit ded4c74f6b8297cacf0fb89e8c24f98472a8349c.\n\nChange-Id: Id04f99d2e1d31fe93ba370e4433a268acaa562a3\nReviewed-on: https://gerrit.instructure.com/56843\nTested-by: Jenkins\nReviewed-by:...
ruby
chosen
[ { "from": "system", "value": "Add filename specification in ExpectViolation\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ExpectViolation\n def expect_violation(source)\n expectation = RuboCop::Devtools::Expectation.new(source)\n inspect_source(cop, expectatio...
ruby
chosen
[ { "from": "system", "value": "Tweak syntax whitespace of Flex Cloud SQL migration for readability in docs\n" }, { "from": "human", "value": "# Copyright 2016 Google, Inc\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with...
ruby
chosen
[ { "from": "system", "value": "Add model and controller test\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'question show page' do \n\tit 'shows the individual question' do \n\t\tvisit '/questions/1'\n\t\texpect(page).to have_content(\"Tags\")\n\tend \nend " }, { "...
ruby
chosen
[ { "from": "system", "value": "Disable Sidekiq in spec to prevent transient build failures\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature 'Merge immediately', :feature, :js do\n let(:user) { create(:user) }\n let(:project) { create(:project, :public) }\n\n let!(:merge_requ...
ruby
chosen
[ { "from": "human", "value": "Add spec to confirm successful aws-sdk auth patch\n" }, { "from": "gpt", "value": "require 'aws-sdk'\nrequire 'patches/aws-sdk-core/seahorse_client_net_http_pool_patch'\n\ndescribe Seahorse::Client::NetHttp::ConnectionPool do\n describe \"#start_session (monkey patc...
ruby
chosen
[ { "from": "system", "value": "Test which reception could be reconciled to a purchase invoice and which ones appear in the modal of the purchase invoice form\n" }, { "from": "human", "value": "require 'test_helper'\nmodule Backend\n module PurchaseProcess\n class ReconciliationControllerTest ...
ruby
chosen
[ { "from": "system", "value": "Revert \"FReCon: Version ~> 1.5.0\"\n\nThis reverts commit 54edac071e70cc411941f23ace9650cdb1bd0a79.\n\nCheck out commit d2f1b00994737b536304fc615696ff64923f626c for an explanation of why.\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n" ...
ruby
chosen
[ { "from": "system", "value": "Robot: Remove old associations with competitions and teams.\n" }, { "from": "human", "value": "# lib/frecon/models/robot.rb\n#\n# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part of FR...
ruby
chosen
[ { "from": "human", "value": "Add new script to convert old time files\n" }, { "from": "gpt", "value": "# Copyright (C) 2016 Andreas Siegemund (smumm)\n# \n# This library is free software; you can redistribute it and/or\n# modify it under the terms of the GNU Lesser General Public\n# ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove unused argument from MemoryLogger constructor\"\n\nThis reverts commit 8f810904343fb3530dfa2820f572890f64ab0d6e.\n" }, { "from": "human", "value": "module Loady\n class MemoryLogger\n attr_reader :messages\n\n def initialize\n @messages =...
ruby
chosen
[ { "from": "system", "value": "Fix typo in error message.\n" }, { "from": "human", "value": "# Geojson helper module for spec\n# https://github.com/mapbox/simplestyle-spec/tree/master/1.1.0\n# Geojson format definition http://geojson.org/\n\nmodule Geojson\n # Main class\n class Base\n attr_...
ruby
chosen
[ { "from": "system", "value": "Make sure assets compile for heroku\n" }, { "from": "human", "value": "require_relative 'boot'\n\nrequire \"rails\"\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_job/railtie\"\nrequire \"active_record/railtie\"\nrequire \"actio...
ruby
chosen
[ { "from": "system", "value": "Change homepage to GitHub URL\n\nFor easier discovery via https://rubygems.org/gems/rack-proxy" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rack-proxy\"\n\nGem::Specification.new do |s|\n s.na...
ruby
chosen
[ { "from": "system", "value": "Fix sqlite3 version to 1.3.x\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nlib = File.expand_path('lib', __dir__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'flog/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add restart timeout so that we don't wait forever for an app restart\n" }, { "from": "human", "value": "execute \"gem uninstall puma\" do\n only_if \"gem list | grep puma\"\nend\n\ninclude_recipe \"nginx\"\n\ndirectory \"/etc/nginx/shared\"\ndirectory \"/etc/nginx/...
ruby
chosen
[ { "from": "system", "value": "Fix configuration file not being passed into service.\n" }, { "from": "human", "value": "#\n# Cookbook: nrpe-ng\n# License: Apache 2.0\n#\n# Copyright 2015-2016, Bloomberg Finance L.P.\n#\npoise_service_user node['nrpe-ng']['service_user'] do\n group node['nrpe-ng'...
ruby
chosen
[ { "from": "system", "value": "Fix init script on systemd\n" }, { "from": "human", "value": "\nrequire 'yaml'\n\ninclude_recipe \"build-essential\"\n\ngem_package \"json\"\ngem_package \"dyndnsd\"\n\ntemplate \"/etc/init.d/dyndnsd\" do\n source \"dyndnsd.init.erb\"\n owner \"root\"\n group \"r...
ruby
chosen
[ { "from": "system", "value": "Support file upload with data key.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nrequire 'faraday_middleware'\nrequire 'multi_json'\nrequire 'tumblife/response'\n\nmodule Tumblife\n module Connection\n # Returns a Faraday::Connection object\n ...
ruby
chosen
[ { "from": "system", "value": "Check WeChat as low as possible\n" }, { "from": "human", "value": "require 'user_agent/browsers/base'\nrequire 'user_agent/browsers/wechat_browser'\nrequire 'user_agent/browsers/chrome'\nrequire 'user_agent/browsers/edge'\nrequire 'user_agent/browsers/gecko'\nrequir...
ruby
chosen
[ { "from": "system", "value": "Use condition variable to be notified of RPC responses\n\nEarlier version suffered from a race condition under load\nthat caused Bunny continuation to never unblock.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\nrequire \"bunny\"\n\nco...
ruby
chosen
[ { "from": "system", "value": "Add title to navigation bar\n" }, { "from": "human", "value": "class PostsScreen < UI::Screen\n def on_load\n self.input.on(:change) { |text| fetch_posts(text) }\n self.view.add_child(self.input)\n self.view.add_child(self.list)\n self.view.update_layou...
ruby
chosen
[ { "from": "system", "value": "Add skip_before_action for search action in SearchesController\n" }, { "from": "human", "value": "#\n# == SearchesController\n#\nclass SearchesController < ApplicationController\n before_action :search_module_enabled?\n\n # GET /rechercher\n # GET /rechercher.jso...
ruby
chosen
[ { "from": "system", "value": "Use iter[] instead of get_value/set_value methods\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n=begin\n combobox_from_cellrender.rb - Ruby/GTK sample script\n Copyright (c) 2002-2015 Ruby-GNOME2 Project Team\n This program is licenced under the same li...
ruby
chosen
[ { "from": "system", "value": "Use http instead of https for repo jenkins\n" }, { "from": "human", "value": "#\n# Cookbook:: jenkins\n# Recipe:: default\n#\n# Copyright:: 2017, The Authors, All Rights Reserved.\n\nif platform?('debian', 'ubuntu')\n\n # Required by apt-get\n package 'apt-transpo...
ruby
chosen
[ { "from": "system", "value": "Support for chefdk kitchenplan config\n" }, { "from": "human", "value": "#\n# Cookbook Name:: janus\n# Recipe:: default\n#\n# Copyright 2015, Marcin Nowicki\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and as...
ruby
chosen
[ { "from": "system", "value": "Install thoughtbot's `gitsh` with git cookbook\n" }, { "from": "human", "value": "#\n# Cookbook Name:: git\n# Recipe:: default\n#\n# Copyright (C) 2013 Logan Koester\n# \n# All rights reserved - Do Not Redistribute\n#\n\ninclude_recipe 'pacman'\n\npackage('git') { a...
ruby
chosen
[ { "from": "system", "value": "Add development dependency on Nokogiri 1.6+\n\nSax Machine can be used with Nokogiri, Ox, or Oga, so it does not have\nan explicit dependency on any of them. It does, however, use Nokogiri by\ndefault. That means we need a development dependency on it here to use\nSax Machine i...
ruby
chosen
[ { "from": "system", "value": "Include vendored assets in build\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"kea-rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n ...
ruby
chosen
[ { "from": "human", "value": "Add icon helper to use Font Awesome 5\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nmodule IconHelper\n def icon(icon, style_prefix = \"fas\", html_options = {})\n if style_prefix.is_a?(Hash)\n html_options = style_prefix\n style_pre...
ruby
chosen
[ { "from": "system", "value": "Set invitation \"from name\" to event owners name\n" }, { "from": "human", "value": "class UserMailer < ActionMailer::Base\n default :from => '\"Sched.do\" <app@sched.do>'\n\n def vote_confirmation(vote)\n @user = vote.votable.user\n @event = vote.suggestion...
ruby
chosen
[ { "from": "human", "value": "Add migration to include a uniqueness constraint to tokens\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass AddUniqueConstraintToUserApiTokens < ActiveRecord::Migration[5.2]\n def change\n add_index :user_api_tokens, :token, unique: true\n ...
ruby
chosen
[ { "from": "system", "value": "Add ability to write to a file\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\n$KCODE = 'UTF8'\n\nrequire 'yaml'\nrequire 'set'\n\ntranzlator = YAML::load_file('tranzlator.yml')\n\ndef yaml_quote(string)\n quote = false\n booleans = Set.new ['yes', 'true', '...
ruby
chosen
[ { "from": "system", "value": "Remove needless type: \"fulltext\" for PGroonga\n" }, { "from": "human", "value": "class AddNameIndexToFtsTags < ActiveRecord::Migration[5.2]\n def change\n if Redmine::Database.mysql?\n add_index :fts_tags,\n :name,\n type: \"...
ruby
chosen