Plugin to Core Code Basics
The standard considerations when converting plugins into ArchivesSpace core code are as follows:
- Determine if the new files from the plugin should remain as separate files or if they should be incorporated into existing files in core code. If they should remain as separate files, make sure they are placed in the correct location in the core code structure and follow ArchivesSpace conventions. Otherwise, add functionality as appropriate to existing files.
- Determine if utility functions included in the plugin are already available in the core code base. If so, use the core code base version. If not, add them to the existing utilities files (perhaps common/asutils.rb).
- Specific files to make sure necessary functionality gets pulled over:
- initialization
- Gemfile
- routes - all new routes should be scoped as needed
- locales ymls - translations should be moved outside of the plugins: hierarchy and added to the corresponding yml file in the correct hierarchy for the core code
- configuration - new configuration parameters should follow convention and include comments describing use in the config-defaults.rb file
- Remove all commented out code
- Remove all unused code
- Ensure there is test coverage
- Run RuboCop and fix offenses
- Share documentation