Skip to content

Commit 2c2b9dd

Browse files
committed
refactor: rename InstallTimeConfig to EnvironmentConfig
1 parent ded0796 commit 2c2b9dd

File tree

9 files changed

+15
-16
lines changed

9 files changed

+15
-16
lines changed

src/cls/IPM/General/InstallTimeConfig.cls renamed to src/cls/IPM/General/EnvironmentConfig.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class %IPM.General.InstallTimeConfig Extends %IPM.General.Singleton
1+
Class %IPM.General.EnvironmentConfig Extends %IPM.General.Singleton
22
{
33

44
Property Config As %Library.DynamicObject [ InitialExpression = {{}}, Private ];

src/cls/IPM/Lifecycle/Base.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,8 +1793,8 @@ Query Packaging(pPackaging As %String = "") As %SQLQuery [ Final, SqlProc ]
17931793

17941794
ClassMethod LoadInstallTimeConfig(paths As %String)
17951795
{
1796-
#dim config As %IPM.General.InstallTimeConfig
1797-
Set config = ##class(%IPM.General.InstallTimeConfig).%Get()
1796+
#dim config As %IPM.General.EnvironmentConfig
1797+
Set config = ##class(%IPM.General.EnvironmentConfig).%Get()
17981798
Do config.Clear()
17991799
Set paths = $ListFromString(paths, ";")
18001800
Set ptr = 0

src/cls/IPM/Main.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Currently, there may only be one of these per namespace.
6161
<example description="Compiles the module named &quot;MyModuleName&quot;">module-action MyModuleName compile</example>
6262
<example description="Performs multiple actions on the module named &quot;MyModuleName&quot;; &quot;clean&quot; deletes all of its dependenices, and &quot;install&quot; will then re-download them, package the module, and register it in the current namespace's module cache.">MyModuleName clean register</example>
6363
<example description="Compiles the module named MyUIModule with verbose output and pParams(&quot;UIFW&quot;,&quot;force&quot;) (passed to all lifecycle phases) set to 42.">MyUIModule compile -v -DUIFW.force=42</example>
64-
<example description="Verify the module MyModule with the env file /path/to/env.json. The module is responsible for accessing the data using %IPM.General.InstallTimeConfig:GetArg()">MyModule verify -env /path/to/env.json</example>
64+
<example description="Verify the module MyModule with the env file /path/to/env.json. The module is responsible for accessing the data using %IPM.General.EnvironmentConfig:GetArg()">MyModule verify -env /path/to/env.json</example>
6565

6666
<!-- Parameters -->
6767
<parameter name="module" required="true" description="Name of module on which to perform lifecycle actions" />
@@ -789,7 +789,7 @@ ClassMethod ShellInternal(pCommand As %String, Output pException As %Exception.A
789789
{
790790
New $$$DeprecationWarned
791791
// Keep a reference of the singleton, so subsequent .%Get() calls return the same instance
792-
Set configReference = ##class(%IPM.General.InstallTimeConfig).%Get()
792+
Set configReference = ##class(%IPM.General.EnvironmentConfig).%Get()
793793

794794
Set pException = $$$NULLOREF
795795
Set tOneCommand = 0

src/cls/IPM/Utils/LegacyCompat.cls

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ ClassMethod UpdateSuperclassAndCompile(ByRef pItems, ByRef qSpec = "") As %Statu
3232
}
3333
}
3434

35-
// If the install-time configuration (aka env.json) is set, compile in the current process where singleton %IPM.General.InstallTimeConfig is available
35+
// If the install-time configuration (aka env.json) is set, compile in the current process where singleton %IPM.General.EnvironmentConfig is available
3636
// Methods with [CodeMode = objectgenerator] can then use this to access configuration set in env.json
37-
Set itconfig = ##class(%IPM.General.InstallTimeConfig).%Get()
38-
If 'itconfig.IsEmpty() {
37+
If '##class(%IPM.General.EnvironmentConfig).%Get().IsEmpty() {
3938
Set qSpec = qSpec _ "/multicompile=0"
4039
}
4140

src/cls/IPM/Utils/Module.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ ClassMethod LoadQualifiedReference(pReference As %IPM.Storage.QualifiedModuleInf
221221
ClassMethod LoadModuleReference(pServerName As %String, pModuleName As %String, pVersion As %String, pDeployed As %Boolean, pPlatformVersion As %String, ByRef pParams, ByRef pDependencyGraph) As %Status
222222
{
223223
// Keep a reference of the singleton in this process (which can be a new process!), so subsequent .%Get() calls return the same instance
224-
Set configReference = ##class(%IPM.General.InstallTimeConfig).%Get()
224+
Set configReference = ##class(%IPM.General.EnvironmentConfig).%Get()
225225

226226
// Suspend the error count to avoid spurious messages about errors being detected in load/compile.
227227
$$$SuspendErrorCount

tests/integration_tests/Test/PM/Integration/InstallTimeConfig.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class Test.PM.Integration.InstallTimeConfig Extends Test.PM.Integration.Base
1+
Class Test.PM.Integration.EnvironmentConfig Extends Test.PM.Integration.Base
22
{
33

44
Parameter TargetPath = "install-time-config";

tests/integration_tests/Test/PM/Integration/_data/install-time-config/dep/src/InstallTimeConfigDependency/Main.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Parameter PackageName = "install-time-config-dependency";
77

88
ClassMethod RunOnLoad() [ CodeMode = objectgenerator ]
99
{
10-
#dim config As %IPM.General.InstallTimeConfig
11-
Set config = ##class(%IPM.General.InstallTimeConfig).%Get()
10+
#dim config As %IPM.General.EnvironmentConfig
11+
Set config = ##class(%IPM.General.EnvironmentConfig).%Get()
1212
Set magicValue = config.GetArg(..#PackageName, "nested", "magic")
1313
If magicValue '= ..#MagicValue {
1414
If magicValue = "" {

tests/integration_tests/Test/PM/Integration/_data/install-time-config/package/src/InstallTimeConfig/Main.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class InstallTimeConfig.Main Extends InstallTimeConfigDependency.Main
1+
Class EnvironmentConfig.Main Extends InstallTimeConfigDependency.Main
22
{
33

44
Parameter MagicValue = 42;
@@ -9,8 +9,8 @@ Parameter PackageName = "install-time-config";
99

1010
ClassMethod RunOnLoad() [ CodeMode = objectgenerator ]
1111
{
12-
#dim config As %IPM.General.InstallTimeConfig
13-
Set config = ##class(%IPM.General.InstallTimeConfig).%Get()
12+
#dim config As %IPM.General.EnvironmentConfig
13+
Set config = ##class(%IPM.General.EnvironmentConfig).%Get()
1414
Set magicValue = config.GetArg(..#PackageName, "nested", "magic")
1515
If magicValue '= ..#MagicValue {
1616
If magicValue = "" {

tests/unit_tests/Test/PM/Unit/MergeJSON.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Method TestMergeDynamicObjects()
7777
Set allTestCases = [].%FromJSON(stream)
7878
Set iter = allTestCases.%GetIterator()
7979
While iter.%GetNext(.key, .case) {
80-
Do ##class(%IPM.General.InstallTimeConfig).MergeDynamicObjects(case.dest, case.src)
80+
Do ##class(%IPM.General.EnvironmentConfig).MergeDynamicObjects(case.dest, case.src)
8181
If '$$$AssertTrue(..Equal(case.dest, case.expected)) {
8282
Set message = $$$FormatText("Failed test case: %1, output = %2", case.%ToJSON(), case.dest.%ToJSON())
8383
Do $$$LogMessage(message)

0 commit comments

Comments
 (0)