maintenance_tasks 1.2.0 → 1.2.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: ed5e344271f9c3342d90720aef36f06a0d62634eb646318afa0bb18e29b0edcc
4
- data.tar.gz: 3a32052fb7148cdf403939cbfc154c816285897dd58396db3e4b39d6bb9aa9b0
3
+ metadata.gz: c673afea63371c8c8f69ccda520b66fb1391d17ff6f241eb5610e45c60493561
4
+ data.tar.gz: a1b914d6fdf7391bda0691444f8af2e263c71313c295bf2fd38e6e655f661a99
5
5
  SHA512:
6
- metadata.gz: 34d930320936fb1286687ec4268c1af2ba7cdd3e7a1d704ce45dc68de76ff3f47dece9ad714848b76ad6d33407dbe9204b6d2eb172cc2f1040831ab9a728bfb0
7
- data.tar.gz: 612b1a57750e4a3c250d914e915b2389a8931c1b5de19fcd3bf8a3cc2be1bb5f9cc98881380294455c035d71717065fb6b6728a1b839a98cd71c2aaedc890070
6
+ metadata.gz: d161e823b16c12abd127d725cccf985d0bca50253cb40937d265685d6078730beff127913eea7973ff23211576d5d143508ac61968ebb2460f1c12fc89ff5d82
7
+ data.tar.gz: 46de8ac9e6819829de191a0fcfaf40c48b2922f1cc3024df58a41a7e6763658149f3f32baa168045bae6c00790da1b789647d36bad880714bdf63e75d67aeb32
@@ -51,13 +51,13 @@ module MaintenanceTasks
51
51
  count = @run.tick_count
52
52
  total = @run.tick_total
53
53
  if !total?
54
- "Processed #{pluralize(count, 'item')}."
54
+ "Processed #{pluralize(count, "item")}."
55
55
  elsif over_total?
56
- "Processed #{pluralize(count, 'item')} (expected #{total})."
56
+ "Processed #{pluralize(count, "item")} (expected #{total})."
57
57
  else
58
58
  percentage = 100.0 * count / total
59
59
 
60
- "Processed #{count} out of #{pluralize(total, 'item')} "\
60
+ "Processed #{count} out of #{pluralize(total, "item")} "\
61
61
  "(#{number_to_percentage(percentage, precision: 0)})."
62
62
  end
63
63
  end
@@ -48,7 +48,12 @@ module MaintenanceTasks
48
48
 
49
49
  validates_with RunStatusValidator, on: :update
50
50
 
51
- has_one_attached :csv_file, service: MaintenanceTasks.active_storage_service
51
+ if MaintenanceTasks.active_storage_service.present?
52
+ has_one_attached :csv_file,
53
+ service: MaintenanceTasks.active_storage_service
54
+ else
55
+ has_one_attached :csv_file
56
+ end
52
57
 
53
58
  # Sets the run status to enqueued, making sure the transition is validated
54
59
  # in case it's already enqueued.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maintenance_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Engineering
@@ -138,10 +138,10 @@ files:
138
138
  homepage: https://github.com/Shopify/maintenance_tasks
139
139
  licenses: []
140
140
  metadata:
141
- source_code_uri: https://github.com/Shopify/maintenance_tasks/tree/v1.2.0
141
+ source_code_uri: https://github.com/Shopify/maintenance_tasks/tree/v1.2.1
142
142
  allowed_push_host: https://rubygems.org
143
143
  post_install_message: |-
144
- Thank you for installing Maintenance Tasks 1.2.0. To complete, please run:
144
+ Thank you for installing Maintenance Tasks 1.2.1. To complete, please run:
145
145
 
146
146
  rails generate maintenance_tasks:install
147
147
  rdoc_options: []