conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix rubocop warnings in TimeHelper\n"
},
{
"from": "human",
"value": "module Mixins\n module TimeHelper\n private\n\n # Create a time in a timezone, return in UTC\n def create_time_in_utc(datetime, tz = nil) # tz = nil means use user's sessi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix singup method to use therapist_params method to take arguments\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n\n def index\n\n end\n\n def login\n therapist = Therapist.find_by(email: params[:therapist][:email]).try(:au... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Physical Storage to Physical Disks inverse association\n\n"
},
{
"from": "human",
"value": "class PhysicalStorage < ApplicationRecord\n belongs_to :ext_management_system, :foreign_key => :ems_id, :inverse_of => :physical_storages,\n :class_name => \"ManageIQ:... | ruby | chosen |
[
{
"from": "system",
"value": "Change from spec_helper to rails_helper to fix failing test.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe BronzeStreakAchievement do\n let(:user) { create(:user) }\n\n context \"earned_by?\" do\n it \"returns false if < 5\" do\n exp... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sale price in currency\n"
},
{
"from": "human",
"value": "module Spree\n Variant.class_eval do\n scope :sale_off, -> { where('sale_rate > 0').where.not(sale_date: nil).where('sale_date < ?', DateTime.now) }\n\n alias_method :orig_price_in, :price_in\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add devise helper to transit app\n"
},
{
"from": "gpt",
"value": "module DeviseHelper\n def devise_error_messages!\n\n return \"\" if resource.errors.empty?\n\n messages = resource.errors.full_messages.map {|msg| content_tag(:li, msg)}.join\n sentence = I18... | ruby | chosen |
[
{
"from": "system",
"value": "Update the gemspec and require Ruby 2.5 or later\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nGem::Specification.new do |spec|\n spec.name = 'rack-redic'\n spec.version = '1.4.2'\n spec.authors = ['Evan Lecklider']\n spec.email = ['evan... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify the platform check logic\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: ark\n# Recipe:: default\n#\n# Author:: Bryan W. Berry <bryan.berry@gmail.com>\n# Copyright:: 2012-2017... | ruby | chosen |
[
{
"from": "system",
"value": "Mark the keys as sensitive."
},
{
"from": "human",
"value": "#\n# Copyright 2014, 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 obtain a copy of ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert tabs to spaces again per style\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: dse\n# Recipe:: opscenter\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... | ruby | chosen |
[
{
"from": "system",
"value": "Use more robust and explicit file path\n"
},
{
"from": "human",
"value": "require 'active_model'\n\nrequire 'active_interaction/version'\nrequire 'active_interaction/errors'\nrequire 'active_interaction/overload_hash'\nrequire 'active_interaction/filter'\nrequire 'a... | ruby | chosen |
[
{
"from": "human",
"value": "Add Dash beta after removal from homebrew-versions\n\nThis cask was removed from the caskroom/homebrew-versions repo as the\nbeta download link is held behind a login page on HockeyApp.\n\nI've also updated it from the version in homebrew-versions so that\nit is now referencing ... | ruby | chosen |
[
{
"from": "system",
"value": "Update KeePassX version to 2.0.0-alpha5.\n"
},
{
"from": "human",
"value": "class Keepassx2 < Cask\n url 'http://www.keepassx.org/dev/attachments/download/38/KeePassX-2.0-alpha4.dmg'\n homepage 'http://www.keepassx.org/'\n version '2.0.0-alpha4'\n sha1 'c289e953... | ruby | chosen |
[
{
"from": "system",
"value": "Move the verbosity of calling Arborist.config.migration.reset_column_information to a predicate\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Arborist::Migration::Data\n extend ActiveSupport::Concern\n\n require_relative 'data_migration'... | ruby | chosen |
[
{
"from": "system",
"value": "Add quotes around command name\n"
},
{
"from": "human",
"value": "require 'shellwords'\n\nmodule PXCBackup\n class PathResolver\n def initialize(options = {})\n @options = options\n @paths = {}\n end\n\n def method_missing(name, *arguments)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing tests for pages controller\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass PagesControllerTest < ActionController::TestCase\n include Devise::TestHelpers\n\n fixtures :users\n\n context 'when user signed in' do\n setup do\n sign... | ruby | chosen |
[
{
"from": "system",
"value": "Add SHA1 to Lion DiskMaker.\n"
},
{
"from": "human",
"value": "class LionDiskMaker < Cask\n url 'http://liondiskmaker.com/downloads/LionDiskMaker.zip'\n homepage 'http://liondiskmaker.com/'\n version '2.0.2'\n no_checksum\n link \"Lion DiskMaker #{version}/Lion... | ruby | chosen |
[
{
"from": "system",
"value": "Add Al to CI build notifications\n"
},
{
"from": "human",
"value": "Project.configure do |project|\n project.email_notifier.emails = [\"scott@butlerpress.com\"]\n project.build_command = \"./script/cruise_build.rb #{project.name}\"\nend\n"
},
{
"from": "gp... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem license to gemspec\n\nDeclaring the gem's license in the gemspec so that other tools can\ndetermine the license used.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'gherkin_lint'\n s.version = '1.2.2'\n s.date ... | ruby | chosen |
[
{
"from": "system",
"value": "Document the Active Directory magic numbers\n"
},
{
"from": "human",
"value": "module Gitlab\n module LDAP\n class Person\n AD_USER_DISABLED = Net::LDAP::Filter.ex(\"userAccountControl:1.2.840.113556.1.4.803\", \"2\")\n\n def self.find_by_uid(uid, adap... | ruby | chosen |
[
{
"from": "system",
"value": "Drop bogus class method (sidebar).\n"
},
{
"from": "human",
"value": "module HasAccounts\n module Model\n extend ActiveSupport::Concern\n \n included do\n class_inheritable_accessor :direct_account\n\n has_many :bookings, :as => :reference, :depe... | ruby | chosen |
[
{
"from": "system",
"value": "Delete require is not using\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'cloud_conductor_utils/consul'\n\ndescribe service('iptables') do\n it { should_not be_enabled }\nend\n\ndescribe 'connect to the server have a key that [:roles] to db' do... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the port, it's not being used\n"
},
{
"from": "human",
"value": "require 'sinatra'\n\nmodule Nark\n module Reporter\n class HTTP < Sinatra::Base\n set :port, 9494\n\n get \"/nark/available_plugins\" do\n JSON.pretty_generate :plugins => N... | ruby | chosen |
[
{
"from": "system",
"value": "Join arrays by using .flatten(1)\n"
},
{
"from": "human",
"value": "require 'prompt/command_group'\nrequire 'prompt/command'\n\nmodule Prompt\n class Application\n attr :command_groups\n attr_accessor :prompt\n\n def initialize\n @command_groups = []\... | ruby | chosen |
[
{
"from": "system",
"value": "Update thor version to 0.16.0\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'cramp'\n s.version = '0.15.1'\n s.summary = 'Asynchronous web framework.'\n s.description = 'Cramp is a framework for d... | ruby | chosen |
[
{
"from": "human",
"value": "Create a new spec file for the DataStore\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe DataStore do\n describe 'set(data)' do\n it 'stores original and transformed data' do\n pending\n end\n end\n\n describe 'get(id)' do\n it 're... | ruby | chosen |
[
{
"from": "system",
"value": "Test that we can run it more than once and get the same result.\n- Also some cleanup to keep things under 80 chars."
},
{
"from": "human",
"value": "require 'duffel'\n\ndescribe Duffel do\n subject { Duffel }\n\n it 'should not raise an error' do\n expect { sub... | ruby | chosen |
[
{
"from": "system",
"value": "Test multiple parsings in a single string\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nrequire \"spec_helper\"\n\ndescribe Agate::Parser do\n let!(:text) { \"勉強【べんきょう】します\" }\n let!(:agate) { Agate::Parser.new(text) }\n let!(:parsed_text) { \"<ruby... | ruby | chosen |
[
{
"from": "system",
"value": "Test internal function to get lock."
},
{
"from": "human",
"value": "require \"helper\"\n\ndescribe Redis::Lock, redis: true do\n\n before do\n @it = Redis::Lock.new( redis, \"test\" )\n end\n\n it \"can acquire and release a lock\" do\n redis.lock(\"test\"... | ruby | chosen |
[
{
"from": "system",
"value": "Update from 0.1.1 to 0.1.2\n\nProbably should have done that before merging :p\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'taggle'\n s.version = '0.1.1'\n s.date = '2015-04-30'\n s.summary = 'Taggle: tag/toggle time track'\n s.d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix actionpack version for security vulnerability\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'auto/session/timeout/version'\n\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Comment when ../lib added to load path\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nbegin\n Bundler.setup(:default, :development)\nrescue Bundler::BundlerError => e\n $stderr.puts e.message\n $stderr.puts \"Run `bundle install` to ins... | ruby | chosen |
[
{
"from": "system",
"value": "Fix utf8 weirdness on tests\n\nFixes #629\n"
},
{
"from": "human",
"value": "ThinkingSphinx::Index.define :city, :with => :active_record do\n indexes name\n has lat, lng\n\n set_property :charset_table => '0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional tests for the error handler\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"api versioning with accept headers\", type: :request do\n\n it \"does not allow incorrect api version headers\" do\n expect{ get \"/api/users\" }.to... | ruby | chosen |
[
{
"from": "system",
"value": "Clear tmp folder before run test\n"
},
{
"from": "human",
"value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire \"rails/test_help\"\n\nActionMailer::Base.delivery_m... | ruby | chosen |
[
{
"from": "system",
"value": "Expand the load path to inlcude lib/cookie_monster.rb.\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire 'cookie_monster'\n\nCookieMonster.configure do |config|\n config.key = 'a key'\n config.iv = 'an iv'\nend\n"
},
{
"from": "gpt",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem file to require\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'minitest/autorun'\nrequire 'test/unit'\nrequire 'mocha/setup'\nrequire 'mail_logger'\n\nMail::Logger.configure do |config|\n config.log_path = File.e... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite migration to avoid using Model objects\n\nAs per http://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html#label-Using+models+in+your+migrations\n"
},
{
"from": "human",
"value": "require \"bundler\"\nBundler.require\n\nrequire './lib/initializer'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the add menu_type migration\n\nThis migration fails being rolled back because change_column is not reversible. Using `change_column_null` resolves that issue. Also it does not make sense to write into a column we delete any way.\n"
},
{
"from": "human",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we initialize the DB after install\n"
},
{
"from": "human",
"value": "postgresql_repository 'install' do\n version '9.6'\nend\n\npostgresql_server_install 'package' do\n version '9.6'\nend\n\n# Using this to generate a service resource to control\nfind_r... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to support Rails 4.x\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"dateslices/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for the latet version of Rufus Scheduler\n"
},
{
"from": "human",
"value": "scheduler = Rufus::Scheduler.start_new\n\tinclude I343Auth\n\tinclude H4Api\n\n\t# re-authenticate windows live and spartan tokens\n\tscheduler.every '45m' do\n\t\tI343Auth.update_authen... | ruby | chosen |
[
{
"from": "system",
"value": "Remove (possibly) unnecessary Bundler.require call\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire \"rails/all\"\n\nBundler.require(*Rails.groups)\n\nclass Application < Rails::Application\n config.root = File.expand_path... | ruby | chosen |
[
{
"from": "system",
"value": "Put back call to run redis instance, which seemed to cause failures when changed\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nActiveRecord::Migrator.migrations_paths = [File.expan... | ruby | chosen |
[
{
"from": "system",
"value": "Update webmock requirement to ~> 3.1.0\n\nUpdates the requirements on [webmock](https://github.com/bblimke/webmock) to permit the latest version.\n- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)"
},
{
"from": "human",
"value": "require Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Change migration to muting thread\n"
},
{
"from": "human",
"value": "class RemoveHasMutedFromUsers < ActiveRecord::Migration\n def change\n User.where(has_muted: true).each do |user|\n user.experienced!(\"threadMuted\")\n end\n remove_column :users, :... | ruby | chosen |
[
{
"from": "system",
"value": "Add Gemfile and Gemfile.lock to gemspec files\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'validates_as_hostname_label'\n s.version = '1.1.1'\n s.date = '2010-03-16'\n\n s.summary = 'Checks for valid hostname labels'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper methods for Category.\n"
},
{
"from": "human",
"value": "class Category < ActiveRecord::Base\n has_many :feeds\n\n def safe_destroy\n Feed.transaction do\n feeds.each do |feed|\n feed.category = Category.where(name: \"uncategorized\").fir... | ruby | chosen |
[
{
"from": "system",
"value": "Remove angle brackets in @from.\n"
},
{
"from": "human",
"value": "class Notifier < ActionMailer::Base\n default_url_options[:host] = 'builders.railsbridge.org'\n\n def project_confirmation(project)\n recipients project.contact_email\n subject 'Thank you for... | ruby | chosen |
[
{
"from": "system",
"value": "Remove app folder from files"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'historyable/version'\n\nGem::Specification.new do |s|\n s.name = \"historyable\"\n s.version = Historyable::... | ruby | chosen |
[
{
"from": "system",
"value": "Add ruby 1.9.3 requirement to gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'digiusb'\n s.version = '0.0.2'\n s.summary = \"a tiny library for talking to digisparks\"\n s.author = 'Bluebie'\n s.email = \"a@creativepony.com\... | ruby | chosen |
[
{
"from": "system",
"value": "Add version to rspec dev 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 'dims/version'\n\nGem::Specification.new do |spec|\n spec.name = '... | ruby | chosen |
[
{
"from": "system",
"value": "Add method for reversing a linked list\n"
},
{
"from": "human",
"value": "# linkedlists consists of nodes (data), which contains a link to the next node\n\nclass Node\n\n attr_accessor :value, :next_node\n\n def initialize(value, next_node)\n @value = value\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve transform generator: Better migrating\n"
},
{
"from": "human",
"value": "# Generate files and directories from an application model file. Afterwards do\n# any setup left necessary (e.g. updating the database).\n\n# The application model transformation is spl... | ruby | chosen |
[
{
"from": "system",
"value": "Convert validate_create_key_pair to use ems.supports?(:auth_key_pair_create)\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Button::AuthKeyPairCloudCreate < ApplicationHelper::Button::ButtonNewDiscover\n def disabled?\n # check that at least one EMS... | ruby | chosen |
[
{
"from": "human",
"value": "Add Facebook Sdk version 4.23.0\n"
},
{
"from": "gpt",
"value": "#\n# Be sure to run `pod spec lint YumiUnitySDK.podspec' to ensure this is a\n# valid spec and to remove all comments including this before submitting the spec.\n#\n# To learn more about Podspec attr... | ruby | chosen |
[
{
"from": "system",
"value": "FIX - Ashok - Reindex solr if solr is not in sync with couchdb data\n"
},
{
"from": "human",
"value": "module Searchable\n class DocumentInstanceAccessor < Sunspot::Adapters::InstanceAdapter\n def id\n @instance.id\n end\n end\n\n class DocumentDataAcc... | ruby | chosen |
[
{
"from": "system",
"value": "Validate map_segment and comp map agree\n"
},
{
"from": "human",
"value": "class PlayerSelection < ApplicationRecord\n belongs_to :player_hero\n belongs_to :composition\n belongs_to :map_segment\n\n validates :player_hero, :composition, :map_segment, presence: t... | ruby | chosen |
[
{
"from": "system",
"value": "Add schema grant to the api key presenter\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule Carto\n module Api\n class ApiKeyPresenter\n def initialize(api_key)\n @api_key = api_key\n end\n\n def to_poro\n return {} unless ... | ruby | chosen |
[
{
"from": "system",
"value": "Add to label :id to response\n"
},
{
"from": "human",
"value": "class Dashboard::LabelsController < Dashboard::ApplicationController\n def index\n labels = Label.where(project_id: projects).select(:title, :color).uniq(:title)\n\n respond_to do |format|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add OCI gems and circ group to Item\n"
},
{
"from": "human",
"value": "module BlacklightCornellRequests\n # @author Matt Connolly\n\n class Item\n\n attr_reader :id, :holding_id, :enumeration, :location, :status\n\n # Basic initializer\n #\n # @param h... | ruby | chosen |
[
{
"from": "system",
"value": "Convert credit card to active merchant before storing\n\nThis is important because in activemerchant we check if the payment is a\nCreditCard.\n"
},
{
"from": "human",
"value": "module Spree\n class Gateway::KomojuCreditCard < KomojuGateway\n def auto_capture?\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add versions and changes fields in serializer\n"
},
{
"from": "human",
"value": "class SandboxShipmentSerializer < ActiveModel::Serializer\n attributes :id, :appendix, :taxon_name, #:reported_taxon_name, :accepted_taxon_name,\n :term_code, :quantity, :unit_code,... | ruby | chosen |
[
{
"from": "system",
"value": "Add Bitter.random to generate random bits\n"
},
{
"from": "human",
"value": "require \"bitter/version\"\nrequire \"bitter/words\"\n\nmodule Bitter\n\n NUMBERS = Hash[%w{one two three four five six seven eight nine ten\n eleven twelve thirteen fourteen fifteen}.... | ruby | chosen |
[
{
"from": "system",
"value": "Handle the “too much magic” case from Faker\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature \"Search Users on Admin Dashboard\", js: true do\n let(:user) { create :user, :admin }\n let!(:journal) { create :journal }\n\n before do\n create :... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec requirement from ~> 3.1.0 to ~> 3.8.0\n\nUpdates the requirements on [rspec](https://github.com/rspec/rspec) to permit the latest version.\n- [Release notes](https://github.com/rspec/rspec/releases)\n- [Commits](https://github.com/rspec/rspec/compare/v3.1.0...v3.8.... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple script to use html to form terminal background\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n\ndef rasterize(output_file)\n `phantomjs lib/rasterize.js file:///home/jimmy/Programming/Other/layer/example.html #{output_file}`\nend\n\ndef replace_ba... | ruby | chosen |
[
{
"from": "system",
"value": "Update required_ruby_version to \">= 2.2.9\"\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'amazon-drs/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Texture Packer Tileset example\n"
},
{
"from": "gpt",
"value": "require 'json'\nmodule Gosu\n module TexturePacker\n class Tileset\n\n def self.load_json(window, json)\n self.new(window, json)\n end\n\n def initialize(window, json)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move enqueue_next_feed_versions_cron task to 6pm PST\n"
},
{
"from": "human",
"value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove verbose option when unarchiving\n"
},
{
"from": "human",
"value": "namespace :git_export do\n archive_name = 'archive.tar.gz'\n\n desc 'Archive files to #{archive_name}'\n file archive_name do |t|\n sh \"git archive #{fetch(:branch)} --format=tar | bzip... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration file to change a column type\n"
},
{
"from": "gpt",
"value": "class ChangeColumnTypeUserIdOnJobApplications < ActiveRecord::Migration\n def up\n integer = 'integer USING CAST(user_id AS integer)'\n change_column :job_applications, :user_id, integ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove optional controller concern spec action parameter\n"
},
{
"from": "human",
"value": "module ControllerConcernHelper\n module ClassMethods\n def controller(&block)\n before { controller(&block) }\n end\n end\n\n def controller(&block)\n @contr... | ruby | chosen |
[
{
"from": "system",
"value": "Add session id check :tada:\n"
},
{
"from": "human",
"value": "module AuthpdsNyu\n module Session\n module Callbacks\n def pds_record_identifier\n (pds_user.respond_to?(:nyu_shibboleth) and pds_user.nyu_shibboleth) ? :uid : :id\n end\n\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the introduction and conclusion execution from the launch\n"
},
{
"from": "human",
"value": "class Guide\n def initialize path = nil\n # locate the restaurant text file at path\n # or create a new file\n # exit if create fails\n end\n \n def launch!... | ruby | chosen |
[
{
"from": "system",
"value": "Return 400 instead of 500 on missing sensor or user\n"
},
{
"from": "human",
"value": "class ReadingsController < ApplicationController\n protect_from_forgery except: :create\n\n def create\n reading = Reading.create_from_params(strong_params)\n\n if readin... | ruby | chosen |
[
{
"from": "system",
"value": "Make password_hash protected because it should not be set. Add relation to the List model\n"
},
{
"from": "human",
"value": "class User\n include Mongoid::Document\n include BCrypt\n\n field :email, type: String\n field :password_hash, type: String\n\n index({e... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out the authentication method\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n #before_filter :authenticate\n before_filter :ref_to_cookie\n\n def mobile_device?\n if session[:mobile_pa... | ruby | chosen |
[
{
"from": "system",
"value": "Change to simplify logic and raise errors.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule TTY\n class Prompt\n class ConverterRegistry\n def initialize\n @_registry = {}\n end\n\n # Register converter\n #\n # @api ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is incremented from 0.1.1 to '0.1.2'\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'error_data'\n s.version = '0.1.1'\n s.summary = 'Representation of an error as a data structure'\n s.desc... | ruby | chosen |
[
{
"from": "system",
"value": "Test recipe updated (2 knot.x instances side-by-side)\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: knotx\n# Recipe:: install\n#\n# Copyright 2016 Karol Drazek\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable access from dynamic table classes\n"
},
{
"from": "human",
"value": "class DataSource < ActiveRecord::Base\n\n module DynamicTable\n end\n\n def source_table_class_name(name)\n \"#{dbname.classify}_#{name.classify}\"\n end\n\n def source_base_class\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test to check for no error on unknown attribute\n"
},
{
"from": "gpt",
"value": "require_relative '../test_helper'\n\nclass ResourceTest < ChargoverRubyTest\n\n def test_exists\n Chargeover::Resource\n end\n\n def test_ignore_unknown_attributes\n assert ... | ruby | chosen |
[
{
"from": "system",
"value": "Add .all method to file adapter\n"
},
{
"from": "human",
"value": "module Cheatly\n class Sheet\n attr_accessor :title, :body\n def initialize(title, body)\n @title, @body = title, body\n end\n\n def to_s\n \" #{@body.gsub(\"\\r\",'').gsub(\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a check to make sure that a reader class is found for a given file in the FileInfo methods\n"
},
{
"from": "human",
"value": "module FileData\n # Operations common to all files\n class FileInfo\n class << self\n attr_reader :info_maps\n end\n\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Diaspora::Camo.from_markdown with frozen strings\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# implicitly requires OpenSSL\nmodule Diaspora\n module Camo\n def self.from_markdown(markdown_text)\n return unless markdown_text\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove parenthesis as ruby support it.\n"
},
{
"from": "human",
"value": "module Easemob\n module Users\n def create_user(username, password, nickname = nil)\n valid_username!(username)\n request(:post, 'users', json: { username: username, password: pa... | ruby | chosen |
[
{
"from": "system",
"value": "Load MSFL::Sinatra by default, we can change this later if we start using this on rails too\n"
},
{
"from": "human",
"value": "require 'msfl/parsers'\nrequire 'msfl/types'\nrequire 'msfl/validators'\nrequire 'msfl/configuration'\nrequire 'msfl/datasets'\n\nmodule MS... | ruby | chosen |
[
{
"from": "system",
"value": "ADD setup method in test"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass Backend::BlogsControllerTest < ActionController::TestCase\n test 'should get index' do\n get :index\n assert_response :success\n end\n\n test 'should get a collection v... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sparks qucs linking to use the right script\n"
},
{
"from": "human",
"value": "# some common tasks, hooks and definitions for sparks deploys\n\nafter 'deploy:symlink', 'import:create_or_update_sparks_content'\nafter 'deploy:make_directory_structure', 'deploy:mak... | ruby | chosen |
[
{
"from": "system",
"value": "Update font-awesome-rails to version 4.1\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'formgen/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to JSON.dump for hash serialization"
},
{
"from": "human",
"value": "class HashSerializer\n def self.dump(str)\n JSON.parse str\n end\n\n def self.load(hash)\n return '{}' if hash.nil?\n hash.empty? ? '{}' : hash.to_json\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Use a constant to keep track of the default constraint (>= 0.0.0)\n"
},
{
"from": "human",
"value": "module Solve\n require_relative 'solve/artifact'\n require_relative 'solve/constraint'\n require_relative 'solve/demand'\n require_relative 'solve/dependency'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Channel methods provided by Resourceable\n"
},
{
"from": "human",
"value": "require 'nacre/abstract_resource'\nrequire 'nacre/concerns/searchable'\n\nmodule Nacre\n class Channel < AbstractResource\n\n extend Searchable\n extend Getable\n\n attribut... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to version 0.0.2\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NSExtensions\"\n s.version = \"0.0.1\"\n s.summary = \"A collection of useful extensions for standard Cocoa classes.\"\n s.homepage = \"htt... | ruby | chosen |
[
{
"from": "system",
"value": "Include a better interface method to extentions and documentation\n"
},
{
"from": "human",
"value": "module Supido\n\n class AbstractBenchmarkBase\n def build(profile_action)\n raise \"build is not implemented!\"\n end\n end\nend"
},
{
"from": "... | ruby | chosen |
[
{
"from": "human",
"value": "Add forgotten class WP25::Option of wordpress convertor\n\nSigned-off-by: Matijs van Zuijlen <81ee54b05e09f9623524a1cf203ae4408aa091d3@matijs.net>\n"
},
{
"from": "gpt",
"value": "module WP25\n class Option < ActiveRecord::Base\n set_table_name 'wp_options'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make CSS framework selection up to the user\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path(\"../lib\", __FILE__)\n\nrequire 'sinatra/asset_pipeline/version'\n\nGem::Specification.new do |gem|\n gem.name = \"sinatra-asset-pipeline\"\n gem.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Make boot process more visible.\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.require(:default)\n\nrequire 'securerandom'\nrequire 'json'\n\nCelluloid.logger = nil\n\nmodule Citrus\n class << self\n attr_writer :build_root\n\n def build_root\n... | ruby | chosen |
[
{
"from": "system",
"value": "Package .yardopts file into gem\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'lieu/version'\n\nGem::Specification.new do |gem|\n gem.name = 'lieu'\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.