Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update connection pool dependency #70

Merged
merged 7 commits into from

2 participants

@sferik

As indicated by the branch name, this pull request started as a simple update to the connection_pool dependency but then I continued to make a few additional changes. Everything is in atomic commits so feel free to take what you like and leave what you don't. A few of the changes (e.g. alphabetical gemspec) are purely a matter of taste.

I also added Bundler::GemHelper.install_tasks to the Rakefile. Again, it's a matter of taste, but it makes building and tagging releases easier and I couldn't think of any reason not to add it.

Once you merge in the connection_pool dependency update, please ship a new release of this gem. Thanks!

@jc00ke
Collaborator

:+1:

@jc00ke jc00ke merged commit 5f74111 into mperham:master
@jc00ke
Collaborator
@sferik

Thanks for the quick turnaround!

@sferik sferik deleted the unknown repository branch
@jc00ke
Collaborator

Gotta do something productive while I cook my oatmeal :wink:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
6 .gitignore
@@ -1,8 +1,8 @@
*.gem
+*.rdb
.bundle
+.idea/*
Gemfile.lock
+coverage/*
pkg/*
rbxdb/
-*.rdb
-.idea/*
-
View
4 .travis.yml
@@ -1,11 +1,9 @@
+bundler_args: --without development
language: ruby
rvm:
- 1.9.3
- jruby-19mode
- rbx-19mode
-matrix:
- allow_failures:
- - rvm: rbx-19mode
branches:
only:
- master
View
17 Gemfile
@@ -1,10 +1,11 @@
-source "http://rubygems.org"
+source :rubygems
-# Specify your gem's dependencies in girl_friday.gemspec
-gemspec
+gem 'rake'
+
+group :test do
+ gem 'minitest'
+ gem 'redis'
+ gem 'flexmock-minitest'
+end
-# Needed for testing only!
-gem 'minitest'
-gem 'redis'
-gem 'connection_pool'
-gem 'flexmock-minitest'
+gemspec
View
3  Rakefile
@@ -1,3 +1,6 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
+
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
View
36 girl_friday.gemspec
@@ -1,23 +1,21 @@
# -*- encoding: utf-8 -*-
require "./lib/girl_friday/version"
-Gem::Specification.new do |s|
- s.name = "girl_friday"
- s.version = GirlFriday::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ["Mike Perham"]
- s.email = ["mperham@gmail.com"]
- s.homepage = "http://github.com/mperham/girl_friday"
- s.summary = s.description = %q{Background processing, simplified}
-
- s.rubyforge_project = "girl_friday"
-
- s.files = `git ls-files`.split("\n").reject { |path| path =~ /rails_app/}
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.require_paths = ["lib"]
- s.add_dependency 'connection_pool', '~> 0.9.0'
- s.add_dependency 'rubinius-actor'
- s.add_development_dependency 'sinatra', '~> 1.3'
- s.add_development_dependency 'rake'
+Gem::Specification.new do |spec|
+ spec.add_dependency 'connection_pool', '~> 1.0'
+ spec.add_dependency 'rubinius-actor'
+ spec.add_development_dependency 'sinatra', '~> 1.3'
+ spec.add_development_dependency 'simplecov'
+ spec.authors = ["Mike Perham"]
+ spec.email = ["mperham@gmail.com"]
+ spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ spec.files = `git ls-files`.split("\n").reject { |path| path =~ /rails_app/}
+ spec.homepage = "https://github.com/mperham/girl_friday"
+ spec.licenses = ['MIT']
+ spec.name = "girl_friday"
+ spec.platform = Gem::Platform::RUBY
+ spec.require_paths = ["lib"]
+ spec.summary = spec.description = %q{Background processing, simplified}
+ spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ spec.version = GirlFriday::VERSION
end
View
14 test/helper.rb
@@ -15,10 +15,12 @@
end
end
-# require 'simplecov'
-# SimpleCov.start do
-# add_filter "/actor.rb"
-# end
+unless ENV['CI']
+ require 'simplecov'
+ SimpleCov.start do
+ add_filter "/actor.rb"
+ end
+end
require 'rubygems'
require 'minitest/spec'
@@ -30,9 +32,9 @@
class MiniTest::Unit::TestCase
def async_test(time=0.5)
- q = TimedQueue.new
+ q = ConnectionPool::TimedStack.new
yield Proc.new { q << nil }
- q.timed_pop(time)
+ q.pop(time)
ensure
count = GirlFriday.shutdown!(1)
puts "Unable to shutdown queue (#{count})" if count != 0
View
2  test/test_girl_friday_queue.rb
@@ -125,7 +125,7 @@ def test_should_persist_with_redis_connection_pool
require 'redis'
require 'connection_pool'
pool = ConnectionPool.new(:size => 5, :timeout => 2){ Redis.new }
- pool.with_connection {|redis| redis.flushdb }
+ pool.with {|redis| redis.flushdb }
rescue LoadError
return puts "Skipping redis test, 'redis' gem not found: #{$!.message}"
rescue Errno::ECONNREFUSED
Something went wrong with that request. Please try again.