conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use https in homepage URL"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift File.join(__dir__, \"lib\")\n\nrequire \"dyno_metadata\"\n\nGem::Specification.new do |s|\n s.name = \"dyno_metadata\"\n s.version = DynoMetad... | ruby | chosen |
[
{
"from": "system",
"value": "Fix an invalid join that prevents specs from running on PostgreSQL\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n belongs_to :employer\n\n belongs_to :manages_company, :class_name => \"Company\"\n counter_culture :manages_company, :column_na... | ruby | chosen |
[
{
"from": "system",
"value": "Use ssh backend for serverspec\n\nUsing docker backend, spec fails at random, and very slow.\nFurthermore, `docker exec` is not available on Circle CI.\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\nset :backend, :docker\nset :docker_image, ENV['DOCKER_I... | ruby | chosen |
[
{
"from": "system",
"value": "Improve before and after methods (fewer errors with repo state)\n"
},
{
"from": "human",
"value": "$:<<File.join(File.dirname(__FILE__), '/../lib')\n\nrequire 'safety_pin'\n\nRSpec.configure do |config|\n config.before(:all) do\n SafetyPin::JCR.dev_login\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Create must synonym for should\n\nThe rspec method `should` does conflict with the `should` method of a\npuppet property. Add a must synonym that can be used to avoid this\nconflict.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'puppetlabs_spec_hel... | ruby | chosen |
[
{
"from": "system",
"value": "Add doc to VERBOSE flag\n"
},
{
"from": "human",
"value": "require 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nBundler.require(:default, :development)\n\nrequire './configuration'\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Add api group to SimpleCov\n"
},
{
"from": "human",
"value": "require 'linkedin2'\n\nrequire 'rspec'\nrequire 'vcr'\nrequire 'pry'\nrequire 'byebug'\n\nrequire 'simplecov'\nSimpleCov.start do\n add_group \"API\", \"lib/evertrue/api\"\nend\n\nVCR.configure do |c|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use global model cleanup code from dm-core. All green now!"
},
{
"from": "human",
"value": "require 'dm-transactions'\n\nrequire 'dm-core/spec/lib/counter_adapter'\nrequire 'dm-core/spec/lib/pending_helpers'\nrequire 'dm-core/spec/lib/adapter_helpers'\n\nrequire 'dm... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require path for Chef::Exceptions\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path('../../lib', __FILE__)\nrequire 'chef/knife/cloud/exceptions'\nrequire 'json'\n\nclass App\n attr_accessor :config\n def initialize\n @config = {}\n end\nend\n... | ruby | chosen |
[
{
"from": "system",
"value": "Facilitate running specs without Rails\n\nBy implementing the bare bones of autoload and loading a few libraries,\nwe can avoid having to require rails_helper - and thus the whole of\nRails - which takes a significant time.\n"
},
{
"from": "human",
"value": "require... | ruby | chosen |
[
{
"from": "system",
"value": "Reposition ChefSpec::Coverage as per ChefSpec docs\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\n\nrequire 'chef/application'\n\nRSpec.configure do |config|\n # Default platform used\n config.platform = '... | ruby | chosen |
[
{
"from": "system",
"value": "Allow VCR to post to codeclimate\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] = 'test'\nENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')\n\nif ENV['CODECLIMATE_REPO_TOKEN']\n require \"codeclimate-test-reporter\"\n CodeClimate::TestReporter.star... | ruby | chosen |
[
{
"from": "system",
"value": "Use Executor and ThreadPool to look up oids by device. Request timeouts will no longer kill main thread."
},
{
"from": "human",
"value": "require 'config/initialize.rb'\n# TODO move into discoverer class\nconfig = gov.nrel.bacnet.consumer.BACnet.parseOptions(ARGV)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for nav bar link highlighting\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nRSpec.describe \"nav\", :js => true, :type => :feature do\n include Capybara::Angular::DSL\n\n before do\n visit \"/\"\n end\n \n it \"contains links to top-... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Event import from Lastfm"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Event do\n describe '.create_from_lastfm' do\n let(:data) {\n {\n lastfm_uuid: \"3705233\",\n title: \"GRAPE FES... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (8) - alternating case\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/56efc695740d30f963000557/\n# --- iteration 1 ---\nclass String\n def to_alternating_case\n self.swapcase\n end\nend\n\n# --- iteration 2 ---\nclass String\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler requirement from ~> 1.8 to ~> 2.0\n\nUpdates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.\n- [Release notes](https://github.com/bundler/bundler/releases)\n- [Changelog](https://github.com/bundler/bundler/blob/mas... | ruby | chosen |
[
{
"from": "system",
"value": "Use a different mirror in testing since GH Actions is blocked\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "apt_update\n\nnode.default['php']['install_method'] = 'source'\nnode.default['php']['pear'... | ruby | chosen |
[
{
"from": "system",
"value": "Create and use a dynamically-named filter path for the theme, so we can ensure multiple themes don't overwrite each other.\n"
},
{
"from": "human",
"value": "class ActionController::Base\n before_filter :set_view_paths\n\n def set_view_paths \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Create a dynamic method to translate enum collections\n\nFor a field named \"status\" we now have a \"Foo.statuses_i18n\" method,\nwhich is similar to the existing \"foo_instance.status_i18n\".\n\nRefactored the code to keep everything understandable with the new\nchanges. It n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix getting Cats::VERSION from the gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cats/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Use struct accessor instead of instance variable set/get\n"
},
{
"from": "human",
"value": "module MoneyAccessor\n def self.included(base)\n base.extend(ClassMethods)\n end\n\n module ClassMethods\n def money_accessor(*columns)\n Array(columns).flatten... | ruby | chosen |
[
{
"from": "system",
"value": "Update required version of httpclient to ensure :default_header works\n\nCloses https://github.com/oscardelben/firebase-ruby/issues/75"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"firebase\"\n s.version = \"0.2.6\"\n\n s.require_pat... | ruby | chosen |
[
{
"from": "system",
"value": "Stop test suite when ^C\n"
},
{
"from": "human",
"value": "module Protest\n class Runner\n # Set up the test runner. Takes in a report that will be passed to test\n # cases for reporting.\n def initialize(report)\n @report = report\n end\n\n # R... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused `connection` from Repository\n"
},
{
"from": "human",
"value": "module ROM\n # Repository exposes native database connection and schema when it's\n # supported by the adapter\n #\n # @api public\n class Repository\n include Concord::Public.new(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bottomless hash add module\n"
},
{
"from": "human",
"value": "class BottomlessHash < Hash\n def initialize\n super &-> h, k { h[k] = self.class.new }\n end\n\n def self.from_hash(hash)\n new.merge(hash)\n end\nend\n\nclass Hash\n def bottomless\n B... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out network id and username for now\n"
},
{
"from": "human",
"value": "class IdsPlease\n module Grabbers\n class Vimeo < IdsPlease::Grabbers::Base\n\n def grab_link\n @network_id = find_network_id\n @avatar = find_avatar\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Detach was removed a few commits ago\n"
},
{
"from": "human",
"value": "class String\n\n def extract_settings\n split(\",\").map { |x| x.strip }\n end\n\n def remove_prefix\n split(\"/\")[1..-1].join(\"/\")\n end\n\n def extract_class\n remove_prefix.c... | ruby | chosen |
[
{
"from": "human",
"value": "Add ability to change user / group permissions in release directory\n"
},
{
"from": "gpt",
"value": "namespace :load do\n task :defaults do\n set :owned_by_user, 'app'\n set :owned_by_group, 'deploy'\n end\nend\n\nnamespace :deploy do\n task :set_app_ownersh... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sleep, restructure a bit\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.setup\n\nrequire 'vertx'\nrequire 'eventstore'\nrequire 'json'\n\nconfig = Vertx.config\np stream = config['stream']\n\neventstore = Eventstore.new(\"localhost\", 1113)\nev... | ruby | chosen |
[
{
"from": "system",
"value": "Include CHANGELOG.md in gem files\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"cogy/version\"\n\nGem::Specification.new do |s|\n s.name = \"cogy\"\n s.version = Cogy::VERSION\n s.authors = [... | ruby | chosen |
[
{
"from": "system",
"value": "Update mysql-connector source url and md5sum\n\nThe previous version (6.1.0) of mysql-connector is no longer available\nat cogentco.com. Update this to the latest version, 6.1.3.\n"
},
{
"from": "human",
"value": "#\n# Copyright 2013, Craig Tracey <craigtracey@gmail... | ruby | chosen |
[
{
"from": "system",
"value": "Set activerecord to ~> 3.2.0 version\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"immortal\"\n s.version = '1.0.5'\n s.authors = [\"Jordi ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.0.2.5 to 0.0.2.6\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'http-commands'\n s.version = '0.0.2.5'\n s.summary = 'Convenience abstractions for common HTTP operations, such as post and get'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Create admin user when seeding the database\n"
},
{
"from": "human",
"value": "unless Role.count > 0\n Role.create!(:name => Role::ADMIN, :kind => Role::KIND_ADMIN)\n Role.create!(:name => Role::MEMBER, :kind => Role::KIND_MEMBER)\nend\n"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Add fake data in seed file.\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).\n... | ruby | chosen |
[
{
"from": "human",
"value": "Make a script to test websocket connections\n"
},
{
"from": "gpt",
"value": "require 'faye/websocket'\nrequire 'eventmachine'\n\nEM.run do\n ws = Faye::WebSocket::Client.new('ws://127.0.0.1:6601/')\n\n ws.on :open do |_|\n p [:open]\n Thread.new do\n loo... | ruby | chosen |
[
{
"from": "system",
"value": "Use git config --get for obtaining the single config value\n"
},
{
"from": "human",
"value": "GitHub.register :open do \n if remote = `git config -l`.split(\"\\n\").detect { |line| line =~ /remote.origin.url/ }\n exec \"open http://github.com/#{remote.split(':')... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify engine generator model spec template.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ::Refinery::<%= class_name %> do\n\n def reset_<%= singular_name %>(options = {})\n @valid_attributes = {\n :id => 1<% if (title = attributes... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spelling error in migrate script (reload_column_information)\n\nSigned-off-by: Tor Arne Vestbø <e15670bde49f42788b511fae93b8512474990c44@gmail.com>\n"
},
{
"from": "human",
"value": "class RenameParticipationsToCommittersAndMakeItPolymorphic < ActiveRecord::Migr... | ruby | chosen |
[
{
"from": "system",
"value": "Add html compressor as shorthand bundle processor\n"
},
{
"from": "human",
"value": "require \"emcee/html_processor\"\nrequire \"emcee/html_compressor\"\n\nmodule Emcee\n class Railtie < Rails::Railtie\n initializer :add_html_processor do |app|\n app.assets... | ruby | chosen |
[
{
"from": "system",
"value": "Use Hestia::SignedCookieJarExtension::ActionPack4 when actionpack version is >= 4\n"
},
{
"from": "human",
"value": "require \"hestia\"\n\nmodule Hestia\n class Railtie < ::Rails::Railtie\n # Hooks into ActionDispatch::Session::SignedCookieJar to allow rotating ... | ruby | chosen |
[
{
"from": "system",
"value": "Split out condition_interval and action_interval to prevent early signal triggers from causing action_block to be called more than necessary\n"
},
{
"from": "human",
"value": "module LIFX\n module Utilities\n def try_until(condition_proc, timeout_exception: Time... | ruby | chosen |
[
{
"from": "system",
"value": "Add recording to the DSL"
},
{
"from": "human",
"value": "##\n# DO NOT USE THIS API!\n# This file is temporary, to help make testing Punchblock easier.\n# THIS IS IMPERMANENT AND WILL DISAPPEAR\nmodule Punchblock\n class DSL\n def initialize(protocol, call, queu... | ruby | chosen |
[
{
"from": "system",
"value": "Reset Railtie back to master code, approach does not seem to be working\n"
},
{
"from": "human",
"value": "class Raygun::Railtie < Rails::Railtie\n initializer \"raygun.configure_rails_initialization\" do |app|\n if Raygun.configured?\n # Thanks Airbrake: S... | ruby | chosen |
[
{
"from": "system",
"value": "Use backslash only for string concatenation\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Pwnbox\n # For crypto problem\n module Crypto\n # http://rosettacode.org/wiki/Modular_inverse#Ruby\n def self.extended_gcd(a, b)\n last_remainder, r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to elements order in home\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n\n def index\n @latest_exercises = Exercise.last(5).reverse\n @hottest_exercises = Exercise.order(:submissions_count).limit(5)\n if current_user?... | ruby | chosen |
[
{
"from": "system",
"value": "Fix how to set `changed_attributes` in Rails 4.2.x\n"
},
{
"from": "human",
"value": "require 'story_operations/member_notification'\nrequire 'story_operations/state_change_notification'\nrequire 'story_operations/legacy_fixes'\n\nmodule StoryOperations\n\n class C... | ruby | chosen |
[
{
"from": "system",
"value": "Add serialization of pictures in user serializer\n"
},
{
"from": "human",
"value": "class UserSerializer < ActiveModel::Serializer\n attributes :id, :name, :email, :gender, :birthday, :picture\n\n has_many :subjects\nend\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Delete pid when application quits.\n"
},
{
"from": "human",
"value": "require 'fileutils'\nrequire 'isna'\n\nclass StreetLights\n\n def initialize(app)\n @app = app\n @street_lights_dir = 'street_lights/'\n unless File.exists?(@street_lights_dir)\n Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Print password after user creation, since its plaintext is not stored anywhere.\n"
},
{
"from": "human",
"value": "namespace :users do\n task :create, :name do |t, args|\n require \"bundler\"\n Bundler.require\n require_relative \"../initializer\"\n\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Include email in UserFieldType picker, so content creators can discern between users with the same fullname\n"
},
{
"from": "human",
"value": "module Plugins\n module Core\n class UserCell < Plugins::Core::Cell\n def dropdown\n render\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use rake tasks from bundler\n"
},
{
"from": "human",
"value": "$:.unshift(File.join(File.dirname(__FILE__), 'lib'))\n\nrequire 'rubygems'\nrequire 'rake/gempackagetask'\nrequire 'rake/rdoctask'\nrequire 'risky/version'\nrequire 'find'\n \n# Don't include resource fo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix two examples, spec still does not test if update method is working, break update method to test spec.\n"
},
{
"from": "human",
"value": "class IdeasController < ApplicationController\n skip_before_filter :authenticate_user!, only: :index\n \n def index\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong dojo count in Stats controller\n"
},
{
"from": "human",
"value": "class StatsController < ApplicationController\n def show\n @url = request.url\n @dojo_count = Dojo.count\n @regions_and_dojos = Dojo.group_by_region_on_a... | ruby | chosen |
[
{
"from": "system",
"value": "Order users by pull_request_count and nickname"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_action :ensure_logged_in, only: [:projects]\n\n respond_to :html, :json\n respond_to :js, only: :index\n\n def index\n @user... | ruby | chosen |
[
{
"from": "system",
"value": "Create the surcharge as soon as the payment gets created."
},
{
"from": "human",
"value": "Payment.class_eval do\n \n has_one :adjustment, :as => :source, :dependent => :destroy\n \n after_save :ensure_correct_adjustment, :update_order\n \n before_save :delete... | ruby | chosen |
[
{
"from": "system",
"value": "Add pdf ending to mailer attachment\n"
},
{
"from": "human",
"value": "class NotificationsMailer < ActionMailer::Base\n default from: ENV[\"EMAIL_FROM\"]\n default to: ENV[\"EMAIL_FROM\"] #Doesn't matter because Sendgrid API...\n\n def email_announcement(announce... | ruby | chosen |
[
{
"from": "system",
"value": "Remove orphan price check from price model\n\nThis is a quick fix. This check is breaking product deletion in some situations and orphan Prices are not really a problem in the DB\n"
},
{
"from": "human",
"value": "module Spree\n Price.class_eval do\n after_save ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix servie name to match the new init.d script name\n"
},
{
"from": "human",
"value": "define :puma_web_app do\n deploy = params[:deploy]\n application = params[:application]\n\n\n nginx_web_app deploy[:application] do\n docroot deploy[:absolute_document_root]... | ruby | chosen |
[
{
"from": "system",
"value": "Replace any number of slashes following https: by two\n"
},
{
"from": "human",
"value": "require 'uri'\n\nmodule Micky\n HTTP_URI_REGEX = %r{\\Ahttps?://?}\n SINGLE_SLASH_HTTP_URI_REGEX = %r{\\Ahttps?:/[^/]}\n\n def self.URI(uri)\n uri = uri.to_s.strip\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation to replace method\n"
},
{
"from": "human",
"value": "module Templater\n def self.replace(str, values)\n if values.is_a? Hash\n str.gsub(/{{(.*?)}}/) { \n if !values[$1].nil?\n values[$1]\n elsif !valu... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for players move.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe TTT::Board::Cell do\n let(:cell) { TTT::Board::Cell.new(position: 1) }\n\n class TestPlayer\n def move\n 'X'\n end\n end\n\n it 'should not be nil' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix session user id param.\n"
},
{
"from": "human",
"value": "module AuthsHelper\n def current_user\n if session[:user_id]\n @current_user ||= User.find_by_id(session[:user_id])\n end\n end\n\n def logged_in?\n !current_user.nil?\n end\nend\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where rails tag helper tried to make iFrame self-closing\n"
},
{
"from": "human",
"value": "module ItemsHelper\n def itemable_items_path(itemable)\n if itemable.class.name =~ /Channel$/\n channel_items_path(channel_id: itemable.id)\n else\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad reference on notifications\n"
},
{
"from": "human",
"value": "module ExercismWeb\n module Presenters\n class Dashboard\n attr_reader :user\n def initialize(user)\n @user = user\n end\n\n def current_exercises\n user.exer... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependencies of Org Ruby\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/org-converge/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Waldemar Quevedo\"]\n gem.email = [\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove needless require ostruct statement\n\nostruct is no longer required since v4.0.0\nref. 55f1eed4fa2e01a95ca35be0231ad5181939deb6\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nrequire 'aasm/version'\nrequire 'aasm/errors'\nrequire 'aasm/configuration'... | ruby | chosen |
[
{
"from": "system",
"value": "Create common form render helper\n"
},
{
"from": "human",
"value": "module UsersHelper\nend\n"
},
{
"from": "gpt",
"value": "module UsersHelper\n def render_common_form(submit_value = 'submit')\n form_for :user do |f|\n f.submit(submit_value)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix biz crashing on POST appointment_attempts/:id/appointments\n"
},
{
"from": "human",
"value": "class BusinessDays\n # This can't happen in an initializer because:\n # https://github.com/zendesk/biz/issues/18\n Biz.configure do |config|\n config.hours = {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add attributes and comment to learnSession model\n"
},
{
"from": "human",
"value": "class LearnSession\n include Mongoid::Document\nend\n"
},
{
"from": "gpt",
"value": "class LearnSession\n include Mongoid::Document\n include Mongoid::Timestamps::Crea... | ruby | chosen |
[
{
"from": "system",
"value": "Add first user to seed\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).\n#\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Add data for sexual orientation.\n"
},
{
"from": "human",
"value": "answer = [\"a\", \"b\", \"c\", \"d\"]\n\nnum = 1\n\n10.times do\n password = Faker::Internet.password\n User.create(name: Faker::Name.name,\n age: rand(1..100),\n gender:... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out breaking config for now"
},
{
"from": "human",
"value": "module Dragonfly\n module Config\n \n # RMagickImages is a saved configuration for Dragonfly apps, which does the following:\n # - registers an rmagick analyser\n # - registers an rmag... | ruby | chosen |
[
{
"from": "system",
"value": "Fix associations for Rails 4\n"
},
{
"from": "human",
"value": "module DuckPuncher\n module Ducks\n module ActiveRecord\n def self.included(base)\n base.extend(ClassMethods)\n end\n\n def associations?\n associations.present?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop offense and uncomment most of registrationscontroller\n"
},
{
"from": "human",
"value": "class Users::RegistrationsController < Devise::RegistrationsController\n # before_action :configure_sign_up_params, only: [:create]\n # before_action :configure_ac... | ruby | chosen |
[
{
"from": "system",
"value": "Fix TODO in pretty print visitor (refactoring, LoD)\n"
},
{
"from": "human",
"value": "module GitCompound\n module Worker\n # Worker that prints dependency tree\n #\n class PrettyPrint < Worker\n def visit_component(component)\n print_component... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we right it correct\n"
},
{
"from": "human",
"value": "require 'colorize'\n\nrequire 'icapps/translations/http'\nrequire 'icapps/translations/import/base'\n\nmodule Icapps\n module Translations\n module Import\n class React < Base\n class <... | ruby | chosen |
[
{
"from": "human",
"value": "Add gemspec file to repository\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 do |s|\n s.name = %... | ruby | chosen |
[
{
"from": "system",
"value": "Add ImageMagick requirement to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'borealis/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a small example script to send get requests.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\n# Simple get request example.\n\n$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')\nrequire 'rubygems'\nrequire 'meac_control'\nrequire 'httpclien... | ruby | chosen |
[
{
"from": "system",
"value": "Add default respond_to formats to ApplicationController.\n"
},
{
"from": "human",
"value": "# Filters added to this controller apply to all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n\nclass Application... | ruby | chosen |
[
{
"from": "system",
"value": "Rename search service to rummager\n\nAs this is clearer.\n"
},
{
"from": "human",
"value": "require 'gds_api/publishing_api_v2'\nrequire 'gds_api/rummager'\n\nmodule Services\n def self.publishing_api\n @publishing_api ||= GdsApi::PublishingApiV2.new(\n Ple... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging to show the yum repo definition\n\nWe're getting some test failures due to not being able to access\nthe puppetlabs development yum repo (s3?). This commit\nsimply adds logging to show the repo configuration, which should\nhelp us to troubleshoot this kind of error... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Admin before action checking Admin user status\n\nIf a user is not an admin, redirect them back to the home page.\nOptionally, we can flash a message stating that they do not have the\nproper authorization to access the interface, but that may be revealing\ntoo much informa... | ruby | chosen |
[
{
"from": "system",
"value": "Change input parsing to one character at a time\n\nAnother reason for the horrendous memory consumption was the fact that I\nread the complete file before starting to process it. For now, I solved\nthis by reading one character at at time.\n\nThis again, the absolute trade-off ... | ruby | chosen |
[
{
"from": "system",
"value": "ENHANCE: Add is_graded to task definition serializer\n"
},
{
"from": "human",
"value": "class TaskDefinitionSerializer < ActiveModel::Serializer\n attributes :id, :abbreviation, :name, :description, \n :weight, :target_grade, :target_date, \n :upload_requirem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in CartItem test name\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass CartItemTest < ActiveSupport::TestCase\n test \"CartItem Weight should match\" do\n assert_equal 200, cart_items(:george_one).weight\n end\n\n test \"CartItem cost... | ruby | chosen |
[
{
"from": "system",
"value": "C: Put empty method definitions on a single line.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nrequire 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\nrequire 'chef/application'\n\n::LOG_LE... | ruby | chosen |
[
{
"from": "system",
"value": "Fix standards by student feature spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Standards by Student Progress Report', js: true do\n before(:each) { vcr_ignores_localhost }\n include_context 'Topic Progress Report'\n\n let(:report_page... | ruby | chosen |
[
{
"from": "system",
"value": "Fix development fixture for gitlab_shell\n"
},
{
"from": "human",
"value": "root = Gitlab.config.gitolite.repos_path\n\nprojects = [\n { path: 'underscore.git', git: 'https://github.com/documentcloud/underscore.git' },\n { path: 'diaspora.git', ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability for user to logout.\n\nAdded get '/logout' route to the users.rb controller.\n\nA request to that route will simply clear the session and redirect to\nthe root url.\n"
},
{
"from": "human",
"value": "get '/signup' do\n erb :'users/signup'\nend\n\nget '/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the double yum dep\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'jenkins'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Ap... | ruby | chosen |
[
{
"from": "system",
"value": "Correct end at file ending\n"
},
{
"from": "human",
"value": "class Poll\n class Shift < ActiveRecord::Base\n belongs_to :booth\n belongs_to :officer\n\n validates :booth_id, presence: true\n validates :officer_id, presence: true\n validates :date, p... | ruby | chosen |
[
{
"from": "system",
"value": "Change net-ldap dependency to original gem"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'cmu'\n s.version = '0.0.3'\n s.author = 'Tom Shen'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add description of Article model to documentation\n"
},
{
"from": "human",
"value": "# News Articles\n#\n# == Attributes\n#\n# name:: headline\n# id:: unique numerical id (starting at 1)\n# rss_log_id:: unique numerical id\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Add email correct email address\n"
},
{
"from": "human",
"value": "class Contact < MailForm::Base\n attribute :school_information\n attribute :name_teacher\n\tattribute :email, validate => /\\A([\\w\\.%\\+\\-]+)@([\\w\\-]+\\.)+([\\w]{2,})\\z/i\n attribute :phone\... | ruby | chosen |
[
{
"from": "system",
"value": "Introduce a seed for a test `Vdc::Resource`\n\nCreates a test `Vdc::Resource` when `rake db:seeds` is run.\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then... | ruby | chosen |
[
{
"from": "system",
"value": "Update seed file to use endpoint link in location table item\n"
},
{
"from": "human",
"value": "require 'csv' \n\nSchool.delete_all \n\ncsv_text = File.read('db/cfe-money-new-data-feb15.csv')\ncsv = CSV.parse(csv_text, :headers => true)\ncsv.each do |row|\n Schoo... | ruby | chosen |
[
{
"from": "system",
"value": "Use github URL instead of hydra API on the DSA server\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongsid... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.