I hereby claim:
- I am johnathanludwig on github.
- I am bumontherun (https://keybase.io/bumontherun) on keybase.
- I have a public key whose fingerprint is 4D70 2EB7 F31C 770F 0674 A482 97CE CB2A 0DBE CD6C
To claim this, I am signing this object:
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| # Activate the gem you are reporting the issue against. | |
| gem "activerecord", "~> 5.2.0" | |
| gem "sqlite3" |
I hereby claim:
To claim this, I am signing this object:
| require 'ansi/code' | |
| module Minitest | |
| module Reporters | |
| # Features: | |
| # Like the SpecReporter but with the pass/time on the left | |
| # Collects the message before doing a puts so that lines dont get mixed up when running tests in threads | |
| # Highlights lines in a stacktrace from this project | |
| # Highlights slow tests | |
| class ParallelReporter < BaseReporter |
| %h1 New Team | |
| = form_for @team do |f| | |
| = f.label :name | |
| = f.text_field :name | |
| -# fields_for accepts a second param of the object. Use @team.players incase its an edit, otherwise build a new player | |
| = f.fields_for :players, (@team.players || @team.players.build) do |players| | |
| = players.label :player_name |
| # Add test:workers rake task, and include it in the normal test run | |
| namespace :test do | |
| task run: ['test:workers'] | |
| ['workers'].each do |name| | |
| Rails::TestTask.new(name => 'test:prepare') do |t| | |
| t.pattern = "test/#{name}/**/*_test.rb" | |
| end | |
| end | |
| end |
| module ActiveModel | |
| module Validations | |
| class DateRangeValidator < ActiveModel::EachValidator | |
| def validate_each(record, attribute, value) | |
| return if value.blank? | |
| pass = true | |
| if comparison_date = options[:before] | |
| if record.send(comparison_date).present? | |
| pass = value < record.send(comparison_date) |