Unverified Commit 2298622b authored by Aaron Andersen's avatar Aaron Andersen Committed by GitHub
Browse files

redmine: 6.0.8 -> 6.1.1 (#448507)

parents d8fdf5ea c03d1166
Loading
Loading
Loading
Loading
+0 −275
Original line number Diff line number Diff line
--- a/lib/redmine/scm/adapters/mercurial/redminehelper.py
+++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py
@@ -45,17 +45,20 @@ Output example of rhmanifest::
       </repository>
     </rhmanifest>
 """
-import re, time, cgi, urllib
+import re, time, html, urllib
 from mercurial import cmdutil, commands, node, error, hg, registrar
 
 cmdtable = {}
 command = registrar.command(cmdtable) if hasattr(registrar, 'command') else cmdutil.command(cmdtable)
 
-_x = cgi.escape
-_u = lambda s: cgi.escape(urllib.quote(s))
+_x = lambda s: html.escape(s.decode('utf-8')).encode('utf-8')
+_u = lambda s: html.escape(urllib.parse.quote(s)).encode('utf-8')
+
+def unquoteplus(*args, **kwargs):
+    return urllib.parse.unquote_to_bytes(*args, **kwargs).replace(b'+', b' ')
 
 def _changectx(repo, rev):
-    if isinstance(rev, str):
+    if isinstance(rev, bytes):
        rev = repo.lookup(rev)
     if hasattr(repo, 'changectx'):
         return repo.changectx(rev)
@@ -70,10 +73,10 @@ def _tip(ui, repo):
         except TypeError:  # Mercurial < 1.1
             return repo.changelog.count() - 1
     tipctx = _changectx(repo, tiprev())
-    ui.write('<tip revision="%d" node="%s"/>\n'
+    ui.write(b'<tip revision="%d" node="%s"/>\n'
              % (tipctx.rev(), _x(node.hex(tipctx.node()))))
 
-_SPECIAL_TAGS = ('tip',)
+_SPECIAL_TAGS = (b'tip',)
 
 def _tags(ui, repo):
     # see mercurial/commands.py:tags
@@ -84,7 +87,7 @@ def _tags(ui, repo):
             r = repo.changelog.rev(n)
         except error.LookupError:
             continue
-        ui.write('<tag revision="%d" node="%s" name="%s"/>\n'
+        ui.write(b'<tag revision="%d" node="%s" name="%s"/>\n'
                  % (r, _x(node.hex(n)), _u(t)))
 
 def _branches(ui, repo):
@@ -104,136 +107,148 @@ def _branches(ui, repo):
             return repo.branchheads(branch)
     def lookup(rev, n):
         try:
-            return repo.lookup(rev)
+            return repo.lookup(str(rev).encode('utf-8'))
         except RuntimeError:
             return n
     for t, n, r in sorted(iterbranches(), key=lambda e: e[2], reverse=True):
         if lookup(r, n) in branchheads(t):
-            ui.write('<branch revision="%d" node="%s" name="%s"/>\n'
+            ui.write(b'<branch revision="%d" node="%s" name="%s"/>\n'
                      % (r, _x(node.hex(n)), _u(t)))
 
 def _manifest(ui, repo, path, rev):
     ctx = _changectx(repo, rev)
-    ui.write('<manifest revision="%d" path="%s">\n'
+    ui.write(b'<manifest revision="%d" path="%s">\n'
              % (ctx.rev(), _u(path)))
 
     known = set()
-    pathprefix = (path.rstrip('/') + '/').lstrip('/')
+    pathprefix = (path.decode('utf-8').rstrip('/') + '/').lstrip('/')
     for f, n in sorted(ctx.manifest().iteritems(), key=lambda e: e[0]):
-        if not f.startswith(pathprefix):
+        fstr = f.decode('utf-8')
+        if not fstr.startswith(pathprefix):
             continue
-        name = re.sub(r'/.*', '/', f[len(pathprefix):])
+        name = re.sub(r'/.*', '/', fstr[len(pathprefix):])
         if name in known:
             continue
         known.add(name)
 
         if name.endswith('/'):
-            ui.write('<dir name="%s"/>\n'
+            ui.write(b'<dir name="%s"/>\n'
                      % _x(urllib.quote(name[:-1])))
         else:
             fctx = repo.filectx(f, fileid=n)
             tm, tzoffset = fctx.date()
-            ui.write('<file name="%s" revision="%d" node="%s" '
-                     'time="%d" size="%d"/>\n'
+            ui.write(b'<file name="%s" revision="%d" node="%s" '
+                     b'time="%d" size="%d"/>\n'
                      % (_u(name), fctx.rev(), _x(node.hex(fctx.node())),
                         tm, fctx.size(), ))
 
-    ui.write('</manifest>\n')
+    ui.write(b'</manifest>\n')
 
-@command('rhannotate',
-         [('r', 'rev', '', 'revision'),
-          ('u', 'user', None, 'list the author (long with -v)'),
-          ('n', 'number', None, 'list the revision number (default)'),
-          ('c', 'changeset', None, 'list the changeset'),
+@command(b'rhannotate',
+         [(b'r', b'rev', b'', b'revision'),
+          (b'u', b'user', None, b'list the author (long with -v)'),
+          (b'n', b'number', None, b'list the revision number (default)'),
+          (b'c', b'changeset', None, b'list the changeset'),
          ],
-         'hg rhannotate [-r REV] [-u] [-n] [-c] FILE...')
+         b'hg rhannotate [-r REV] [-u] [-n] [-c] FILE...')
 def rhannotate(ui, repo, *pats, **opts):
-    rev = urllib.unquote_plus(opts.pop('rev', None))
+    rev = unquoteplus(opts.pop('rev', b''))
     opts['rev'] = rev
-    return commands.annotate(ui, repo, *map(urllib.unquote_plus, pats), **opts)
+    return commands.annotate(ui, repo, *map(unquoteplus, pats), **opts)
 
-@command('rhcat',
-               [('r', 'rev', '', 'revision')],
-               'hg rhcat ([-r REV] ...) FILE...')
+@command(b'rhcat',
+               [(b'r', b'rev', b'', b'revision')],
+               b'hg rhcat ([-r REV] ...) FILE...')
 def rhcat(ui, repo, file1, *pats, **opts):
-    rev = urllib.unquote_plus(opts.pop('rev', None))
+    rev = unquoteplus(opts.pop('rev', b''))
     opts['rev'] = rev
-    return commands.cat(ui, repo, urllib.unquote_plus(file1), *map(urllib.unquote_plus, pats), **opts)
+    return commands.cat(ui, repo, unquoteplus(file1), *map(unquoteplus, pats), **opts)
 
-@command('rhdiff',
-               [('r', 'rev', [], 'revision'),
-                ('c', 'change', '', 'change made by revision')],
-               'hg rhdiff ([-c REV] | [-r REV] ...) [FILE]...')
+@command(b'rhdiff',
+               [(b'r', b'rev', [], b'revision'),
+                (b'c', b'change', b'', b'change made by revision')],
+               b'hg rhdiff ([-c REV] | [-r REV] ...) [FILE]...')
 def rhdiff(ui, repo, *pats, **opts):
     """diff repository (or selected files)"""
     change = opts.pop('change', None)
     if change:  # add -c option for Mercurial<1.1
         base = _changectx(repo, change).parents()[0].rev()
-        opts['rev'] = [str(base), change]
+        opts['rev'] = [base, change]
     opts['nodates'] = True
-    return commands.diff(ui, repo, *map(urllib.unquote_plus, pats), **opts)
-
-@command('rhlog',
-                   [
-                    ('r', 'rev', [], 'show the specified revision'),
-                    ('b', 'branch', [],
-                       'show changesets within the given named branch'),
-                    ('l', 'limit', '',
-                         'limit number of changes displayed'),
-                    ('d', 'date', '',
-                         'show revisions matching date spec'),
-                    ('u', 'user', [],
-                      'revisions committed by user'),
-                    ('', 'from', '',
-                      ''),
-                    ('', 'to', '',
-                      ''),
-                    ('', 'rhbranch', '',
-                      ''),
-                    ('', 'template', '',
-                       'display with template')],
-                   'hg rhlog [OPTION]... [FILE]')
+    return commands.diff(ui, repo, *map(unquoteplus, pats), **opts)
+
+@command(b'rhlog',
+                  [
+                    (b'r', b'rev', [], b'show the specified revision'),
+                    (b'b', b'branch', [],
+                       b'show changesets within the given named branch'),
+                    (b'l', b'limit', b'',
+                         b'limit number of changes displayed'),
+                    (b'd', b'date', b'',
+                         b'show revisions matching date spec'),
+                    (b'u', b'user', [],
+                      b'revisions committed by user'),
+                    (b'', b'from', b'',
+                      b''),
+                    (b'', b'to', b'',
+                      b''),
+                    (b'', b'rhbranch', b'',
+                      b''),
+                    (b'', b'template', b'',
+                       b'display with template')],
+                   b'hg rhlog [OPTION]... [FILE]')
+
 def rhlog(ui, repo, *pats, **opts):
     rev      = opts.pop('rev')
     bra0     = opts.pop('branch')
-    from_rev = urllib.unquote_plus(opts.pop('from', None))
-    to_rev   = urllib.unquote_plus(opts.pop('to'  , None))
-    bra      = urllib.unquote_plus(opts.pop('rhbranch', None))
-    from_rev = from_rev.replace('"', '\\"')
-    to_rev   = to_rev.replace('"', '\\"')
-    if hg.util.version() >= '1.6':
-      opts['rev'] = ['"%s":"%s"' % (from_rev, to_rev)]
+    from_rev = unquoteplus(opts.pop('from', b''))
+    to_rev   = unquoteplus(opts.pop('to'  , b''))
+    bra      = unquoteplus(opts.pop('rhbranch', b''))
+    from_rev = from_rev.replace(b'"', b'\\"')
+    to_rev   = to_rev.replace(b'"', b'\\"')
+    if (from_rev != b'') or (to_rev != b''):
+        if from_rev != b'':
+            quotefrom = b'"%s"' % (from_rev)
+        else:
+            quotefrom = from_rev
+        if to_rev != b'':
+            quoteto = b'"%s"' % (to_rev)
+        else:
+            quoteto = to_rev
+        opts['rev'] = [b'%s:%s' % (quotefrom, quoteto)]
     else:
-      opts['rev'] = ['%s:%s' % (from_rev, to_rev)]
-    opts['branch'] = [bra]
-    return commands.log(ui, repo, *map(urllib.unquote_plus, pats), **opts)
-
-@command('rhmanifest',
-                   [('r', 'rev', '', 'show the specified revision')],
-                   'hg rhmanifest [-r REV] [PATH]')
-def rhmanifest(ui, repo, path='', **opts):
+        opts['rev'] = rev
+    if (bra != b''):
+        opts['branch'] = [bra]
+    return commands.log(ui, repo, *map(unquoteplus, pats), **opts)
+
+
+@command(b'rhmanifest',
+                   [(b'r', b'rev', b'', b'show the specified revision')],
+                   b'hg rhmanifest -r REV [PATH]')
+def rhmanifest(ui, repo, path=b'', **opts):
     """output the sub-manifest of the specified directory"""
-    ui.write('<?xml version="1.0"?>\n')
-    ui.write('<rhmanifest>\n')
-    ui.write('<repository root="%s">\n' % _u(repo.root))
+    ui.write(b'<?xml version="1.0"?>\n')
+    ui.write(b'<rhmanifest>\n')
+    ui.write(b'<repository root="%s">\n' % _u(repo.root))
     try:
-        _manifest(ui, repo, urllib.unquote_plus(path), urllib.unquote_plus(opts.get('rev')))
+        _manifest(ui, repo, unquoteplus(path), unquoteplus(opts.get('rev')))
     finally:
-        ui.write('</repository>\n')
-        ui.write('</rhmanifest>\n')
+        ui.write(b'</repository>\n')
+        ui.write(b'</rhmanifest>\n')
 
-@command('rhsummary',[], 'hg rhsummary')
+@command(b'rhsummary',[], b'hg rhsummary')
 def rhsummary(ui, repo, **opts):
     """output the summary of the repository"""
-    ui.write('<?xml version="1.0"?>\n')
-    ui.write('<rhsummary>\n')
-    ui.write('<repository root="%s">\n' % _u(repo.root))
+    ui.write(b'<?xml version="1.0"?>\n')
+    ui.write(b'<rhsummary>\n')
+    ui.write(b'<repository root="%s">\n' % _u(repo.root))
     try:
         _tip(ui, repo)
         _tags(ui, repo)
         _branches(ui, repo)
         # TODO: bookmarks in core (Mercurial>=1.8)
     finally:
-        ui.write('</repository>\n')
-        ui.write('</rhsummary>\n')
+        ui.write(b'</repository>\n')
+        ui.write(b'</rhsummary>\n')
 
+26 −20
Original line number Diff line number Diff line
source 'https://rubygems.org'

ruby '>= 3.1.0', '< 3.4.0'
ruby '>= 3.2.0', '< 3.5.0'

gem 'rails', '7.2.3'
gem 'rouge', '~> 4.5'
gem 'mini_mime', '~> 1.1.0'
gem "actionpack-xml_parser"
gem 'roadie-rails', '~> 3.2.0'
gem 'roadie-rails', '~> 3.3.0'
gem 'marcel'
gem 'mail', '~> 2.8.1'
gem 'nokogiri', '~> 1.18.3'
gem 'i18n', '~> 1.14.1'
gem 'rbpdf', '~> 1.21.4'
gem 'addressable'
gem 'rubyzip', '~> 2.3.0'
gem 'rubyzip', '~> 2.4.0'
gem 'propshaft', '~> 1.1.0'
gem 'rack', '>= 3.1.3'
gem "stimulus-rails", "~> 1.3"
gem "importmap-rails", "~> 2.0"
gem 'commonmarker', '~> 2.3.0'
gem "doorkeeper", "~> 5.8.2"
gem "bcrypt", require: false
gem "doorkeeper-i18n", "~> 5.2"
gem "requestjs-rails", "~> 0.0.13"

#  Ruby Standard Gems
gem 'csv', '~> 3.2.8'
gem 'net-imap', '~> 0.4.20'
gem 'csv', '~> 3.3.2'
gem 'net-imap', '~> 0.5.7'
gem 'net-pop', '~> 0.1.2'
gem 'net-smtp', '~> 0.4.0'
gem 'net-smtp', '~> 0.5.0'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
@@ -41,20 +48,16 @@ end

# Optional gem for exporting the gantt to a PNG file
group :minimagick do
  gem 'mini_magick', '~> 5.0.1'
end

# Optional CommonMark support, not for JRuby
group :common_mark do
  gem "commonmarker", '~> 0.23.8'
  gem 'deckar01-task_list', '2.3.2'
  gem 'mini_magick', '~> 5.2.0'
end

# Include database gems for the database adapters NixOS supports
gem 'mysql2', '~> 0.5.0'
gem "with_advisory_lock"
gem 'trilogy', '~> 2.9.0'
gem "with_advisory_lock"
gem 'pg', '~> 1.5.3'
gem 'sqlite3', '~> 1.7.0'
gem 'sqlite3', '~> 2.5.0'

group :development, :test do
  gem 'debug'
@@ -64,6 +67,7 @@ group :development do
  gem 'listen', '~> 3.3'
  gem 'yard', require: false
  gem 'svg_sprite', require: false
  gem 'bullet'
end

group :test do
@@ -76,13 +80,15 @@ group :test do
  gem "capybara", ">= 3.39"
  gem 'selenium-webdriver', '>= 4.11.0'
  # RuboCop
  gem 'rubocop', '~> 1.68.0', require: false
  gem 'rubocop-ast', '~> 1.40.0', require: false
  gem 'rubocop-performance', '~> 1.22.0', require: false
  gem 'rubocop-rails', '~> 2.27.0', require: false
  gem 'rubocop', '~> 1.76.0', require: false
  gem 'rubocop-performance', '~> 1.25.0', require: false
  gem 'rubocop-rails', '~> 2.32.0', require: false
  gem 'bundle-audit', require: false
  # `bin/rails test` fails at startup with minitest >= 6.0
  gem 'minitest', '< 6.0'
  # for testing oauth provider capabilities
  gem 'oauth2'
  gem 'rest-client'
  # Lock minitest to 5.x until a Rails release includes support for minitest 6.0
  gem 'minitest', '~> 5.27'
end

gem "webrick"
+126 −46
Original line number Diff line number Diff line
@@ -81,9 +81,13 @@ GEM
      public_suffix (>= 2.0.2, < 8.0)
    ast (2.4.3)
    base64 (0.3.0)
    bcrypt (3.1.21)
    benchmark (0.5.0)
    bigdecimal (4.0.1)
    builder (3.3.0)
    bullet (8.1.0)
      activesupport (>= 3.0.0)
      uniform_notifier (~> 1.11)
    bundle-audit (0.2.0)
      bundler-audit
    bundler-audit (0.9.3)
@@ -100,40 +104,63 @@ GEM
      xpath (~> 3.2)
    cgi (0.5.1)
    chunky_png (1.4.0)
    commonmarker (0.23.12)
    commonmarker (2.3.2)
      rb_sys (~> 0.9)
    concurrent-ruby (1.3.6)
    connection_pool (3.0.2)
    crass (1.0.6)
    css_parser (1.21.1)
      addressable
    csv (3.2.9)
    csv (3.3.5)
    date (3.5.1)
    debug (1.11.1)
      irb (~> 1.10)
      reline (>= 0.3.8)
    deckar01-task_list (2.3.2)
      html-pipeline
    docile (1.4.1)
    domain_name (0.6.20240107)
    doorkeeper (5.8.2)
      railties (>= 5)
    doorkeeper-i18n (5.2.8)
      doorkeeper (>= 5.2)
    drb (2.2.3)
    erb (6.0.1)
    erubi (1.13.1)
    faraday (2.14.0)
      faraday-net_http (>= 2.0, < 3.5)
      json
      logger
    faraday-net_http (3.4.2)
      net-http (~> 0.5)
    ffi (1.17.3)
    globalid (1.3.0)
      activesupport (>= 6.1)
    hashie (5.1.0)
      logger
    html-pipeline (2.13.2)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    htmlentities (4.4.2)
    http-accept (1.7.0)
    http-cookie (1.1.0)
      domain_name (~> 0.5)
    i18n (1.14.8)
      concurrent-ruby (~> 1.0)
    importmap-rails (2.2.3)
      actionpack (>= 6.0.0)
      activesupport (>= 6.0.0)
      railties (>= 6.0.0)
    io-console (0.8.2)
    irb (1.16.0)
      pp (>= 0.6.0)
      rdoc (>= 4.0.0)
      reline (>= 0.4.2)
    json (2.18.0)
    json (2.18.1)
    jwt (3.1.2)
      base64
    language_server-protocol (3.17.0.5)
    listen (3.9.0)
    lint_roller (1.1.0)
    listen (3.10.0)
      logger
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    logger (1.7.0)
@@ -147,15 +174,25 @@ GEM
      net-smtp
    marcel (1.1.0)
    matrix (0.4.3)
    mini_magick (5.0.1)
    mime-types (3.7.0)
      logger
      mime-types-data (~> 3.2025, >= 3.2025.0507)
    mime-types-data (3.2026.0203)
    mini_magick (5.2.0)
      benchmark
      logger
    mini_mime (1.1.5)
    mini_portile2 (2.8.9)
    minitest (5.27.0)
    mocha (3.0.1)
      ruby2_keywords (>= 0.0.5)
    multi_xml (0.8.1)
      bigdecimal (>= 3.1, < 5)
    mysql2 (0.5.7)
      bigdecimal
    net-imap (0.4.23)
    net-http (0.9.1)
      uri (>= 0.11.1)
    net-imap (0.5.13)
      date
      net-protocol
    net-ldap (0.17.1)
@@ -163,20 +200,30 @@ GEM
      net-protocol
    net-protocol (0.2.2)
      timeout
    net-smtp (0.4.0.1)
    net-smtp (0.5.1)
      net-protocol
    netrc (0.11.0)
    nio4r (2.7.5)
    nokogiri (1.18.10)
      mini_portile2 (~> 2.8.2)
      racc (~> 1.4)
    oauth2 (2.0.18)
      faraday (>= 0.17.3, < 4.0)
      jwt (>= 1.0, < 4.0)
      logger (~> 1.2)
      multi_xml (~> 0.5)
      rack (>= 1.2, < 4)
      snaky_hash (~> 2.0, >= 2.0.3)
      version_gem (~> 1.1, >= 1.1.9)
    parallel (1.27.0)
    parser (3.3.10.0)
    parser (3.3.10.1)
      ast (~> 2.4.1)
      racc
    pg (1.5.9)
    pp (0.6.3)
      prettyprint
    prettyprint (0.2.0)
    prism (1.9.0)
    propshaft (1.1.0)
      actionpack (>= 7.0.0)
      activesupport (>= 7.0.0)
@@ -186,7 +233,7 @@ GEM
      date
      stringio
    public_suffix (7.0.2)
    puma (7.1.0)
    puma (7.2.0)
      nio4r (~> 2.0)
    racc (1.8.1)
    rack (3.2.4)
@@ -230,26 +277,36 @@ GEM
      zeitwerk (~> 2.6)
    rainbow (3.1.1)
    rake (13.3.1)
    rake-compiler-dock (1.11.0)
    rb-fsevent (0.11.2)
    rb-inotify (0.11.1)
      ffi (~> 1.0)
    rb_sys (0.9.124)
      rake-compiler-dock (= 1.11.0)
    rbpdf (1.21.4)
      htmlentities
      rbpdf-font (~> 1.19.0)
    rbpdf-font (1.19.1)
    rdoc (7.0.3)
    rdoc (7.1.0)
      erb
      psych (>= 4.0.0)
      tsort
    regexp_parser (2.11.3)
    reline (0.6.3)
      io-console (~> 0.5)
    requestjs-rails (0.0.14)
      railties (>= 7.1.0)
    rest-client (2.1.0)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    rexml (3.4.4)
    roadie (5.2.1)
      css_parser (~> 1.4)
      nokogiri (~> 1.15)
    roadie-rails (3.2.0)
      railties (>= 5.1, < 8.0)
    roadie-rails (3.3.0)
      railties (>= 5.1, < 8.1)
      roadie (~> 5.0)
    rotp (6.3.0)
    rouge (4.7.0)
@@ -257,34 +314,38 @@ GEM
      chunky_png (~> 1.0)
      rqrcode_core (~> 2.0)
    rqrcode_core (2.1.0)
    rubocop (1.68.0)
    rubocop (1.76.2)
      json (~> 2.3)
      language_server-protocol (>= 3.17.0)
      language_server-protocol (~> 3.17.0.2)
      lint_roller (~> 1.1.0)
      parallel (~> 1.10)
      parser (>= 3.3.0.2)
      rainbow (>= 2.2.2, < 4.0)
      regexp_parser (>= 2.4, < 3.0)
      rubocop-ast (>= 1.32.2, < 2.0)
      regexp_parser (>= 2.9.3, < 3.0)
      rubocop-ast (>= 1.45.1, < 2.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 2.4.0, < 3.0)
    rubocop-ast (1.40.0)
      parser (>= 3.3.1.0)
    rubocop-performance (1.22.1)
      rubocop (>= 1.48.1, < 2.0)
      rubocop-ast (>= 1.31.1, < 2.0)
    rubocop-rails (2.27.0)
      unicode-display_width (>= 2.4.0, < 4.0)
    rubocop-ast (1.49.0)
      parser (>= 3.3.7.2)
      prism (~> 1.7)
    rubocop-performance (1.25.0)
      lint_roller (~> 1.1)
      rubocop (>= 1.75.0, < 2.0)
      rubocop-ast (>= 1.38.0, < 2.0)
    rubocop-rails (2.32.0)
      activesupport (>= 4.2.0)
      lint_roller (~> 1.1)
      rack (>= 1.1)
      rubocop (>= 1.52.0, < 2.0)
      rubocop-ast (>= 1.31.1, < 2.0)
      rubocop (>= 1.75.0, < 2.0)
      rubocop-ast (>= 1.44.0, < 2.0)
    ruby-progressbar (1.13.0)
    ruby2_keywords (0.0.5)
    rubyzip (2.3.2)
    rubyzip (2.4.1)
    sanitize (6.1.3)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    securerandom (0.4.1)
    selenium-webdriver (4.39.0)
    selenium-webdriver (4.40.0)
      base64 (~> 0.2)
      logger (~> 1.4)
      rexml (~> 3.2, >= 3.2.5)
@@ -296,8 +357,13 @@ GEM
      simplecov_json_formatter (~> 0.1)
    simplecov-html (0.13.2)
    simplecov_json_formatter (0.1.4)
    sqlite3 (1.7.3)
    snaky_hash (2.0.3)
      hashie (>= 0.1.0, < 6)
      version_gem (>= 1.1.8, < 3)
    sqlite3 (2.5.0)
      mini_portile2 (~> 2.8.0)
    stimulus-rails (1.3.4)
      railties (>= 6.0.0)
    stringio (3.2.0)
    svg_optimizer (0.3.0)
      nokogiri
@@ -307,18 +373,24 @@ GEM
      thor
    thor (1.5.0)
    timeout (0.6.0)
    trilogy (2.9.0)
    tsort (0.2.0)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    unicode-display_width (2.6.0)
    unicode-display_width (3.2.0)
      unicode-emoji (~> 4.1)
    unicode-emoji (4.2.0)
    uniform_notifier (1.18.0)
    uri (1.1.1)
    useragent (0.16.11)
    version_gem (1.1.9)
    webrick (1.9.2)
    websocket (1.2.11)
    websocket-driver (0.8.0)
      base64
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    with_advisory_lock (7.0.2)
    with_advisory_lock (7.5.0)
      activerecord (>= 7.2)
      zeitwerk (>= 2.7)
    xpath (3.2.0)
@@ -332,28 +404,33 @@ PLATFORMS
DEPENDENCIES
  actionpack-xml_parser
  addressable
  bcrypt
  bullet
  bundle-audit
  capybara (>= 3.39)
  commonmarker (~> 0.23.8)
  csv (~> 3.2.8)
  commonmarker (~> 2.3.0)
  csv (~> 3.3.2)
  debug
  deckar01-task_list (= 2.3.2)
  doorkeeper (~> 5.8.2)
  doorkeeper-i18n (~> 5.2)
  ffi
  html-pipeline (~> 2.13.2)
  i18n (~> 1.14.1)
  importmap-rails (~> 2.0)
  listen (~> 3.3)
  mail (~> 2.8.1)
  marcel
  mini_magick (~> 5.0.1)
  mini_magick (~> 5.2.0)
  mini_mime (~> 1.1.0)
  minitest (< 6.0)
  minitest (~> 5.27)
  mocha (>= 2.0.1)
  mysql2 (~> 0.5.0)
  net-imap (~> 0.4.20)
  net-imap (~> 0.5.7)
  net-ldap (~> 0.17.0)
  net-pop (~> 0.1.2)
  net-smtp (~> 0.4.0)
  net-smtp (~> 0.5.0)
  nokogiri (~> 1.18.3)
  oauth2
  pg (~> 1.5.3)
  propshaft (~> 1.1.0)
  puma
@@ -361,20 +438,23 @@ DEPENDENCIES
  rails (= 7.2.3)
  rails-dom-testing (>= 2.3.0)
  rbpdf (~> 1.21.4)
  roadie-rails (~> 3.2.0)
  requestjs-rails (~> 0.0.13)
  rest-client
  roadie-rails (~> 3.3.0)
  rotp (>= 5.0.0)
  rouge (~> 4.5)
  rqrcode
  rubocop (~> 1.68.0)
  rubocop-ast (~> 1.40.0)
  rubocop-performance (~> 1.22.0)
  rubocop-rails (~> 2.27.0)
  rubyzip (~> 2.3.0)
  rubocop (~> 1.76.0)
  rubocop-performance (~> 1.25.0)
  rubocop-rails (~> 2.32.0)
  rubyzip (~> 2.4.0)
  sanitize (~> 6.0)
  selenium-webdriver (>= 4.11.0)
  simplecov (~> 0.22.0)
  sqlite3 (~> 1.7.0)
  sqlite3 (~> 2.5.0)
  stimulus-rails (~> 1.3)
  svg_sprite
  trilogy (~> 2.9.0)
  tzinfo-data
  webrick
  with_advisory_lock
+486 −70

File changed.

Preview size limit exceeded, changes collapsed.

+40 −6
Original line number Diff line number Diff line
{
  defaultGemConfig,
  lib,
  stdenvNoCC,
  fetchurl,
@@ -6,10 +7,15 @@
  ruby_3_3,
  makeWrapper,
  nixosTests,
  openssl,
  rustc,
  cargo,
  rustPlatform,
  buildRubyGem,
}:

let
  version = "6.0.8";
  version = "6.1.1";
  rubyEnv = bundlerEnv {
    name = "redmine-env-${version}";

@@ -23,6 +29,38 @@ let
      "minimagick"
      "test"
    ];
    gemConfig = defaultGemConfig // {
      trilogy = attrs: {
        buildInputs = [ openssl ];
      };
      commonmarker = attrs: {
        cargoDeps = rustPlatform.fetchCargoVendor {
          inherit (buildRubyGem { inherit (attrs) gemName version source; })
            name
            src
            unpackPhase
            nativeBuildInputs
            ;
          hash = "sha256-rUNsf7DUVueD9revOR6Mab36XnVEmjL4bVv6TIMMqjM=";
        };
        dontBuild = false;
        nativeBuildInputs = [
          cargo
          rustc
          rustPlatform.cargoSetupHook
          rustPlatform.bindgenHook
        ];
        disallowedReferences = [
          rustc.unwrapped
        ];
        preInstall = ''
          export CARGO_HOME="$PWD/../.cargo/"
        '';
        postInstall = ''
          find $out -type f -name .rustc_info.json -delete
        '';
      };
    };
  };
in
stdenvNoCC.mkDerivation (finalAttrs: {
@@ -31,7 +69,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {

  src = fetchurl {
    url = "https://www.redmine.org/releases/redmine-${finalAttrs.version}.tar.gz";
    hash = "sha256-5DCIUq/2Yylqn3fTEwL00BjgQwXtAwq9R5gtXdoDzEY=";
    hash = "sha256-Hy5t0GlwYvxzNwH4i1BB3A38a1NiVet5AvIfsJcOYD4=";
  };

  nativeBuildInputs = [ makeWrapper ];
@@ -41,10 +79,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
    rubyEnv.bundler
  ];

  # taken from https://www.redmine.org/issues/33784
  # can be dropped when the upstream bug is closed and the fix is present in the upstream release
  patches = [ ./0001-python3.patch ];

  buildPhase = ''
    mv config config.dist
    mv themes themes.dist