Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
c65fd986
Commit
c65fd986
authored
Jan 11, 2016
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manage Common/Constants.pm with jsongenerator and add $hashParameters constant
parent
64099c2c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
13 deletions
+80
-13
Makefile
Makefile
+1
-0
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Constants.pm
...nldap-ng-common/lib/Lemonldap/NG/Common/Conf/Constants.pm
+8
-8
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
+65
-0
scripts/jsongenerator.pl
scripts/jsongenerator.pl
+6
-5
No files found.
Makefile
View file @
c65fd986
...
...
@@ -129,6 +129,7 @@ MANAGERJSONDST=$(SRCMANAGERDIR)/site/static/struct.json \
$(SRCMANAGERDIR)
/lib/Lemonldap/NG/Manager/Attributes.pm
\
$(SRCMANAGERDIR)
/lib/Lemonldap/NG/Manager/Constants.pm
\
$(SRCCOMMONDIR)
/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm
\
$(SRCCOMMONDIR)
/lib/Lemonldap/NG/Common/Conf/Constants.pm
\
_example/conf/lmConf-1.js
PERLCOMMONSRC
:=
$(
shell
find
$(SRCCOMMONDIR)
/lib
-name
'*.pm'
)
PERLCOMMONDST
=
$(SRCCOMMONDIR)
/blib/lib/Lemonldap/NG/Common.pm
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Constants.pm
View file @
c65fd986
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package
Lemonldap::NG::Common::Conf::
Constants
;
use
strict
;
use
utf8
;
use
Exporter
'
import
';
use
base
qw(Exporter)
;
our
$VERSION
=
'
1.0.2
';
our
$VERSION
=
'
1.9.0
';
# CONSTANTS
...
...
@@ -23,6 +23,8 @@ use constant HANDLERSECTION => "handler";
use
constant
MANAGERSECTION
=>
"
manager
";
use
constant
SESSIONSEXPLORERSECTION
=>
"
sessionsExplorer
";
use
constant
APPLYSECTION
=>
"
apply
";
our
$hashParameters
=
'
(?:(?:g(?:r(?:antSessionRule|oup)|lobalStorageOption|oogleExportedVar)|l(?:o(?:calSessionStorageOption|goutService)|dapExportedVar)|ca(?:s(?:StorageOption|Attribute)|ptchaStorageOption)|(?:(?:d(?:emo|bi)|facebook|webID)E|e)xportedVar|p(?:ersistentStorageOption|ortalSkinRule)|re(?:moteGlobalStorageOption|loadUrl)|notificationStorageOption|CAS_proxiedService|macro)s|s(?:aml(?:S(?:PMetaDataNode|torageOptions)|IDPMetaDataNode)|essionDataToRemember|laveExportedVars)|o(?:idc(?:S(?:erviceMetaDataAuthnContext|torageOptions)|[OR]PMetaDataNode)|penIdExportedVars)|a(?:uthChoiceModules|pplicationList)|virtualHost)
';
our
%EXPORT_TAGS
=
(
'
all
'
=>
[
...
...
@@ -41,13 +43,11 @@ our %EXPORT_TAGS = (
MANAGERSECTION
SESSIONSEXPLORERSECTION
APPLYSECTION
$hashParameters
)
]
);
our
@EXPORT_OK
=
(
@
{
$EXPORT_TAGS
{'
all
'}
}
);
our
@EXPORT
=
(
@
{
$EXPORT_TAGS
{'
all
'}
}
);
our
@EXPORT_OK
=
(
@
{
$EXPORT_TAGS
{'
all
'}
}
);
our
@EXPORT
=
(
@
{
$EXPORT_TAGS
{'
all
'}
}
);
1
;
__END__
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
View file @
c65fd986
...
...
@@ -18,6 +18,7 @@ has confTreeFile => ( isa => 'Str', is => 'ro', required => 1 );
has
managerConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
managerAttributesFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
defaultValuesFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
confConstantsFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
has
firstLmConfFile
=>
(
isa
=>
'
Str
',
is
=>
'
ro
',
required
=>
1
);
my
@managerAttrKeys
=
qw(keyTest select type test msgFail default)
;
...
...
@@ -216,6 +217,70 @@ $defaultAttr}
close
F
;
print
STDERR
"
done
\n
";
printf
STDERR
$format
,
$self
->
confConstantsFile
;
$ra
=
Regexp::
Assemble
->
new
;
foreach
(
@simpleHashKeys
,
sort
keys
%cnodesRe
)
{
$ra
->
add
(
$_
);
}
my
$confConstants
=
"
our
\$
hashParameters = '
"
.
$ra
->
as_string
.
"
';
\n
";
open
(
F
,
"
>
",
$self
->
confConstantsFile
)
or
die
(
$!
);
print
F
<<EOF;
# This file is generated by $module. Don't modify it by hand
package Lemonldap::NG::Common::Conf::Constants;
use strict;
use Exporter 'import';
use base qw(Exporter);
our \$VERSION = '$Lemonldap::NG::Manager::Build::Attributes::VERSION';
# CONSTANTS
use constant CONFIG_WAS_CHANGED => -1;
use constant UNKNOWN_ERROR => -2;
use constant DATABASE_LOCKED => -3;
use constant UPLOAD_DENIED => -4;
use constant SYNTAX_ERROR => -5;
use constant DEPRECATED => -6;
use constant DEFAULTCONFFILE => "/usr/local/lemonldap-ng/etc/lemonldap-ng.ini";
use constant DEFAULTSECTION => "all";
use constant CONFSECTION => "configuration";
use constant PORTALSECTION => "portal";
use constant HANDLERSECTION => "handler";
use constant MANAGERSECTION => "manager";
use constant SESSIONSEXPLORERSECTION => "sessionsExplorer";
use constant APPLYSECTION => "apply";
$confConstants
our %EXPORT_TAGS = (
'all' => [
qw(
CONFIG_WAS_CHANGED
UNKNOWN_ERROR
DATABASE_LOCKED
UPLOAD_DENIED
SYNTAX_ERROR
DEPRECATED
DEFAULTCONFFILE
DEFAULTSECTION
CONFSECTION
PORTALSECTION
HANDLERSECTION
MANAGERSECTION
SESSIONSEXPLORERSECTION
APPLYSECTION
\$hashParameters
)
]
);
our \@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } );
our \@EXPORT = ( \@{ \$EXPORT_TAGS{'all'} } );
1;
EOF
close
F
;
print
STDERR
"
done
\n
";
printf
STDERR
$format
,
$self
->
managerAttributesFile
;
my
$managerAttr
=
{
map
{
...
...
scripts/jsongenerator.pl
View file @
c65fd986
...
...
@@ -3,11 +3,12 @@
use
Lemonldap::NG::Manager::
Build
;
Lemonldap::NG::Manager::
Build
->
run
(
structFile
=>
"
lemonldap-ng-manager/site/static/struct.json
"
,
confTreeFile
=>
"
lemonldap-ng-manager/site/static/js/conftree.js
"
,
managerConstantsFile
=>
"
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Constants.pm
"
,
structFile
=>
'
lemonldap-ng-manager/site/static/struct.json
'
,
confTreeFile
=>
'
lemonldap-ng-manager/site/static/js/conftree.js
'
,
managerConstantsFile
=>
'
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Constants.pm
'
,
managerAttributesFile
=>
'
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
',
defaultValuesFile
=>
"
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm
",
firstLmConfFile
=>
"
_example/conf/lmConf-1.js
",
defaultValuesFile
=>
'
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm
',
confConstantsFile
=>
'
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Constants.pm
',
firstLmConfFile
=>
'
_example/conf/lmConf-1.js
',
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment