conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "QUALITY: Change log level to debug\n"
},
{
"from": "human",
"value": "# Settings specified here will take precedence over those in config/application.rb\nDoubtfire::Application.configure do\n # Show full error reports and disable caching\n config.consider_all_requ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix links in emails in dev\n"
},
{
"from": "human",
"value": "Signonotron2::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code is reloaded on\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec with rails spec dependency and refactor description text.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tytus/version\"\n\nGem::Specification.new do |s|\n s.name = \"tyt... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the way we get the latest tag to be the real latest tag\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\ndef word_wrap(text)\n text.gsub(/(.{1,60})(\\s|$)/, \"\\\\1\\n \")\nend\n\ndef collect_issues\n out = `git log $(git tag | tail -n 1)...HEAD -E -... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs on period scope\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Payment do\n describe 'validations' do\n let(:subject) { build :payment }\n\n it { expect(subject).to validate_presence_of(:bill) }\n it { expect(subject).to val... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to enable debug logging in tests"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule CliHelpers\n java_import 'java.io.ByteArrayOutputStream'\n java_import 'scala.Console'\n\n def capture(stream=:stdout, &block)\n begin\n stderr,... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for mergeable feature\n"
},
{
"from": "gpt",
"value": "require_relative '../../assets/lib/filters/mergeable'\nrequire_relative '../../assets/lib/pull_request'\nrequire_relative '../../assets/lib/input'\nrequire 'webmock/rspec'\n\ndescribe Filters::Mergeable... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for creating(C) products"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe VersacommerceAPI::Product do\n let!(:klass) { VersacommerceAPI::Product }\n\n before do\n initialize_session\n end\n\n describe 'CRUD Operations' do\n\n de... | ruby | chosen |
[
{
"from": "human",
"value": "Remove redundant ci_builds partial index on GitLab.com\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# See http://doc.gitlab.com/ce/development/migration_style_guide.html\n# for more information on how to write migrations for GitLab.\n\nclass Remo... | ruby | chosen |
[
{
"from": "system",
"value": "Add base dependencies to acceptance spec helper.\n\nEnsure wget and rsync are installed on the testing system.\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\n\nhosts.each do |host|\n on host, install_puppet\nend\n\nzookeeper_pp = <<-EOS\nclass { 'zookee... | ruby | chosen |
[
{
"from": "system",
"value": "Use context for rendering by default\n"
},
{
"from": "human",
"value": "require_relative 'exhibit'\n\nmodule DisplayCase\n class BasicExhibit < Exhibit\n def self.applicable_to?(*args)\n true\n end\n\n def to_partial_path\n if __getobj__.respond_... | ruby | chosen |
[
{
"from": "system",
"value": "Update brew-gem to point at the new release\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass SportnginBrewGem < Formula\n homepage 'https://github.com/sportngin/brew-gem'\n head 'https://github.com/sportngin/brew-gem/archive/master.tar.gz'\n\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Reset primary keys after swapping events tables\n\nThis is required as otherwise newly created events will start with the\nwrong ID.\n"
},
{
"from": "human",
"value": "# See http://doc.gitlab.com/ce/development/migration_style_guide.html\n# for more information on h... | ruby | chosen |
[
{
"from": "system",
"value": "Add time range to condition for query of MetricRollups\n\nand add it as console parameter\n"
},
{
"from": "human",
"value": "OUTPUT_CSV_FILE_PATH = 'cores_usage_per_label.csv'.freeze\n\nHEADERS_AND_COLUMNS = ['Hour', 'Date', 'Label of image (key : value)', 'Project'... | ruby | chosen |
[
{
"from": "human",
"value": "Add custom macro for inserting “ma says” section."
},
{
"from": "gpt",
"value": "class PublifyApp\n class Textfilter\n class MaSays< TextFilterPlugin::MacroPost\n plugin_display_name \"Ma Says\"\n plugin_description \"Insert an Ma Says snippet\"\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add discount to days table.\n"
},
{
"from": "gpt",
"value": "class AddDiscountToDays < ActiveRecord::Migration\n def self.up\n add_column :days, :discount, :decimal, :default => 0.0\n end\n\n def self.down\n remove_column :days, :discount\n end\nend\n"
}
... | ruby | chosen |
[
{
"from": "system",
"value": "Add version constraint for Rake\n"
},
{
"from": "human",
"value": "require './lib/rack/canonical_host/version'\n\nGem::Specification.new do |gem|\n gem.name = 'rack-canonical-host'\n gem.version = Rack::CanonicalHost::VERSION\n gem.licenses = ['MIT']\n gem.summa... | ruby | chosen |
[
{
"from": "system",
"value": "Update consul lookup in get-postgresql-primary\n\nAfter recent Consul upgrade '.consul' is required at the end of DNS lookups\n\nChangelog: fixed\n"
},
{
"from": "human",
"value": "require 'resolv'\n\nmodule GitlabCtl\n class PostgreSQL\n class EE\n class <... | ruby | chosen |
[
{
"from": "system",
"value": "Remove new rails defaults that talk about ActiveRecord.\n"
},
{
"from": "human",
"value": "# These settings change the behavior of Rails 2 apps and will be defaults\n# for Rails 3. You can remove this initializer when Rails 3 is released.\n\n# Include Active Record ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a manual release to get nested modules\n"
},
{
"from": "human",
"value": "require \"formula\"\n\nclass Wake < Formula\n url \"https://github.com/MichaelRFairhurst/wake-compiler/archive/v0.2.1.tar.gz\"\n homepage \"http://www.wakelang.com\"\n sha1 \"04920699e5... | ruby | chosen |
[
{
"from": "system",
"value": "Remove simple client and plug in Httparty for REST\n"
},
{
"from": "human",
"value": "module JellyfishOdl\n module Provider\n class SimpleClient < ::Provider\n def initialize\n true\n end\n\n def settings\n {}\n end\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy adjustment metadata when adjustment is destroyed\n"
},
{
"from": "human",
"value": "module Spree\n Adjustment.class_eval do\n has_one :metadata, class_name: 'AdjustmentMetadata'\n\n scope :enterprise_fee, where(originator_type: 'EnterpriseFee')\n end... | ruby | chosen |
[
{
"from": "system",
"value": "EDSC-24: Add sync to spatial constraint matcher to avoid intermittent errors\n"
},
{
"from": "human",
"value": "module MapUtil\n def self.tiles(node, selector)\n # 'visible: false' because leaflet fails to load the tiles and therefore keeps them hidden\n node... | ruby | chosen |
[
{
"from": "system",
"value": "Change time zone to Tokyo"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add `/lib` to eager_load_paths\"\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\nrequire \"sprockets/railtie\"\n\n# Require the gems listed in Gemfile, including any gem... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib to eagerload paths\n\nThis fixes lib files not being available in Rails 5 production without\nexplicitly requiring them.\n\nThis comes with the caveat that everything in lib will be loaded when the\napplication boots, but in our case that's just a few rake tasks so we a... | ruby | chosen |
[
{
"from": "system",
"value": "Use auth method for blcoking user from viewing pages without login.\n"
},
{
"from": "human",
"value": "# Set up gems listed in the Gemfile.\n# See: http://gembundler.com/bundler_setup.html\n# http://stackoverflow.com/questions/7243486/why-do-you-need-require-bu... | ruby | chosen |
[
{
"from": "system",
"value": "Update 'cloud logs API' -> 'cloud logging API'\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.name = 'fluent-plugin-google-cloud'\n gem.description = %q{Fluentd plugin to stream logs to the Google Cloud Platform's logs API, whi... | ruby | chosen |
[
{
"from": "system",
"value": "Add a method to InfraManager to retrieve Hosts without EmsCluster\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1440263\n"
},
{
"from": "human",
"value": "module ManageIQ::Providers\n class InfraManager < BaseManager\n require_nested :Template\n require_nest... | ruby | chosen |
[
{
"from": "system",
"value": "Update to die class week-6\n"
},
{
"from": "human",
"value": "# Die Class 2: Arbitrary Symbols\n\n\n# I worked on this challenge [by myself].\n# I spent [#] hours on this challenge.\n\n# Pseudocode\n\n# Input:\n# Output:\n# Steps:\n\n\n# Initial Solution\n\nclass Di... | ruby | chosen |
[
{
"from": "system",
"value": "Disable router check-in with an environment variable\n\nFor instance, you would be able to initialize your Rails app with rails server DISABLE_ROUTER_CHECKIN=true, and then it wouldn't load your YML file or attempt to register with the router.\n\nAddresses #36.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Change of expected log messages.\n"
},
{
"from": "human",
"value": "require \"executors/configurators/configurator_logging_test\"\r\n\r\nclass ClassCreateTest < Test::Unit::TestCase\r\n include ConfiguratorLoggingTest\r\n\r\n def setup\r\n @method = \"load_yaml... | ruby | chosen |
[
{
"from": "system",
"value": "Make my own “workstation” dep to wrap up my personal changes"
},
{
"from": "human",
"value": "dep \"laptop\" do\n # Build the standard Icelab environment\n requires \"icelab:workstation\"\n\n requires \"personal dotfiles\"\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove conditional for configuration from initializer\n"
},
{
"from": "human",
"value": "# Prevents \"PG::UndefinedTable: ERROR: relation 'configurations' does not exist\"\n# on server initialization when running existing migrations.\nif ActiveRecord::Base.connecti... | ruby | chosen |
[
{
"from": "system",
"value": "Make the server work properly\n"
},
{
"from": "human",
"value": "unless Rails.env.development?\n $mixpanel = Mixpanel::Tracker.new('2e87e79bda898d69197d3623c426be35')\nend\n"
},
{
"from": "gpt",
"value": "if defined?(Mixpanel)\n $mixpanel = Mixpanel::T... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to version 2.1.17\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.16\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectur... | ruby | chosen |
[
{
"from": "system",
"value": "Add a dependency on the JSON gem to the gemspec.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = 'broach'\n spec.version = '0.2.0'\n\n spec.author = \"Manfred Stienstra\"\n spec.email = \"manfred@fngtps.com\"\n\n spec.descripti... | ruby | chosen |
[
{
"from": "human",
"value": "Add override to rails_admin show_in_game action that will navigate to the correct path when viewing a Team\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire 'rails_admin/config/actions'\nrequire 'rails_admin/config/actions/show_in_app'\n\nmodule... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"JRuby is currently having a problem loading the fixture (SyntaxError), so it's not running the specs.\"\n\nThis reverts commit 35d1c953db52f9a79d3fb56ad435fccef0624739.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FI... | ruby | chosen |
[
{
"from": "system",
"value": "r515: Handle site_config.rb in Cap deployment\n"
},
{
"from": "human",
"value": "Capistrano.configuration(:must_exist).load do\n\n desc 'deploy CC.rb'\n task :deploy_ccrb do\n stop_ccrb\n\n update_code\n after_update_code\n symlink\n\n start_ccrb\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod file with new swift version and new dependencies\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'RxKeyboard'\n s.version = '0.8.1'\n s.summary = 'Reactive Keyboard in iOS'\n s.homepage = 'https... | ruby | chosen |
[
{
"from": "system",
"value": "Use mine username, i.e. irnc\n"
},
{
"from": "human",
"value": "#gitback 0.1\n#credits: Walter White, Updates: Addy Osmani\n#!/usr/bin/env ruby\n# dependencies\nrequire \"yaml\"\nrequire \"open-uri\"\n# your github username\nusername = \"addyosmani\"\ntime = Time.ne... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec for user sign up\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.feature 'Signing up', type: :feature do\n before do\n #stub_request(:get, 'http://www.google.com/search?output=rss&q=link:www.example.com&tbm=blg').\n #to_retu... | ruby | chosen |
[
{
"from": "system",
"value": "Make it much more obvious when the readme_spec fails"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nrequire \"support/mapper_setup\"\nrequire \"support/sequel_persistence_setup\"\nrequire \"support/seed_data_setup\"\nrequire \"terrestrial\"\n\nrequire \... | ruby | chosen |
[
{
"from": "system",
"value": "Include config dir files in gemspec\n"
},
{
"from": "human",
"value": "version = '3.0.0'\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_volume_pricing'\n s.version = version\n s.summary = 'Allow prices to ... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra stubbing for the feature tests\n"
},
{
"from": "human",
"value": "require 'gds_api/publishing_api_v2'\nrequire_relative '../../test/support/policy_tagging_helpers'\n\nBefore do\n publishing_api_v1_endpoint = File.join(\n Plek.find('publishing-api'),\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rollback in favour of PR\n"
},
{
"from": "human",
"value": "class UberS3\n module Authorization\n extend self\n \n def sign(client, verb, path, headers={})\n req_verb = verb.to_s.upcase\n req_content_md5 = headers['Cont... | ruby | chosen |
[
{
"from": "system",
"value": "WatchTower: Redefine the methods name and version so the tests passes on Linux.\n"
},
{
"from": "human",
"value": "begin\n require 'rubygems'\n require 'appscript'\nrescue LoadError\n require 'rbconfig'\n if RbConfig::CONFIG['target_os'] =~ /darwin/i\n STDERR... | ruby | chosen |
[
{
"from": "human",
"value": "Copy bash script from Jenkins as a starting point.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# TODO: loop through all open pull requests.\n\n# fetch the merge-commit for the pull request.\n# NOTE: this automatically created by GitHub.\n`git fetch origin r... | ruby | chosen |
[
{
"from": "system",
"value": "Update controller to use Disclosure::Rule model\n"
},
{
"from": "human",
"value": "class Users::NotificationRulesController < ApplicationController\n before_filter :authenticate_user!\n\n def index\n @notification_rule = NotificationRule.new\n end\n\n def cre... | ruby | chosen |
[
{
"from": "system",
"value": "Order admin org repos by contributions first\n"
},
{
"from": "human",
"value": "class Admin::RepositoryOrganisationsController < Admin::ApplicationController\n def show\n @org = RepositoryOrganisation.host(current_host).find_by_login(params[:login])\n @top_re... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite Ruby for problem 1 in functional style\n\nI'm enjoying this style, so I rewrote the ruby function into a dense\none-liner.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# \n# http://projecteuler.net/index.php?section=problems&id=1\n\nclass EulerNum... | ruby | chosen |
[
{
"from": "system",
"value": "Correct gem name in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'conditional_callback'\n s.version = '0.0.1'\n s.date = '2014-10-04'\n s.summary = 'ConditionalCallbacks'\n s.description = 'Calls back blocks by name'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove precompile directive for materialize files\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Include DelayedJob errors in Errbit exceptions\n\nThe integration between Airbrake/Errbit and DelayedJob wasn't working\nbecause we require our dependencies in alphabetic order, and so by the\ntime `airbrake` was required, `delayed_job` wasn't loaded.\n\nSo we're manually requi... | ruby | chosen |
[
{
"from": "system",
"value": "Add update method to line items controller\n"
},
{
"from": "human",
"value": "module Spree\n module Api\n module V1\n class LineItemsController < Spree::Api::V1::BaseController\n def create\n authorize! :read, order\n @line_item = o... | ruby | chosen |
[
{
"from": "system",
"value": "Make changes in terms_form to behave like issues_form\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoAdmin\n module GobiertoCommon\n class TermForm < BaseForm\n\n attr_accessor(\n :id,\n :site_id,\n :... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) how many twos\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/56aed5db9d5cb55de000001c/\n# --- iteration 1 ---\ndef two_count(n)\n n.to_s(2).chars.reverse.join.split(\"1\")[0].size rescue 0\nend\n\n# --- iteration 2 ---\ndef two_co... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Switch to python-pgmagick on buildserver too\"\n\nThis reverts commit f012165c694bf6e929f96db31d93edcb168c7f95.\n"
},
{
"from": "human",
"value": "\nuser = node[:settings][:user]\n\nexecute \"apt-get-update\" do\n command \"apt-get update\"\nend\n\n%w{ant ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to pass the test case in Rails 4.0/4.1\n"
},
{
"from": "human",
"value": "describe 'comable/admin/orders/edit' do\n let(:order) { create(:order, :completed) }\n\n before { assign(:order, order) }\n\n it 'renders the edit product form' do\n render\n asse... | ruby | chosen |
[
{
"from": "system",
"value": "Use a socket for Puma in production\n"
},
{
"from": "human",
"value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['MAX_THREADS'] || 5)\nthreads threads_count, threads_count\n\ntag 'deploy-it'\nrackup DefaultRackup\nenviron... | ruby | chosen |
[
{
"from": "system",
"value": "Use json for debugging for now\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'omniauth'\nrequire 'omniauth-oauth2'\nrequire 'rack/ssl'\nrequire 'pp'\n\n# These variables should all be set in your environment\nCLIENT_ID = ENV['CLIENT_ID']\nCLIENT_SECR... | ruby | chosen |
[
{
"from": "system",
"value": "Mark direct payment as pending\n\ndon't care about anything but hpp\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'spree/testing_support/order_walkthrough'\n\nmodule Spree\n describe Order do\n context 'with an associated user' do\n let(... | ruby | chosen |
[
{
"from": "system",
"value": "Update the method names according to the previous commit to the HtmlEntities module\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"str_sanitizer/html_entities\"\n\nRSpec.describe StrSanitizer::HtmlEntities do\n before(:each) do\n @methods... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up backtrace initialization script\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.\n# Rails.backtrace_... | ruby | chosen |
[
{
"from": "system",
"value": "Convert one instance of :text => :plain\n"
},
{
"from": "human",
"value": "class Dataservice::ExternalActivityDataController < ApplicationController\n\n private\n\n def handle_versioned_protocol(version)\n learner = Portal::Learner.find_by_id_or_key(params[:id_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant blank line at the bottom\n"
},
{
"from": "human",
"value": "<% module_namespacing do -%>\nclass <%= class_name %>Controller < ApplicationController\n<% actions.each do |action| -%>\n def <%= action %>\n end\n\n<% end -%>\nend\n<% end -%>\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add backend javascripts to install generator\n"
},
{
"from": "human",
"value": "module SpreeLimitBackorders\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default => false\n\... | ruby | chosen |
[
{
"from": "human",
"value": "Rename type to something else\n"
},
{
"from": "gpt",
"value": "class RenameTypeToSomethingBetter < ActiveRecord::Migration[5.0]\n def change\n rename_column :accounts, :type, :account_stype\n rename_column :transactions, :type, :transaction_type\n end\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the layout of the sql migration script\n"
},
{
"from": "human",
"value": "class AddTimestampsToBenefitCheck < ActiveRecord::Migration\n def up\n change_table(:benefit_checks) { |t| t.timestamps }\n migrate_sql = <<SQL\nUPDATE benefit_checks\nSET\n cr... | ruby | chosen |
[
{
"from": "human",
"value": "Add cleanup script for cloneable sandboxed courses\n\nThe 'stay_in_sandboxes' option was an experiment that we've decided isn't worth continuing, so we want to make sure the old courses that were set up with timeline content built around staying in sandboxes don't get cloned.\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Update aws-sdk gem version to ~> 2.1.0\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add helpers for adding and removing form fields with JS\n"
},
{
"from": "human",
"value": "module FormsHelper\nend"
},
{
"from": "gpt",
"value": "module FormsHelper\n \n def remove_child_link(name, f)\n f.hidden_field(:_delete) + link_to_function(na... | ruby | chosen |
[
{
"from": "system",
"value": "Change the response for each feed page\n"
},
{
"from": "human",
"value": "module CertificateFactory\n\n class Factory\n include HTTParty\n format :xml\n\n def initialize(options)\n @url = options[:feed]\n @limit = options[:limit] || 20\n @co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Timeline component passing wrong argument for broadcast\n"
},
{
"from": "human",
"value": "require 'chatrix/message'\nrequire 'chatrix/events'\n\nrequire 'wisper'\n\nmodule Chatrix\n module Components\n # Manages the timeline for a room.\n class Timeline\... | ruby | chosen |
[
{
"from": "system",
"value": "Update the group slugs and restore the index\n\n- Note that this migration fails when run in a\nbatch with this error:\nPG::FeatureNotSupported: ERROR:\ncached plan must not change result type\n\n- This appears to be caused by executing sql\nin the previous migration that adds ... | ruby | chosen |
[
{
"from": "human",
"value": "Add badge related fields to projects\n"
},
{
"from": "gpt",
"value": "class AddBadgeFieldsToProjects < ActiveRecord::Migration\n def change\n add_column :projects, :badge_generated, :boolean\n add_column :projects, :badge_filled_in_percent, :integer\n add_c... | ruby | chosen |
[
{
"from": "system",
"value": "Add User model via devise gem, add association to reports\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_a... | ruby | chosen |
[
{
"from": "system",
"value": "Allow counts to increment once again\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n\n def increment_notification_count\n # TODO fix this soon (it should increment by one)\n self.notification_count = 0\n self.save\n end\n\n def reset... | ruby | chosen |
[
{
"from": "system",
"value": "Change status from '503' to 'error' to standartize responses from lib\n"
},
{
"from": "human",
"value": "module BeGateway\n module Connection\n extend ActiveSupport::Concern\n extend Forwardable\n def_delegators :connection, :headers, :headers=\n \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add /image route to render & return url to image\n"
},
{
"from": "human",
"value": "module ShareMeow\n module Routes\n class Base < Sinatra::Application\n register ShareMeow::Authorization\n register Sinatra::Param\n\n configure do\n set :l... | ruby | chosen |
[
{
"from": "system",
"value": "Add proper files to gem\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'time_pilot'\n s.summary = 'Configure enabled features for a specific set of users.'\n s.description = ''\n s.version = '0.0.1'\n s.platform ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test coverage for Sapience::Extensions::ActiveRecord::LogSubscriber\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\nrequire \"rails\"\nrequire \"sapience/extensions/active_record/log_subscriber\"\n\ndescribe Sapience::Extensions::ActiveRecord::LogSubscr... | ruby | chosen |
[
{
"from": "system",
"value": "[DOC] Update generated config file for easy configuration of Rayo/Asterisk, and default to debug log level in development\n"
},
{
"from": "human",
"value": "# Centralized way to overwrite any Adhearsion platform or plugin configuration\n# - Execute rake adhearsion:c... | ruby | chosen |
[
{
"from": "human",
"value": "Add *.gemspec to use by bundler."
},
{
"from": "gpt",
"value": "# Generated by jeweler\n# DO NOT EDIT THIS FILE DIRECTLY\n# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command\n# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec file for test\n"
},
{
"from": "gpt",
"value": "require 'serverspec'\n\n# Required by serverspec\nset :backend, :exec\n\ndescribe 'Skype Daemon' do\n\n it 'has a running service of skype-daemon' do\n expect(service('skype')).to be_running\n end\n\nend\n"... | ruby | chosen |
[
{
"from": "human",
"value": "Add default false value from migration\n"
},
{
"from": "gpt",
"value": "class AddNotNullToActive < ActiveRecord::Migration\n def change\n Sponsor.update_all(active: false)\n change_column :sponsors, :active, :boolean, null: false, default: false\n end\nend\n"... | ruby | chosen |
[
{
"from": "system",
"value": "Support Isles of Scilly council\n"
},
{
"from": "human",
"value": "class LicenceLocationIdentifier\n def self.find_snac(geostack, artefact = nil)\n authorities = Hash[geostack['council'].map {|area| [area['type'], area['ons']] }]\n self.authority_types.each {... | ruby | chosen |
[
{
"from": "system",
"value": "Split out unwrapping of payload in TravisPayload to improve clarity\n"
},
{
"from": "human",
"value": "class TravisJsonPayload < Payload\n def building?\n status_content.first['state'] == 'started'\n end\n\n def build_status_is_processable?\n status_is_proc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ensure block for old Ruby versions\n"
},
{
"from": "human",
"value": "module RorVsWild\n module Plugin\n class ActiveJob\n def self.setup\n return if @installed\n return unless defined?(::ActiveJob::Base)\n ::ActiveJob::Base.around_... | ruby | chosen |
[
{
"from": "system",
"value": "Use Dojo.destroy_all to test in Aggregation spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\nrequire 'statistics'\n\nRSpec.describe Statistics::Aggregation do\n include_context 'Use stubs for Faraday'\n\n before(:all) do\n Dojo.delete_all\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Add more tests for debug presenter\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe Presenters::DebugPresenter do\n let(:document) { FactoryGirl.create(:document) }\n let!(:content_item) { FactoryGirl.create(:content_item, document: do... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for async request\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe 'RubyRabbitmqJanus::RRJ' do\n describe '.response', type: :request_async, name: :info do\n let(:transaction) { RubyRabbitmqJanus::RRJ.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Add fields to transaction table\n"
},
{
"from": "human",
"value": "Sequel.migration do\n change do\n create_table :transactions do\n primary_key :id\n String :description\n FixNum :amount\n end\n end\nend\n"
},
{
"from": "gpt",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "TEST: Check retutned response in test post campus\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass CampusesTest < ActiveSupport::TestCase\n include Rack::Test::Methods\n include TestHelpers::AuthHelper\n include TestHelpers::JsonHelper\n\n def a... | ruby | chosen |
[
{
"from": "system",
"value": "Add method comments to `Production::Terminal`\n"
},
{
"from": "human",
"value": "module Calyx\n module Production\n class Terminal\n def initialize(atom)\n @atom = atom\n end\n\n def evaluate\n [:atom, @atom]\n end\n end\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic pipeline expressions grammar definition\n"
},
{
"from": "human",
"value": "module Gitlab\n module Ci\n module Pipeline\n module Expression\n class Lexer\n def initialize(statement)\n @statement = statement\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the require statment too.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'zip'\nrequire 'snappy'\n\nmodule Keynote \n module Extractor \n class ArchiveExtractor \n def self.extract(file)\n archive = Zip::File.open(file) \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check that ensure is the first attribute in a resource if it's specified\n"
},
{
"from": "human",
"value": "# Resources\n# http://docs.puppetlabs.com/guides/style_guide.html#resources\n\nclass PuppetLint::Plugins::CheckResources < PuppetLint::CheckPlugin\n def test... | ruby | chosen |
[
{
"from": "human",
"value": "Add XMLHelper to help with XML generation\n"
},
{
"from": "gpt",
"value": "module EPP\n module XMLHelpers\n # Creates and returns an instance of the EPP 1.0 namespace\n #\n # @param [XML::Node] node to create the namespace on\n # @param [String, nil] Nam... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.