Skip to content

Commit

Permalink
Manifest fix (#80)
Browse files Browse the repository at this point in the history
* fixed document module load

* added test

* rem spaces

* updated module test
  • Loading branch information
athaynes authored Aug 17, 2018
1 parent 722c127 commit 887972c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
6 changes: 0 additions & 6 deletions PowerStig.Document.psm1

This file was deleted.

7 changes: 2 additions & 5 deletions PowerStig.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
# Licensed under the MIT License.

@{
# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = @(
'PowerStig.psm1',
'PowerStig.Document.psm1'
)
# Script module or binary module file associated with this manifest.
RootModule = 'PowerStig.psm1'

# Version number of this module.
ModuleVersion = '1.1.1.0'
Expand Down
12 changes: 9 additions & 3 deletions PowerStig.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ using module .\Module\Stig.StigException\Stig.StigException.psm1
using module .\Module\Stig.TechnologyRole\Stig.TechnologyRole.psm1
using module .\Module\Stig.TechnologyVersion\Stig.TechnologyVersion.psm1

# load the public functions
Foreach ($supportFile in ( Get-ChildItem -Path "$PSScriptRoot\Module\Stig.Main" -Filter '*.ps1' ) )
# load the public StigData functions

$pathList = @(
"$PSScriptRoot\Module\Stig.Main",
"$PSScriptRoot\Module\Document.Main"
)
Foreach ($supportFile in (Get-ChildItem -Path $pathList -Filter '*.ps1'))
{
Write-Verbose "Loading $($supportFile.FullName)"
. $supportFile.FullName
Expand All @@ -20,5 +25,6 @@ Foreach ($supportFile in ( Get-ChildItem -Path "$PSScriptRoot\Module\Stig.Main"
Export-ModuleMember -Function @(
'Get-OrgSettingsObject',
'Get-DomainName',
'Get-StigList'
'Get-StigList',
'New-StigCheckList'
)
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,3 @@ Added the following STIGs:
* Windows Server DNS V1R9
* Windows AD Domain V2R9
* IE11 V1R15


4 changes: 4 additions & 0 deletions Tests/Integration/PowerStig.Integration.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Import-Module $modulePath -Force

Describe "$ModuleName module" {

It 'Should be a Script Module' {
(Get-Module -Name $script:modulePath -ListAvailable).ModuleType | Should Be 'Script'
}

Context 'Exported Commands' {

$commands = (Get-Command -Module $ModuleName).Name
Expand Down

0 comments on commit 887972c

Please sign in to comment.