conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use forked version of ApiAiRuby client gem\n"
},
{
"from": "human",
"value": "require 'dry-initializer'\nrequire 'dry-types'\nrequire 'api-ai-ruby'\nrequire 'colorize'\nrequire 'awesome_print'\n\n# TODO: http://api.rubyonrails.org/classes/ActiveSupport/Autoload.html... | ruby | chosen |
[
{
"from": "system",
"value": "Use global `@options` instead of parameters\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'gli'\nrequire 'kckstrt/version'\nrequire 'highline/import'\nrequire 'active_support/core_ext/string/inflections'\n\nmodule Kckstrt\n extend GLI::App\n\n pr... | ruby | chosen |
[
{
"from": "system",
"value": "Add runtime dependencies to gem spec file\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'myprecious'\n s.version = '0.0.4'\n s.date = '2017-04-26'\n s.summary = \"Your precious dependencies!\"\n s.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Use unless for more idiomatic condition in Lyricfy::Fetcher\n"
},
{
"from": "human",
"value": "require 'ostruct'\nrequire \"open-uri\"\nrequire \"nokogiri\"\nrequire_relative \"lyricfy/version\"\nrequire_relative \"lyricfy/uri_helper\"\nrequire_relative \"lyricfy/so... | ruby | chosen |
[
{
"from": "system",
"value": "Add unit tests to task model.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TasksTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclas... | ruby | chosen |
[
{
"from": "system",
"value": "Add description, summary, and homepage in the 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 'obtuse/version'\n\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Break gem test to test Hudson."
},
{
"from": "human",
"value": "require 'helper'\n\nclass TestDeprecations < Test::Unit::TestCase\n context \"with Gelf object\" do\n setup do\n @verbose, $VERBOSE = $VERBOSE, nil\n @g = Gelf.new('host', 12345)\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify day 8 a bit.\n"
},
{
"from": "human",
"value": "def day8(filename)\n lines = File.readlines(\"data/input8.txt\").map(&:strip)\n puts \"Part 1: #{lines.reduce(0) { |sum, line| sum + escape_overhead(line) }}\"\n puts \"Part 2: #{lines.reduce(0) { |sum, lin... | ruby | chosen |
[
{
"from": "system",
"value": "Change to relax dev deps\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/tree/version'\n\nGem::Specification.new do |spec|\n spec.name = \"tty-tree\"\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add app back into load path\n\nI bet this is an API change in Rails sometime but this is an easy fix.\nMaybe I'll come back to it later.\n"
},
{
"from": "human",
"value": "require 'title/version'\nrequire 'rails/engine'\nrequire 'title/engine'\nrequire 'helpers/titl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused let var in client spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule RubyEventStore\n RSpec.describe Client do\n let(:stream_name) { 'stream_name' }\n\n specify 'raise exception if stream name is incorrect' do\n client ... | ruby | chosen |
[
{
"from": "system",
"value": "Make guard a soft dev-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 'workable/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct slugs and edition types for existing unpublishings\n\nThe few existing unpublishings had lost the information about the\noriginal url, because the title of the last edition has been changed.\n"
},
{
"from": "human",
"value": "class AddDocumentTypeAndSlugToUn... | ruby | chosen |
[
{
"from": "system",
"value": "Use the heap size set in Chef via /etc/default/elasticsearch\n"
},
{
"from": "human",
"value": "# See <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_linux.html>\n\nfilename = node.elasticsearch[:deb_url].split('/').last\n\nremote_file \"#{Ch... | ruby | chosen |
[
{
"from": "system",
"value": "Add Matt Outten to the authors in gemspec\n\nThis commit adds Matt as an author to this gem as he and Tim were the\noriginal coders on the project.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for default site location\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe OmniAuth::Strategies::Madmimi do\n let(:request) { double('Request', :params => {}, :cookies => {}, :env => {}) }\n\n subject do\n args = ['appid', 'secret',... | ruby | chosen |
[
{
"from": "system",
"value": "Fix menu selection when on physical infra topology view\n"
},
{
"from": "human",
"value": "class PhysicalInfraTopologyController < TopologyController\n @layout = \"physical_infra_topology\"\n @service_class = PhysicalInfraTopologyService\n\n menu_section :inf\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Add some examples for the user."
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe User do\nend\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe User do\n subject(:user) { build :user }\n\n describe '#full_name' do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary loop code from ebs test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'LVM Pool' do\n {\n '/dev/xvde' => '/mnt/ebs0'\n }.each do |device, mountpoint|\n describe file(mountpoint) do\n it do\n is_expected.t... | ruby | chosen |
[
{
"from": "system",
"value": "Set error_on_missing_backend_type false in unit tests.\n"
},
{
"from": "human",
"value": "require 'itamae'\n\n# This file was generated by the `rspec --init` command. Conventionally, all\n# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update to use run state over node attributes\n"
},
{
"from": "human",
"value": "pkgs = case node.platform_family\nwhen 'debian'\n %w(cgroup-bin libcgroup1)\nwhen 'rhel'\nelse\n raise \"Unsupported platform family encountered: #{node.platform_family}\"\nend\n\npkgs... | ruby | chosen |
[
{
"from": "system",
"value": "Change ports, and role names\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: ganeti_webmgr\n# Recipe:: default\n#\n# Copyright 2013, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\n\napplication \"ganeti_webmgr\" do\n path \"/home/vagr... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce handler location log level to debug\n"
},
{
"from": "human",
"value": "#\n# Author:: Seth Chisamore (<schisamo@chef.io>)\n# Cookbook Name:: chef_handler\n# Recipe:: default\n#\n# Copyright 2011-2016, Chef Software, Inc.\n#\n# Licensed under the Apache License... | ruby | chosen |
[
{
"from": "system",
"value": "Use yum-epel default recipe not yum::epel.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: openvpn\n# Recipe:: install\n#\n# Copyright 2014, Xhost Australia\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ... | ruby | chosen |
[
{
"from": "system",
"value": "Set a project name in Browserstack so we can tell what is taking a snapshot.\n"
},
{
"from": "human",
"value": "require 'selenium-webdriver'\n\nclass Browserstack\n def initialize(user, key)\n @user = user\n @key = key\n end\n \n def get_url\n \"http://... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the date parts and set a default empty categories array\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Dimples\n class Post < Page\n POST_FILENAME = /(\\d{4})-(\\d{2})-(\\d{2})-(.+)/\n\n def initialize(site, path)\n sup... | ruby | chosen |
[
{
"from": "system",
"value": "Allow warning/critical condition in LRWP to be both Int/String\n"
},
{
"from": "human",
"value": "#\n# Author:: Jake Vanderdray <jvanderdray@customink.com>\n# Cookbook Name:: nrpe\n# Resource:: check\n#\n# Copyright 2011, CustomInk LLC\n#\n# Licensed under the Apach... | ruby | chosen |
[
{
"from": "system",
"value": "Fix path to CorsixTH app\n"
},
{
"from": "human",
"value": "cask :v1 => 'corsixth' do\n version '0.40'\n sha256 'd4f3a289954fc2eb400615114f0a8bd729e38b310beedf20dbe97a0e1cecb127'\n\n url \"https://github.com/CorsixTH/CorsixTH/releases/download/v#{version}/CorsixT... | ruby | chosen |
[
{
"from": "system",
"value": "Add Rails' built-in CSRF protection"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule LetterOpenerWeb\n class ApplicationController < ActionController::Base\n end\nend\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: tru... | ruby | chosen |
[
{
"from": "system",
"value": "Hide invisible posts in user categories\n"
},
{
"from": "human",
"value": "class Publications::Users::CategoriesController < ApplicationController\n def show\n @user = User.find(params[:user_id])\n @category = @user.publication_categories.find(params[:id]... | ruby | chosen |
[
{
"from": "system",
"value": "Update facebook dependency to restore compilation on iOS5\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'GPActivityViewController'\n s.version = '1.3.1'\n s.authors = { 'Gleb Pinigin' => 'gpinigin@gmail.com' }\n s.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Extend Note() macro with optional arg for changing the octicon.\n"
},
{
"from": "human",
"value": "module Gollum\n class Macro\n class Note < Gollum::Macro\n def render(notice)\n icon = Octicons::Octicon.new('info', {width: 24, height: 24})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil when verifier is invalid\n"
},
{
"from": "human",
"value": "require \"base64\"\n\nmodule Identity\n # CookieCoder encodes and decodes payload before setting it to cookie\n # Different from FernetCookieCoder, it converts Ruby objects to JSON\n # format ... | ruby | chosen |
[
{
"from": "human",
"value": "Add core transport. create/delete/exists for queues.\n"
},
{
"from": "gpt",
"value": "require 'logger'\n\nmodule Logging\n def logger\n @logger ||= Logging.logger_for(self.class.name)\n end\n\n @loggers = {}\n\n class << self\n def logger_for(classname)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise error when file not found\t"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'yaml'\n\nclass LastHit\n class Cli < Thor\n CONFIG_PATH = '~/last_hit.yml'\n\n include Thor::Actions\n\n class << self\n def load_config(path)\n config ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove tool class name method\n"
},
{
"from": "human",
"value": "require 'scaffolder'\n\nmodule Scaffolder::ToolIndex\n require 'scaffolder/tool'\n\n def normalise(name)\n name.to_s.downcase.to_sym if name\n end\n\n def known_tool?(name)\n tools.keys.inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Use ffaker gem if it exist in bundle\n\nto avoid collision with faker gem.\n\n(ffaker gem, for example, used in spree)\n"
},
{
"from": "human",
"value": "require 'rails_ui_kit/engine'\nrequire 'faker'\n\nmodule RailsUiKit\nend\n"
},
{
"from": "gpt",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Add budget_published? helper method to BudgetHelper\n\nWe need to check if the budget is in drafting phase to avoid showing\nit to the users, unless the current user is an administrator.\n"
},
{
"from": "human",
"value": "module BudgetsHelper\n\n def budget_phases_... | ruby | chosen |
[
{
"from": "system",
"value": "Add direct link to variants by allele registry id\n"
},
{
"from": "human",
"value": "class FrontendRouter\n attr_reader :id_type, :id\n def initialize(id_type, id)\n @id_type = id_type || ''\n @id = id\n end\n\n def url\n (entity, query_field) = query_i... | ruby | chosen |
[
{
"from": "system",
"value": "Use rspec's new _from_any_process output modifiers\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'stringio'\n\n# TODO Check whether rspec's output matcher has become thread-safe.\n# It would be wonderful to do\n#\n# expect { shexec.run(\"echo\"... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded cast to float\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'librato-rack'\n\n# Simulate the environment variables Heroku passes along\n# with each request\n#\nclass QueueWait\n def initialize(app)\n @app = app\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "[Specs] Disable ANSI in fixture classes\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Fixture\n class Error < StandardError\n include CLAide::InformativeError\n end\n\n class Command < CLAide::Command\n self.command = 'bin'\n\n class Spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the license string in the gemspec.\n\n[#150502401](https://www.pivotaltracker.com/story/show/150502401)\n\nSigned-off-by: Luan Santos <509a85c757dc22c0257f4655fb3fb682d42f965b@pivotal.io>\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire File.expand_pa... | ruby | chosen |
[
{
"from": "system",
"value": "Set ivar outside the method\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\n$LOAD_PATH.unshift File.expand_path(\"../lib\", __FILE__)\nrequire \"subdomain_locale/url_for\"\n\nclass UrlForTest < MiniTest::Unit::TestCase\n module UrlFor\n def url_... | ruby | chosen |
[
{
"from": "system",
"value": "Add summary and homepage to gemspec.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"rack-cloudflare... | ruby | chosen |
[
{
"from": "system",
"value": "Increase minimum code coverage percentage\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('..', __FILE__)\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nif RUBY_VERSION >= '1.9'\n require 'simplecov'\n require 'coveralls'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Create GitHub client with no auth token\n"
},
{
"from": "human",
"value": "GITHUB = Github.new(:oauth_token => \"...\")\nGITHUB_WEBHOOK_SECRET = \"...\"\n"
},
{
"from": "gpt",
"value": "GITHUB = Github.new(:oauth_token => nil) # Add a token to access pri... | ruby | chosen |
[
{
"from": "system",
"value": "Use a CDN if the host application has one configured\n"
},
{
"from": "human",
"value": "require \"refile/rails\"\nrequire \"refile/s3\"\n\n# Manually mount Refile before Smithy Engine\nRefile.automount = false\nRails.application.routes.prepend do\n mount Refile.app... | ruby | chosen |
[
{
"from": "system",
"value": "Use user ID to avoid nil errors on to_param\n\nHonestly no idea why this keeps popping up only on Travis. Just doing\nthis to trigger clearer nil errors if object is somehow nil.\n"
},
{
"from": "human",
"value": "class UserDecorator < ApplicationDecorator\n delega... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify method to check an image max size\n\nWe were converting megabytes to bytes with the `megabytes` method and\nthen adding a `bytes_to_megabytes` method to convert it back to bytes,\nwhich is the same as not doing anything at all :).\n"
},
{
"from": "human",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper method for correctly generating with fingerprints in Serializers\n"
},
{
"from": "human",
"value": "module SerializerHelper\n def ids_to_objs(ids)\n return [] if ids.blank?\n\n ids.map { |id| { id: id } }\n end\n\n # Returns an array of the field... | ruby | chosen |
[
{
"from": "system",
"value": "Declare support 4 Rails 4\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"current_user/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Explitly ignore UndefinedTable and StatementInvalid exceptions\"\n"
},
{
"from": "human",
"value": "require \"govuk_app_config\"\nGovukUnicorn.configure(self)\n\nGovukError.configure do |config|\n config.data_sync_excluded_exceptions += [\n \"PG::Undefi... | ruby | chosen |
[
{
"from": "system",
"value": "Swap load order of activesupport and action pack.\\nThis is not technically required but it causes them to load in the actual order they are required.\n"
},
{
"from": "human",
"value": "require 'fileutils'\ninclude FileUtils\n\nrequire 'rubygems'\n%w[rake hoe newgem... | ruby | chosen |
[
{
"from": "system",
"value": "Increment version to 1.0.120, based on SVN r120\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"gtm-oauth2-thekey\"\n s.version = \"1.0.118\"\n s.summary = \"Google OAuth2 Framework modified for TheKey.\"\n s.homepage =... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade rspec to '~> 3.4'\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'sql_tagger'\n s.version = IO.read('VERSION').chomp\n s.authors = ['Toby Hsieh']\n s.homepage = 'https://github.com/SlideShareInc/sql_tagger'\n s.summary = 'St... | ruby | chosen |
[
{
"from": "system",
"value": "Implement POST /containers to create a container with the given 'id' or 'container_name'.\n"
},
{
"from": "human",
"value": "require 'ffi_yajl'\nrequire 'chef_zero/endpoints/rest_list_endpoint'\n\nmodule ChefZero\n module Endpoints\n # /organizations/ORG/contain... | ruby | chosen |
[
{
"from": "human",
"value": "Add the stats API generator\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nmodule UsesThis\n module Api\n # A class that generates all stats API endpoints.\n class StatsGenerator < BaseGenerator\n def generate\n %w[hardware softw... | ruby | chosen |
[
{
"from": "system",
"value": "Allow flatten as argument for Dragonfly encode\n\nDragonfly 1.4.0 does not allow flatten as argument to encode.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire \"dragonfly_svg\"\n\n# Logger\nDragonfly.logger = Rails.logger\n\n# Add model fu... | ruby | chosen |
[
{
"from": "system",
"value": "Make readme link parsing more robust for markdown"
},
{
"from": "human",
"value": "renderer = Redcarpet::Render::HTML.new\n\nextensions = {\n fenced_code_blocks: true,\n no_intra_emphasis: true,\n tables: true,\n lax_spacing: true,\n autolink: true\n}\n\n::Mark... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for account model\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AccountTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\ncla... | ruby | chosen |
[
{
"from": "system",
"value": "Sort keys found for comparison.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass VariablesTest < MiniTest::Test\n\n def test_it_fetches_variables\n with_site(name: FIXTURES_DIR) do |site|\n\n site = Nanoc::Int::SiteLoader.new.new_from_cwd\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add slack webhook admin panel\n"
},
{
"from": "gpt",
"value": "ActiveAdmin.register Webhook do\n\n controller do\n def create\n @webhook = Webhook.new(webhook_params)\n if @webhook.save\n redirect_to admin_webhooks_path\n else\n rende... | ruby | chosen |
[
{
"from": "system",
"value": "Comment: Apply permission checking as validations\n"
},
{
"from": "human",
"value": "# ===GLSAMaker v2\n# Copyright (C) 2009-2011 Alex Legler <a3li@gentoo.org>\n# Copyright (C) 2009 Pierre-Yves Rofes <py@gentoo.org>\n#\n# This program is free software: you can red... | ruby | chosen |
[
{
"from": "system",
"value": "Remove invitations_count on inviteable drop\n\ninvitations_count was not removed when rolling back the inviteable migration"
},
{
"from": "human",
"value": "class DeviseInvitableAddTo<%= table_name.camelize %> < ActiveRecord::Migration\n def up\n change_table :<... | ruby | chosen |
[
{
"from": "system",
"value": "Update jawbone updater to sha 256\n"
},
{
"from": "human",
"value": "class JawboneUpdater < Cask\n url 'http://content.jawbone.com/store/dashboard/Jawbone_Updater-2.2.3.pkg'\n homepage 'http://jawbone.com/'\n version '2.2.3'\n sha1 'f729fc0d59ab84ae5bb8741c7033b... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for floats and such.\n"
},
{
"from": "human",
"value": "def rpn(str)\n a=[]\n ops = {\n '^' => ->(x,y){x**y},\n }\n\n str.split.each do |x|\n if x =~ /\\d+(\\.\\d+)?/\n a.push x.to_f\n else\n l, r = a.pop 2\n a.push ops[x] ? op... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out call to jhead for the moment, since it requires a saved version of the file on disk.\n\n\ngit-svn-id: 6d9b9a8f21f96071dc3ac7ff320f08f2a342ec80@69 daa9635f-4444-0410-9b3d-b8c75a019348\n"
},
{
"from": "human",
"value": "require 'RMagick'\n\nmodule Airbrush... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'wrong constant name' error (Rails 4.1.0beta1)\n"
},
{
"from": "human",
"value": "require 'active_support/inflector'\nrequire 'active_support/core_ext/string'\n\nmodule DecentExposure\n class ConstantResolver\n attr_reader :context, :constant_name\n def i... | ruby | chosen |
[
{
"from": "system",
"value": "Update and tighten reek dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/reek/version'\n\nGem::Specification.new do |s|\n s.name = 'pronto-reek'\n s.version = Pronto::R... | ruby | chosen |
[
{
"from": "system",
"value": "Store the symbols as an array.\n\nA Set can't be implicitly converted into an Array:\n\n```\nirb(main):012:0> formats = [ :rss ]\n=> [:rss]\nirb(main):013:0> formats &= SET.symbols\nTypeError: no implicit conversion of Set into Array\n from (irb):13:in `&'\n from (irb):13... | ruby | chosen |
[
{
"from": "system",
"value": "Sort due calendar items on homepage\n"
},
{
"from": "human",
"value": "class CalendarItemReminderPending < ActiveRecord::Base\n include MyplaceonlineActiveRecordIdentityConcern\n\n belongs_to :calendar_item_reminder\n belongs_to :calendar_item\n belongs_to :cale... | ruby | chosen |
[
{
"from": "human",
"value": "Remove calls to git from gemspec for Windows compatibility\n\nCloses #85\nCloses #170\nCloses #171\n"
},
{
"from": "gpt",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rails_admin/version', __FILE__)\n\nGem::Specification.new do |s|\n s.add_d... | ruby | chosen |
[
{
"from": "system",
"value": "Allow rakefile to run w/o RedCloth.\n\nOnly complain about missing redcloth if we try to run the readme task.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'redcloth'\n\ndirectory \"html\"\n\ndesc \"Display the README file\"\ntask :readme => \"ht... | ruby | chosen |
[
{
"from": "system",
"value": "Change the default session. We should remove this altogether eventually.\n"
},
{
"from": "human",
"value": "module Hdo\n module StortingImporter\n class DataSource\n\n class NotFoundError < StandardError\n end\n\n DEFAULT_SESSION = '2011-2012'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set example description for chat routes.\n"
},
{
"from": "human",
"value": "module Lita\n module RSpec\n module Matchers\n # Used to complete a chat routing test chain.\n class RouteMatcher\n def initialize(context, message_body, invert: false)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add link to answer in NiceAnswer's progress_description\n"
},
{
"from": "human",
"value": "require_relative '../badge'\n\nclass NiceAnswer < Badge\n series :nice_answer\n\n def progress_title\n \"You're getting close to...\"\n end\n\n def progress_description... | ruby | chosen |
[
{
"from": "system",
"value": "Use Most Recent Watchman Version\n"
},
{
"from": "human",
"value": "# Must correspond to a valid release here https://github.com/facebook/watchman/releases\ndefault['watchman']['version'] = 'v3.0.0'\n"
},
{
"from": "gpt",
"value": "# Must correspond to a... | ruby | chosen |
[
{
"from": "system",
"value": "Add Install forever, create log file folder and remove start app part\n"
},
{
"from": "human",
"value": "remote_file '/tmp/nodejs.deb' do\n source \"http://ppa.launchpad.net/chris-lea/node.js/ubuntu/pool/main/n/nodejs/nodejs_0.10.37-1chl1~trusty1_amd64.deb\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test so it fails when options not correctly passed to super\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"mobility/plugins/fallthrough_accessors\"\n\ndescribe Mobility::Plugins::FallthroughAccessors do\n include Helpers::Plugins\n\n con... | ruby | chosen |
[
{
"from": "system",
"value": "Add model test for Product properties\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ProductTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'test_helpe... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment about purpose of test\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire(\"test_helper\")\n\nclass RssLogTest < UnitTestCase\n def test_url_for_normalized_controllers\n normalized_rss_log_types.each do |type|\n rss_log =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in BrowserStack Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'browserstacklocal' do\n version :lat... | ruby | chosen |
[
{
"from": "system",
"value": "Update Transporter Desktop to version 4.1.5_20060\n\nThis commit updates the version and sha256 stanzas.\n"
},
{
"from": "human",
"value": "cask :v1 => 'transporter-desktop' do\n version '4.0.8_19845'\n sha256 '9d8d0606286a4baa1a3fc4df4bad64e879cb434766f6d4466c0d3... | ruby | chosen |
[
{
"from": "system",
"value": "Fix platforms in cocoapods spec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"GNContextManager\"\n s.version = \"0.3.11\"\n s.summary = \"CoreData helper\"\n s.description = <<-DESC\n Manager for helpin... | ruby | chosen |
[
{
"from": "system",
"value": "Send test now reflects additional parameters to incremental send.\n"
},
{
"from": "human",
"value": "require 'stringio'\nrequire 'common/send_incrementally'\nmodule TestIncrementalSend\n def test_send\n file = \"data/noyes/noyes.flac\"\n to_server = StringIO.... | ruby | chosen |
[
{
"from": "system",
"value": "FIX : prise en compte de la gestion de la méthode current_user pour l'application native.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n\t# Prevent CSRF attacks by raising an exception.\n\t# For APIs, you may want to use :n... | ruby | chosen |
[
{
"from": "system",
"value": "Store the current user in the thread to allow us to capture that in various models\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n before_filter :authenticate_user!, :unless => :devise_controller?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for RecordNotFound in current_applicant\n\nThis tends to happen when old cookies are left around when reseeding the\ndatabase.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n before_action :aut... | ruby | chosen |
[
{
"from": "system",
"value": "Update sanitizer options to new devise\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: ... | ruby | chosen |
[
{
"from": "system",
"value": "Add profiler info to prod\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :exception\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable page caching based on perform_caching setting\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n def current_admin_user\n current_user.try(:admin?) and current_user\n end\n\n def authentic... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify that these are custom pages\n"
},
{
"from": "human",
"value": "module Dugway\n class Application\n def initialize(options={})\n @theme = Theme.new(File.join(Dir.pwd, 'source'), options[:customization] || {})\n @store = Store.new(options[:store]... | ruby | chosen |
[
{
"from": "system",
"value": "Determine type from class name\n"
},
{
"from": "human",
"value": "module Her\n module JsonApi\n module Model\n \n def self.included(klass)\n klass.class_eval do\n include Her::Model\n\n method_for :update, :patch\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in DroppedAttributesSetter that under some conditions set dropped_split_id without setting dropped_lap.\n"
},
{
"from": "human",
"value": "class DroppedAttributesSetter\n\n attr_reader :report\n\n def self.set_attributes(args)\n bulk_setter = new(args)\... | ruby | chosen |
[
{
"from": "system",
"value": "Use trailing commas in multi-line Arrays."
},
{
"from": "human",
"value": "class Parelation::Applier\n\n # @return [Array] the list of active criteria classes\n # that are used to narrow down database results.\n #\n CRITERIA = [\n Parelation::Criteria::Sele... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the compatibility with rest-client 2.0\n"
},
{
"from": "human",
"value": "module Paypal\n module NVP\n class Request < Base\n attr_required :username, :password, :signature\n attr_optional :subject\n attr_accessor :version\n\n ENDPOINT = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use html_safe and not html_safe!\n"
},
{
"from": "human",
"value": "module Tolk\n class LinkRenderer < WillPaginate::LinkRenderer\n def to_html\n links = @options[:page_links] ? windowed_links : []\n # previous/next buttons\n links.unshift page_li... | ruby | chosen |
[
{
"from": "system",
"value": "Add Linode as an option.\n"
},
{
"from": "human",
"value": "module Zartan\n module SourceType\n extend self\n \n def all\n [\n ::Sources::DigitalOcean\n ]\n end\n end\nend"
},
{
"from": "gpt",
"value": "module Zartan\n mod... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec checking exceptions reaching the top-level are printed properly\n"
},
{
"from": "gpt",
"value": "require_relative '../../spec_helper'\n\ndescribe \"An Exception reaching the top level\" do\n it \"is printed on STDERR\" do\n ruby_exe('raise \"foo\"', args... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.