]> nos-oignons.net Git - gestion-adh.git/blobdiff - features/support/fixtures.rb
Add missing step in the deployement doc
[gestion-adh.git] / features / support / fixtures.rb
index 2c540364842b149fca41916ce933eb0db0d6cdec..8280d7967f479a781f10cf368b0b01c115850ab8 100644 (file)
@@ -4,7 +4,7 @@ require 'erb'
 require 'ostruct'
 require 'yaml'
 
-BASE_SUBSCRIPTIONS = YAML.load(<<END_OF_YAML)
+BASE_MEMBERS = YAML.load(<<END_OF_YAML)
 000001:
   name: Matthieu Simon-Blavier
   address: |
@@ -13,6 +13,7 @@ BASE_SUBSCRIPTIONS = YAML.load(<<END_OF_YAML)
     75009 Paris
     FR
   email: registry@domainnetwork.fr
+  joined_on: 2013-02-21
   membership_fee_paid_on: 2013-02-21
   notes:
     Il vient de `whois cogent.fr`.
@@ -23,6 +24,7 @@ BASE_SUBSCRIPTIONS = YAML.load(<<END_OF_YAML)
     13, rue de Javel
     75015 Paris
   email: sylvain.dufier@orange-ftgroup.com
+  joined_on: 2013-05-20
   membership_fee_paid_on: 2013-05-29
     Il vient de `whois orange.fr`.
 000003:
@@ -32,41 +34,45 @@ BASE_SUBSCRIPTIONS = YAML.load(<<END_OF_YAML)
     15, rue de la Nuee Bleue
     67000 Strasbourg
   email: domaines@sdv.fr
-  membership_fee_paid_on: 2010-01-21
+  joined_on: 2010-01-21
+  membership_fee_paid_on: 2011-01-11
     Il vient de `whois numericable.fr`.
     Et il n'est pas à jour de cotisation.
 END_OF_YAML
 
-EXTRA_SUBSCRIPTION = YAML.load(<<END_OF_YAML)
+EXTRA_MEMBER = YAML.load(<<END_OF_YAML)
 name: Franck Rohard
 address: |
   SOCIETE FRANCAISE DU RADIOTELEPHONE - SFR
   42, avenue de Friedland
   75008 Paris
 email: domains@sfr.com
+joined_on: 2013-04-04
 membership_fee_paid_on: 2013-04-04
 notes:
   Il vient de `whois sfr.fr`.
 END_OF_YAML
 
-SUBSCRIPTION_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
+MEMBER_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
 ---
 name: <%= name %>
 address: |
 <%= address.gsub(/^/, '  ').rstrip %>
 email: <%= email %>
-mumbership_fee_paid_on: <%= membership_fee_paid_on %>
+joined_on: <%= joined_on %>
+membership_fee_paid_on: <%= membership_fee_paid_on %>
 ---
+[[!ftemplate id="membre"]]
 
 <%= notes %>
 END_OF_TEMPLATE
 
-def subscription_filename_for_id(id)
+def member_filename_for_id(id)
   "Membres/%06d.mdwn" % id
 end
 
-def render_subscription_file(locals)
-  ERB.new(SUBSCRIPTION_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
+def render_member_file(locals)
+  ERB.new(MEMBER_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
 end
 
 def new_id