Skip to content

Commit

Permalink
Merge pull request #52 from gocardless/generate-valid-migration
Browse files Browse the repository at this point in the history
Add migration class version
  • Loading branch information
James Turley authored Nov 8, 2019
2 parents 65b0c56 + 88f26f0 commit 8724f17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ platforms :rbx do
gem 'rubysl', '~> 2.0'
end

gem 'prometheus-client', '~> 0.10.0.alpha'
gem 'prometheus-client', '~> 1.0'
gem 'prometheus_gcstat', git: '[email protected]:gocardless/prometheus_gcstat_ruby'

gemspec
2 changes: 1 addition & 1 deletion lib/generators/que/templates/add_que.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class AddQue < ActiveRecord::Migration
class AddQue < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
def self.up
# The current version as of this migration's creation.
Que.migrate! version: 4
Expand Down
8 changes: 4 additions & 4 deletions spec/lib/que/middleware/queue_collector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
collector.call({})

expect(described_class::Queued.values).to eql(
{ queue: "default", job_class: "FakeJob", priority: 1, due: "true" } => 2.0,
{ queue: "default", job_class: "FakeJob", priority: 10, due: "true" } => 1.0,
{ queue: "default", job_class: "FakeJob", priority: 1, due: "false" } => 2.0,
{ queue: "another", job_class: "FakeJob", priority: 1, due: "false" } => 1.0,
{ queue: "default", job_class: "FakeJob", priority: "1", due: "true" } => 2.0,
{ queue: "default", job_class: "FakeJob", priority: "10", due: "true" } => 1.0,
{ queue: "default", job_class: "FakeJob", priority: "1", due: "false" } => 2.0,
{ queue: "another", job_class: "FakeJob", priority: "1", due: "false" } => 1.0,
)

# It's not easy to predict the number of dead tuples deterministically, so we just
Expand Down

0 comments on commit 8724f17

Please sign in to comment.