Plugin to Core Code Basics

The standard considerations when converting plugins into ArchivesSpace core code are as follows:

  1. 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.
  2. 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).
  3. Specific files to make sure necessary functionality gets pulled over:
    1. initialization
    2. Gemfile
    3. routes - all new routes should be scoped as needed
    4. 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 
    5. configuration - new configuration parameters should follow convention and include comments describing use in the config-defaults.rb file
  4. Remove all commented out code
  5. Remove all unused code
  6. Ensure there is test coverage
  7. Run RuboCop and fix offenses
  8. Share documentation