paper_trail-background 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 429ba548db6a5017655f122d0eb90807ff62d6a3c8c0cb500bc60dc104a49e10
4
- data.tar.gz: d200d4f26668cbaf3c19fd66f88a1c1ab47e8adf9decd89d5e4c76ce391ad507
3
+ metadata.gz: 801abe0ea0d7e83c628f71db2a9983b00af26f9b68a66a2e5cc79fce306abb2c
4
+ data.tar.gz: 68e276d1635253b002c84eb45b644cc85d9e4b35f1595da87de4552a6755b31d
5
5
  SHA512:
6
- metadata.gz: 41c19e1a64c9f99610390ecddca4e7a8669590112310df538cebbf75567e6f92d85dd91202cad5a6227edd04e3013842372956097baacf0315b91422cd427087
7
- data.tar.gz: 91348f10376acbadc06f425bab1307e89f21f7e46172709cc5e14902d7ff856f227eee56fb5eecfdcbc1d36a89fcaa9189505bc6412128ef0c237b404d72d451
6
+ metadata.gz: 45f4ddea7993170dad7a1c611bf21b3097a090764a0c19f962f07431047d2e05726645e29afd7d12e90796dc151f032329b556e27369f9eb19ec864b7022de4e
7
+ data.tar.gz: 26b673571563ed840b85dc63faa4da4144bd017948f0c33b7b8001cf20cb249e8e4c6a8fe409884767bf6bfeb4858041e01d97e7f846a4f064cf427ed84645b2
data/README.md CHANGED
@@ -5,12 +5,29 @@
5
5
  - [![Version](http://img.shields.io/gem/v/paper_trail-background.svg?style=flat-square)](https://rubygems.org/gems/paper_trail-background)
6
6
 
7
7
 
8
- TODO: Write a gem description
8
+ Allows you to enqueue version creation/deletion as a background job to avoid having business logic blocked by changelog writing.
9
9
 
10
10
 
11
11
  ## Using
12
12
 
13
- TODO: Write usage instructions here
13
+ First you'll need to setup a job for processing versions:
14
+
15
+ ``` ruby
16
+ # The class MUST be named this
17
+ class VersionJob < ApplicationJob
18
+
19
+ # These are settings you'll probably want, I suggest sidekiq-unique-jobs
20
+ sidekiq_options(
21
+ :queue => "versions",
22
+ :unique_across_queues => true,
23
+ :lock => :until_executed,
24
+ :log_duplicate_payload => true
25
+ )
26
+
27
+ # This wires up the background job
28
+ include PaperTrail::Background::Sidekiq
29
+ end
30
+ ```
14
31
 
15
32
 
16
33
  ## Installing
@@ -32,3 +49,9 @@ Or install it yourself with:
32
49
  4. Commit your changes (`git commit -am 'Add some feature'`)
33
50
  5. Push to the branch (`git push origin my-new-feature`)
34
51
  6. Create new Pull Request
52
+
53
+
54
+ ## Todo
55
+
56
+ - Support other job types
57
+ - Allow for configuring the job class name
@@ -1,5 +1,5 @@
1
1
  module PaperTrail
2
2
  module Background
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail-background
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2019-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler