Skip to content

Commit 9da806b

Browse files
authored
TEF-80: update gyr-efiler to newest version, which uses mef sdk v16 (#6096)
* update to new gyr-efiler version, except in production before 1/1/26 * add todo comment * removed todo comment
1 parent 22e4e3f commit 9da806b

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

app/services/efile/gyr_efiler_service.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module Efile
44
class GyrEfilerService
5-
CURRENT_VERSION = 'ae332c44bac585fb9dbec9bf32ffff0d34a72830'
65
POSTGRES_LOCK_PREFIX = 1640661264
76
RETRYABLE_LOG_CONTENTS = [
87
/Transaction Result: The server sent HTTP status code 302: Moved Temporarily/,
@@ -18,6 +17,14 @@ class GyrEfilerService
1817
/HTTP transport error: javax.net.ssl.SSLException/,
1918
]
2019

20+
def self.current_version
21+
if Rails.env.production? && Date.today.year < 2026
22+
'ae332c44bac585fb9dbec9bf32ffff0d34a72830'
23+
else
24+
'8c46c9dccfc4da4b0acec5813966b1ba68abe245'
25+
end
26+
end
27+
2128
def self.run_efiler_command(*args)
2229
Dir.mktmpdir do |working_directory|
2330
FileUtils.mkdir_p(File.join(working_directory, "output", "log"))
@@ -80,7 +87,7 @@ def self.ensure_config_dir_prepared
8087
FileUtils.mkdir_p(config_dir)
8188
return if File.exist?(File.join(config_dir, '.ready'))
8289

83-
config_zip_path = Dir.glob(Rails.root.join("vendor", "gyr_efiler", "gyr-efiler-config-#{CURRENT_VERSION}.zip"))[0]
90+
config_zip_path = Dir.glob(Rails.root.join("vendor", "gyr_efiler", "gyr-efiler-config-#{current_version}.zip"))[0]
8491
raise StandardError.new("Please run rake setup:download_gyr_efiler then try again") if config_zip_path.nil?
8592

8693
system!("unzip -o #{config_zip_path} -d #{Rails.root.join("tmp", "gyr_efiler")}")
@@ -108,7 +115,7 @@ def self.ensure_config_dir_prepared
108115
end
109116

110117
def self.ensure_gyr_efiler_downloaded
111-
classes_zip_path = Dir.glob(Rails.root.join("vendor", "gyr_efiler", "gyr-efiler-classes-#{CURRENT_VERSION}.zip"))[0]
118+
classes_zip_path = Dir.glob(Rails.root.join("vendor", "gyr_efiler", "gyr-efiler-classes-#{current_version}.zip"))[0]
112119
raise StandardError.new("You must run rails setup:download_gyr_efiler") if classes_zip_path.nil?
113120

114121
return classes_zip_path

lib/tasks/setup.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ namespace :setup do
3131

3232
task download_gyr_efiler: :environment do |_task|
3333
paths = [
34-
Rails.root.join('vendor', 'gyr_efiler', "gyr-efiler-classes-#{Efile::GyrEfilerService::CURRENT_VERSION}.zip"),
35-
Rails.root.join('vendor', 'gyr_efiler', "gyr-efiler-config-#{Efile::GyrEfilerService::CURRENT_VERSION}.zip")
34+
Rails.root.join('vendor', 'gyr_efiler', "gyr-efiler-classes-#{Efile::GyrEfilerService.current_version}.zip"),
35+
Rails.root.join('vendor', 'gyr_efiler', "gyr-efiler-config-#{Efile::GyrEfilerService.current_version}.zip")
3636
]
3737
# If the file already exists, do not re-download.
3838
next if paths.all? { |p| File.exist?(p) }

0 commit comments

Comments
 (0)