rename environment variables
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Thu, 23 Jul 2009 14:45:31 +0200
changeset 2445 6f065b366d14
parent 2444 4e61d9e4befb
child 2446 440cb4ea7e5c
rename environment variables
cwconfig.py
doc/book/en/admin/instance-config.rst
doc/book/en/admin/setup.rst
doc/book/en/intro/concepts/index.rst
test/unittest_cwctl.py
--- a/cwconfig.py	Thu Jul 23 14:35:58 2009 +0200
+++ b/cwconfig.py	Thu Jul 23 14:45:31 2009 +0200
@@ -581,24 +581,24 @@
     @classmethod
     def runtime_dir(cls):
         """run time directory for pid file..."""
-        return env_path('CW_RUNTIME', cls.RUNTIME_DIR, 'run time')
+        return env_path('CW_RUNTIME_DIR', cls.RUNTIME_DIR, 'run time')
 
     @classmethod
     def registry_dir(cls):
         """return the control directory"""
-        return env_path('CW_REGISTRY', cls.REGISTRY_DIR, 'registry')
+        return env_path('CW_INSTANCES_DIR', cls.REGISTRY_DIR, 'registry')
 
     @classmethod
     def instance_data_dir(cls):
         """return the instance data directory"""
-        return env_path('CW_INSTANCE_DATA',
+        return env_path('CW_INSTANCES_DATA_DIR',
                         cls.INSTANCE_DATA_DIR or cls.REGISTRY_DIR,
                         'additional data')
 
     @classmethod
     def migration_scripts_dir(cls):
         """cubicweb migration scripts directory"""
-        return env_path('CW_MIGRATION', cls.MIGRATION_DIR, 'migration')
+        return env_path('CW_MIGRATION_DIR', cls.MIGRATION_DIR, 'migration')
 
     @classmethod
     def config_for(cls, appid, config=None):
--- a/doc/book/en/admin/instance-config.rst	Thu Jul 23 14:35:58 2009 +0200
+++ b/doc/book/en/admin/instance-config.rst	Thu Jul 23 14:45:31 2009 +0200
@@ -6,7 +6,7 @@
 
 While creating an instance, a configuration file is generated in::
 
-    $ (CW_REGISTRY) / <instance> / <configuration name>.conf
+    $ (CW_INSTANCES_DIR) / <instance> / <configuration name>.conf
 
 For example::
 
--- a/doc/book/en/admin/setup.rst	Thu Jul 23 14:35:58 2009 +0200
+++ b/doc/book/en/admin/setup.rst	Thu Jul 23 14:45:31 2009 +0200
@@ -116,9 +116,9 @@
 following environment variables as follows::
 
     export CW_CUBES_PATH=~/lib/cubes
-    export CW_REGISTRY=~/etc/cubicweb.d/
-    export CW_INSTANCE_DATA=$CW_REGISTRY
-    export CW_RUNTIME=/tmp
+    export CW_INSTANCES_DIR=~/etc/cubicweb.d/
+    export CW_INSTANCES_DATA_DIR=$CW_INSTANCES_DIR
+    export CW_RUNTIME_DIR=/tmp
 
 .. note::
     The values given above are our suggestions but of course
--- a/doc/book/en/intro/concepts/index.rst	Thu Jul 23 14:35:58 2009 +0200
+++ b/doc/book/en/intro/concepts/index.rst	Thu Jul 23 14:45:31 2009 +0200
@@ -64,7 +64,7 @@
 
 On a Unix system, the instances are usually stored in the directory
 :file:`/etc/cubicweb.d/`. During development, the :file:`~/etc/cubicweb.d/`
-directory is looked up, as well as the paths in :envvar:`CW_REGISTRY`
+directory is looked up, as well as the paths in :envvar:`CW_INSTANCES_DIR`
 environment variable.
 
 The term application can refer to an instance or to a cube, depending on the
--- a/test/unittest_cwctl.py	Thu Jul 23 14:35:58 2009 +0200
+++ b/test/unittest_cwctl.py	Thu Jul 23 14:45:31 2009 +0200
@@ -13,9 +13,9 @@
 if os.environ.get('APYCOT_ROOT'):
     root = os.environ['APYCOT_ROOT']
     CUBES_DIR = '%s/local/share/cubicweb/cubes/' % root
-    os.environ['CW_CUBES'] = CUBES_DIR
+    os.environ['CW_CUBES_PATH'] = CUBES_DIR
     REGISTRY_DIR = '%s/etc/cubicweb.d/' % root
-    os.environ['CW_REGISTRY_DIR'] = REGISTRY_DIR
+    os.environ['CW_INSTANCES_DIR'] = REGISTRY_DIR
 
 from cubicweb.cwconfig import CubicWebConfiguration
 CubicWebConfiguration.load_cwctl_plugins()