maintenance_tasks 2.3.0 → 2.3.1

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: a14c442d683123d8aabb30db8c73c15a31ddd24852356aa64b0255b1cb2312e0
4
- data.tar.gz: d5df5cbfa0cf9feab143ae2ea15cb5a0013978b552a068d9a588fed4e04178bd
3
+ metadata.gz: dadbcebb3f103324f6dd5d4319777ffbb5caa5c935912f092299275d27c40f58
4
+ data.tar.gz: a58d54eed126d14c9e3e036cc76238f3c738de40c66038882f4824230137c791
5
5
  SHA512:
6
- metadata.gz: 528669b01c611fe0e502683665182bddb2a98f2a74911c5d957f3868fca2ff57323a07eb2093acdfedc39e44057f8346702f70fc67cf027f59a32b985a6f7cea
7
- data.tar.gz: bb00d7ef688b49ad9ae295650eea0b57718ea95aea6b341780011d882ae2b0f9ac830241cd9663d3bd7c9b9e08b3ee9bf6daa91a4ef2e4c53b69a15350c2da06
6
+ metadata.gz: d0ffc76f0c5a2b7a3520ac7e8ae5f41e346f03eb84500238c1e73fec7dfea11586aa6d6b2c44841b72b550c023f3e7f4926dab686b823e475a22ec31e1b513ae
7
+ data.tar.gz: ac810b5fd6f1a9965bdf9556035196d4603bf84dd03297fb1f02ba5aa31c38935db9bca1d8195dc0950875083d0e372a0c540226bf80b9beb4986624072f71d6
data/README.md CHANGED
@@ -840,8 +840,8 @@ or email of the user who performed the maintenance task.
840
840
 
841
841
  ```ruby
842
842
  # config/initializers/maintenance_tasks.rb
843
- MaintenanceTasks.metadata = -> do
844
- { user_email: current_user.email }
843
+ MaintenanceTasks.metadata = ->(context) do
844
+ { user_email: context.current_user.email }
845
845
  end
846
846
  ```
847
847
 
@@ -14,7 +14,7 @@ module MaintenanceTasks
14
14
  name: params.fetch(:task_id),
15
15
  csv_file: params[:csv_file],
16
16
  arguments: params.fetch(:task_arguments, {}).permit!.to_h,
17
- metadata: MaintenanceTasks.metadata&.call,
17
+ metadata: instance_exec(&MaintenanceTasks.metadata || -> {}),
18
18
  &block
19
19
  )
20
20
  redirect_to(task_path(task))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maintenance_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-23 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -156,7 +156,7 @@ homepage: https://github.com/Shopify/maintenance_tasks
156
156
  licenses:
157
157
  - MIT
158
158
  metadata:
159
- source_code_uri: https://github.com/Shopify/maintenance_tasks/tree/v2.3.0
159
+ source_code_uri: https://github.com/Shopify/maintenance_tasks/tree/v2.3.1
160
160
  allowed_push_host: https://rubygems.org
161
161
  post_install_message:
162
162
  rdoc_options: []