Skip to content

Commit

Permalink
Fixed issues due to removed method in Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pschijven committed Sep 14, 2023
1 parent cadf25e commit 90271a2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ def build_filename
private

def delete_dump_file
File.delete(build_filename) if File.exists?(build_filename)
File.delete(build_filename) if File.exist?(build_filename)
end
end
2 changes: 1 addition & 1 deletion app/views/pages/version.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dd class="col-md-10"><%= "#{Iqvoc.host_namespace} #{Iqvoc.host_version}" %></dd>
<% end %>
<% if File.exists?(Rails.root.join('headrev.txt')) %>
<% if File.exist?(Rails.root.join('headrev.txt')) %>
<dt class="col-md-2">Revision</dt>
<dd class="col-md-10"><%= File.read(Rails.root.join('headrev.txt')) %></dd>
<% end %>
Expand Down
26 changes: 26 additions & 0 deletions test/integration/version_page_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2011-2023 innoQ Deutschland GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require File.join(File.expand_path(File.dirname(__FILE__)), '../integration_test_helper')

class VersionPageTest < ActionDispatch::IntegrationTest

test 'visit version page' do
visit version_path(lang: 'de')

assert page.body.include? 'iQvoc core version:'
assert page.body.include? Iqvoc::VERSION
end

end

0 comments on commit 90271a2

Please sign in to comment.