auxilium 3.0.24 → 3.0.30
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 +4 -4
- data/.github/workflows/gem-push.yml +11 -0
- data/Gemfile.lock +3 -3
- data/lib/auxilium/concerns/metadata.rb +4 -0
- data/lib/auxilium/concerns/sidekiq_callbacks.rb +63 -0
- data/lib/auxilium/easy_crypt.rb +11 -1
- data/lib/auxilium/responders/continue_responder.rb +2 -2
- data/lib/auxilium/responders/signum_responder.rb +1 -1
- data/lib/auxilium/version.rb +1 -1
- data/lib/auxilium.rb +1 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b89d012f40a935b2cabb55fa5b7b42be362b22df1a671d44da81f2930b5826a4
|
4
|
+
data.tar.gz: 801a1b9b7ed8287ae037820949ca46b9c98ed1e1c2762051cd5dff49d3caeb3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e637f59e510c8271d6192731f813064e39466f0501ae41aa112a76975fc5d8bf21eb8bfa7b8e390827eee9b26a3c8cfbb628ac7f849a81e440c0be8386f83454
|
7
|
+
data.tar.gz: d732a9eb80da40fcbd726838f998ef40aecc520e5c3be1aae72963d86876207ef40f7c11f31cc545a973ab88d5e0e27c3e799aa1a0cb3a340316129c6a2fa217
|
data/Gemfile.lock
CHANGED
@@ -10,7 +10,7 @@ GIT
|
|
10
10
|
PATH
|
11
11
|
remote: .
|
12
12
|
specs:
|
13
|
-
auxilium (3.0.
|
13
|
+
auxilium (3.0.27)
|
14
14
|
actionpack (> 5.1)
|
15
15
|
activemodel (> 5.1)
|
16
16
|
activesupport (> 5.1)
|
@@ -74,7 +74,7 @@ GEM
|
|
74
74
|
pry (0.14.1)
|
75
75
|
coderay (~> 1.1)
|
76
76
|
method_source (~> 1.0)
|
77
|
-
pundit (2.
|
77
|
+
pundit (2.3.1)
|
78
78
|
activesupport (>= 3.0.0)
|
79
79
|
racc (1.6.0)
|
80
80
|
rack (2.2.4)
|
@@ -98,7 +98,7 @@ GEM
|
|
98
98
|
reverse_markdown (2.1.1)
|
99
99
|
nokogiri
|
100
100
|
rexml (3.2.5)
|
101
|
-
rolify (6.0.
|
101
|
+
rolify (6.0.1)
|
102
102
|
rubocop (1.37.1)
|
103
103
|
json (~> 2.3)
|
104
104
|
parallel (~> 1.10)
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require "active_support/callbacks"
|
2
|
+
|
3
|
+
# Following approach used by ActiveJob
|
4
|
+
# https://github.com/rails/rails/blob/93c9534c9871d4adad4bc33b5edc355672b59c61/activejob/lib/active_job/callbacks.rb
|
5
|
+
module Auxilium
|
6
|
+
module Concerns
|
7
|
+
module SidekiqCallbacks
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
def self.prepended(base)
|
11
|
+
base.include(ActiveSupport::Callbacks)
|
12
|
+
|
13
|
+
# Check to see if we already have any callbacks for :perform
|
14
|
+
# Prevents overwriting callbacks if we already included this module (and defined callbacks)
|
15
|
+
base.define_callbacks :perform unless base.respond_to?(:_perform_callbacks) && base._perform_callbacks.present?
|
16
|
+
base.define_callbacks :enqueue unless base.respond_to?(:_enqueue_callbacks) && base._enqueue_callbacks.present?
|
17
|
+
|
18
|
+
class << base
|
19
|
+
prepend ClassMethods
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def perform(*args)
|
24
|
+
if respond_to?(:run_callbacks)
|
25
|
+
run_callbacks :perform do
|
26
|
+
super(*args)
|
27
|
+
end
|
28
|
+
else
|
29
|
+
super(*args)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def enqueue(*args)
|
34
|
+
if respond_to?(:run_callbacks)
|
35
|
+
run_callbacks :enqueue do
|
36
|
+
super(*args)
|
37
|
+
end
|
38
|
+
else
|
39
|
+
super(*args)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module ClassMethods
|
44
|
+
def around_perform(*filters, &blk)
|
45
|
+
set_callback(:perform, :around, *filters, &blk)
|
46
|
+
end
|
47
|
+
|
48
|
+
def before_enqueue(*filters, &blk)
|
49
|
+
set_callback(:enqueue, :before, *filters, &blk)
|
50
|
+
end
|
51
|
+
|
52
|
+
def around_enqueue(*filters, &blk)
|
53
|
+
set_callback(:enqueue, :around, *filters, &blk)
|
54
|
+
end
|
55
|
+
|
56
|
+
def before_perform(*filters, &blk)
|
57
|
+
set_callback(:perform, :before, *filters, &blk)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
data/lib/auxilium/easy_crypt.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Auxilium
|
2
2
|
class EasyCrypt
|
3
3
|
# When no digest is given, the default Rails digest is used.
|
4
|
-
# Digest can be something like OpenSSL::Digest::SHA1 or OpenSSL::Digest::SHA256
|
4
|
+
# Digest can be something like OpenSSL::Digest::SHA1 or OpenSSL::Digest::SHA256
|
5
5
|
def initialize(key_base, digest: OpenSSL::Digest::SHA1)
|
6
6
|
@key_base = key_base
|
7
7
|
@digest = digest
|
@@ -52,5 +52,15 @@ module Auxilium
|
|
52
52
|
def crypted?(text)
|
53
53
|
text =~ /^EasyCrypt@[0-9a-f]+\$\$[^-]+--[^-]+--[^-]+/
|
54
54
|
end
|
55
|
+
|
56
|
+
class << self
|
57
|
+
def dump(text)
|
58
|
+
new(Rails.application.credentials.secret_key_base).encrypt(text)
|
59
|
+
end
|
60
|
+
|
61
|
+
def load(text)
|
62
|
+
new(Rails.application.credentials.secret_key_base).decrypt(text)
|
63
|
+
end
|
64
|
+
end
|
55
65
|
end
|
56
66
|
end
|
@@ -7,9 +7,9 @@ module Auxilium
|
|
7
7
|
protected
|
8
8
|
|
9
9
|
def navigation_location
|
10
|
-
return options[:location] if options[:location] && (controller.is_a?(Devise::SessionsController) || controller.is_a?(Devise::PasswordsController))
|
10
|
+
return options[:location] if options[:location] && (defined?(Devise) && (controller.is_a?(Devise::SessionsController) || controller.is_a?(Devise::PasswordsController)))
|
11
11
|
return options[:location] if controller.params[:commit] == 'continue' && options[:location]
|
12
|
-
return options[:collection_location].call if %w[save commit].include?(controller.params[:commit]) && options[:collection_location]
|
12
|
+
return options[:collection_location].call if %w[save commit delete].include?(controller.params[:commit]) && options[:collection_location]
|
13
13
|
return resource_location if controller.params[:commit] == 'continue'
|
14
14
|
|
15
15
|
klass = resources.last.class
|
data/lib/auxilium/version.rb
CHANGED
data/lib/auxilium.rb
CHANGED
@@ -19,6 +19,7 @@ require 'auxilium/concerns/authenticated'
|
|
19
19
|
require 'auxilium/concerns/metadata'
|
20
20
|
require 'auxilium/concerns/metadata_scoped'
|
21
21
|
require 'auxilium/concerns/model_name_shortcuts'
|
22
|
+
require 'auxilium/concerns/sidekiq_callbacks'
|
22
23
|
require 'auxilium/responders/continue_responder'
|
23
24
|
require 'auxilium/responders/signum_responder'
|
24
25
|
require 'auxilium/responders/responder'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auxilium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Meij
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -143,6 +143,7 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
+
- ".github/workflows/gem-push.yml"
|
146
147
|
- ".gitignore"
|
147
148
|
- ".travis.yml"
|
148
149
|
- Gemfile
|
@@ -160,6 +161,7 @@ files:
|
|
160
161
|
- lib/auxilium/concerns/metadata.rb
|
161
162
|
- lib/auxilium/concerns/metadata_scoped.rb
|
162
163
|
- lib/auxilium/concerns/model_name_shortcuts.rb
|
164
|
+
- lib/auxilium/concerns/sidekiq_callbacks.rb
|
163
165
|
- lib/auxilium/easy_crypt.rb
|
164
166
|
- lib/auxilium/grape.rb
|
165
167
|
- lib/auxilium/grape/parameter_filter.rb
|
@@ -180,7 +182,7 @@ licenses: []
|
|
180
182
|
metadata:
|
181
183
|
homepage_uri: https://code.entropydecelerator.com/components/auxilium
|
182
184
|
source_code_uri: https://code.entropydecelerator.com/components/auxilium
|
183
|
-
post_install_message:
|
185
|
+
post_install_message:
|
184
186
|
rdoc_options: []
|
185
187
|
require_paths:
|
186
188
|
- lib
|
@@ -195,8 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
197
|
- !ruby/object:Gem::Version
|
196
198
|
version: '0'
|
197
199
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
199
|
-
signing_key:
|
200
|
+
rubygems_version: 3.4.10
|
201
|
+
signing_key:
|
200
202
|
specification_version: 4
|
201
203
|
summary: Random utilities.
|
202
204
|
test_files: []
|