queue_classic_plus 4.0.0.alpha9 → 4.0.0.alpha10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 998da8f0e2f5f397e1125b9f47f447ba3cdb17908e79bb4eb9d34a5acb87f7d8
4
- data.tar.gz: fb21b8b1175142d27792885d814597c145b68fe2e82e8541d6db78a000c30a86
3
+ metadata.gz: 14e8dfec194b5946e629568f8fc73041f0a9f546b737ab2926446cfa0bffe854
4
+ data.tar.gz: e45cbfdd17b764c9569f554ac989e3ab03948a237265f53605aba8032be28bd1
5
5
  SHA512:
6
- metadata.gz: 84850b2d1be63a0127adf54eab5d810b6fde5de1d9ee2826a2121f76343fc3442cac74de674858234fcf5ae1f25c418f70d578e242280f83485a892e935f13e3
7
- data.tar.gz: 1e2e3b3ca6d2280c5aa445737b7179e2bd7f800c8c5a971d81fc3978f753189f437c99fe6ea81b7d69c079b631e4da41c1adf09032f9fe92863c8003e3fd8ee4
6
+ metadata.gz: 6380f8e7aaacae04565c0d1ed2a6b0bb5a9257709f803efd015914a032d1aa35cf4757c4dee8c7639bf9ec03e92df8352a08dddd0ab1f53ccf85d18c7fa77685
7
+ data.tar.gz: eefd27dce5e3f9e6a5a1c33a5b6572890a29142b2acf9b65dc2802a125b6fa173dedd48e0f216f61f9384bfa10cf13651d6173b8ca1a0d07e4ad66f4201a3ea1
data/.circleci/config.yml CHANGED
@@ -3,7 +3,7 @@ version: 2.1
3
3
  jobs:
4
4
  test:
5
5
  docker:
6
- - image: circleci/ruby:2.7.4-node
6
+ - image: cimg/ruby:3.0.3
7
7
  auth:
8
8
  username: $DOCKERHUB_USERNAME
9
9
  password: $DOCKERHUB_TOKEN
@@ -27,7 +27,7 @@ jobs:
27
27
 
28
28
  push_to_rubygems:
29
29
  docker:
30
- - image: circleci/ruby:2.7.4
30
+ - image: cimg/ruby:3.0.3
31
31
  auth:
32
32
  username: $DOCKERHUB_USERNAME
33
33
  password: $DOCKERHUB_TOKEN
data/Gemfile CHANGED
@@ -13,9 +13,9 @@ end
13
13
 
14
14
  group :test do
15
15
  gem 'byebug'
16
- gem 'rake'
17
16
  gem 'rspec'
18
17
  gem 'timecop'
19
18
  gem 'newrelic_rpm'
20
19
  gem 'ddtrace'
20
+ gem 'simplecov', require: false
21
21
  end
@@ -122,7 +122,7 @@ module QueueClassicPlus
122
122
  if defined?(ActiveRecord) && ActiveRecord::Base.connected?
123
123
  # If ActiveRecord is loaded, we use it's own transaction mechanisn since
124
124
  # it has slightly different semanctics for rollback.
125
- ActiveRecord::Base.transaction(options, &block)
125
+ ActiveRecord::Base.transaction(**options, &block)
126
126
  else
127
127
  begin
128
128
  execute "BEGIN"
@@ -1,3 +1,3 @@
1
1
  module QueueClassicPlus
2
- VERSION = '4.0.0.alpha9'.freeze
2
+ VERSION = '4.0.0.alpha10'.freeze
3
3
  end
data/spec/base_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'spec_helper'
2
+ require 'active_record'
1
3
 
2
4
  describe QueueClassicPlus::Base do
3
5
  context "A child of QueueClassicPlus::Base" do
@@ -189,5 +191,32 @@ describe QueueClassicPlus::Base do
189
191
  expect(Jobs::Tests::TestJob.librato_key).to eq('jobs.tests.test_job')
190
192
  end
191
193
  end
192
- end
193
194
 
195
+ context 'with ActiveRecord' do
196
+ before do
197
+ @old_conn_adapter = QC.default_conn_adapter
198
+ @activerecord_conn = ActiveRecord::Base.establish_connection(ENV["DATABASE_URL"])
199
+ QC.default_conn_adapter = QC::ConnAdapter.new(
200
+ connection: ActiveRecord::Base.connection.raw_connection
201
+ )
202
+ end
203
+
204
+ after do
205
+ @activerecord_conn.disconnect!
206
+ QC.default_conn_adapter = @old_conn_adapter
207
+ end
208
+
209
+ subject do
210
+ Class.new(QueueClassicPlus::Base) do
211
+ @queue = :test
212
+
213
+ def self.perform(foo, bar)
214
+ end
215
+ end
216
+ end
217
+
218
+ it 'works' do
219
+ expect { subject._perform(1, 2) }.not_to raise_error
220
+ end
221
+ end
222
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,10 @@
1
+ require 'simplecov'
2
+
3
+ SimpleCov.start do
4
+ add_filter(%r/^\/spec\//)
5
+ enable_coverage(:branch)
6
+ end
7
+
1
8
  require 'queue_classic_plus'
2
9
  require 'pg'
3
10
  require 'timecop'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue_classic_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha9
4
+ version: 4.0.0.alpha10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Mathieu
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-10-27 00:00:00.000000000 Z
13
+ date: 2022-01-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: queue_classic
@@ -95,7 +95,6 @@ files:
95
95
  - ".github/dependabot.yml"
96
96
  - ".gitignore"
97
97
  - ".rspec"
98
- - ".rvmrc"
99
98
  - Gemfile
100
99
  - Guardfile
101
100
  - LICENSE.txt
@@ -147,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
146
  - !ruby/object:Gem::Version
148
147
  version: 1.3.1
149
148
  requirements: []
150
- rubygems_version: 3.1.6
149
+ rubygems_version: 3.2.32
151
150
  signing_key:
152
151
  specification_version: 4
153
152
  summary: Useful extras for Queue Classic
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 2.1.3@queue_classic_plus --create