Skip to content

Commit

Permalink
Merge pull request #35 from ledgersmb/1.3
Browse files Browse the repository at this point in the history
1.3 - sync from central
  • Loading branch information
pongraczi committed Sep 30, 2014
2 parents 46b13f6 + cbf8beb commit 6266d39
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Supported Presently
Changelog for 1.3.45
* Cleaned up sql files so App::LedgerSMB::Admin (Chris T)
* Fixed pricematrix prices not respected for vendors (Chris T, bug 1230)
* Added tests for Sysconfig (Chris T, bug 1232)

Chris T is Chris Travers

Expand Down
24 changes: 24 additions & 0 deletions t/12-sysconfig.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use Test::More tests => 13;

chdir 't/data';

require '../../LedgerSMB/Sysconfig.pm';

is $LedgerSMB::Sysconfig::auth, 'DB2', 'Auth set correctly';
is $LedgerSMB::Sysconfig::logging, 1, 'Correct logging settings';
is $LedgerSMB::Sysconfig::tempdir, 'test', 'tempdir set correctly';
is $LedgerSMB::Sysconfig::cssdir, 'css3/', 'css dir set correctly';
is $LedgerSMB::Sysconfig::fs_cssdir, 'css4', 'css fs dir set correctly';
is $LedgerSMB::Sysconfig::cache_templates, 5, 'template caching working';
is $LedgerSMB::Sysconfig::language, 'en2', 'language set correctly';
is $LedgerSMB::Sysconfig::check_max_invoices, '52',
'max invoices set correctly';
is $LedgerSMB::Sysconfig::max_post_size, 4194304333,
'max post size set correctly';
is $LedgerSMB::Sysconfig::decimal_places, 22, 'money places set correctly';

is $LedgerSMB::Sysconfig::cookie_name, 'LedgerSMB-1.32', 'cookie set correctly';
is $LedgerSMB::Sysconfig::no_db_str, 'database2',
'missing db string set correctly';
like $ENV{PATH}, '/foo$/', 'appends config path correctly';

101 changes: 101 additions & 0 deletions t/data/ledgersmb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
auth : DB2
logging : 1
#Be aware of tempdir setting.If client_browser and server_apache on same machine, sharing tmp-dir , problems 'Permission denied' if server tries to write temp-file wich already exists as client-owned
tempdir : test

# This is the logical CSS directory. I.e. it is what comes before the
# ledgersmb.css in the url. Example might be /my_css_dir/ or
# http://localhost/other_css_dir/
cssdir = css3/

# THis is the location on the file system where the css files are, for editing
# and selection. An example might be /var/www/ledgersmb_css/
fs_cssdir = css4/

# If set to a true value this caches templates. Typically it will be set to 0
# to disable or 1 to enable.

cache_templates = 5

# Set language for login and admin pages
language : en2

log_level : ERROR2
#DBI_TRACE : 1=/tmp/dbi.trace
DBI_TRACE : 2
# For Windows, uncomment the pathsep line:
# pathsep : ;

# If you have LaTeX installed, set to 1
latex : 12

# Maximum number of invoices that can be printed on a cheque
check_max_invoices : 52

# Maximum POST size to prevent DoS (4MB default)
max_post_size : 4194304333

# Define global settings for decimal places
decimal_places : 22

# Spelling of cookie name for this instance of LedgerSMB.
# Used to keep multiple instances and/or different versions
# logged in at the same time
cookie_name : LedgerSMB-1.32

# This is the string we look for in the failed connection error to determine
# if the database was not found. For English-language locales, this can be
# left in place. If the database server is running a different locale, it may
# need to be changed. Any partial match on the connection error assumes that
# the failure to connect was caused by an invalid database request.

no_db_str : database2

[environment]
# If the server can't find applications, append to the path
PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin:/usr/foo

# If on Mac OS X using Fink's Perl libs, append to the path
#PERL5LIB = /sw/lib/perl5

[paths]
# spool directory for batch printing
spool = spool1
# path to user configuration files
userspath = users2
# templates base directory
templates = templates3
# images base directory
images = images3
# member file
memberfile = users/members4
localepath = locale/po4

[programs]
# program to use for file compression
gzip = 1333


[mail]
### How to send mail. The sendmail command is used unless smtphost is set.
sendmail = 11111
# smtphost = 127.0.0.1
# smtptimeout = 60
# backup_email_from = backups@lsmb_hosting.com

[printers]
# Available printers

[database]
# Sets database connection parameters. Note that default_db can be left blank
# if you want to force people to enter a company name at login.
port = 54322
default_db = lsmb132
host = localhost2
db_namespace = public2
#contrib_dir PG_CONTRIB_DIR
#with postgresql-9.1 this stuff is in /usr/share/postgresql/9.1/extension and is injected in database with create extension pg_trgm,btree_gist...
contrib_dir = /usr/share/pgsql/contrib/2
# sslmode can be require, allow, prefer, or disable. Defaults to prefer.
sslmode = prefer2

0 comments on commit 6266d39

Please sign in to comment.