Skip to content

Commit 7f849b5

Browse files
authored
Merge pull request #341 from gtt-project/next
Prepares v6.0.0 release
2 parents 20c69b0 + 4c0b533 commit 7f849b5

30 files changed

+575
-440
lines changed

.github/workflows/test-postgis.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
redmine_version: [5.0-stable, 5.1-stable, master]
29-
ruby_version: ['3.0', '3.1', '3.2']
30-
db_version: [12-3.4, 16-3.4]
28+
redmine_version: [5.1-stable, 6.0-stable, master]
29+
ruby_version: ['3.1', '3.2', '3.3']
30+
db_version: [13-3.4, 17-3.5]
3131
include:
3232
- system_test: true
33-
redmine_version: 5.1-stable
34-
ruby_version: '3.2'
33+
redmine_version: 6.0-stable
34+
ruby_version: '3.3'
3535
exclude:
36-
- redmine_version: 5.0-stable
37-
ruby_version: '3.2'
36+
- redmine_version: 5.1-stable
37+
ruby_version: '3.3'
3838
- redmine_version: master
3939

4040
services:
@@ -106,8 +106,9 @@ jobs:
106106
- name: Adjust Gem environment
107107
run: |
108108
case "${{ matrix.redmine_version }}" in
109-
master)
110-
echo "GEM_ACTIVERECORD_POSTGIS_ADAPTER_VERSION=9.0.1" >> ${GITHUB_ENV}
109+
5.1-stable)
110+
echo "GEM_RGEO_ACTIVERECORD_VERSION=7.0.1" >> ${GITHUB_ENV}
111+
echo "GEM_ACTIVERECORD_POSTGIS_ADAPTER_VERSION=7.1.1" >> ${GITHUB_ENV}
111112
;;
112113
esac
113114
@@ -142,11 +143,11 @@ jobs:
142143
GOOGLE_CHROME_OPTS_ARGS: "headless,disable-gpu,no-sandbox,disable-dev-shm-usage"
143144
working-directory: redmine
144145
run: |
145-
bundle exec rake redmine:plugins:test:units NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
146-
bundle exec rake redmine:plugins:test:functionals NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
147-
bundle exec rake redmine:plugins:test:integration NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
146+
bundle exec rails test plugins/redmine_gtt/test/unit
147+
bundle exec rails test plugins/redmine_gtt/test/functional
148+
bundle exec rails test plugins/redmine_gtt/test/integration
148149
if [ ${{ matrix.system_test }} = "true" ]; then
149-
bundle exec rake redmine:plugins:test:system NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
150+
bundle exec rails test plugins/redmine_gtt/test/system
150151
fi
151152
152153
- name: Run uninstall test

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ source 'https://rubygems.org'
33
# Define gem versions with environment variables or default versions
44
gem_versions = {
55
pg: ENV['GEM_PG_VERSION'] || '1.5.3',
6-
rgeo: ENV['GEM_RGEO_VERSION'] || '3.0.0',
7-
rgeo_activerecord: ENV['GEM_RGEO_ACTIVERECORD_VERSION'] || '7.0.1',
8-
activerecord_postgis_adapter: ENV['GEM_ACTIVERECORD_POSTGIS_ADAPTER_VERSION'] || '7.1.1'
6+
rgeo: ENV['GEM_RGEO_VERSION'] || '3.0.1',
7+
rgeo_activerecord: ENV['GEM_RGEO_ACTIVERECORD_VERSION'] || '8.0.0',
8+
activerecord_postgis_adapter: ENV['GEM_ACTIVERECORD_POSTGIS_ADAPTER_VERSION'] || '10.0.0'
99
}
1010

1111
gem 'deface'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The Geo-Task-Tracker (GTT) plugin adds spatial capabilities to Redmine:
1717
Redmine GTT plugins **require PostgreSQL/PostGIS** and will not work with SQLite
1818
or MariaDB/MySQL!!!
1919

20-
- Redmine >= 5.0.0
21-
- PostgreSQL >= 12
20+
- Redmine >= 5.1.0
21+
- PostgreSQL >= 13
2222
- PostGIS >= 3.0
2323
- NodeJS v18
2424
- yarn

app/models/gtt_map_layer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Map layer model
22
#
33
# Configuration is stored as json
4-
class GttMapLayer < ActiveRecord::Base
4+
class GttMapLayer < (defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base)
55
self.inheritance_column = 'none'
66

77
validates :name, presence: true

app/views/gtt_map_layers/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="contextual">
2-
<%= link_to t('map_layer.new'), new_gtt_map_layer_path, :class => 'icon icon-add' %>
2+
<%= link_to (Redmine::VERSION.to_s >= '6.0.0') ? sprite_icon('add', t('map_layer.new')) : t('map_layer.new'), new_gtt_map_layer_path, :class => 'icon icon-add' %>
33
</div>
44

55
<%= title t('map_layer.plural') %>

app/views/issues/show.api.rsb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ api.issue do
6565
api.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil?
6666
api.notes journal.notes
6767
api.created_on journal.created_on
68+
api.updated_on journal.updated_on
69+
api.updated_by(:id => journal.updated_by.id, :name => journal.updated_by.name) unless journal.updated_by.nil?
6870
api.private_notes journal.private_notes
6971
api.array :details do
7072
journal.visible_details.each do |detail|

app/views/projects/index.api.rsb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ api.array :projects, api_meta(:total_count => @project_count, :offset => @offset
55
api.name project.name
66
api.identifier project.identifier
77
api.description project.description
8+
api.homepage project.homepage
89
api.parent(:id => project.parent.id, :name => project.parent.name) if project.parent && project.parent.visible?
910
api.status project.status
1011
api.is_public project.is_public?

app/views/projects/show/_map.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% if @project.nil? or @project.module_enabled?(:gtt) %>
22
<div class="projectmap box">
3-
<h3 class="icon icon-gtt-map"><%= l(:label_project_map) %></h3>
3+
<h3 class="icon icon-gtt-map"><%= (Redmine::VERSION.to_s >= '6.0.0') ? sprite_icon('gtt-map', l(:label_project_map), plugin: 'redmine_gtt') : l(:label_project_map) %></h3>
44

55
<%= map_tag map: @project.map, rotation: @project.map_rotation %>
66
</div>

app/views/redmine_gtt/hooks/_view_layouts_base_body_bottom.html.erb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,27 @@
22
<textarea name="<%= l(:title_geojson_upload) %>" placeholder="<%= l(:placeholder_geojson_upload) %>" class="ui-widget ui-state-default ui-corner-all"></textarea>
33
<input type="file" id="file-selector" accept=".json,.geojson">
44
</div>
5+
6+
<%= javascript_include_tag 'main', plugin: 'redmine_gtt' %>
7+
8+
<% geocoder = { enabled: false } %>
9+
10+
<% if Setting.plugin_redmine_gtt['enable_geocoding_on_map'] == 'true' %>
11+
<% geocoder = {
12+
enabled: true,
13+
provider: Setting.plugin_redmine_gtt['default_geocoder_provider'],
14+
options: (JSON.parse(Setting.plugin_redmine_gtt['default_geocoder_options']) rescue {})
15+
} %>
16+
<% end %>
17+
18+
<%= tag.div data: {
19+
lon: Setting.plugin_redmine_gtt['default_map_center_longitude'],
20+
lat: Setting.plugin_redmine_gtt['default_map_center_latitude'],
21+
zoom: Setting.plugin_redmine_gtt['default_map_zoom_level'],
22+
maxzoom: Setting.plugin_redmine_gtt['default_map_maxzoom_level'],
23+
vector_minzoom: Setting.plugin_redmine_gtt['vector_minzoom_level'],
24+
fit_maxzoom: Setting.plugin_redmine_gtt['default_map_fit_maxzoom_level'],
25+
geocoder: geocoder,
26+
plugin_settings: Setting.plugin_redmine_gtt.select { |key, value| key.to_s.match(/^(?!default).+/) },
27+
i18n: l(:gtt_js).to_json.html_safe
28+
}, id: 'gtt-defaults', style: 'display:none' %>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<%= tag.meta(
2+
name: 'gtt-font-custom-icons',
3+
content: asset_path('plugin_assets/redmine_gtt/custom-icons.woff2')) %>
4+
5+
<%= tag.meta(
6+
name: 'gtt-font-mdi-webfont',
7+
content: asset_path('plugin_assets/redmine_gtt/materialdesignicons-webfont.woff2')) %>

0 commit comments

Comments
 (0)