require 'bundler'
Bundler.setup
-require 'nos_oignons/mailman'
-require 'nos_oignons/subscriptions'
+require 'nos_oignons'
-LIST = 'ag'
-
-current_emails = NosOignons::Mailman.list_members(LIST)
-uptodate_emails = NosOignons::Subscription.all.select(&:up_to_date?).collect(&:email)
-
-NosOignons::Mailman.add_members(LIST, uptodate_emails - current_emails)
-NosOignons::Mailman.remove_members(LIST, current_emails - uptodate_emails)
+NosOignons.update_ag_subscribers!