Skip to content

Commit 255f56d

Browse files
committed
Version 6.9.0
1 parent c13a8af commit 255f56d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+365
-330
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Stop russian war. **🇺🇦 Free Ukraine!**
2+
13
# apijs
24

35
JavaScript pop-ups and slideshow for [Redmine](https://github.com/redmine/redmine).
@@ -6,8 +8,8 @@ For more information, go to https://www.luigifab.fr/apijs and https://www.luigif
68

79
This repository is a releases mirror. To install the plugin, please read the documentation.
810

9-
- Current version: 6.8.2 (01/01/2022)
10-
- Compatibility: Redmine 1.4 / 2.x / 3.x / 4.x, Python 3.3 - 3.10
11+
- Current version: 6.9.0 (07/07/2022)
12+
- Compatibility: Redmine 1.4 / 2.x / 3.x / 4.x / 5.x, Python 3.3+
1113
- Client compatibility: Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+
1214
- Translations: English (en), French (fr-FR/fr-CA), German (de), Italian (it), Portuguese (pt-PT/pt-BR), Spanish (es) / Chinese (zh), Czech (cs), Dutch (nl), Greek (el), Hungarian (hu), Japanese (ja), Polish (pl), Romanian (ro), Russian (ru), Slovak (sk), Turkish (tr), Ukrainian (uk)
1315
- License: GNU GPL 2+

debian/changelog

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
redmine-plugin-apijs (6.8.2-1) unstable; urgency=low
1+
redmine-plugin-apijs (6.9.0-1) experimental; urgency=low
22

3-
* Initial debian package release (Closes: #959426)
3+
* Initial Debian package release (Closes: #959426)
44

5-
-- Fabrice Creuzot <[email protected]> Sat, 01 Jan 2022 20:00:00 +0000
5+
-- Fabrice Creuzot <[email protected]> Thu, 07 Jul 2022 20:00:00 +0000

debian/copyright

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ License: SIL-1.1
1414

1515
Files: */lib/useragentparser.rb
1616
Copyright:
17-
2013-2021 Jesse G. Donat <[email protected]>
18-
2019-2021 Fabrice Creuzot (luigifab) <[email protected]>
17+
2013-2022 Jesse G. Donat <[email protected]>
18+
2019-2022 Fabrice Creuzot (luigifab) <[email protected]>
1919
License: Expat
2020

2121
License: GPL-2+

debian/deb.sh

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/bash
2-
# debian: sudo apt install dpkg-dev devscripts dh-make
2+
# Debian: sudo apt install dpkg-dev devscripts dh-make
33

44

55
cd "$(dirname "$0")"
6-
version="6.8.2"
6+
version="6.9.0"
77

88

99
rm -rf builder/
1010
mkdir builder
1111

1212
# copy to a tmp directory
13-
if [ true ]; then
13+
if [ ! true ]; then
1414
cd builder
1515
wget https://github.com/luigifab/redmine-apijs/archive/v$version/redmine-apijs-$version.tar.gz
1616
tar xzf redmine-apijs-$version.tar.gz
@@ -30,33 +30,34 @@ else
3030
fi
3131

3232

33-
# create packages for debian and ubuntu
34-
for serie in unstable jammy impish hirsute focal bionic xenial trusty; do
33+
# create packages for Debian and Ubuntu
34+
for serie in experimental kinetic jammy impish focal bionic xenial trusty; do
3535

36-
if [ $serie = "unstable" ]; then
37-
# for ubuntu
36+
if [ $serie = "experimental" ]; then
37+
# for Ubuntu
3838
cp -a builder/redmine-apijs-$version/ builder/redmine-apijs-$version+src/
39-
# debian only
39+
# Debian only
4040
cd builder/redmine-apijs-$version/
4141
else
42-
# ubuntu only
42+
# Ubuntu only
4343
cp -a builder/redmine-apijs-$version+src/ builder/redmine-apijs+$serie-$version/
4444
cd builder/redmine-apijs+$serie-$version/
4545
fi
4646

4747
dh_make -a -s -y -f ../redmine-apijs-$version.tar.gz -p redmine-plugin-apijs
4848

49-
rm -f debian/*ex debian/*EX debian/README* debian/*doc* debian/deb.sh
49+
rm -f debian/*ex debian/*EX debian/README* debian/*doc*
5050
mkdir debian/upstream
51+
rm debian/deb.sh
5152
mv debian/metadata debian/upstream/metadata
5253
mv debian/lintian debian/redmine-plugin-apijs.lintian-overrides
5354

5455

5556

56-
if [ $serie = "unstable" ]; then
57+
if [ $serie = "experimental" ]; then
5758
dpkg-buildpackage -us -uc
5859
else
59-
# debhelper: unstable:13 hirsute:13 focal:12 bionic:9 xenial:9 trusty:9
60+
# debhelper: experimental:13 focal:12 bionic:9 xenial:9 trusty:9
6061
if [ $serie = "focal" ]; then
6162
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 12)/g' debian/control
6263
fi
@@ -73,27 +74,27 @@ for serie in unstable jammy impish hirsute focal bionic xenial trusty; do
7374
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
7475
echo 9 > debian/compat
7576
fi
76-
sed -i 's/unstable/'$serie'/g' debian/changelog
77+
sed -i 's/experimental/'$serie'/g' debian/changelog
7778
sed -i 's/-1) /-1+'$serie') /' debian/changelog
7879
dpkg-buildpackage -us -uc -ui -d -S
7980
fi
80-
echo "==========================="
81+
echo "=========================== debsign =="
8182
cd ..
8283

83-
if [ $serie = "unstable" ]; then
84-
# debian only
84+
if [ $serie = "experimental" ]; then
85+
# Debian only
8586
debsign redmine-plugin-apijs_$version-*.changes
86-
echo "==========================="
87+
echo "=========================== lintian =="
8788
lintian -EviIL +pedantic redmine-plugin-apijs_$version-*.deb
8889
else
89-
# ubuntu only
90+
# Ubuntu only
9091
debsign redmine-plugin-apijs_$version*+$serie*source.changes
9192
fi
9293
echo "==========================="
9394
cd ..
9495
done
9596

96-
ls -dltrh builder/*.deb builder/*.changes
97+
ls -dlth "$PWD/"builder/*.deb "$PWD/"builder/*.changes
9798
echo "==========================="
9899

99100
# cleanup

opensuse/redmine-apijs.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%define basedir /srv/www/vhosts/redmine/
22
%define plugin_name redmine_apijs
33
Name: redmine-apijs
4-
Version: 6.8.2
4+
Version: 6.9.0
55
Release: 0
66
Summary: Plugin for Redmine to display a gallery from attachments
77
Summary(fr): Extension pour Redmine pour afficher une galerie à partir des pièces jointes
@@ -66,6 +66,9 @@ chmod +x %{buildroot}%{basedir}/plugins/%{plugin_name}/lib/*.py
6666

6767

6868
%changelog
69+
* Thu Jul 07 2022 Fabrice Creuzot <[email protected]> - 6.9.0-1
70+
- New upstream release
71+
6972
* Sat Jan 01 2022 Fabrice Creuzot <[email protected]> - 6.8.2-1
7073
- New upstream release
7174

opensuse/rpm.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44

55
cd "$(dirname "$0")"
6-
version="6.8.2"
6+
version="6.9.0"
77

88

9-
rm -rf builder/ ~/rpmbuild/
9+
rm -rf builder/
1010
mkdir -p builder ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
1111

1212
# copy to a tmp directory
13-
if [ true ]; then
13+
if [ ! true ]; then
1414
chmod 644 redmine-apijs.spec
1515
spectool -g -R redmine-apijs.spec
1616
else
@@ -41,8 +41,8 @@ rpm --checksig builder/*.rpm
4141
echo "==========================="
4242
rpmlint redmine-apijs.spec builder/*.rpm
4343
echo "==========================="
44-
ls -dltrh builder/*.rpm
44+
ls -dlth "$PWD/"builder/*.rpm
4545
echo "==========================="
4646

4747
# cleanup
48-
rm -rf builder/*/ ~/rpmbuild/
48+
rm -rf builder/*/

rubygem/gem.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
2-
# debian: sudo apt install ruby
2+
# Debian: sudo apt install ruby
33

44

55
cd "$(dirname "$0")"
6-
version="6.8.2"
6+
version="6.9.0"
77
rm -rf builder/
88

99

@@ -18,8 +18,9 @@ cp -r ../src/lib builder/redmine_apijs-${version}/
1818
cp ../src/init.rb builder/redmine_apijs-${version}/
1919
cp ../src/readme builder/redmine_apijs-${version}/README
2020
cp Gemfile builder/redmine_apijs-${version}/
21-
cp redmine_apijs.gemspec builder/redmine_apijs-${version}/
22-
cp /usr/share/common-licenses/GPL-2 builder/redmine_apijs-${version}/LICENSE
21+
cp redmine_apijs.gemspec builder/redmine_apijs-${version}/
22+
cp redmine_apijs.rb builder/redmine_apijs-${version}/lib/
23+
cp /usr/share/common-licenses/GPL-2 builder/redmine_apijs-${version}/LICENSE
2324
sed -i 's/'${version}'/'${version}-gem'/g' builder/redmine_apijs-${version}/init.rb
2425
sed -i 's/x.y.z/'${version}'/g' builder/redmine_apijs-${version}/redmine_apijs.gemspec
2526
find builder/redmine_apijs-${version}/ -type f | xargs chmod +r
@@ -29,14 +30,13 @@ find builder/redmine_apijs-${version}/ -type f | xargs chmod +r
2930

3031

3132

32-
3333
# create package (https://guides.rubygems.org/make-your-own-gem/)
3434
cd builder/redmine_apijs-${version}/
3535
gem build redmine_apijs.gemspec
3636
cd ../..
3737
mv builder/redmine_apijs-${version}/*.gem .
3838
echo "==========================="
39-
ls -dltrh $PWD/*.gem
39+
ls -dlth $PWD/*.gem
4040
echo "==========================="
4141

4242
# cleanup

rubygem/redmine_apijs.gemspec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
33
s.name = 'redmine_apijs'
44
s.version = 'x.y.z'
55
s.summary = 'Redmine Apijs plugin'
6-
s.description = 'Integrate the apijs JavaScript library into Redmine. Provides a gallery for image and video attachments.'
6+
s.description = 'Integrate the apijs JavaScript library into Redmine. Provides a gallery for image and video attachments. Gem for Redmine 3.0+ (tested with 3.0..5.0), for Redmine 4.1+, read https://redmine.org/issues/31110#note-8'
77
s.homepage = 'https://github.com/luigifab/redmine-apijs'
88
s.license = 'GPL-2.0-or-later'
99
s.authors = ['Fabrice Creuzot']
@@ -66,12 +66,10 @@ Gem::Specification.new do |s|
6666
Gemfile
6767
init.rb
6868
lib/apijs_attachment.rb
69-
lib/apijs_const.rb
7069
lib/apijs_files.rb
7170
lib/image.py
7271
lib/redmine_apijs.rb
7372
lib/useragentparser.rb
74-
lib/video.py
7573
LICENSE
7674
README
7775
redmine_apijs.gemspec

rubygem/redmine_apijs.rb

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# encoding: utf-8
2+
# Created L/13/07/2020
3+
# Updated M/05/07/2022
4+
#
5+
# Copyright 2008-2022 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
6+
# https://www.luigifab.fr/redmine/apijs
7+
#
8+
# This program is free software, you can redistribute it or modify
9+
# it under the terms of the GNU General Public License (GPL) as published
10+
# by the free software foundation, either version 2 of the license, or
11+
# (at your option) any later version.
12+
#
13+
# This program is distributed in the hope that it will be useful,
14+
# but without any warranty, without even the implied warranty of
15+
# merchantability or fitness for a particular purpose. See the
16+
# GNU General Public License (GPL) for more details.
17+
18+
require 'rails/engine'
19+
20+
module RedmineApijs
21+
22+
class Plugin < ::Rails::Engine
23+
24+
config.after_initialize do
25+
26+
# for Redmine 5.0+ with Rails 6.0+
27+
ENV['redmine_apijs_gem'] = 'yes'
28+
29+
# Gemify redmine plugin (based on https://github.com/koppen/redmine_github_hook/commit/a82bcccfd0731503509771d3f715d8fb1e6f1bfe)
30+
# it works out of box with Redmine 3.0 - 4.0, for Redmine 4.1+ see https://www.redmine.org/issues/31110
31+
# run the classic redmine plugin initializer after rails boot
32+
require File.expand_path('../../init', __FILE__)
33+
::ActionController::Base.prepend_view_path(File.expand_path('../../app/views/', __FILE__))
34+
35+
# and copy plugin assets
36+
unless ::Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
37+
if Redmine::VERSION::MAJOR >= 5
38+
# https://github.com/redmine/redmine/blob/9aa34eb651e2941aeae69cc3acf6e1c1b909729e/lib/redmine/plugin_loader.rb#L41
39+
# Update the name of the plugin directory
40+
module ::Redmine
41+
class PluginPath
42+
def update_dir(dir)
43+
@dir = dir
44+
end
45+
end
46+
end
47+
# go
48+
obj = Redmine::PluginPath.new(File.expand_path('../../', __FILE__))
49+
obj.update_dir('redmine_apijs')
50+
obj.mirror_assets
51+
else
52+
# https://github.com/redmine/redmine/blob/94f3510036690d049ac7425d19fa7c055044ae57/lib/redmine/plugin.rb#L207
53+
# Returns the absolute path to the plugin assets directory
54+
module ::Redmine
55+
class Plugin
56+
def assets_directory
57+
if directory =~ /redmine_apijs/
58+
File.join(File.expand_path('../../', __FILE__), 'assets')
59+
else
60+
File.join(directory, 'assets')
61+
end
62+
end
63+
end
64+
end
65+
# go
66+
Redmine::Plugin.mirror_assets('redmine_apijs')
67+
end
68+
end
69+
end
70+
end
71+
end

0 commit comments

Comments
 (0)