7 BASE_SUBSCRIPTIONS = YAML.load(<<END_OF_YAML)
9 name: Matthieu Simon-Blavier
12 17, square Edouard VII
15 email: registry@domainnetwork.fr
16 membership_fee_paid_on: 2013-02-21
18 Il vient de `whois cogent.fr`.
25 email: sylvain.dufier@orange-ftgroup.com
26 membership_fee_paid_on: 2013-05-29
27 Il vient de `whois orange.fr`.
32 15, rue de la Nuee Bleue
34 email: domaines@sdv.fr
35 membership_fee_paid_on: 2010-01-21
36 Il vient de `whois numericable.fr`.
37 Et il n'est pas à jour de cotisation.
40 EXTRA_SUBSCRIPTION = YAML.load(<<END_OF_YAML)
43 SOCIETE FRANCAISE DU RADIOTELEPHONE - SFR
44 42, avenue de Friedland
46 email: domains@sfr.com
47 membership_fee_paid_on: 2013-04-04
49 Il vient de `whois sfr.fr`.
52 SUBSCRIPTION_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
56 <%= address.gsub(/^/, ' ').rstrip %>
58 mumbership_fee_paid_on: <%= membership_fee_paid_on %>
64 def subscription_filename_for_id(id)
65 "Membres/%06d.mdwn" % id
68 def render_subscription_file(locals)
69 ERB.new(SUBSCRIPTION_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
73 new_id = Dir.glob("#{current_dir}/Membres/*.mdwn").
74 collect { |f| File.basename(f).gsub(/\.mdwn$/, '').to_i }.max + 1