Browse files

Move system config file to sqitch directory.

This is so we can later store templates there. Maybe.
  • Loading branch information...
1 parent ee688e3 commit 0086a6a542f74db336be061aa99c79ffc9f3f14e @theory committed Apr 28, 2012
Showing with 13 additions and 13 deletions.
  1. +3 −3 lib/App/Sqitch/Command/config.pm
  2. +2 −2 lib/App/Sqitch/Config.pm
  3. +7 −7 lib/sqitch-config.pod
  4. +1 −1 t/configuration.t
View
6 lib/App/Sqitch/Command/config.pm
@@ -579,9 +579,9 @@ editor is determined by L<Sqitch/editor>.
my $file_name = $config->file;
Returns the path to the configuration file to be acted upon. If the context is
-C<system>, then the value returned is C<$(prefix)/etc/sqitch.ini>. If the
-context is C<user>, then the value returned is C<~/.sqitch.config.ini>.
-Otherwise, the default is F<./sqitch.ini>.
+C<system>, then the value returned is C<$(prefix)/etc/sqitch/sqitch.conf>. If
+the context is C<user>, then the value returned is C<~/.sqitch/sqitch.conf>.
+Otherwise, the default is F<./sqitch.conf>.
=head1 See Also
View
4 lib/App/Sqitch/Config.pm
@@ -19,7 +19,7 @@ has '+confname' => (
sub system_file {
return $ENV{SQITCH_SYSTEM_CONFIG} || file(
- $Config{prefix}, 'etc', shift->confname
+ $Config{prefix}, 'etc', 'sqitch', shift->confname
);
}
@@ -110,7 +110,7 @@ Returns the configuration file base name, which is F<sqitch.conf>.
Returns the path to the system configuration file. The value returned will be
the contents of the C<$SQITCH_SYSTEM_CONFIG> environment variable, if it's
-defined, or else C<$Config{prefix}/etc/sqitch.conf>.
+defined, or else C<$Config{prefix}/etc/sqitch/sqitch.conf>.
=head3 C<global_file>
View
14 lib/sqitch-config.pod
@@ -139,11 +139,11 @@ See also L<Files>.
=item C<--system>
-For writing options: write to system-wide F<$(prefix)/etc/sqitch.conf> file
-rather than the repository F<./sqitch.conf>.
+For writing options: write to system-wide F<$(prefix)/etc/sqtich/sqitch.conf>
+file rather than the repository F<./sqitch.conf>.
-For reading options: read only from system-wideF<$(prefix)/etc/sqitch.conf>
-file rather than from all available files.
+For reading options: read only from system-wide
+F<$(prefix)/etc/sqitch/sqitch.conf> file rather than from all available files.
See also L<Files>.
@@ -211,7 +211,7 @@ Local, project-specific configuration file.
User-specific configuration file.
-=item C<$(prefix)/etc/sqitch.conf>
+=item C<$(prefix)/etc/sqitch/sqitch.conf>
System-wide configuration file.
@@ -233,7 +233,7 @@ C<~/.sqitch/sqitch.conf>.
=item C<SQITCH_SYSTEM_CONFIG>
Take the system configuration from the given file instead of
-C<$(prefix)/etc/sqitch.conf>.
+C<$(prefix)/etc/sqitch/sqitch.conf>.
=back
@@ -320,7 +320,7 @@ sqitch command's behavior. The F<./sqitch.conf> file local to each project is
used to store the configuration for that project, and
F<$HOME/.sqitch/sqitch.conf> is used to store a per-user configuration as
fallback values for the F<./sqitch.conf> file. The file
-F<$(prefix>/etc/sqitch.conf> can be used to store a system-wide default
+F<$(prefix)/etc/sqitch/sqitch.conf> can be used to store a system-wide default
configuration.
The variables are divided into sections, wherein the fully qualified variable
View
2 t/configuration.t
@@ -19,7 +19,7 @@ isa_ok my $config = $CLASS->new, $CLASS, 'New config object';
is $config->confname, 'sqitch.conf', 'confname should be "sqitch.conf"';
is_deeply $config->global_file, File::Spec->catfile(
- $Config::Config{prefix}, 'etc', 'sqitch.conf'
+ $Config::Config{prefix}, 'etc', 'sqitch', 'sqitch.conf'
), 'Defaulg global file name should be correct';
$ENV{SQITCH_SYSTEM_CONFIG} = 'FOO/BAR';

0 comments on commit 0086a6a

Please sign in to comment.