Skip to content

Commit

Permalink
rails 7
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Oct 31, 2024
1 parent 6286c9d commit 2273171
Show file tree
Hide file tree
Showing 21 changed files with 93 additions and 86 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ruby File.read('.ruby-version').strip

# gems that have rails engines are are always needed
group :preload do
rails_version = '~> 6.1.7'
rails_version = '~> 7.0.8.6'
gem 'railties', rails_version
gem 'actioncable', rails_version
gem 'actionmailer', rails_version
Expand Down
123 changes: 63 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,58 +211,60 @@ GEM
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
actioncable (7.0.8.6)
actionpack (= 7.0.8.6)
activesupport (= 7.0.8.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (6.1.7.8)
actionpack (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activesupport (= 6.1.7.8)
actionmailer (7.0.8.6)
actionpack (= 7.0.8.6)
actionview (= 7.0.8.6)
activejob (= 7.0.8.6)
activesupport (= 7.0.8.6)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (6.1.7.8)
actionview (= 6.1.7.8)
activesupport (= 6.1.7.8)
rack (~> 2.0, >= 2.0.9)
actionpack (7.0.8.6)
actionview (= 7.0.8.6)
activesupport (= 7.0.8.6)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (6.1.7.8)
activesupport (= 6.1.7.8)
actionview (7.0.8.6)
activesupport (= 7.0.8.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_hash (3.2.1)
activesupport (>= 5.0.0)
activejob (6.1.7.8)
activesupport (= 6.1.7.8)
activejob (7.0.8.6)
activesupport (= 7.0.8.6)
globalid (>= 0.3.6)
activemodel (6.1.7.8)
activesupport (= 6.1.7.8)
activerecord (6.1.7.8)
activemodel (= 6.1.7.8)
activesupport (= 6.1.7.8)
activesupport (6.1.7.8)
activemodel (7.0.8.6)
activesupport (= 7.0.8.6)
activerecord (7.0.8.6)
activemodel (= 7.0.8.6)
activesupport (= 7.0.8.6)
activesupport (7.0.8.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
airbrake (11.0.3)
airbrake-ruby (~> 5.1)
airbrake-ruby (5.2.1)
rbtree3 (~> 0.5)
airbrake (13.0.4)
airbrake-ruby (~> 6.0)
airbrake-ruby (6.2.2)
rbtree3 (~> 0.6)
ansible (0.2.2)
ar_multi_threaded_transactional_tests (0.5.0)
activerecord (>= 4.2.0, < 6.2.0)
ar_multi_threaded_transactional_tests (0.6.0)
activerecord (>= 6.1.0, < 7.2.0)
ast (2.4.2)
attr_encrypted (3.1.0)
attr_encrypted (4.1.1)
encryptor (~> 3.0.0)
audited (5.4.3)
activerecord (>= 5.0, < 7.2)
Expand Down Expand Up @@ -301,7 +303,7 @@ GEM
bootstrap3-datetimepicker-rails (4.17.47)
momentjs-rails (>= 2.8.1)
brakeman (5.4.1)
builder (3.2.4)
builder (3.3.0)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
Expand All @@ -310,7 +312,7 @@ GEM
concurrent-ruby
coderay (1.1.3)
commonmarker (0.23.10)
concurrent-ruby (1.3.1)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crack (0.4.6)
bigdecimal
Expand All @@ -329,7 +331,7 @@ GEM
railties (>= 5)
dotenv (2.8.1)
encryptor (3.0.0)
erubi (1.12.0)
erubi (1.13.0)
execjs (2.9.1)
faraday (2.8.1)
base64
Expand Down Expand Up @@ -357,17 +359,17 @@ GEM
flowdock (0.7.1)
httparty (~> 0.7)
multi_json
forking_test_runner (1.13.0)
forking_test_runner (1.15.0)
parallel_tests (>= 1.3.7)
git_diff_parser (3.2.0)
gitlab (4.19.0)
httparty (~> 0.20)
terminal-table (>= 1.5.1)
globalid (1.2.1)
activesupport (>= 6.1)
goldiloader (3.2.0)
activerecord (>= 4.2, < 6.3)
activesupport (>= 4.2, < 6.3)
goldiloader (5.3.1)
activerecord (>= 6.1, < 8)
activesupport (>= 6.1, < 8)
hashie (5.0.0)
http (5.2.0)
addressable (~> 2.8)
Expand All @@ -382,7 +384,7 @@ GEM
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
inflection (1.0.0)
interception (0.5)
Expand Down Expand Up @@ -415,7 +417,7 @@ GEM
railties (>= 4)
request_store (~> 1.0)
logstash-event (1.2.02)
loofah (2.22.0)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.7.1)
Expand All @@ -431,9 +433,9 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.14.4)
minitest-rails (6.1.1)
minitest-rails (7.0.1)
minitest (~> 5.10)
railties (~> 6.1.0)
railties (~> 7.0.0)
mixlib-shellout (3.2.7)
chef-utils
mocha (2.1.0)
Expand All @@ -460,16 +462,16 @@ GEM
netrc (0.11.0)
newrelic_rpm (9.7.1)
nio4r (2.7.3)
nokogiri (1.16.5)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.5-aarch64-linux)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-darwin)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
Expand Down Expand Up @@ -502,8 +504,8 @@ GEM
actionpack (>= 4.2)
omniauth (~> 2.0)
pagy (4.11.0)
parallel (1.24.0)
parallel_tests (2.32.0)
parallel (1.26.3)
parallel_tests (4.7.2)
parallel
parser (3.3.0.5)
ast (~> 2.4.1)
Expand All @@ -528,8 +530,8 @@ GEM
puma (5.6.9)
nio4r (~> 2.0)
pyu-ruby-sasl (0.0.3.3)
racc (1.8.0)
rack (2.2.9)
racc (1.8.1)
rack (2.2.10)
rack-mini-profiler (3.3.0)
rack (>= 1.2.0)
rack-protection (3.2.0)
Expand All @@ -548,12 +550,13 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
railties (7.0.8.6)
actionpack (= 7.0.8.6)
activesupport (= 7.0.8.6)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.2.1)
rbtree3 (0.7.1)
Expand All @@ -566,7 +569,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.8)
rexml (3.3.9)
rollbar (2.27.1)
rollbar-user_informer (0.1.0)
rollbar (~> 2.15)
Expand Down Expand Up @@ -639,7 +642,7 @@ GEM
stackprof (0.2.12)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.3.1)
thor (1.3.2)
tilt (2.3.0)
timeout (0.4.1)
tzinfo (2.0.6)
Expand All @@ -659,7 +662,7 @@ GEM
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.15)
zeitwerk (2.7.1)
zendesk_api (2.0.1)
faraday (> 2.0.0)
faraday-multipart
Expand All @@ -677,10 +680,10 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
actioncable (~> 6.1.7)
actionmailer (~> 6.1.7)
actioncable (~> 7.0.8.6)
actionmailer (~> 7.0.8.6)
active_hash
activerecord (~> 6.1.7)
activerecord (~> 7.0.8.6)
ansible
ar_multi_threaded_transactional_tests
attr_encrypted
Expand Down Expand Up @@ -754,7 +757,7 @@ DEPENDENCIES
rails-assets-underscore!
rails-assets-x-editable!
rails-controller-testing
railties (~> 6.1.7)
railties (~> 7.0.8.6)
rubocop
rubocop-rails
samson_airbrake!
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/dashboards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class DashboardsController < ApplicationController
before_action :find_environment

def show
@before = Time.parse(params[:before] || Time.now.to_s(:db))
@before = Time.parse(params[:before] || Time.now.to_fs(:db))
@deploy_groups = @environment.deploy_groups
@projects = Project.all
@failed_deploys = (params[:failed_deploys] == "true")
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/resource_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def render_as_csv(items)
csv << ['-', 'url:', request.original_url]
end

file = "#{controller_name}_#{Time.now.to_s(:db).tr(':', '-')}.csv"
file = "#{controller_name}_#{Time.now.to_fs(:db).tr(':', '-')}.csv"
send_data csv, type: :csv, filename: file
end
end
2 changes: 1 addition & 1 deletion app/models/concerns/attr_encrypted_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def as_json(options = {})
options[:except] ||= []
options[:except] += [
:encryption_key_sha,
*self.class.encrypted_attributes.keys.flat_map do |column|
*self.class.attr_encrypted_encrypted_attributes.keys.flat_map do |column|
[column, :"encrypted_#{column}_iv", :"encrypted_#{column}"]
end
]
Expand Down
2 changes: 1 addition & 1 deletion app/models/csv_export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def status?(state)
end

def download_name
"deploys_#{filters_project}#{created_at.to_s(:number)}.csv"
"deploys_#{filters_project}#{created_at.to_fs(:number)}.csv"
end

def path_file
Expand Down
2 changes: 1 addition & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def repository_homepage_gitlab
def deploys_by_group(before, include_failed_deploys: false)
stages.each_with_object({}) do |stage, result|
stage_filter = include_failed_deploys ? stage.deploys : stage.deploys.succeeded.where(release: true)
deploy = stage_filter.find_by("deploys.updated_at <= ?", before.to_s(:db))
deploy = stage_filter.find_by("deploys.updated_at <= ?", before.to_fs(:db))
next unless deploy
stage.deploy_groups.pluck(:id).each { |id| (result[id] ||= []) << deploy }
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<% if SAMSON_VERSION %>
<li>
<%= link_to SAMSON_VERSION.first(7), "https://github.com/zendesk/samson/commit/#{SAMSON_VERSION}",
title: "Currently deployed samson version since #{Rails.application.config.samson.start_time.to_s(:db)}", class: "sha" %>
title: "Currently deployed samson version since #{Rails.application.config.samson.start_time.to_fs(:db)}", class: "sha" %>
</li>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/_stage.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<% if deploy = stage.last_deploy %>
<td>
<%= link_to deploy.short_reference, [@project, deploy], title: "#{deploy.reference} at #{deploy.updated_at.to_s(:db)}" %>
<%= link_to deploy.short_reference, [@project, deploy], title: "#{deploy.reference} at #{deploy.updated_at.to_fs(:db)}" %>
by
<%= deploy.user.name %>
<%= status_badge deploy.job.status %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/secrets/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<% end %>
<%= form.input :deprecated, as: :check_box, label: "Deprecated #{secret[:deprecated_at]}" do %>
<%= form.check_box :deprecated_at, {}, secret[:deprecated_at] || Time.now.to_s(:db), "0" %>
<%= form.check_box :deprecated_at, {}, secret[:deprecated_at] || Time.now.to_fs(:db), "0" %>
<% end %>
<% needs_value = @duplicate_secret_error || !id %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/user_merges/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Delete selected empty user and change #<%= @user.id %> <%= @user.name_and_email
<h2>Users with the same name or email</h2>
<ul>
<% candidates.each do |user| %>
<li>ID <%= user.id %> <%= link_to user.name_and_email, user %>, last seen <%= user.last_seen_at&.to_s(:db) || "Never" %></li>
<li>ID <%= user.id %> <%= link_to user.name_and_email, user %>, last seen <%= user.last_seen_at&.to_fs(:db) || "Never" %></li>
<% end %>
</ul>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion lib/samson/secrets/db_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def secret_to_hash(secret)
{
value: secret.value,
visible: secret.visible,
deprecated_at: secret.deprecated_at&.to_s(:db),
deprecated_at: secret.deprecated_at&.to_fs(:db),
comment: secret.comment,
updater_id: secret.updater_id,
creator_id: secret.creator_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def update_secret(namespace)
namespace: namespace,
annotations: {
via: "Samson",
created_at: Time.now.to_s(:db)
created_at: Time.now.to_fs(:db)
}
},
data: {
Expand Down
Loading

0 comments on commit 2273171

Please sign in to comment.