Skip to content

Commit

Permalink
Move system config file to sqitch directory.
Browse files Browse the repository at this point in the history
This is so we can later store templates there. Maybe.
  • Loading branch information
theory committed Apr 28, 2012
1 parent ee688e3 commit 0086a6a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lib/App/Sqitch/Command/config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/App/Sqitch/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

Expand Down Expand Up @@ -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>
Expand Down
14 changes: 7 additions & 7 deletions lib/sqitch-config.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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>.

Expand Down Expand Up @@ -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.

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion t/configuration.t
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 0086a6a

Please sign in to comment.