conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Improve creation of `details` hash\n"
},
{
"from": "human",
"value": "require_relative '../publishing_api_presenters'\n\nclass PublishingApiPresenters::Organisation < PublishingApiPresenters::Placeholder\n include ApplicationHelper\n\n def details\n super.tap d... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Bundler version bug still not fixed\"\n\nThis reverts commit 69431d5c6c13b371d0e6fbbd98cbfbf20ea405e7.\n"
},
{
"from": "human",
"value": "ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)\n\nGem::Specification.find_by_name('bundler', '~> 2.0... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce worker to a default of 1\n"
},
{
"from": "human",
"value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)\nthreads threads_count, threads_count\n\npreload_app!\n\nrackup DefaultRackup\nport EN... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for multiple viewers\n"
},
{
"from": "gpt",
"value": "require 'net/https'\n\ndef run()\n Thread.new {\n while 1 do \n uri = URI.parse('https://jdis-ia.dinf.usherbrooke.ca/api/1/game/-1')\n req = Net::HTTP::Get.new(uri.path)\n res = Net::HT... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to version 1.1.1\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = \"Rally\"\n s.version = \"1.1.0\"\n s.summary = \"Summary goes here.\"\n\n s.description = <<-DESC\n \n De... | ruby | chosen |
[
{
"from": "system",
"value": "Add Reference to Swift 3.0 in Podspec file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\ns.name = 'Track'\ns.summary = 'Track is a thread safe cache write by Swift. Composed of DiskCache and MemoryCache which support LRU.'\ns.version = '... | ruby | chosen |
[
{
"from": "system",
"value": "Set Embedded Content Contains Swift Code flag to YES\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Cosmos\"\n s.version = \"2.0.3\"\n s.license = { :type => \"MIT\" }\n s.homepage = \"https://github.com/marketplacer/Cosmo... | ruby | chosen |
[
{
"from": "human",
"value": "Add plugin to track connections from netfilter and percent of connections available.\n"
},
{
"from": "gpt",
"value": "class ConnectionTracking < Scout::Plugin\n def build_report\n conntrack_max_output = `cat /proc/sys/net/netfilter/nf_conntrack_max`\n max = co... | ruby | chosen |
[
{
"from": "system",
"value": "Add Synopsis To Item Serializer\n"
},
{
"from": "human",
"value": "class ItemSerializer < ActiveModel::Serializer\n attributes :id, :title, :number, :sections\n\n has_one :item_type\nend\n"
},
{
"from": "gpt",
"value": "class ItemSerializer < ActiveMod... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typos in migration template (generator)\n"
},
{
"from": "human",
"value": "#\n# Generates the migrations necessary to use the acts_as_prototype plugin\n#\nclass PrototypeMigrationMigrationGenerator < Rails::Generator::Base\n def manifest\n record do |m|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Make Agreements fields not null\n"
},
{
"from": "gpt",
"value": "class MakeAgreementsFieldNotNull < ActiveRecord::Migration[5.0]\n def change\n\n change_column_null :agreements, :service_provider_organization_id, false\n change_column_null :agreements, :servic... | ruby | chosen |
[
{
"from": "system",
"value": "Add proper email address format validation"
},
{
"from": "human",
"value": "module PlosAuthors\n class PlosAuthor < ActiveRecord::Base\n include EventStreamNotifier\n\n acts_as :author, dependent: :destroy\n delegate :completed?, to: :plos_authors_task, pr... | ruby | chosen |
[
{
"from": "system",
"value": "Implement adding multiple items to a cart\n"
},
{
"from": "human",
"value": "class CartsController < ApplicationController\n def create\n item = Item.find(params[:item_id])\n flash[:notice] = \"You have added 1 #{item.title} to your cart.\"\n redirect_to i... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor code to test mailing errors\n"
},
{
"from": "human",
"value": "class MainsController < ApplicationController\n\tdef index\n\t\t@albums = Album.all\n\t\t@images = Image.all\n\t\t@contact = Contact.new\n\t\t@projects = Album.order(\"created_at DESC\")\n\tend\... | ruby | chosen |
[
{
"from": "system",
"value": "Use aws-sdk ~> 1.0 and apns ~> 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": "Remove old DB reflection constants.\n"
},
{
"from": "human",
"value": "module ActiveRecord\n module ConnectionAdapters\n module SQLServer\n module Version\n\n VERSION = '4.2.0'\n\n SUPPORTED_VERSIONS = [2005, 2008, 2010, 2011, 2012, 2014]\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Rename \"UK mission for ASEAN\"\n\nto \"UK mission to ASEAN\". the associated slug, name and title\n"
},
{
"from": "gpt",
"value": "asean_mission = WorldLocation.find_by(slug: \"uk-mission-for-asean\")\nif asean_mission\n asean_mission.update!(slug: \"uk-mission-to-... | ruby | chosen |
[
{
"from": "system",
"value": "Update controller tests to ensure permissions\n\nVerifies that non-permitted users should not be able to close governments.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass Admin::GovernmentsControllerTest < ActionController::TestCase\n setup do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove canceled attendees from tournament reports\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\nclass Rpt::TournamentReportsController < Rpt::AbstractReportController\n helper_method :self_promoter\n\n def show\n @tournament = Tournament.yr(@year).fi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug creating new lists.\n"
},
{
"from": "human",
"value": "class ListsController < ApplicationController\n expose(:sector)\n expose(:lists, ancestor: :sector)\n expose(:list, attributes: :list_params)\n\n def index; end\n\n def create\n list.sector_id = ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow adding a trip without authorization\n"
},
{
"from": "human",
"value": "class TripsController < MyplaceonlineController\n def may_upload\n true\n end\n \n protected\n def sorts\n [\"trips.started DESC\"]\n end\n\n def obj_params\n para... | ruby | chosen |
[
{
"from": "system",
"value": "Change User Path After Edit To Hide User Show\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def show\n @user = current_user\n end\n\n def new\n @user = User.new\n end\n\n def create\n @user = User.new(user_params)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for hire me btn bug\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def index\n @users = User.search(params)\n end\n\n def hire_me_contact_form\n message_params = params['message_form']\n request.env['HTTP_REFERER']... | ruby | chosen |
[
{
"from": "human",
"value": "Remove unused profile flags / role columns\n\nThese were made redundant by #67\n"
},
{
"from": "gpt",
"value": "class RemoveUnusedProfileFlags < ActiveRecord::Migration[5.2]\n def change\n remove_column :users, :admin\n remove_column :users, :blogger\n remo... | ruby | chosen |
[
{
"from": "system",
"value": "Include number_of_residences with sparse area data\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Api\n module V3\n class AreaPresenter\n # These attributes will be kept as part of the JSON representation of the\n # area whe... | ruby | chosen |
[
{
"from": "system",
"value": "Add compcert 3.0.0 to the black-list\n"
},
{
"from": "human",
"value": "# A list of packages with errors which we chose to ignore (for now). It\n# contains an exact package name together with a string which should be\n# included in the error message.\n\nBlackList = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add region option for AWS config"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n#\n# This handler assumes it runs on an ec2 instance with an iam role\n# that has permission to send to the sns topic specified in the config.\n# This removes the requirement to s... | ruby | chosen |
[
{
"from": "system",
"value": "Tag value method takes objects\n"
},
{
"from": "human",
"value": "module ValidatesTimeliness\n module Extensions\n module TimelinessDateTimeSelect\n # Intercepts the date and time select helpers to reuse the values from\n # the params rather than the p... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to include user tracking and soft-delete features\n"
},
{
"from": "gpt",
"value": "class AddUserTrackingFieldsToModels < ActiveRecord::Migration[5.0]\n def change\n\n \ttables [:account, :bid, :bid_plan, :bid_plan_item]\n\n \tadd_column :account, :cr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix docs to be more precise\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Axiom\n module Types\n\n # Add encoding constraints to a type\n module Encodable\n if RUBY_VERSION >= '1.9'\n\n # Hook called when module is extended\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a better to_s output for LightCollection\n"
},
{
"from": "human",
"value": "require 'lifx/light_target'\n\nmodule LIFX\n class LightCollection\n include LightTarget\n extend Forwardable\n\n # Stores an array of lights and handles addressing multiple li... | ruby | chosen |
[
{
"from": "system",
"value": "Allow NTEE::HierarchicalDimension to accept NTEE codes and convert them\n"
},
{
"from": "human",
"value": "require 'search_dimensions'\n\nmodule NTEE\n class HierarchicalDimension < SearchDimensions::HierarchicalDimension\n def value_class\n NTEE::Hierarchi... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for setting elastic IPs\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'right_aws'\n\nmodule CloudMaker\n class Ec2\n attr_accessor :config, :aws_secret_access_key, :aws_access_key_id\n\n def initialize(cloud_maker_config, options)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Stop indexing crazy big chat rooms\n"
},
{
"from": "human",
"value": "class Indexer\n include Sidekiq::Worker\n sidekiq_options queue: 'elasticsearch', retry: false\n\n def perform(operation, record_type, record_id)\n klass = record_type.constantize\n case ... | ruby | chosen |
[
{
"from": "system",
"value": "Add default fines for incorrect cals\n"
},
{
"from": "human",
"value": "require 'hashie/mash'\n\nclass Game\n\n DEFAULTS = Hashie::Mash.new({\n initial_balance: 10000,\n payroll: {\n interval_secs: 60,\n wage_bill: 100\n }\n })\n\n def initiali... | ruby | chosen |
[
{
"from": "system",
"value": "Move the backend to the cascade apps\n\n- In dev mode, try sprockets, try static files, then try the back end,\n this eliminates some crazy hoops to jump through. None of the file\n generating apps needs to worry about calling up the stack, they can\n rely on headers that ph... | ruby | chosen |
[
{
"from": "system",
"value": "Replace the edit icon with a delete on the CV snapshot delete button\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Toolbar::CloudVolumeSnapshotCenter < ApplicationHelper::Toolbar::Basic\n button_group('cloud_volume_snapshot_vmdb', [\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add display_name() for Network Router model\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Amazon::NetworkManager::NetworkRouter < ::NetworkRouter\nend\n"
},
{
"from": "gpt",
"value": "class ManageIQ::Providers::Amazon::NetworkManager::Net... | ruby | chosen |
[
{
"from": "system",
"value": "Sort Freckle projects by name\n"
},
{
"from": "human",
"value": "module Hamckle\n class Freckle\n def initialize(options)\n LetsFreckle.configure do\n account_host options[:account_host]\n username options[:username]\n token options[:to... | ruby | chosen |
[
{
"from": "system",
"value": "Remove middleware because it's not supported by mixpanel-ruby"
},
{
"from": "human",
"value": "require 'mixpanel-ruby'\n\nmodule Mixpanel\n class Engine < ::Rails::Railtie\n\n Config = Struct.new(:token, :options, :middleware)\n MiddlewareConfig = Struct.new(... | ruby | chosen |
[
{
"from": "system",
"value": "Add functionality to grab the DNS zone records and nameservers\n"
},
{
"from": "human",
"value": "module Squall\n # OnApp DNS Zones\n class DnsZone < Base\n # Public: List DNS zones.\n #\n # Returns an Array.\n def list\n response = request(:get, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add generated gemspec for installing gem from git.\n"
},
{
"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 ... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'require_all' gem where possible.\n"
},
{
"from": "human",
"value": "Dir[\"../lib/*.rb\"].each {|file| require_relative file }\n\ninput = '../input/PubMed_1000_original_2014-06-15.csv'\noutput = '../output/PubMed_1000_original_altmetric.csv'\napi = 'altmetric'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add Moped As Gem Dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'my_mongoid/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix parent_document proc on Ruby 1.9\n"
},
{
"from": "human",
"value": "module MongoModel\n module DocumentParent\n extend ActiveSupport::Concern\n \n def parent_document\n @_parent_document.is_a?(Proc) ? @_parent_document.call(self) : @_parent_docume... | ruby | chosen |
[
{
"from": "system",
"value": "Remove engine paths from asset config\n"
},
{
"from": "human",
"value": "Rails.application.config.assets.paths << Peoplefinder::Engine.root.join(\n 'vendor', 'assets', 'components'\n )\n\nRails.application.config.assets.precompile += %w[\n gov-static/gov-goodbrow... | ruby | chosen |
[
{
"from": "human",
"value": "Add KeyProcessor to analyze fetched keys\n"
},
{
"from": "gpt",
"value": "require 'net/ssh'\n\nmodule Processor\n # SSH public key analyzer\n class KeyProcessor\n # @param [String] key public key data\n # @param [OpenSSL::PKey] pkey loaded ssh key object (opt... | ruby | chosen |
[
{
"from": "system",
"value": "Work around Recent Selenium FF drag & drop bug: \n\nSimulate the drop, by directly invoking the drop\ncallback.\n\nsee:\nhttps://github.com/jnicklas/capybara/issues/477\nhttp://bit.ly/q9LHR4\n\n"
},
{
"from": "human",
"value": "Given /^the following external activit... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify the apply manifest logic\n\n* There's already a dedicated option for catching\nchanges in the apply_manifest method"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'logwatch class' do\n\n context 'default parameters' do\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix locale controller helper test to now depend on Spree::Frontend::Config[:locale]\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\n# In this file, we want to test that the controller helpers function correctly\n# So we need to use one of the controllers... | ruby | chosen |
[
{
"from": "system",
"value": "Support spree versions over 3.0.6\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_promotion_codes'\n s.version = '3.0.6'\n s.summary = 'Allow multiple code... | ruby | chosen |
[
{
"from": "system",
"value": "Allow web console from vagrant host\n"
},
{
"from": "human",
"value": "Tfpullrequests::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 rel... | ruby | chosen |
[
{
"from": "human",
"value": "Read the fucking problem statement... count all sum solutions\n"
},
{
"from": "gpt",
"value": "# http://lcoj.tk/problems/find-all-sum-solution-for-positive-number-lalayangguang-draft/\n# Give a positive number N, find all possible positive numbers can be sum equ... | ruby | chosen |
[
{
"from": "human",
"value": "Remove duplicates (used Pry to debug post factum and it's pretty awesome. Love it)\n"
},
{
"from": "gpt",
"value": "# Follow up for \"Remove Duplicates\":\n# What if duplicates are allowed at most twice?\n#\n# For example,\n# Given sorted array nums = [1,1,1,2,2,... | ruby | chosen |
[
{
"from": "system",
"value": "Switch provider to manage paste.ini file\n\n... so that we users can use '<SERVICE DEFAULT>' similarly to\nthe resource types to manage the <service>.conf files.\n\nCloses-Bug: #1981118\nChange-Id: Iefc9b16662603fd8fc410c9080cb13b603bd4cf5\n"
},
{
"from": "human",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Implement new format of stats\n"
},
{
"from": "human",
"value": "class GetStats\n def call(team_params)\n team = PrepareTeam.new.call(team_params)\n data = fetch_data(team)\n format(data)\n end\n\n private\n\n def fetch_data team\n team.team_members.... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Version bump to v1.4.0.beta1\"\n"
},
{
"from": "human",
"value": "module Discourse\n # work around reloader\n unless defined? ::Discourse::VERSION\n module VERSION #:nodoc:\n MAJOR = 1\n MINOR = 4\n TINY = 0\n PRE = 'beta1'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use rails group, not app\n"
},
{
"from": "human",
"value": "rails_env = ENV['::Rails.env'] || 'production'\n\nworker_processes 2\npreload_app true\ntimeout 180\n\nuser 'app', 'app'\n\napp_path = File.expand_path(File.dirname(__FILE__) + \"/../../../current\")\nworki... | ruby | chosen |
[
{
"from": "system",
"value": "Add libcurl3 to list of required packages\n"
},
{
"from": "human",
"value": "\ninclude_recipe 'apt'\n\n# commonly needed packages / tools\n%w(vim gconf2 libxml2-dev libxslt1-dev zlib1g-dev liblzma-dev build-essential xvfb indicator-multiload).each do |pkg|\n packag... | ruby | chosen |
[
{
"from": "system",
"value": "Remove reference to Specs directory\n"
},
{
"from": "human",
"value": "module RestKit\n module CoreData\n class Cache < Sinatra::Base\n\n get '/coredata/etag' do\n tag = '2cdd0a2b329541d81e82ab20aff6281b'\n if tag == request.env[\"HTTP_IF_NONE... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for issue search\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../test_helper\", __FILE__)\n\nmodule FullTextSearch\n class SearchControllerTest < Redmine::ControllerTest\n include GroongaCommandExecutable\n\n make_my_diffs_pr... | ruby | chosen |
[
{
"from": "human",
"value": "Make random numbers to check randomness of pi\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/ruby\r\n# coding: utf-8\r\n# 円周率の各桁が乱数とみなせるなら、7zで圧縮したときに、\r\n# 乱数と同程度のサイズになるのではないか?\r\n\r\nclass RandomDigits\r\n attr_reader :n, :a, :s\r\n\r\n def initialize(argv)\r\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest as development dependency for Ruby 2.2\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'es6_module_transpiler/rails/version'\n\nGem::Specifi... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for Adobe Creative Cloud\n"
},
{
"from": "gpt",
"value": "class AdobeCreativeCloud < Cask\n url 'https://ccmdls.adobe.com/AdobeProducts/KCCC/1/osx10/CreativeCloudInstaller.dmg'\n homepage 'https://creative.adobe.com/products/creative-cloud'\n version 'lat... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for read_changelog action\n"
},
{
"from": "gpt",
"value": "describe Fastlane::Actions::ReadChangelogAction do\n describe 'Read CHANGELOG.md action' do\n\n \tlet (:changelog_mock_path) {\"./fastlane-plugin-changelog/spec/fixtures/CHANGELOG_MOCK.md\"}\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing env var RAILS_ENV in some cases (unicorn)\n"
},
{
"from": "human",
"value": "require 'active_record'\n\n::Sequel::DATABASES.each{|d| d.sql_log_level = :debug }\n\n@environment = ENV['RAILS_ENV'] || 'development'\n@dbconfig = YAML.load(File.read('config/d... | ruby | chosen |
[
{
"from": "system",
"value": "Improve usage, and make github.com/cloudfoundry/cf-release default web URL\n"
},
{
"from": "human",
"value": "require \"thor\"\nmodule GitReleaseNotes\n class CLI < Thor\n include Thor::Actions\n\n desc \"html\", \"Generates a HTML release notes document\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated use of Connection::Client\n"
},
{
"from": "human",
"value": "module HTTP\n module Commands\n class Connect\n attr_reader :host\n attr_reader :port\n attr_reader :scheduler\n attr_reader :ssl_context\n\n def initialize(h... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out output of log_init_msg for now.\n"
},
{
"from": "human",
"value": "# Author:: Chris Fordham (<chris@fordham-nagy.id.au>)\n# Copyright:: Copyright (c) 2013 Chris Fordham\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Ver... | ruby | chosen |
[
{
"from": "human",
"value": "Add 'updated_at' index to sequences and activities to speed up index.\n"
},
{
"from": "gpt",
"value": "class AddIndexesToLightweightActivitiesAndSequences < ActiveRecord::Migration\n def change\n add_index \"lightweight_activities\", [\"updated_at\"], :name => \"... | ruby | chosen |
[
{
"from": "human",
"value": "Add rails secret token initializer\n"
},
{
"from": "gpt",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will become i... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT to the gemspec licenses\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rbnacl/version'\n\nGem::Specification.new do |gem|\n gem.name... | ruby | chosen |
[
{
"from": "system",
"value": "Use the CancelsCourseMembership service when destroying a course membership\n"
},
{
"from": "human",
"value": "class CourseMembershipsController < ApplicationController\n\n before_filter :ensure_staff?\n\n def create\n @course_membership = current_course.course... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify development dependencies on gemfile.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"mtrack/version\"\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make it work with any version of Rails >= 3.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"plupload/rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"plupload-rails\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Allow asset author to receive permissions methods\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Landable\n module Api\n describe AssetsController, json: true do\n routes { Landable::Engine.routes }\n\n describe '#update' do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for cdn:containers:add command set.\n"
},
{
"from": "gpt",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')\n\ndescribe \"cdn:containers:add command\" do\n\n def cli\n @cli ||= HP::Cloud::CLI.new\n end\n\n before(:a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nil exception when no value present for year\n"
},
{
"from": "human",
"value": "require 'csv'\n\nmodule Api\n module V1\n module Data\n class HistoricalEmissionsCsvContent\n def initialize(filter)\n @grouped_query = filter.call\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary check on `params`\n\nIn Rails v4.2.0 (the oldest version of Rails that Doorkeeper supports),\n`params` is an instance of `ActionController::Parameters`, which\nresponds to `#permit`.\n"
},
{
"from": "human",
"value": "module Doorkeeper\n class Ap... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop dependency version to 0.49.1\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"onkcop/version\"\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove comment for pre-Rails 3.2 code\n\nCorresponding code was removed in 689c76fec7df3b309e9612a5231bcb97edaa23c7.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule ActiveRecordShards\n module AssociationCollectionConnectionSelection\n d... | ruby | chosen |
[
{
"from": "system",
"value": "TEST: Add check that user can have multiple auth tokens\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UserTest < ActiveSupport::TestCase\n setup do\n # Make it Andrew Cain\n @user = User.first\n end\n\n test 'user authentication post' do... | ruby | chosen |
[
{
"from": "human",
"value": "Add Redfish server default collection\n\nPartially fixes https://bugzilla.redhat.com/show_bug.cgi?id=1574808\n"
},
{
"from": "gpt",
"value": "class ManagerRefresh::InventoryCollectionDefault::PhysicalInfraManager < ManagerRefresh::InventoryCollectionDefault\n class ... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to set all current Artefacts to have ODI role\n"
},
{
"from": "gpt",
"value": "class AddOdiTagToExistingContent < Mongoid::Migration\n def self.up\n Artefact.all.each { |a| a.update_attributes!(:roles => ['odi']) rescue nil }\n end\n\n def self.do... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude line length checks from mdl\n\nSince some of the docs are generated from ruby documentation, and we are\nnot enforcing a minimum line length for ruby files, I think it's better\nto disable this since it's likely to get in the middle.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sorting of SKUs when editing promotion.\n"
},
{
"from": "human",
"value": "module IslayShop\n module Admin\n class PromotionsController < IslayShop::Admin::ApplicationController\n resourceful :promotion\n header 'Orders - Promotions'\n nav_sco... | ruby | chosen |
[
{
"from": "human",
"value": "Add column to show current product amount in admin list.\n"
},
{
"from": "gpt",
"value": "Deface::Override.new(:virtual_path => \"spree/admin/products/index\",\n :name => \"exchange_colgroup_definition\",\n :replace => \"colgro... | ruby | chosen |
[
{
"from": "system",
"value": "Add optipng, useful for some apps\n\nSpecifically, for cz.jirkovsky.lukas.chmupocasi\n"
},
{
"from": "human",
"value": "\nuser = node[:settings][:user]\n\nexecute \"apt-get-update\" do\n command \"apt-get update\"\nend\n\n%w{ant ant-contrib autoconf autopoint bison... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to python-pgmagick on buildserver too\n"
},
{
"from": "human",
"value": "\nuser = node[:settings][:user]\n\nexecute \"apt-get-update\" do\n command \"apt-get update\"\nend\n\n%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libsaxonb-java lib... | ruby | chosen |
[
{
"from": "human",
"value": "Remove non existing policy relations\n\nThis data migration removes three `EditionPolicy` records which relate\nto policies that are not present in the publishing API.\n"
},
{
"from": "gpt",
"value": "#These records are `Policy` associations for Detailed Guides where... | ruby | chosen |
[
{
"from": "human",
"value": "Define partybus migration for policyfile schema and data\n"
},
{
"from": "gpt",
"value": "define_upgrade do\n if Partybus.config.bootstrap_server\n must_be_data_master\n\n # We require the schema to at least contain the tag\n # \"policyfile-api-tables\"; Th... | ruby | chosen |
[
{
"from": "system",
"value": "Add rubocop as development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'uchiwa/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update InstallGenerator to be compatible with modern Spree"
},
{
"from": "human",
"value": "module SpreeAutosuggest\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n def add_javascripts\n append_file \"app/assets/javascripts/... | ruby | chosen |
[
{
"from": "system",
"value": "Put repetetive test stuff into a class that we can inherit\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire 'watir-webdriver'\n\n# FIXME: questions for Louise:\n#\n# * resolve exit status oddness if assert fails before browser is quit (something to do... | ruby | chosen |
[
{
"from": "human",
"value": "Allow creating facility features for transam_assets. [TTPLAT-10]\n"
},
{
"from": "gpt",
"value": "class AssetsFacilityFeatureAllowNullAssetIDs < ActiveRecord::Migration[5.2]\n def change\n change_column_null :assets_facility_features, :asset_id, true\n add_ind... | ruby | chosen |
[
{
"from": "system",
"value": "Build gem only for ruby and rbx\n"
},
{
"from": "human",
"value": "SUPPORTED_RUBIES = %w[ree 1.9.2 jruby rbx]\n\nGEMSPEC = Bundler::GemHelper.new(Dir.pwd).gemspec\n\ndef with_rubies(command)\n SUPPORTED_RUBIES.each do |ruby|\n with_ruby(ruby, command)\n end\nen... | ruby | chosen |
[
{
"from": "human",
"value": "Add Windows feature installation of PowerShell ISE, SNMP, .NET 3.5.1, and MSMQ to the Windows recipe in ondemand_base cookbook\n"
},
{
"from": "gpt",
"value": "# Webtrends Windows system setup\n\n#Install SNMP feature\nwindows_feature \"SNMP-Service\"\n action :inst... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"loud\" style Comment message\n\nUpdate linting message for `style: loud` Comments to match the \"loud\"\nsyntax.\n\nResolves #865\n"
},
{
"from": "human",
"value": "module SCSSLint\n # Checks for uses of renderable comments (/* ... */)\n class Linter::Commen... | ruby | chosen |
[
{
"from": "system",
"value": "Add setting for number of Net Acuity connections\n"
},
{
"from": "human",
"value": "name \"wt_logpreproc\"\nmaintainer \"Webtrends\"\nmaintainer_email \"Jeremy.Chartrand@WebTrends.com\"\nlicense \"All rights reserved\"\ndescription \"... | ruby | chosen |
[
{
"from": "system",
"value": "Clean CardTemplates table before seeding\n"
},
{
"from": "human",
"value": "template_list = [\n {\n greeting: \"Sorry you feel that way\",\n image_file: \"sorry_template_0.1.svg\"\n },\n {\n greeting: \"There's no reason for you to be this upset\",\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.