[Bug 22834] New: Add a method for plugins to return the absolute path for bundled files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Bug ID: 22834 Summary: Add a method for plugins to return the absolute path for bundled files Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Koha::Plugins::Base inherits from Module::Bundled::Files, which is handy to pack assets together and have a simple way to calculate the asset's path. It would help developing new features to have a way to retrieve the absolute path. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agustinmoyano@theke.io Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 89258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89258&action=edit Bug 22834: Add tests for Koha::Plugins::Base->bundle_path -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 89259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89259&action=edit Bug 22834: Add Koha::Plugins::Base->bundle_path This patch adds a 'bundle_path' method that return the base path for assets included in the plugin. The idea is that it will be used for calculation of the absolute path in the filesystem for static content. To test: - Apply the unit tests patch - Run: $ kshell k$ prove t/db_dependent/Plugins.t => FAIL: The method is not implemented - Apply this patch - Run: k$ prove t/db_dependent/Plugins.t => SUCCESS: Tests pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22835 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22835 [Bug 22835] Serve static files from plugins through the API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21073 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21073 [Bug 21073] Improve plugin performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89258|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89259|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 89260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89260&action=edit Bug 22834: Add tests for Koha::Plugins::Base->bundle_path -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 89261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89261&action=edit Bug 22834: Add Koha::Plugins::Base->bundle_path This patch adds a 'bundle_path' method that return the base path for assets included in the plugin. The idea is that it will be used for calculation of the absolute path in the filesystem for static content. To test: - Apply the unit tests patch - Run: $ kshell k$ prove t/db_dependent/Plugins.t => FAIL: The method is not implemented - Apply this patch - Run: k$ prove t/db_dependent/Plugins.t => SUCCESS: Tests pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89260|0 |1 is obsolete| | --- Comment #5 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 89660 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89660&action=edit Bug 22834: Add tests for Koha::Plugins::Base->bundle_path Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89261|0 |1 is obsolete| | --- Comment #6 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 89661 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89661&action=edit Bug 22834: Add Koha::Plugins::Base->bundle_path This patch adds a 'bundle_path' method that return the base path for assets included in the plugin. The idea is that it will be used for calculation of the absolute path in the filesystem for static content. To test: - Apply the unit tests patch - Run: $ kshell k$ prove t/db_dependent/Plugins.t => FAIL: The method is not implemented - Apply this patch - Run: k$ prove t/db_dependent/Plugins.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #7 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Works as expected, the gif provided as an example is very rewarding, thanks ;) Made my day. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #8 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- wrong bz, sry... (In reply to Arthur Suzuki from comment #7)
Works as expected, the gif provided as an example is very rewarding, thanks ;) Made my day.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89660|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89661|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #9 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 89809 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89809&action=edit Bug 21073: (follow-up) QA fixes after rebase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89809|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #10 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 89810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89810&action=edit Bug 22834: Add tests for Koha::Plugins::Base->bundle_path Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #11 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 89811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89811&action=edit Bug 22834: Add Koha::Plugins::Base->bundle_path This patch adds a 'bundle_path' method that return the base path for assets included in the plugin. The idea is that it will be used for calculation of the absolute path in the filesystem for static content. To test: - Apply the unit tests patch - Run: $ kshell k$ prove t/db_dependent/Plugins.t => FAIL: The method is not implemented - Apply this patch - Run: k$ prove t/db_dependent/Plugins.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Pushed for QA --- Comment #12 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Indeed, While trying to install some plugin I had to deal with having several "plugin_dir" in my koha-conf.xml. That led to some errors in the plugin page (see https://github.com/bywatersolutions/koha-plugin-support/issues/9) That would be solved by this patch. I guess we can push for QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed for QA |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89810|0 |1 is obsolete| | Attachment #89811|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 90181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90181&action=edit Bug 22834: Add tests for Koha::Plugins::Base->bundle_path Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 90182 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90182&action=edit Bug 22834: Add Koha::Plugins::Base->bundle_path This patch adds a 'bundle_path' method that return the base path for assets included in the plugin. The idea is that it will be used for calculation of the absolute path in the filesystem for static content. To test: - Apply the unit tests patch - Run: $ kshell k$ prove t/db_dependent/Plugins.t => FAIL: The method is not implemented - Apply this patch - Run: k$ prove t/db_dependent/Plugins.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23171 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23171 [Bug 23171] Improve plugin performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|23171 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23171 [Bug 23171] Improve plugin performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Plugin architecture |and plumbing | CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This new feature allows release notes| |plugin authors to construct | |absolute paths to resources | |contained within their | |plugins using the new | |`bundle_path` method. | | | |This | |can be used to aid in | |serving static content. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This new feature allows |This new feature allows release notes|plugin authors to construct |plugin authors to construct |absolute paths to resources |absolute paths to resources |contained within their |contained within their |plugins using the new |plugins using the new |`bundle_path` method. |`bundle_path` method. | | |This |This |can be used to aid in |can be used to aid in |serving static content. |serving static content. | | | |**Warning**: Care should be | |taken when installing any | |plugins and only plugins | |you trust should be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.08. backporting this without the bz21073 dependency after speaking with Tomas. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hayleymapley@catalyst.net.n | |z --- Comment #17 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Enhancement will not be backported to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22834 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26803 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26803 [Bug 26803] Fix PLUGIN_DIR when plugin_dirs is multivalued -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org