Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redmine 5.0 #91

Closed
lluisgener opened this issue Apr 26, 2022 · 11 comments
Closed

Redmine 5.0 #91

lluisgener opened this issue Apr 26, 2022 · 11 comments
Assignees

Comments

@lluisgener
Copy link

Hello.

Is it possible to make the plugin compatible with new redmine 5?

There seems to be a compatibility issue with the new Zeitwerk loader.

Thanks in advance.

@JanB97
Copy link

JanB97 commented May 9, 2022

I managed to get it to work for me, but there are still issues.
Search isn't working and reload isn't either.
I can send you my files if you want, as I can not remember what all I changed anymore.

@lluisgener
Copy link
Author

If you can, I would appreciate it.

Thanks.

@noshutdown-ru-user noshutdown-ru-user self-assigned this May 12, 2022
@noshutdown-ru-user
Copy link
Member

Our debt is growing but we will try

@noshutdown-ru-user
Copy link
Member

pls append your changed or you can open PR with changes

@JanB97
Copy link

JanB97 commented May 23, 2022

I tried making a PR, but it doesn't notice my changes but tells me that everything is different.
Here are my files, as I said it is working for me, but not perfect.

Just as info, the new loader seems to require a specific structure and also specific "classes" within this structure.
I just added a empty variable in that case to get rid of the error but I guess to make it rubust you would have to redo how the plugin is setup.

vault.zip

@CSCSxx
Copy link

CSCSxx commented Jun 13, 2022

I also played a while...but it didn't work...would be great if it runs on Redmine 5!

@lluisgener
Copy link
Author

lluisgener commented Jun 13, 2022

I made the attached vault.zip by @JanB97 work by adding this to the gemfile:

if Gem::Version.new(redmine_version_major) >= Gem::Version.new('4') gem 'protected_attributes_continued', '1.8.2' end

and replacing line 112 in keys_controller.rb for:

if @key.update(params[:vault_key])

It seems to read the previous keys, and I've been able to add, update and delete new ones. I don't know if I need to test much more.

@CSCSxx
Copy link

CSCSxx commented Jun 14, 2022

I made the attached vault.zip by @JanB97 work by adding this to the gemfile:

if Gem::Version.new(redmine_version_major) >= Gem::Version.new('4') gem 'protected_attributes_continued', '1.8.2' end

and replacing line 112 in keys_controller.rb for:

if @key.update(params[:vault_key])

It seems to read the previous keys, and I've been able to add, update and delete new ones. I don't know if I need to test much more.

Oh cool, works with the gem!
However, I fear that the gem will eventually stop working - but it's a great workaround, at least for now
Thanks :)

@rohitthakral
Copy link

Ok so I have tried the change by @JanB97 and the updates by @lluisgener as well but I keep getting this:

Zeitwerk::NameError: expected file /opt/redmine/plugins/vault/lib/mk_keyfiles_dir.rb to define constant MkKeyfilesDir, but didn't
/var/lib/gems/2.7.0/gems/zeitwerk-2.6.4/lib/zeitwerk/loader/callbacks.rb:25:in `on_file_autoloaded'
/var/lib/gems/2.7.0/gems/zeitwerk-2.6.4/lib/zeitwerk/kernel.rb:42:in `require'

@rohitthakral
Copy link

Ignore, I was trying to use the repository and not the zip provided by @JanB97 .

Thank you guys for your help. I will try and see if I can commit this through my repository and get back to you with a merge request.

mr-exz added a commit that referenced this issue Dec 30, 2024
## Version: 0.5.0
### Improvements
- [Redmine 5.0 compatibility.](#91)
- Added view of all keys
- Key tags view improved, tags are colored now
- Keys search improved for all and per project
- Added copy to clipboard for login
- Added browser title for plugin page
- Added new type of key SFTP
- Fixed compatibility issue with the new Zeitwerk loader
- Improved translation
- Code refactoring
- Added Github Actions for CI
Co-Authored-By: Jan <7881168+JanB97@users.noreply.github.com>
Co-Authored-By: lluisgener <22933112+lluisgener@users.noreply.github.com>
Co-authored-by: Pavlo Butenko <pavlo.butenko@deveit.eu>
Co-authored-by: Sir-Will <brieftaubenman@gmail.com>
Co-authored-by: Vladimir Tananko <58197515+bs-prog@users.noreply.github.com>
Co-authored-by: Stanislav <giwinax@gmail.com>
Co-authored-by: vikiesakki <vemcse@gmail.com>
@mr-exz
Copy link
Contributor

mr-exz commented Dec 30, 2024

0.5.0 released

@mr-exz mr-exz closed this as completed Dec 30, 2024
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

No branches or pull requests

6 participants