Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2
jobs:
test_ruby_2_5_4:
parallelism: 2
docker:
- image: circleci/ruby:2.5.4
environment:
RAILS_ENV: test
RACK_ENV: test
POSTGRES_USER: root
PGHOST: 127.0.0.1
DATABASE_URL: postgres://postgres@127.0.0.1/circle_test
QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test
QC_BENCHMARK: true
QC_BENCHMARK_MAX_TIME_DEQUEUE: 60
- image: circleci/postgres:9.6.6-alpine
steps:
- checkout
- run:
name: Install env dependencies
command: |
sudo apt-get update
sudo apt-get install postgresql-client
- restore_cache:
key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec"
}}
- run:
name: Install Ruby gems
command: |
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
- save_cache:
key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec"
}}
paths:
- ~/project/vendor/bundle
- run:
name: Minitest
command: |
bundle exec rake
- store_artifacts:
path: test/reports/
- store_test_results:
path: test/reports/
workflows:
version: 2
test:
jobs:
- test_ruby_2_5_4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ etc/
.env
Gemfile.lock
tips-and-tricks.md
test/reports/
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

13 changes: 7 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
source "https://rubygems.org"
source 'https://rubygems.org' do
gem 'rake'

gem "rake"
gemspec

gemspec

group :test do
gem 'minitest', '~> 5.5.1'
group :test do
gem 'minitest', '~> 5.8'
gem 'minitest-reporters'
end
end
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# queue_classic
A simple, efficient worker queue for Ruby & PostgreSQL

<p align="center">
<b>Simple, efficient worker queue for Ruby & PostgreSQL</b>
<br />
<a href="https://travis-ci.org/QueueClassic/queue_classic"><img src="http://img.shields.io/travis/QueueClassic/queue_classic/master.svg?style=flat" /></a>

<a href="https://codeclimate.com/github/QueueClassic/queue_classic"><img src="http://img.shields.io/codeclimate/github/QueueClassic/queue_classic.svg?style=flat" /></a>
[![CircleCI](https://circleci.com/gh/QueueClassic/queue_classic/tree/master.svg?style=svg)](https://circleci.com/gh/QueueClassic/queue_classic/tree/master)

<a href="http://badge.fury.io/rb/queue_classic"><img src="http://img.shields.io/gem/v/queue_classic.svg?style=flat" alt="Gem Version" height="18"></a>
</p>
[![Code Climate](http://img.shields.io/codeclimate/github/QueueClassic/queue_classic.svg?style=flat)](https://codeclimate.com/github/QueueClassic/queue_classic)

[![Gem Version](http://img.shields.io/gem/v/queue_classic.svg?style=flat)](http://badge.fury.io/rb/queue_classic)


**IMPORTANT NOTE REGARDING VERSIONS**
Expand All @@ -35,7 +33,7 @@ queue_classic provides a simple interface to a PostgreSQL-backed message queue.

## Table of content

* [Documentation](http://rubydoc.info/gems/queue_classic/2.2.3/frames)
* [Documentation](https://www.rubydoc.info/gems/queue_classic/)
* [Usage](#usage)
* [Setup](#setup)
* [Upgrade from earlier versions to V3.1](#upgrade-from-earlier-versions)
Expand Down
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Unreleased
- `enqueue`, `enqueue_at`, `enqueue_in` return job hash with id.
- Fixed unlock query for versions below Postgres 9.2
- Change ruby versions tested in Travis to currently supported ones.
- Switched project to use CircleCI, as it's way more consistent speed wise

Version 3.0.0rc
- Improved signal handling
Expand Down
8 changes: 8 additions & 0 deletions test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
require "bundler"
require "minitest/reporters"

Bundler.setup :default, :test

if ENV['CIRCLECI'] == "true"
Minitest::Reporters.use! Minitest::Reporters::JUnitReporter.new
else
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
end

ENV["DATABASE_URL"] ||= "postgres:///queue_classic_test"

require_relative '../lib/queue_classic'
Expand Down
9 changes: 0 additions & 9 deletions test/worker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,6 @@ def test_work_with_more_complex_construct
assert_equal(0, worker.failed_count)
end

def test_init_worker_with_arg
with_database 'postgres:///invalid' do
conn = PG.connect(dbname: 'queue_classic_test')
QC::Worker.new connection: conn

conn.close
end
end

def test_init_worker_with_database_url
with_database ENV['DATABASE_URL'] || ENV['QC_DATABASE_URL'] do
worker = QC::Worker.new
Expand Down