Skip to content

Commit 4ae6699

Browse files
Merge pull request #344 from Shopify/rafaelfranca-patch-1
Avoid usage of private_constant
2 parents fe52716 + 9bc2a2d commit 4ae6699

File tree

16 files changed

+3
-35
lines changed

16 files changed

+3
-35
lines changed

app/controllers/maintenance_tasks/application_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module MaintenanceTasks
44
# Base class for all controllers used by this engine.
55
#
6-
# @api private
6+
# Can be extended to add different authentication and authorization code.
77
class ApplicationController < ActionController::Base
88
include Pagy::Backend
99

@@ -22,5 +22,4 @@ class ApplicationController < ActionController::Base
2222

2323
protect_from_forgery with: :exception
2424
end
25-
private_constant :ApplicationController
2625
end

app/controllers/maintenance_tasks/runs_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ def set_run
3030
@run = Run.find(params.fetch(:id))
3131
end
3232
end
33-
private_constant :RunsController
3433
end

app/controllers/maintenance_tasks/tasks_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ def set_refresh
4242
@refresh = 3
4343
end
4444
end
45-
private_constant :TasksController
4645
end

app/helpers/maintenance_tasks/application_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ def time_ago(datetime)
2929
end
3030
end
3131
end
32-
private_constant :ApplicationHelper
3332
end

app/helpers/maintenance_tasks/tasks_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,4 @@ def csv_file_download_path(run)
114114
)
115115
end
116116
end
117-
private_constant :TasksHelper
118117
end

app/models/maintenance_tasks/application_record.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
module MaintenanceTasks
33
# Base class for all records used by this engine.
44
#
5-
# @api private
5+
# Can be extended to setup different database where all tables related to
6+
# maintenance tasks will live.
67
class ApplicationRecord < ActiveRecord::Base
78
self.abstract_class = true
89
end
9-
private_constant :ApplicationRecord
1010
end

app/models/maintenance_tasks/csv_collection.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ def count
3030
csv_content.count("\n") - 1
3131
end
3232
end
33-
private_constant :CsvCollection
3433
end

app/models/maintenance_tasks/progress.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ def over_total?
7474
@run.tick_count > @run.tick_total
7575
end
7676
end
77-
private_constant :Progress
7877
end

app/models/maintenance_tasks/run.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,4 @@ def csv_attachment_presence
195195
nil
196196
end
197197
end
198-
private_constant :Run
199198
end

app/models/maintenance_tasks/task_data.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,4 @@ def runs
138138
Run.where(task_name: name).with_attached_csv_file.order(created_at: :desc)
139139
end
140140
end
141-
private_constant :TaskData
142141
end

0 commit comments

Comments
 (0)