conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove helper loading in Engine\n"
},
{
"from": "human",
"value": "module SocialStream\n module Attachments\n class Engine < Rails::Engine\n \n initializer \"social_stream-attachments.attachment_in_social_stream_objects\" do\n SocialStream.objects... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake to >= 12.3.3 to fix security alert\n\nCVE-2020-8130\nmoderate severity\nVulnerable versions: <= 12.3.2\nPatched version: 12.3.3\n\nThere is an OS command injection vulnerability in Ruby Rake before 12.3.3 in Rake::FileList when supplying a filename that begins with ... | ruby | chosen |
[
{
"from": "system",
"value": "Add destroy alias to engines\n"
},
{
"from": "human",
"value": "require 'active_support/core_ext/object/inclusion'\n\nARGV << '--help' if ARGV.empty?\n\naliases = {\n \"g\" => \"generate\"\n}\n\ncommand = ARGV.shift\ncommand = aliases[command] || command\n\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Fix order list for applications/stages\n"
},
{
"from": "human",
"value": "module Pulsar\n class AddApplications\n include Interactor\n\n before :validate_input!, :prepare_context\n after :validate_output!\n\n def call\n each_application_path do |ap... | ruby | chosen |
[
{
"from": "system",
"value": "Enable Maven kit item archive generation\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nmodule Tetra\n # tetra generate-kit-archive\n class GenerateKitArchiveCommand < Tetra::BaseCommand\n def execute\n checking_exceptions do\n project = Te... | ruby | chosen |
[
{
"from": "system",
"value": "Write get index spec for questions controller\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\n describe QuestionsController do\n\n it \"#index\" do\n get :index\n expect(assigns(:questions)).to eq Question.all\n end\n\n it \"#new\" d... | ruby | chosen |
[
{
"from": "human",
"value": "Add exporting script to CSV\n"
},
{
"from": "gpt",
"value": "#!/bin/sh ruby\n# -*- encoding: utf-8 -*-\n\n###\n### Exporting review data to CSV\n### Kazuki Hamasaki (ashphy@ashphy.com)\n### \n\nrequire 'rubygems'\nrequire 'active_record'\n\nrequire_relative '../rietv... | ruby | chosen |
[
{
"from": "system",
"value": "Make Draftsman enabled in Rails by default\n"
},
{
"from": "human",
"value": "require 'singleton'\n\nmodule Draftsman\n class Config\n include Singleton\n attr_accessor :serializer, :timestamp_field\n\n def initialize\n @timestamp_field = :created_at\... | ruby | chosen |
[
{
"from": "system",
"value": "Package version patch number is increased from 0.1.0 to 0.1.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'subst_attr'\n s.version = '0.1.0'\n s.summary = 'Declare attributes that have default implementat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix mapping hash to array\n"
},
{
"from": "human",
"value": "module Fullslate\n\n class Client\n attr_accessor :id, :first_name, :last_name, :emails, :phone_numbers\n\n def initialize(params)\n @id = params[\"id\"]\n @first_name = params[\"first_nam... | ruby | chosen |
[
{
"from": "human",
"value": "Add data migration to replicate current policies\n\nSo that all organisations that currently have policies linked on their\nhomepage continue to have policies linked on their homepages. This will\nauto feature the three most recent policies tagged to each\norganisation.\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Hirb breaking on AR tables with no id column\n\nHirb kills a puppy every time you give it an ActiveRecord::Base table with no id column. I've heard that when a puppy dies it cries out 'comparison of String with nil failed'! This patch will save many puppies by compacting an... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce requests for services and information\n\nThis reduces the number of content store requests required to render a page\nin services and information from 3 to 1.\n\nExample URL: https://www.gov.uk/government/organisations/hm-revenue-customs/services-information\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Set the url of the customized source repository\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Mastodon\n module Version\n module_function\n\n def major\n 2\n end\n\n def minor\n 6\n end\n\n def patch\n 2... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `self.execute` signature for `codeclimate`\n"
},
{
"from": "human",
"value": "require 'tempfile'\n\nclass Nib::CodeClimate\n include Nib::Command\n\n def self.execute(_, args)\n # Discard service name because codeclimate is run on local path\n args.shift... | ruby | chosen |
[
{
"from": "system",
"value": "Send gem version in HTTP header.\n"
},
{
"from": "human",
"value": "require \"set\"\nrequire \"uri\"\nrequire \"net/http\"\nrequire \"json/ext\"\n\nmodule RorVsWild\n class Client\n HTTPS = \"https\".freeze\n CERTIFICATE_AUTHORITIES_PATH = File.expand_path(\"... | ruby | chosen |
[
{
"from": "system",
"value": "Update and improve backtick sandbox\n"
},
{
"from": "human",
"value": "# This code is free software; you can redistribute it and/or modify it under\n# the terms of the new BSD License.\n#\n# Copyright (c) 2012, Sebastian Staudt\n\nmodule Kernel\n\n alias_method :or... | ruby | chosen |
[
{
"from": "system",
"value": "Allow access to lines of CSS file in Engine\n\nTo give linters the ability to inspect individual lines of a SCSS\ndocument, a `lines` accessor was added. This allows greater visibility\ninto aspects of the document that are lost in the abstract syntax tree\n(e.g. whitespace).\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add feature to cache API response\n"
},
{
"from": "human",
"value": "module Seihin\n class AuthenticationError < StandardError; end\n\n class Retriever\n class << self\n def execute\n @client = Atmo::Api.new\n\n unless @client.authenticate\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a proof of concept login test\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"Login\" do\n before do\n @user = FactoryGirl.create(:user, :password => \"mypassword\")\n @channel = FactoryGirl.create(:channel, :name => \"Cool\")\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use context instead of describe to express target status\n"
},
{
"from": "human",
"value": "\nrequire_relative '../lib/message_filter'\n\ndescribe MessageFilter do\n\tshared_examples 'MessageFilter with argument \"foo\"' do\n\t\tit { is_expected.to be_detect('hello ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for Station model.\n"
},
{
"from": "gpt",
"value": "require 'scrapescrobbler'\n\nmodule Scrapescrobbler\n describe Station do\n before do\n @station = Station.new\n end\n\n it \"should have a frequency\" do\n @station.should respond_to :f... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare the pod spec for release 1.0.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'MIHSliderView'\n s.version = '1.0.0'\n s.platform = :osx, '10.6'\n s.license = 'MIT'\n s.summary = 'Core Animations based slide... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActiveRecord errors in Rails 4+ within generators\n"
},
{
"from": "human",
"value": "require 'rails/generators/active_record/migration'\n\nclass PaulRevereGenerator < Rails::Generators::Base\n include Rails::Generators::Migration\n extend ActiveRecord::Generat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to pass the test of OrderMailer\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :order_item, class: Comable::OrderItem do\n sequence(:name) { |n| \"test_product#{n.next}\" }\n sequence(:sku) { |n| format('%07d', n.next) }\n quantity ... | ruby | chosen |
[
{
"from": "human",
"value": "Add 'edit user account' spec.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper.rb'\n\nfeature 'Edit User', %q{\n As a registered user of the website\n I want to edit my user profile\n so I can change my username and password\n} do\n\n background do\n @use... | ruby | chosen |
[
{
"from": "system",
"value": "Add Dynamically Named Getter/Setter Methods\n\nExtend ActiveRecord::Base by generating dynamically named getter/setter\nmethods for masked attributes.\n"
},
{
"from": "human",
"value": "module MaskableAttribute\n module ActsAsMaskableAttribute\n extend ActiveSup... | ruby | chosen |
[
{
"from": "human",
"value": "Add user_id + created_at index to changesets\n\nBrowsing changesets for a user will be much faster if we can get the\nuser's changesets in date order.\n"
},
{
"from": "gpt",
"value": "class AddUserDateIndexToChangeset < ActiveRecord::Migration\n def self.up\n add... | ruby | chosen |
[
{
"from": "system",
"value": "Add a bunch of friendlier attributes & methods\n"
},
{
"from": "human",
"value": "class PolicyDivision < ActiveRecord::Base\n self.table_name = 'pw_dyn_dreamvote'\n belongs_to :policy\n\n def division\n divisions = Division.where(division_date: division_date,\... | ruby | chosen |
[
{
"from": "system",
"value": "Use consistent \"takes precedence over\" verbiage and remove some unnecessary words.\n"
},
{
"from": "human",
"value": "module ActiveSupport #:nodoc:\n module CoreExtensions #:nodoc:\n module Hash #:nodoc:\n # Allows for reverse merging where its the keys i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix mutant expression for null integration test\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe 'null integration' do\n\n let(:base_cmd) { 'bundle exec mutant -I lib --require test_app \"::TestApp*\"' }\n\n around do |exam... | ruby | chosen |
[
{
"from": "human",
"value": "Add Reported Mileage Date attribute to asset\n"
},
{
"from": "gpt",
"value": "class AddReportedMileageDateToAsset < ActiveRecord::Migration\n def change\n add_column :assets, :reported_mileage_date, :date, :after => :reported_mileage\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add meta data for 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 'upload/version'\n\nGem::Specification.new do |spec|\n spec.name = \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use private method names only when args are provided\n"
},
{
"from": "human",
"value": "module DidYouMean\n class MethodNameChecker\n include SpellCheckable\n attr_reader :method_name, :receiver\n\n def initialize(exception)\n @method_name = exception... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem summary and description"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'key_control/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add social media URL to podspec\n\n- Points to our Spotify Engineering Twitter account.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SPTPersistentCache\"\n s.version = \"1.0.0\"\n s.summary = \"SPTPersistentCache ... | ruby | chosen |
[
{
"from": "system",
"value": "Test against platform-correct list of ZK packages\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nshared_examples_for 'an installation from mesosphere' do |opt|\n if(opt[:with_zookeeper])\n context 'with zookeeper' do\n it 'installs zookeeper, zooke... | ruby | chosen |
[
{
"from": "system",
"value": "Use latest version of octokit\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'git/meta/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Change refresh token timeout to 2 weeks\n\nSince the CLI client now supports refresh tokens, setting the refresh\ntoken timeout to two weeks will allow command-line users to stay logged\nin for that amount of time before they have to re-enter their creds.\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix web-app-theme generator options mess"
},
{
"from": "human",
"value": "gem \"web-app-theme\", :git => \"https://github.com/stevehodgkiss/web-app-theme.git\", :group => :development\n\n@stategies << lambda do\n options = []\n options << \"--engine=haml\" if SETT... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Mock AWS::Elasticache::SecurityGroup deletion\n"
},
{
"from": "human",
"value": "module Fog\n module AWS\n class Elasticache\n class Real\n\n require 'fog/aws/parsers/elasticache/base'\n\n # deletes a cache security group\n #\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add text example for pipeline status without action\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Status::Pipeline::Factory do\n subject do\n described_class.new(pipeline)\n end\n\n let(:status) do\n subject.fabricate!\n ... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Add missing project ID to ticket serializer\n"
},
{
"from": "human",
"value": "class HelpdeskTicketSerializer < ActiveModel::Serializer\n attributes :id,\n :student,\n :task,\n :tutorial,\n :target_grade,\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Define cache service by site and module\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nmodule GobiertoCommon\n class CacheService\n attr_reader :gobierto_module, :site\n\n def initialize(site, mod)\n @gobierto_module = mod.is_a?(String)... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for upgrading bash\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nclass Bash\n VERSION = '4.1.2'\n RELEASE = '29.el6'\nend\n\ndescribe package('bash') do\n it { should be_installed.with_version(Bash::VERSION + '-' + Bash::RELEASE) }\nend\... | ruby | chosen |
[
{
"from": "human",
"value": "Write RSpec test for method formatting\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule USaidWat\n module CLI\n describe CommentFormatter do\n let(:formatter) { CommentFormatter.new }\n \n describe \"#format\" do\n it \"shoul... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to OptionParser for dealing with options.\n"
},
{
"from": "human",
"value": "require 'getoptlong'\n\nmodule MrPoole\n class CLI\n\n def initialize(args)\n @helper = Helper.new\n @helper.ensure_jekyll_dir\n\n @params = args\n @tasks = T... | ruby | chosen |
[
{
"from": "system",
"value": "Fix file upload integration specs\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), 'spec_helper')\nrequire 'tempfile'\n\ndescribe \"creating a note on a workspace\" do\n before(:each) do\n login('edcadmin', 'secret')\n create_valid... | ruby | chosen |
[
{
"from": "system",
"value": "Add image test for presentation.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\ndescribe 'ApiImage section tests' do\n it 'ApiImage | GetClassType method' do\n pending('https://github.com/ONLYOFFICE/ooxml_parser/issues/254')\n pptx = DocBuilderWrap... | ruby | chosen |
[
{
"from": "system",
"value": "Use temporary redirect in root/index, since destination may change soon\n"
},
{
"from": "human",
"value": "class RootController < ApplicationController\n def index\n redirect_to Journey::SiteOptions.site_root(logged_in?)\n end\nend\n"
},
{
"from": "gpt"... | ruby | chosen |
[
{
"from": "system",
"value": "Increase max fetch to 25\n"
},
{
"from": "human",
"value": "module Shipit\n class GithubSyncJob < BackgroundJob\n include BackgroundJob::Unique\n\n MAX_FETCHED_COMMITS = 10\n queue_as :default\n\n self.timeout = 60\n self.lock_timeout = 20\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug with empty-string descriptions\n\nPicked up when writing the unit tests.\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: planning_applications\n#\n# id :integer not null, primary key\n# openlylocal_... | ruby | chosen |
[
{
"from": "system",
"value": "Update callout filters to run md conversion on input text\n"
},
{
"from": "human",
"value": "require_relative '../_config'\n\nmodule Jekyll\n\n module AssetFilter\n def post_url(input)\n \"#{$config.basepath}#{input}\"\n end\n\n def stylesheet_url(inp... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as development dependency\n\nSo that `bundle exec rake` works."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"r2/version\"\n\nGem::Specification.new do |s|\n s.name = \"r2\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add type factory for empty string and adjust some names\n"
},
{
"from": "human",
"value": "require 'nrser/refinements'\nrequire 'nrser/types/is'\nrequire 'nrser/types/is_a'\nrequire 'nrser/types/attrs'\n\nusing NRSER\n \nmodule NRSER::Types\n def self.str length: ... | ruby | chosen |
[
{
"from": "human",
"value": "Add podspec so it can be used with projects using CocoaPods to manage React Native.\n"
},
{
"from": "gpt",
"value": "require 'json'\npackage_json = JSON.parse(File.read('package.json'))\n\nPod::Spec.new do |s|\n\n s.name = package_json[\"name\"]\n s.versi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing raitie methods by requiring railties mixins before hal_api\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'hal_api/rails'\nrequire 'active_support/all'\n\nrequire 'minitest/spec'\nrequire 'minitest/... | ruby | chosen |
[
{
"from": "system",
"value": "Tests: Use ActiveRecord without concrete version\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\ngem 'activerecord', '< 3'\n\nrequire 'active_support'\nrequire 'active_support/test_case'\nrequire 'active_record'\nrequire 'test/unit'\n\nrequire \"#{File.dirn... | ruby | chosen |
[
{
"from": "system",
"value": "Order matters of when we load Coveralls\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\n\nif ENV[\"CI\"]\n require 'coveralls'\n Coveralls.wear!\nend\n"
},
{
"from": "gpt",
"value": "if ENV[\"CI\"]\n require 'coveralls'\n Coveralls.wea... | ruby | chosen |
[
{
"from": "system",
"value": "Add environment variables to supply database credentials\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'securerandom'\nrequire_relative '../lib/orats/commands/new/server'\n\nmodule Orats\n module Test\n include Commands::New::Server\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make bundler setup more reliable for tests\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.setup\n\n$:.unshift File.expand_path(\"../../lib\", __FILE__)\nrequire 'form_forms'\nrequire 'simple_form'\n\nrequire 'test/unit'\n\nrequire 'active_model'\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a bunch of tests\n"
},
{
"from": "human",
"value": "ENV['RACK_ENV'] = 'test'\n\nrequire_relative '../file0.rb'\nrequire 'test/unit'\nrequire 'rack/test'\n\nclass File0Test < Test::Unit::TestCase\n include Rack::Test::Methods\n\n def app\n File0.new\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make Event (test model) adopt new resource filter structure\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Event < ActiveRecord::Base\n include Alchemy::Taggable\n\n validates_presence_of :name\n belongs_to :location\n before_destroy :... | ruby | chosen |
[
{
"from": "system",
"value": "Remove current_server instantiation of lucid_works gem\n"
},
{
"from": "human",
"value": "module BaseHelper\n def current_server\n core_url ||= ENV['LWS_API_URL']\n core_url ||= \"#{ENV['LWS_CORE_URL']}\" if ENV['LWS_CORE_URL']\n \n @current_server ||= Lu... | ruby | chosen |
[
{
"from": "system",
"value": "Create helper to manage spec basic structures\n"
},
{
"from": "human",
"value": "module HomeHelper\nend\n"
},
{
"from": "gpt",
"value": "module HomeHelper\n\n def schema_markup(schema_version)\n content_tag(:div, class: \"schema-spec-block\") do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update course report to have Points Earned / Points Total.\n"
},
{
"from": "human",
"value": "class Registration < ActiveRecord::Base\n attr_accessible :course_id, :teacher, :user_id\n \n belongs_to :user\n belongs_to :course\n\n validates :user_id, :presence... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for assignees commands.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::Assignees do\n let(:format) { 'table' }\n let(:user) { 'peter-murach' }\n let(:repo) { 'github_cli' }\n let(:api_cla... | ruby | chosen |
[
{
"from": "system",
"value": "Fix build_config for docker image\n"
},
{
"from": "human",
"value": "MRuby::Build.new do |conf|\n toolchain :gcc\n\n enable_debug\n # k2hash requires C++ so it enables cxxabi\n enable_cxx_abi\n\n conf.gembox 'default'\n\n conf.gem :github => 'syucream/mruby-k2... | ruby | chosen |
[
{
"from": "system",
"value": "Add allowing configuration in compare gpa spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule CodeclimateCi\n describe CompareGpa do\n let(:codeclimate_ci) { CodeclimateCi::CompareGpa.new(api_requester) }\n let(:api_requester) { double(Cod... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for the module_registry spec, also this needs to be written as unit tests.\n"
},
{
"from": "human",
"value": "require File.expand_path('../spec_helper', __FILE__)\n\ndescribe 'ModuleRegistry' do\n\n it 'needs more tests'\n it 'should return item by a specified... | ruby | chosen |
[
{
"from": "system",
"value": "Allow search for anonymous users.\n"
},
{
"from": "human",
"value": "class Ability\n include CanCan::Ability\n\n def initialize(user)\n # Create guest user aka. anonymous (not logged-in) when user is nil.\n user ||= User.new\n\n if user.has_role? :admin\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic_abilities method to Ability Model\n\nThe Ability#basic_abilities method loads all abilities that apply to\nevery user. At this point that is only can :manage, User, id: user.id\nwhich allows a logged in user to manage there own user profile.\n"
},
{
"from": "h... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing role to base Ability model\n"
},
{
"from": "human",
"value": "class Ability\n include CanCan::Ability\n\n # Define abilities for the passed in user here\n #\n # all actions must map to one of\n # :read, \n # :create, \n # :update and \n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Add before_save callback for resetting the company logo back to default\n"
},
{
"from": "human",
"value": "class Startup < ActiveRecord::Base\n belongs_to :user\n\n extend FriendlyId\n friendly_id :name, use: :slugged\n\n # Alias for acts_as_taggable_on :tags\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for sending emails\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"school alert subscription events\", type: :system do\n let!(:school) { create(:school) }\n let!(:user) { create(:user, school: school, role: :school_admin) ... | ruby | chosen |
[
{
"from": "system",
"value": "Use AZURE_ASSETS_STORAGE_HOST to set up carrierware assets host\n\nIt doesn't need to include the container name, since CarrierWave is\nappending it automatically (unlike Rails/sprockets).\n"
},
{
"from": "human",
"value": "if Rails.env.in?(%(development test cucumb... | ruby | chosen |
[
{
"from": "system",
"value": "Fix node and ruby PATH\n"
},
{
"from": "human",
"value": "name \"loom-standalone\"\ndefault_version \"develop\"\n\nsource :git => \"git://github.com/continuuity/loom.git\"\nrelative_path 'standalone'\n\nbuild do\n command \"mkdir -p #{install_dir}/bin\"\n command ... | ruby | chosen |
[
{
"from": "system",
"value": "Update unit test to match changed `mkdir` command\n"
},
{
"from": "human",
"value": "require_relative \"../../../../base\"\n\nrequire Vagrant.source_root.join(\"plugins/guests/windows/cap/rsync\")\n\ndescribe \"VagrantPlugins::GuestWindows::Cap::RSync\" do\n let(:d... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"pessimistic\" syntax for dependencies.\n\nFrom the docs: http://docs.rubygems.org/read/chapter/16#page74"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"music/version\"\n\nGem::Specification... | ruby | chosen |
[
{
"from": "system",
"value": "Use the existing superclass method and drop the overridden method\n\nI doubt we're calling this enough to need this method at all, just let the\nsuperclass handle it.\n\n```\nirb(main):001:0> PhysicalNetworkPortController.method(:model).source_location\n=> [\"/Users/joerafaniel... | ruby | chosen |
[
{
"from": "system",
"value": "Support for multiple databases with Mongoid 3.\n\nTo use:\nDatabaseCleaner[:mongoid, {:connection => 'db_name'}].strategy = :truncation\nDatabaseCleaner[:mongoid, {:connection => 'db_name2'}].strategy = :truncation\n"
},
{
"from": "human",
"value": "module DatabaseC... | ruby | chosen |
[
{
"from": "system",
"value": "Format the timestamp as iso8601 in the json formatter\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule Semlogr\n module Formatters\n class JsonFormatter\n def format(log_event)\n entry = {\n timestamp: log_event.timestamp,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add VCR for testing Typeform I/O integration\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ask_awesomely/version'\n\nGem::Specification.new do |spec|\... | ruby | chosen |
[
{
"from": "system",
"value": "Update GFS version to 3.10\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: gluster\n# Attributes:: default\n#\n# Copyright 2015, Grant Ridder\n# Copyright 2015, Biola University\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix block addition method name\n"
},
{
"from": "human",
"value": "SparkleFormation.new('simple').load(:user_info).overloads do\n dynamic!(:node, 'fubar')\n outputs.region do\n description 'Region of stack'\n value region!\n end\nend\n"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for the new parent-less app_state."
},
{
"from": "human",
"value": "#\n# Copyright 2015, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails logger instead of puts\n"
},
{
"from": "human",
"value": "namespace :after_party do\n desc 'Deployment task: confirm_existing_users'\n task confirm_existing_users: :environment do\n puts \"Running deploy task 'confirm_existing_users'\"\n\n User.upd... | ruby | chosen |
[
{
"from": "human",
"value": "Delete some things marked \"delete\" from production.\n"
},
{
"from": "gpt",
"value": "PolicyTeam.where(name: [\"Example policy team\", \"PLEASE DELETE\"]).each do |policy_team|\n puts \"Destroying policy team: '#{policy_team.name}'...\"\n policy_team.destroy\n pu... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic functional test for SearchController\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SearchControllerTest < ActionController::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Call the establishment directly on BeerList\n\nExample:\n BeerList.muddy_waters\n => \"{\\\"BeerList::Establishments::MuddyWaters\\\":[\\\"\\\",\\\"Surly Bend...\n"
},
{
"from": "human",
"value": "require 'mechanize'\nrequire 'json'\n\nmodule BeerList\n require ... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil when pressing ^D in REPL\n\nCtrl+D produces an EOF, which makes Readline return nil instead of a\nstring, calling to_s on the result squashes this and runs an empty\nprogram instead of passing the nil along producing an error the first\ntime it is used, which is conf... | ruby | chosen |
[
{
"from": "system",
"value": "Update kms preview dependency in s3 gem"
},
{
"from": "human",
"value": "# WARNING ABOUT GENERATED CODE\n#\n# This file is generated. See the contributing guide for more information:\n# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md\n#\n# WARNING AB... | ruby | chosen |
[
{
"from": "system",
"value": "Change dotnet-core to dotnet_core just in PWS task\n\n[#147749883]\n\nSigned-off-by: Keaty Gross <ba27100af1ae477f2abedd28f15b1dd208b1f48a@pivotal.io>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\nrequire 'open3'\nrequire 'fileutils'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust seeds to use manual axiom selection.\n"
},
{
"from": "human",
"value": "repository = Repository.find_by_path('default')\n%w(v__T strict_partial_order).each do |ontology_name|\n ontology = repository.ontologies.find_by_name(ontology_name)\n Proof.new({ontolo... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for dry-monads either\n"
},
{
"from": "human",
"value": "require \"wisper\"\nrequire \"dry/transaction/step_failure\"\n\nmodule Dry\n module Transaction\n # @api private\n class Step\n include Wisper::Publisher\n include Dry::Mon... | ruby | chosen |
[
{
"from": "system",
"value": "Add license header to recipe\n"
},
{
"from": "human",
"value": "# Install packages required for building Git.\n# See http://git-scm.com/book/en/Getting-Started-Installing-Git\n%w(build-essential libcurl4-gnutls-dev libexpat1-dev gettext zlib1g-dev libssl-dev).each d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix authors to show only Roger Leite\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"restfolia/version\"\n\nGem::Specification.new do |s|\n s.name = \"restfolia\"\n s.version = Rest... | ruby | chosen |
[
{
"from": "human",
"value": "Add GemSpec generated by Jeweler\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": "DEV: Remove an empty example group\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"spec_helper\"\n\ndescribe Onebox do\n\n before do\n fake(\"https://www.amazon.com/product\", response(\"amazon\"))\n end\n\n describe \".preview\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.0.2.1 to 0.1.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'serialize'\n s.version = '0.0.2.1'\n s.summary = 'Common interface for serialization and deserialization, ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.