Skip to content

Update deface gem to latest version 1.8.1 - #9

Open
liaham wants to merge 28 commits into
jbbarth:masterfrom
xmera-circle:master
Open

Update deface gem to latest version 1.8.1#9
liaham wants to merge 28 commits into
jbbarth:masterfrom
xmera-circle:master

Conversation

@liaham

@liaham liaham commented May 28, 2021

Copy link
Copy Markdown

The latest version is dated with March, 26th 2021.

liaham added 2 commits May 28, 2021 16:17
The latest version is dated with March, 26th 2021.
deface version is downgraded to 1.6.2 due to some compatability reasons.
The current version 1.8.1 is not compatible with Redmine 4.x due to some
changes between Rails 5.2 and Rails 6. Possibly there are some more
reasons to find in Redmine but seems difficult to debug.
@marcelbonnet

marcelbonnet commented Sep 1, 2021

Copy link
Copy Markdown

deface 1.8.1 seems to work for me:

  • Rails 5.2.5
  • Ruby 2.7.2
  • Redmine 4.2.1

What is this error you mentioned when deface is 1.8.1 and Rails is 5.2 ?

The only error I get is raised by the plugin redmine_maintenance_mode , but it is not causing problems. The error logged is:

Deface: [ERROR] The original source for 'add-maintenance-message-to-bodytop' has changed, this override should be reviewed to ensure it's still valid.

@liaham

liaham commented Sep 2, 2021

Copy link
Copy Markdown
Author

Hi @marcelbonnet ,
Problems occur when viewing revision diffs. There is a discussion in Redmine: https://www.redmine.org/issues/35430.
And this is my comment on the issue: https://www.redmine.org/issues/35430#note-4.

The error message you would get when you enable deface and try to view your revision diffs is something like that:


Rendering repositories/diff.html.erb within layouts/base
Rendered repositories/_related_issues.html.erb (2.5ms)
Rendered common/_tabs.html.erb (0.5ms)
Rendered repositories/_changeset.html.erb (15.1ms)
Rendered common/_diff.html.erb (0.3ms)
Rendered repositories/diff.html.erb within layouts/base (21.1ms)
Completed 500 Internal Server Error in 61ms (ActiveRecord: 16.2ms)

ActionView::Template::Error (undefined method `encoding' for nil:NilClass):

@nanego

nanego commented Mar 17, 2022

Copy link
Copy Markdown
Collaborator

I have updated the current version. This plugin now use Deface 1.6.2.
We cannot use the latest version (1.8) until we have resolved the bug on revisions diff pages.

The warning 'You no longer need to manually require overrides, ...'
occurs especially when views are precompiled by deface with the
corresponding rake task 'deface:precompile'.

The loading of overrides will only be excuted when deface is enabled.
Deface should be disabled when views are precompiled.

Fixes #1662
Release version is then 1.8.1-xmr-3
The warning 'You no longer need to manually require overrides, ...'
occurs especially when views are precompiled by deface with the
corresponding rake task 'deface:precompile'.

The loading of overrides will only be excuted when deface is enabled.
Deface should be disabled when views are precompiled.

Fixes #1662
Release version is then 1.8.1-xmr-3
+ Fixes rubocop offenses
+ Defines rubocop rules
+ Exends .gitignore with ruby linter tool config (.ruby-lsp)
+ Updates deface gem to version 1.8.2
The applicator_patch_spec test fails due to FrozenError:

can't modify frozen String: "posts/index"
./plugins/redmine_base_deface/lib/applicator_patch.rb:12:in `apply'
./plugins/redmine_base_deface/spec/models/applicator_patch_spec.rb:32:in `block (3 levels) in <module:Deface>'
Undos changes to rspec test in hope it won't fail anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants