conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change settings for facebook conections\n" }, { "from": "human", "value": "module Spree\n module Admin\n class SocialController < BaseController\n def edit\n end\n\n def update\n params[:social].each do |provider, value|\n if value...
ruby
chosen
[ { "from": "system", "value": "Use special PPA only for Precise\n\nFor Trusty, there is a package from\nhttp://packages.ubuntu.com/trusty/libzmq3\n\nFixes https://github.com/travis-ci/travis-ci/issues/2558\n" }, { "from": "human", "value": "#\n# Cookbook Name:: zeromq\n# Recipe:: ppa\n#\n# Copyri...
ruby
chosen
[ { "from": "system", "value": "Insert lock on the version of the core" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RestGoatee\"\n s.version = '2.4.0'\n s.summary = \"An intuitive JSON & XML deserialization library for ReST based client\"\n s...
ruby
chosen
[ { "from": "system", "value": "Add MacOSx entry to spec file\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"SSignalKit\"\n s.version = \"0.0.2\"\n s.summary = \"An experimental Rx- and RAC-3.0-inspired FRP framework\"\n s.homepage = \"https://gith...
ruby
chosen
[ { "from": "system", "value": "Add spec for tap-to-click current host\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'osx::global::tap_to_click' do\n let(:facts) { {:boxen_user => 'ilikebees'} }\n\n it do\n should contain_boxen__osx_defaults('Tap-To-Click Bluetooth').wi...
ruby
chosen
[ { "from": "system", "value": "Workaround: Make sure this spec can not hang our spec suite\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire_dependency 'sidekiq/pausable'\n\ndescribe Sidekiq do\n it \"can pause and unpause\" do\n Sidekiq.pause!\n Sidekiq.paused?.should == t...
ruby
chosen
[ { "from": "system", "value": "Update React Native documentation (0.27)\n" }, { "from": "human", "value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.26'\n self.base_url = 'https://fac...
ruby
chosen
[ { "from": "human", "value": "Add rake task to clean up orphaned data\n\nPrevious bugs resulted in editions without mappings and mappings without\neditions. The rake task deletes all the affected records.\n\nNone of the records are being used by anything because of other checks\nin the code that make sure bo...
ruby
chosen
[ { "from": "system", "value": "Add Guard gem to testing\n" }, { "from": "human", "value": "# encoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'iig/version'\n\nGem::Specification.new do |spec|\n spec.name = 'iig...
ruby
chosen
[ { "from": "system", "value": "Update AppCode to version 3.1.6\n\nThis commit increases the version token and the updates the SHA\n" }, { "from": "human", "value": "cask :v1 => 'appcode' do\n version '3.1.5'\n sha256 '17c78a828cf438b9497b9716f26585f279d40cab9a550f8e50551e93ee125372'\n\n url \"...
ruby
chosen
[ { "from": "system", "value": "Tag namespace anticollision should be case sensitive\n" }, { "from": "human", "value": "class Tag\n include Mongoid::Document\n\n field :name, type: String\n field :namespace, type: String\n field :icon, type: String\n\n validates_presence_of :name\n\...
ruby
chosen
[ { "from": "system", "value": "Add rubocop to development dependencies\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'aqbanking/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Throw error on ElasticSearch connection\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nbegin\n Searchkick.client.info\nrescue\n abort 'Searchkick not running'\nend\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nb...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add specs to article to cover the revision feature.\"\n\nThis reverts commit 5bf320b7dfafa64b470f9ea9cf82dcbe6dbaa12a.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Article do\n let(:article) { FactoryGirl.build :article }\n\n it { ...
ruby
chosen
[ { "from": "system", "value": "Add test for index on name and email for a funder.\n" }, { "from": "human", "value": "require 'test_helper'\n\n# FunderTest contains the model tests for a Funder\nclass FunderTest < ActiveSupport::TestCase\n\n def setup\n @funder = Funder.create(name: 'Example F...
ruby
chosen
[ { "from": "system", "value": "Remove guide ID from subject line of fact check emails\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass NoisyWorkflow < ActionMailer::Base\n default :from => \"winston@alphagov.co.uk\"\n \n def make_noise(publication,action)\n @publication = publi...
ruby
chosen
[ { "from": "system", "value": "Move bar out of the way when hovering\n\nCurrently the bar prevents you from clicking links below it. This change just moves the bar to the top or bottom of the page when the user mouses over." }, { "from": "human", "value": "require \"devbar/version\"\n\nmodule Rac...
ruby
chosen
[ { "from": "human", "value": "Add cask for RubyMine with bundled JDK\n" }, { "from": "gpt", "value": "cask :v1 => 'rubymine-bundled-jdk' do\n version '7.1'\n sha256 '2e9fced43c8e14ffbc82a72a8f6cde1cbab50861db079162ca5ff34c668ba57c'\n\n url \"https://download.jetbrains.com/ruby/RubyMine-#{versi...
ruby
chosen
[ { "from": "system", "value": "Make destroy_aws_object work when using ec2-classic" }, { "from": "human", "value": "require 'chef/provisioning/aws_driver/aws_provider'\n\nclass Chef::Provider::AwsInstance < Chef::Provisioning::AWSDriver::AWSProvider\n def create_aws_object(instance); end\n\n de...
ruby
chosen
[ { "from": "human", "value": "Update user_has_namespace_with_gold? to check for any plan instead of just gold plan\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nmodule EE\n module UsersHelper\n def users_sentence(users, link_class: nil)\n users.map { |user| link_to(us...
ruby
chosen
[ { "from": "system", "value": "Reduce the number of gems for AWS SDK usage\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"manageiq/providers/amazon/version\"\n\nGem::Specification.new do |s|\n s.name = \"manageiq-providers-amazon\"\n s.vers...
ruby
chosen
[ { "from": "system", "value": "Add skeleton of app class and load other assets.\n" }, { "from": "human", "value": "require \"guessr/version\"\n\nmodule Guessr\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require \"guessr/version\"\nrequire \"guessr/init_db\"\n\nre...
ruby
chosen
[ { "from": "system", "value": "Switch place and city in google request\n" }, { "from": "human", "value": "require 'clients'\nmodule Jobs\n class Coords\n class << self\n def add_to(need)\n client = Maps.new\n address = location(need)\n coords = client.coords(addres...
ruby
chosen
[ { "from": "system", "value": "Complete the specification of the gem.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'minitest/rails/assertions/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Make sure that Area properties are accessible (add test only)\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass Everypolitician::AreaTest < Minitest::Test\n def test_reading_popolo_areas\n popolo = Everypolitician::Popolo::JSON.new(\n areas:...
ruby
chosen
[ { "from": "system", "value": "Use top level interval option\n" }, { "from": "human", "value": "# Usage (from the repo root):\n# env FLIPPER_CLOUD_TOKEN=<token> bundle exec ruby examples/http_read_async/basic.rb\nrequire 'bundler/setup'\nrequire 'flipper/adapters/http_read_async'\n\n# Configure f...
ruby
chosen
[ { "from": "human", "value": "Add root account id to master_courses_master_content_tags\n\nCloses PLAT-5570\nflag=none\n\nTest Plan:\n- Verify migrations run\n- Verify a root_account_id can be set on a\n MasterCourses::MasterContentTag record\n- Verify MasterContentTags always live on the same shard\n as t...
ruby
chosen
[ { "from": "human", "value": "Change discussion_topic_materialized_views fields to text\n\nflag=none\ncloses VICE-3126\n\ntest plan:\n - Tests pass\n - Cursory testing of legacy discussions\n\nqa risk: low\n\nChange-Id: Ifc84cbeadb439b919bc84d5cae400b92ff32eb0b\nReviewed-on: https://gerrit.instructure.com/...
ruby
chosen
[ { "from": "system", "value": "Use touch instead of update_column\n" }, { "from": "human", "value": "module Kamikakushi\n extend ActiveSupport::Concern\n\n included do\n default_scope { without_deleted }\n alias_method_chain :destroy, :kamikakushi\n alias_method_chain :destroyed?, :kam...
ruby
chosen
[ { "from": "system", "value": "Add myself to the .gemspec\n" }, { "from": "human", "value": "#!/usr/bin/env gem build\n# encoding: utf-8\n\nrequire \"base64\"\n\nGem::Specification.new do |s|\n s.name = \"amq-client\"\n s.version = \"0.2.0\"\n s.authors = [\"Jakub Stastny\"]\n s.homepage = \"...
ruby
chosen
[ { "from": "system", "value": "Fix spec file that wasn't working at al\n" }, { "from": "human", "value": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\nrequire 'spec_helper'\n\ndescribe 'puppetrspec', :type => :class do\n\n let :filename do\n '/tmp/puppetrspec_example.txt'\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Save this for a little later\n" }, { "from": "human", "value": "require \"mail\"\n\nclass ActionMailroom::InboundEmail < ActiveRecord::Base\n self.table_name = \"action_mailroom_inbound_emails\"\n\n has_one_attached :raw_email\n\n enum status: %i[ pending process...
ruby
chosen
[ { "from": "system", "value": "Fix validator for agenda time\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass AgendaTime < ApplicationRecord\n validates :order, presence: true\n\n default_scope -> { order(order: :asc) }\nend\n" }, { "from": "gpt", "value": "...
ruby
chosen
[ { "from": "system", "value": "Make sure rubygems is available for things like rack, rmagick, etc." }, { "from": "human", "value": "# AUTOLOAD EVERYTHING IN THE IMAGETASTIC DIRECTORY TREE\n\n# The convention is that dirs are modules\n# so declare them here and autoload any modules/classes inside ...
ruby
chosen
[ { "from": "system", "value": "Fix the singular inflection for sibilant sounds.\n\nSigned-off-by: David Celis <aa743a0aaec8f7d7a1f01442503957f4d7a2d634@davidcelis.com>\n" }, { "from": "human", "value": "require 'active_support/inflector'\n\nActiveSupport::Inflector.inflections do |inflect|\n inf...
ruby
chosen
[ { "from": "system", "value": "Set up a basic test to verify that the heat map page is accessible to the test user.\n" }, { "from": "human", "value": "require 'rspec'\n\ndescribe 'Student can view review scores in a heat map distribution', js: true do\n\n before(:each) do\n #Include setup her...
ruby
chosen
[ { "from": "system", "value": "Refactor building proxy methods based on worker methods.\n" }, { "from": "human", "value": "module MicroQ\n ##\n # Convenience methods for calling methods asynchronously\n # Adds perform_async by default\n #\n # Usage\n # class MyWorker\n # worker :update, ...
ruby
chosen
[ { "from": "system", "value": "Fix test to use location directly\n" }, { "from": "human", "value": "RSpec.describe Gplaces::Place do\n subject do\n described_class.new(formatted_address: \"My address\",\n geometry: { location: { lat: -33.8669330, lng: 151.1957910 } })\n...
ruby
chosen
[ { "from": "system", "value": "Add test to verify that longest streak incrementing works\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Skill do\n let(:valid_skill) { Skill.create(title: \"valid skill\") }\n let(:invalid_skill) { Skill.create(title: \"invalid skill\") }\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"Don't enable selinux on redhat systems\"\n" }, { "from": "human", "value": "require 'beaker-rspec'\nrequire 'beaker/puppet_install_helper'\n\ndef iptables_flush_all_tables\n ['filter', 'nat', 'mangle', 'raw'].each do |t|\n expect(shell(\"iptables -t #{t...
ruby
chosen
[ { "from": "system", "value": "Use SPDX standard license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'hubot'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense ...
ruby
chosen
[ { "from": "system", "value": "Add supports oses, add yum recipe dependency\n" }, { "from": "human", "value": "name 'bamboo-agent'\nmaintainer 'Numergy'\nmaintainer_email 'cd@numergy.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures a bamboo agent'\nlong_description IO.read(File.join(F...
ruby
chosen
[ { "from": "system", "value": "Increase the version to 0.1.2\n" }, { "from": "human", "value": "name 'rabbitmq-cluster'\nmaintainer 'Sunggun Yu'\nmaintainer_email 'sunggun.dev@gmail.com'\nlicense 'Apache 2.0'\ndescription 'Configures rabbitmq cluster'\nlong_descrip...
ruby
chosen
[ { "from": "system", "value": "Add Swift version to Podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'PusherSwift'\n s.version = '6.1.0'\n s.summary = 'A Pusher client library in Swift'\n s.homepage = 'https://github.com/pusher/p...
ruby
chosen
[ { "from": "human", "value": "Test store credit category factory\n" }, { "from": "gpt", "value": "ENV['NO_FACTORIES'] = \"NO FACTORIES\"\n\nrequire 'spec_helper'\nrequire 'spree/testing_support/factories/store_credit_category_factory'\n\nRSpec.describe 'store credit category factory' do\n let(:f...
ruby
chosen
[ { "from": "system", "value": "Add prints to point assignment\n" }, { "from": "human", "value": "class Race < ApplicationRecord\n has_many :race_results\n has_many :racers, through: :race_results\n\n def self.points\n [\n 250, 200, 160, 150, 140, 130, 120,\n 110, 100, 90, 80, 75, ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Remove N+1 query on booking request slots\"\n\nThis reverts commit 0d1da14eadf7953b33d88fcbc190bfe3a08ba235.\n\nWhen eager-loading the associated slots, the `order` clause on the\n`slots` association is ignored. I'll revert this now for a quick fix\nand follow up with ...
ruby
chosen
[ { "from": "system", "value": "Add minitest as dev dependency" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'authoraise/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update 'format_date()' to handle empty date fields\n" }, { "from": "human", "value": "module ApplicationHelper\n\tdef format_date(date)\n\t\tdate.strftime(\"%m/%d/%y\")\n\tend\nend\n" }, { "from": "gpt", "value": "module ApplicationHelper\n\tdef format_d...
ruby
chosen
[ { "from": "system", "value": "Fix Atom builder with no activities\n" }, { "from": "human", "value": "# http://www.atomenabled.org/developers/syndication/\nitems = controller.controller_name\nitem = items.singularize\nassets = controller.instance_variable_get(\"@#{items}\")\n\natom_feed do |fe...
ruby
chosen
[ { "from": "system", "value": "Use Amazon's weird cron syntax\n" }, { "from": "human", "value": "require 'cloudwatch_scheduler'\n\nCloudwatchScheduler() do |_config|\n # every hour at 10 minutes past the hour\n task 'run_notifications', cron: '10 * * * *' do\n RunNotificationsService.new.cal...
ruby
chosen
[ { "from": "system", "value": "Fix access to keys internally. Start server with `rails s`\n" }, { "from": "human", "value": "Rails.configuration.stripe = {\n :publishable_key => ENV['PUBLISHABLE_KEY'],\n :secret_key => ENV['SECRET_KEY']\n}\n\nStripe.api_key = Rails.application.secrets.stri...
ruby
chosen
[ { "from": "system", "value": "Update LyX to version 2.0.7\n" }, { "from": "human", "value": "class Lyx < Cask\n url 'ftp://ftp.lyx.org/pub/lyx/bin/2.0.6/LyX-2.0.6+qt4.dmg'\n homepage 'http://www.lyx.org'\n version '2.0.6'\n sha1 '7fc3350afb6b5b9ebad04d6a1370ca8670b24e04'\n link 'LyX.app'\ne...
ruby
chosen
[ { "from": "system", "value": "Load compiler directory by default\n" }, { "from": "human", "value": "dir = File.dirname(__FILE__)\n$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)\n\ndir = File.expand_path(\"#{dir}/ymdp\")\n$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)\n\n# load ap...
ruby
chosen
[ { "from": "system", "value": "Support booking filtering in account.\n" }, { "from": "human", "value": "class AccountsController < AuthorizedController\n # Scopes\n has_scope :by_value_period, :using => [:from, :to], :default => proc { |c| c.session[:has_scope] }\n\n def show\n @account = A...
ruby
chosen
[ { "from": "system", "value": "Fix redirect url when signing out\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n protect_from_forgery\n\n def create\n s = Session.from_omniauth(env[\"omniauth.auth\"])\n session[:user_id] = s.uid\n redirect_to root_...
ruby
chosen
[ { "from": "system", "value": "Fix `CookieOverflow` error on google login\n\nThe \"extra\" hash coming from the provider is quite big and we're not\nusing it, so let's not save it in session.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass CallbacksController < Devise::O...
ruby
chosen
[ { "from": "system", "value": "Add a CORS header for the Space API endpoint\n" }, { "from": "human", "value": "class SpaceApiController < ApplicationController\n def status\n @space_api = SpaceApi.new\n end\nend\n" }, { "from": "gpt", "value": "class SpaceApiController < Applicat...
ruby
chosen
[ { "from": "system", "value": "Revert \"try to log user_info response\"\n\nThis reverts commit eec3c5aa32e50aa98a06c79a3ab26bce85e1b0c7.\n" }, { "from": "human", "value": "class UserInfoController < ApplicationController\n before_filter :require_user_access_token\n after_filter do |c|\n logg...
ruby
chosen
[ { "from": "system", "value": "Remove iframe styles for embed field in compact mode\n" }, { "from": "human", "value": "class Field::EmbedPresenter < FieldPresenter\n COMPACT_WIDTH = 300\n COMPACT_HEIGHT = 150\n\n def input(form, method, options={})\n if field.iframe?\n form.text_area(m...
ruby
chosen
[ { "from": "system", "value": "Add filters for the members api\n" }, { "from": "human", "value": "module Api\n module V1\n class MemberResource < BaseResource\n immutable\n\n has_many :gardens\n has_many :plantings\n has_many :harvests\n has_many :seeds\n has_man...
ruby
chosen
[ { "from": "system", "value": "Add reference to rlite repository\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint objc-rlite.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optional, but encou...
ruby
chosen
[ { "from": "system", "value": "Add neighborhood id collection so frontend can query municipality and all its neighborhoods as a filter\n" }, { "from": "human", "value": "module API\n module V1\n class PlaceResource < JSONAPI::Resource\n\n attributes :name, :place_type, :geometry\n\n ...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.7.1.0 to 0.7.1.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.7.1.0'\n s.summary = 'Messaging primitives for Eventide'\n s.description = '...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.9.0.0 to 0.9.0.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.9.0.0'\n s.summary = 'Messaging primitives for Eventide'\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Add `Algorithm.class_for` method for DSL\n" }, { "from": "human", "value": "module ActiveRecord::Turntable\n module Algorithm\n extend ActiveSupport::Autoload\n\n eager_autoload do\n autoload :Base\n autoload :RangeAlgorithm\n autoload :RangeBs...
ruby
chosen
[ { "from": "system", "value": "Initialize thread to silence warning\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Coverband\n class Background\n @semaphore = Mutex.new\n\n def self.stop\n return unless @thread\n @semaphore.synchronize do\n if @...
ruby
chosen
[ { "from": "system", "value": "Use numerical value for ID replacement to allow proper path generation when \\d+ restriction is being applied via routing setup\n" }, { "from": "human", "value": "require 'rails_javascript_helpers'\n\nmodule JqGridRails\n module Helpers\n include RailsJavaScript...
ruby
chosen
[ { "from": "system", "value": "Check for state if state and code are params are present.\n" }, { "from": "human", "value": "class OauthStateMiddleware\n def initialize(app)\n @app = app\n end\n\n def call(env)\n request = Rack::Request.new(env)\n if request.params[\"state\"]\n if...
ruby
chosen
[ { "from": "system", "value": "Use the first non-error response\n\nso that 304 not modified responses are accepted\n" }, { "from": "human", "value": "\nmodule Spontaneous::Rack::Back\n class SiteAssets < Base\n def initialize(site)\n @roots = site.paths(:compiled_assets)\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Print uri params desc if present\n" }, { "from": "human", "value": "module Dox\n module Printers\n class ActionPrinter < BasePrinter\n\n def print(action)\n @output.puts \"### #{action.name} [#{action.verb} #{action.path}]\\n\\n#{print_desc(action.de...
ruby
chosen
[ { "from": "system", "value": "[BRAIN] Fix specs to use separate memory URL" }, { "from": "human", "value": "# encoding: utf-8\n\nENV[\"AHN_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire 'adhearsion/rspec'\nrequire 'rspec/autorun'\nrequire 'webmock/rs...
ruby
chosen
[ { "from": "system", "value": "Make xor public of second challenge\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\ndef treatAsHex s\n [s].pack('H*').unpack('B*').last.to_i 2\nend\n\ndef xor(str1, str2)\n h1 = treatAsHex str1\n h2 = treatAsHex str2\n (h1 ^ h2).to_s(16)\nend\n\ndef he...
ruby
chosen
[ { "from": "system", "value": "Remove manageiq-postgres_ha_admin from the appliance dependencies\n\nWe use the gem from manageiq's core repo now, so we will move\nthe dependency there.\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1391095\n" }, { "from": "human", "value": "# Add gems here, in Ge...
ruby
chosen
[ { "from": "system", "value": "Change type_cast_code to type_cast due to method deprecation in Rails4\n\nSee https://github.com/rails/rails/commit/f50c160cd028bd3e16c46dcba7692439daf709c8\n" }, { "from": "human", "value": "require 'active_support/concern'\n\nmodule HstoreColumns\n extend ActiveS...
ruby
chosen
[ { "from": "system", "value": "Add output to indicate which server we are using\n" }, { "from": "human", "value": "module ACME\n def self.sign(domain)\n command = <<-EOC\n acme_tiny \\\n --account-key /var/lib/nginx-acme/account.key \\\n --csr #{domain.csr_path} \\\n ...
ruby
chosen
[ { "from": "system", "value": "Add `curl` options for errors/gzip transport." }, { "from": "human", "value": "require 'time'\nrequire 'fileutils'\n\nclass Screenshot\n attr_accessor :camera_uuid, :filename, :directory\n\n def initialize(options = {})\n @camera_uuid = options[:camera_uuid]\n ...
ruby
chosen
[ { "from": "human", "value": "Add email interceptor to redirect development emails.\n" }, { "from": "gpt", "value": "class NotLiveYetEmailInterceptor\n def self.delivering_email(message)\n message.subject = \"#{message.to} #{message.subject}\"\n message.to = [ ENV[\"GMAIL_USERNAME\"] ]\n ...
ruby
chosen
[ { "from": "system", "value": "Return evidence activities on a graph users created_facts\n" }, { "from": "human", "value": "class Activity < OurOhm\n module For\n def self.fact(f)\n Query.where([\n {action: [:created, :believes, :disbelieves, :doubts] ,subject: f}\n ])\n e...
ruby
chosen
[ { "from": "system", "value": "Remove export display for now to see if it affects travis\n" }, { "from": "human", "value": "namespace :ci do\n\n desc \"Run tests in the cloud. ZOMG!\"\n task :travis do\n if ENV['BUILD_TYPE'] == 'cucumber'\n puts \"Running cucumber features...\"\n s...
ruby
chosen
[ { "from": "system", "value": "Update relative_path and add documentation\n" }, { "from": "human", "value": "class File\n def self.relative_path(from, to)\n from = File.expand_path(from).split('/')\n to = File.expand_path(to).split('/')\n from.length.times do \n break if from[0] !=...
ruby
chosen
[ { "from": "system", "value": "Test LWRP through integration spec.\n - Apparently it is difficult (or impossible?) to test LWRP w/ ChefSpec :sob:\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'sprout-bash-it::default' do\n before :all do\n expect(File).not_to be_exists(...
ruby
chosen
[ { "from": "system", "value": "Truncate users table before security integration test.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Security: \" do\n\n\tcontext \"If no user is present\" do\n\t\tit \"render the signup view\" do\n\t\t\tvisit '/alchemy/'\n\t\t\twithin('#alc...
ruby
chosen
[ { "from": "system", "value": "Fix up some basic tests." }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Quandl::Config do\n describe '.initialize' do\n it 'generates a Config class, evaluating ERB' do\n configuration = Quandl::Config.new('fake')\n\n expect(configu...
ruby
chosen
[ { "from": "system", "value": "Update specs to pass with minitest 5\n" }, { "from": "human", "value": "require \"active_model/lint\"\nrequire \"test/unit/assertions\"\n\nshared_examples_for \"ActiveModel\" do\n include ActiveModel::Lint::Tests\n include Test::Unit::Assertions\n\n before { @mod...
ruby
chosen
[ { "from": "system", "value": "Drop chef-solo-search from direct dependencies\n" }, { "from": "human", "value": "name \"bacula-ng\"\nmaintainer \"Maciej Pasternacki\"\nmaintainer_email \"maciej@3ofcoins.net\"\nlicense 'MIT'\ndescription \"Bacula\"\nlong_description...
ruby
chosen
[ { "from": "system", "value": "Increase version number to 0.7.0\n" }, { "from": "human", "value": "name 'typo3'\nmaintainer 'Ingo Renner'\nmaintainer_email 'ingo@typo3.org'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures TYPO3'\nlong_description IO.read(Fil...
ruby
chosen
[ { "from": "system", "value": "Fix strict poise-python version dependency\n" }, { "from": "human", "value": "name 'email'\nmaintainer 'Alexander Pyatkin'\nmaintainer_email 'aspyatkin@gmail.com'\nlicense 'MIT'\nversion '1.4.6'\ndescription 'Installs and configures email server'\nlong_description I...
ruby
chosen
[ { "from": "system", "value": "Add version lock on mysql recipe\n" }, { "from": "human", "value": "name 'appsindo'\nmaintainer 'Appsindo Technology'\nmaintainer_email 'erwin.saputra@at.co.id'\nlicense 'All rights reserved'\ndescription 'Installs/Configures Server'\...
ruby
chosen
[ { "from": "system", "value": "Upgrade the version due to changes\n" }, { "from": "human", "value": "name 'appsindo'\nmaintainer 'Appsindo Technology'\nmaintainer_email 'erwin.saputra@at.co.id'\nlicense 'All rights reserved'\ndescription 'Installs/Configures Server...
ruby
chosen
[ { "from": "system", "value": "Add long_description and supports 'windows'\n\nAdding the supports improves search in Supermarket\n" }, { "from": "human", "value": "name 'sysmon'\nmaintainer 'Jeff Blaine'\nmaintainer_email 'jblaine@kickflop.net'\nlicense 'mit'\ndescription 'Installs/Configures Sys...
ruby
chosen
[ { "from": "system", "value": "Add chef gem to runtime dependency list.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"librarian/version\"\n\nGem::Specification.new do |s|\n s.name = \"librarian\"\n s.version = ...
ruby
chosen
[ { "from": "system", "value": "Change pod version to 3-digit number.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'GPUImage-NoAlpha'\n s.version = '0.1.5.2'\n s.license = 'BSD'\n s.summary = 'An open source iOS framework for GPU-based image and video processing.'\...
ruby
chosen
[ { "from": "system", "value": "Fix broken integration test of “installed” file(s)\n\nOf course `Array#grep` returns a list, not true/false, duh." }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'support/configuration_common'\n\nshared_examples_for 'an install method' do\n it_behaves...
ruby
chosen
[ { "from": "system", "value": "Add a spec for calling `RDATA` on a non data wrapper.\n" }, { "from": "human", "value": "require_relative 'spec_helper'\n\nload_extension(\"data\")\n\ndescribe \"CApiAllocSpecs (a class with an alloc func defined)\" do\n it \"calls the alloc func\" do\n @s = CAp...
ruby
chosen
[ { "from": "system", "value": "Update homepage as org has been renamed\n" }, { "from": "human", "value": "require File.expand_path('../lib/partial_ks/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'partial_ks'\n gem.version = PartialKs::VERSION\n gem.summary ...
ruby
chosen
[ { "from": "system", "value": "Define a step to verify lockfile with regexp\n" }, { "from": "human", "value": "Given 'a lockfile with:' do |content|\n steps %Q{\n Given a file named \"#{'.'.to_lockfile_path}\" with:\n \"\"\"\n #{expand(content)}\n \"\"\"\n }\nend\n\nGiven 'I c...
ruby
chosen
[ { "from": "system", "value": "Use the correct matcher for arrays\n" }, { "from": "human", "value": "When(/I have a (\\w+) resource defined as/) do |model_name, resource_definition|\n authorize_model model_name, resource_definition\nend\n\nWhen(/I have a confidential (\\w+) named \"([\\w\\s]+)\"...
ruby
chosen
[ { "from": "system", "value": "Remove reference to modulemap in podspec\n\n- It doesn’t exist anymore.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"SPTPersistentCache\"\n s.version = \"1.0.0\"\n s.summary = \"SPTPersistentCache is a fast, binar...
ruby
chosen
[ { "from": "system", "value": "[watchos] Add support for watchOS 2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NSURL+QueryDictionary\"\n s.version = \"1.1.0\"\n s.summary = \"Make working with NSURL queries more pleasant.\"\n s.description = \"N...
ruby
chosen