Skip to content

Commit

Permalink
Merge pull request #8 from aclemons/rails_revert
Browse files Browse the repository at this point in the history
Revert rails connection handling monkey-patch
  • Loading branch information
aclemons authored Nov 7, 2018
2 parents 47aeab0 + 5d7e6ed commit e70afd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

## Unreleased

## [1.0.5] - 2018-11-08
### Added
- Remove rails monkey patch initially added in `7a7e387`. This is causing breakage with tests using `fork` when using newer versions of mysql2. The connection sharing this monkey patch introduces causes connections to really be closed with newer versions of the gem. There seems to be no measurable performance difference without the monkey patch.

## [1.0.4] - 2018-11-07
### Added
- New option --retry-tags which allows retrying tests tagged with one of the configured tags.
Expand Down
13 changes: 0 additions & 13 deletions lib/nitra/rails_tooling.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
require 'active_record'

ActiveRecord::ConnectionAdapters::ConnectionHandler.class_eval do
private
def owner_to_pool
@owner_to_pool[0] # instead of [Process.pid], which would change every time we fork for a new file
end

def class_to_pool
@class_to_pool[0] # instead of [Process.pid], which would change every time we fork for a new file
end
end

module Nitra
class RailsTooling
##
Expand Down
2 changes: 1 addition & 1 deletion nitra.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spec = Gem::Specification.new do |s|
s.name = 'nitra'
s.version = '1.0.3'
s.version = '1.0.5'
s.platform = Gem::Platform::RUBY
s.license = "MIT"
s.homepage = "http://github.com/fluxfederation/nitra"
Expand Down

0 comments on commit e70afd3

Please sign in to comment.