sunlightlabs / scout

Government-wide search and notification website.
https://scout.sunlightfoundation.com
Other
50 stars 30 forks source link

Give adapters control over their destiny #481

Closed jpmckinney closed 10 years ago

jpmckinney commented 10 years ago

Adapters now declare whether they are search adapters, item adapters, whether they are a search type or cite type, whether they are syncable, etc. This eliminates subscriptions.yml.

You may also change the path to the adapters with an environment variable, allowing you to have a directory full of your own, custom adapters.

adapter_info in environment.rb does the heavy-lifting. All the other methods live off of it - except for the Rake tasks, which need to figure stuff out before loading the environment.

konklone commented 10 years ago

Great work, @jpmckinney! You even preserved the sort order of search types, thank you. This is a great first step to decoupling the adapters, much appreciated.

I'll merge this, and count on you to update the typos on master.