rush_job 0.3.1 → 0.3.2

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: 62c92632ff547f79e44137da7c5d1fa32abebf73e193e415704b04bd981d6256
4
- data.tar.gz: 2bb2cbb6fbd881c7c9419ffdb0b9bbe3ace33d3077f44ef3ee5ff1b4c08df6c3
3
+ metadata.gz: a6a851e49e6f1885c14bb796537b7e508beab734f7997884a3a4ff586821c115
4
+ data.tar.gz: ad8614b76e4f5e1c88b3d34e9327f2780328bb3b8539e813cd2c3da0eedf0444
5
5
  SHA512:
6
- metadata.gz: 5ab20e3517d870afec5c08873854ed7191daae8efb8b462537d1f04545f2ce7b49ec57a0d3996ac2efa7246a5073e856b19d7420006708bd4d6dd2f369f4a9dd
7
- data.tar.gz: 40421bf79367edd3e4ee1b4211adae3e9e918c69a76203cc2468c5779a6d19169b832d56cb9ce672cd8694b09f3f23df83e82aac6c5e5dd4c71bf59eac586925
6
+ metadata.gz: e6462e003fe4e0726deebffde8c579da9b631539c18bc535365dee4d865a084d1dba2e71f7e728421ed909d26c6dfaa5c5e2208cc392f45d776c9e65b0144dd2
7
+ data.tar.gz: 96963d1457393cf3d63829d6232527f531a453d88be6d7d74c90451aeee8998b80a0a198d2cbb2ed4388f5750476824eaab5c3a722ba3e91f56dbbf6913d6d74
data/README.md CHANGED
@@ -14,7 +14,7 @@ Navigate to the `/rush_job` route in your application to see the Delayed Jobs. L
14
14
  Add this line to your Ruby on Rails application's Gemfile:
15
15
 
16
16
  ```ruby
17
- gem 'rush_job', '~> 0.3.1'
17
+ gem 'rush_job', '~> 0.3.2'
18
18
  ```
19
19
 
20
20
  And then execute:
@@ -3,8 +3,16 @@ module RushJob
3
3
  include SortHelper
4
4
  include Pagy::Backend
5
5
 
6
+ rescue_from Pagy::OverflowError, with: :redirect_to_first_page
7
+
6
8
  def index
7
9
  @pagy, @rush_jobs = pagy(RushJob.order("#{sort_column} #{sort_direction}"))
8
10
  end
11
+
12
+ private
13
+
14
+ def redirect_to_first_page
15
+ redirect_to root_path, notice: t(:invalid_page_notice)
16
+ end
9
17
  end
10
18
  end
@@ -11,6 +11,11 @@
11
11
  <%= stylesheet_link_tag "rush_job/application", media: "all" %>
12
12
  </head>
13
13
  <body class="background-color-<%= current_theme %>">
14
+ <% flash.each do |type, msg| %>
15
+ <div class="alert alert-<%= invert_theme %>" role="alert">
16
+ <%= msg %>
17
+ </div>
18
+ <% end %>
14
19
 
15
20
  <%= yield %>
16
21
 
@@ -4,6 +4,7 @@ en:
4
4
  delayed_title: "Delayed jobs"
5
5
  failed_at: "Failed at"
6
6
  id: "Id"
7
+ invalid_page_notice: "No jobs on that page, redirected to first page."
7
8
  job_class: "Job class"
8
9
  last_error: "Last error"
9
10
  locked_at: "Locked at"
@@ -1,3 +1,3 @@
1
1
  module RushJob
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rush_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - JavaKoala
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-28 00:00:00.000000000 Z
11
+ date: 2023-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview