Also add Ubuntu 24.04 and drop 20.04 as 24.04 is needed for
ruby 3.1 without rvm so we should test it.
15 files changed:
cancel-in-progress: true
env:
os: ubuntu-22.04
cancel-in-progress: true
env:
os: ubuntu-22.04
jobs:
rubocop:
name: RuboCop
jobs:
rubocop:
name: RuboCop
name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
strategy:
matrix:
name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
strategy:
matrix:
- ubuntu: [20.04, 22.04]
- ruby: ['3.0', '3.1', '3.2', '3.3']
+ ubuntu: [22.04, 24.04]
+ ruby: ['3.1', '3.2', '3.3']
runs-on: ubuntu-${{ matrix.ubuntu }}
env:
RAILS_ENV: test
runs-on: ubuntu-${{ matrix.ubuntu }}
env:
RAILS_ENV: test
NewCops: enable
Exclude:
- 'vendor/**/*'
NewCops: enable
Exclude:
- 'vendor/**/*'
gem "marcel"
# Used for browser detection
gem "marcel"
# Used for browser detection
-gem "browser", "< 6" # for ruby 3.0 support
+gem "browser", "< 6" # for ruby 3.1 support
# Used for S3 object storage
gem "aws-sdk-s3"
# Used for S3 object storage
gem "aws-sdk-s3"
# Used to validate widths
gem "unicode-display_width"
# Used to validate widths
gem "unicode-display_width"
-# Keep ruby 3.0 compatibility
-gem "multi_xml", "~> 0.6.0"
-
# Gems useful for development
group :development do
gem "better_errors"
# Gems useful for development
group :development do
gem "better_errors"
minitest (>= 4, < 6)
msgpack (1.7.2)
multi_json (1.15.0)
minitest (>= 4, < 6)
msgpack (1.7.2)
multi_json (1.15.0)
+ multi_xml (0.7.1)
+ bigdecimal (~> 3.1)
mutex_m (0.2.0)
net-http (0.4.1)
uri
mutex_m (0.2.0)
net-http (0.4.1)
uri
minitest (~> 5.1)
minitest-focus
multi_json
minitest (~> 5.1)
minitest-focus
multi_json
omniauth (~> 2.0.2)
omniauth-facebook
omniauth-github
omniauth (~> 2.0.2)
omniauth-facebook
omniauth-github
* **Vagrant** This installs the software into a virtual machine. For Vagrant instructions see [VAGRANT.md](VAGRANT.md).
* **Docker** This installs the software using containerization. For Docker instructions see [DOCKER.md](DOCKER.md).
* **Vagrant** This installs the software into a virtual machine. For Vagrant instructions see [VAGRANT.md](VAGRANT.md).
* **Docker** This installs the software using containerization. For Docker instructions see [DOCKER.md](DOCKER.md).
-These instructions are based on Ubuntu 22.04 LTS, which is the platform used by the OSMF servers.
+These instructions are based on Ubuntu 24.04 LTS, which is the platform used by the OSMF servers.
The instructions also work, with only minor amendments, for all other current Ubuntu releases, Fedora and MacOSX
We don't recommend attempting to develop or deploy this software on Windows. Some Ruby gems may not be supported. If you need to use Windows the easiest solutions in order are [Docker](DOCKER.md), [Vagrant](VAGRANT.md), and Ubuntu in a virtual machine.
The instructions also work, with only minor amendments, for all other current Ubuntu releases, Fedora and MacOSX
We don't recommend attempting to develop or deploy this software on Windows. Some Ruby gems may not be supported. If you need to use Windows the easiest solutions in order are [Docker](DOCKER.md), [Vagrant](VAGRANT.md), and Ubuntu in a virtual machine.
* PostgreSQL 13+
* Bundler (see note below about [developer Ruby setup](#rbenv))
* Javascript Runtime
* PostgreSQL 13+
* Bundler (see note below about [developer Ruby setup](#rbenv))
* Javascript Runtime
-These can be installed on Ubuntu 22.04 or later with:
+These can be installed on Ubuntu 24.04 or later with:
Vagrant.configure("2") do |config|
# use official ubuntu image for virtualbox
config.vm.provider "virtualbox" do |vb, override|
Vagrant.configure("2") do |config|
# use official ubuntu image for virtualbox
config.vm.provider "virtualbox" do |vb, override|
- override.vm.box = "ubuntu/jammy64"
+ override.vm.box = "ubuntu/noble64"
override.vm.synced_folder ".", "/srv/openstreetmap-website"
vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
override.vm.synced_folder ".", "/srv/openstreetmap-website"
vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
# use third party image and sshfs or NFS sharing for lxc
config.vm.provider "lxc" do |_, override|
# use third party image and sshfs or NFS sharing for lxc
config.vm.provider "lxc" do |_, override|
- override.vm.box = "generic/ubuntu2204"
+ override.vm.box = "generic/ubuntu2404"
override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
end
# use third party image and sshfs or NFS sharing for libvirt
config.vm.provider "libvirt" do |_, override|
override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
end
# use third party image and sshfs or NFS sharing for libvirt
config.vm.provider "libvirt" do |_, override|
- override.vm.box = "generic/ubuntu2204"
+ override.vm.box = "generic/ubuntu2404"
override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
end
override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
end
##
# wrap an api call in a timeout
##
# wrap an api call in a timeout
- def api_call_timeout(&block)
- Timeout.timeout(Settings.api_timeout, &block)
+ def api_call_timeout(&)
+ Timeout.timeout(Settings.api_timeout, &)
rescue ActionView::Template::Error => e
e = e.cause
rescue ActionView::Template::Error => e
e = e.cause
##
# wrap a web page in a timeout
##
# wrap a web page in a timeout
- def web_timeout(&block)
raise Timeout::Error if Settings.web_timeout.negative?
raise Timeout::Error if Settings.web_timeout.negative?
- Timeout.timeout(Settings.web_timeout, &block)
+ Timeout.timeout(Settings.web_timeout, &)
rescue ActionView::Template::Error => e
e = e.cause
rescue ActionView::Template::Error => e
e = e.cause
t "printable_name.version", :version => object.version
end
t "printable_name.version", :version => object.version
end
- def element_strikethrough(object, &block)
+ def element_strikethrough(object, &)
if object.redacted? || !object.visible?
if object.redacted? || !object.visible?
- def message_body(&block)
render(
:partial => "message_body",
render(
:partial => "message_body",
- :locals => { :body => capture(&block) }
+ :locals => { :body => capture(&) }
- def with_recipient_locale(recipient, &block)
- I18n.with_locale(Locale.available.preferred(recipient.preferred_languages), &block)
+ def with_recipient_locale(recipient, &)
+ I18n.with_locale(Locale.available.preferred(recipient.preferred_languages), &)
end
def from_address(name, type, id, token, user_id = nil)
end
def from_address(name, type, id, token, user_id = nil)
end
# Successively yields all the paginator's pages to the given block.
end
# Successively yields all the paginator's pages to the given block.
page_count.times do |n|
yield self[n + 1]
end
page_count.times do |n|
yield self[n + 1]
end
click_on "Logout", :match => :first
end
click_on "Logout", :match => :first
end
- def within_sidebar(&block)
- within "#sidebar_content", &block
+ def within_sidebar(&)
+ within("#sidebar_content", &)
Settings.merge!(saved_settings)
end
Settings.merge!(saved_settings)
end
- def with_user_account_deletion_delay(value, &block)
+ def with_user_account_deletion_delay(value, &)
- with_settings(:user_account_deletion_delay => value, &block)
+ with_settings(:user_account_deletion_delay => value, &)