Skip to content

Commit

Permalink
renamed init.ps1 to poke_init.ps1; added oneremove to unload init aft…
Browse files Browse the repository at this point in the history
…er poke unload; added psd1 metadata
  • Loading branch information
oising committed Feb 6, 2016
1 parent 430ba2e commit a0ca5d9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Poke.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,10 @@ Update-TypeData -typename Microsoft.PowerShell.Commands.MemberDefinition -Member
# shortcut for $o | peek | gm
function Get-PokeMember { $args | peek | Get-Member }

$ExecutionContext.SessionState.Module.OnRemove = {
remove-module poke_init -ErrorAction SilentlyContinue
}

#
# Exports
#
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
fixes:
- two tests were failing due to silly tests against private member counts to
validate success;
- "init" script module is left loaded after a module unload - added onremove to unload it

enhancements:
- now support invoking methods with out/ref parameters (poewrshell treats both as [ref])
Expand Down
5 changes: 0 additions & 5 deletions init.ps1

This file was deleted.

35 changes: 29 additions & 6 deletions poke.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Author = 'Oisin Grehan'
CompanyName = 'MVP'

# Copyright statement for this module
Copyright = '(c) 2012 Oisin Grehan. All rights reserved.'
Copyright = '(c) 2012-2016 Oisin Grehan. All rights reserved.'

# Description of the functionality provided by this module
Description = "A PowerShell module for working with non-public types and instances. Ideal for live debugging of complex .net applications, or even introspection against powershell itself. Think open brain surgery for .NET."
Expand Down Expand Up @@ -54,7 +54,7 @@ PowerShellVersion = '3.0'
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module
ScriptsToProcess = @('init.ps1')
ScriptsToProcess = @('poke_init.ps1')

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
Expand All @@ -66,7 +66,7 @@ FormatsToProcess = @()
# NestedModules = @()

# Functions to export from this module
FunctionsToExport = '*'
FunctionsToExport = @('Get-Delegate', 'Get-PokeMember', 'Invoke-FormatHelper', 'New-InstanceProxy', 'New-ObjectProxy', 'New-TypeProxy')

# Cmdlets to export from this module
CmdletsToExport = '*'
Expand All @@ -75,7 +75,7 @@ CmdletsToExport = '*'
VariablesToExport = '*'

# Aliases to export from this module
AliasesToExport = '*'
AliasesToExport = 'peek'

# List of all modules packaged with this module
# ModuleList = @()
Expand All @@ -84,13 +84,36 @@ AliasesToExport = '*'
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess
# PrivateData = ''
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'debugging','hack','peek','reflection'

# A URL to the license for this module.
# LicenseUri = ''

# A URL to the main website for this project.
ProjectUri = 'https://github.com/oising/poke'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '1.1 - added support for out/ref parameters.'

# External dependent modules of this module
# ExternalModuleDependencies = ''

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}

0 comments on commit a0ca5d9

Please sign in to comment.