X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/13767cc69697b7eaf4be6e47788efe636b56b6fd..02ebfb9b4cb16eb20e2e66e7654bd63d65158b1d:/bin/update-ag-subscribers diff --git a/bin/update-ag-subscribers b/bin/update-ag-subscribers index f10978e..59d5a91 100755 --- a/bin/update-ag-subscribers +++ b/bin/update-ag-subscribers @@ -5,13 +5,6 @@ require 'rubygems' 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!