Skip to content

Commit 9d13513

Browse files
committedMay 3, 2018
1.1.0
1 parent c48b388 commit 9d13513

10 files changed

+86
-68
lines changed
 

‎CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to the project [https://github.com/mazzy-ax/xpoTools](https://github.com/mazzy-ax/xpoTools) will be documented in this file. See also [https://github.com/mazzy-ax/xpoTools/releases](https://github.com/mazzy-ax/xpoTools/releases).
44

5+
## [1.1.0](https://github.com/mazzy-ax/xpoTools/compare/1.0.1...1.1.0) - 2018-05-03
6+
7+
* To increase a general performance:
8+
* moved: the generation of xpp-files is moved from `xpo-import` to `split-xpo` cmdlet
9+
* removed: the `xpptext` property from class [xpoItem] is unused and have removed
10+
11+
* Small updated for README and tests of the project meta.
12+
513
## [1.0.1](https://github.com/mazzy-ax/xpoTools/compare/1.0.0...1.0.1) - 2018-04-23
614

715
* Added object types for ax2012 in `Get-XpoType.ps1`. #1 closed.

‎README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# xpoTools
22

3-
![version](https://img.shields.io/badge/version-1.0.1-green.svg) ![license](https://img.shields.io/badge/license-MIT-blue.svg)
3+
![version](https://img.shields.io/badge/version-1.1.0-green.svg) ![license](https://img.shields.io/badge/license-MIT-blue.svg)
44

55
[xpoTools](https://github.com/mazzy-ax/xpoTools) is a Powershell module contains cmdlets that splits one XPO file into separate XPO files and combines a set of set of interdependent XPO files into a single XPO file.
66

@@ -15,7 +15,6 @@ XPO file is a text file contains Microsoft Dynamics AX (Axapta) objects. See [te
1515
* include and exclude files based on a file name. For example, to exclude `DEL_` objects
1616
* filter AOT objects based on a text within XPO elements
1717
* uses Encoding parameter
18-
* It have designed for parallel processing. See [examples/parallel-split.ps1](examples/parallel-split.ps1) folder.
1918

2019
## Thanks
2120

‎tests/ModuleManifest.Tests.ps1

-43
This file was deleted.

‎tests/nuspec.Tests.ps1 ‎tests/manifests.Tests.ps1

+50-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ $moduleRoot = Split-Path (Resolve-Path $projectRoot\*\*.psd1)
33
$moduleName = Split-Path $moduleRoot -Leaf
44

55
$changelog = 'CHANGELOG.md'
6+
$readme = 'README.md'
7+
8+
$script:manifest = $null
69

710
Describe 'Module Manifest Tests' -Tag 'Meta' {
811

9-
It 'Passes Test-ModuleManifest' {
12+
It 'has a valid module manifest file' {
1013
$script:manifest = Test-ModuleManifest -Path $moduleRoot\$moduleName.psd1
1114
$? | Should -Be $true
1215
}
@@ -55,4 +58,50 @@ Describe 'Module Manifest Tests' -Tag 'Meta' {
5558
$manifest.Version -as [Version] | Should be ( $ChangelogVersion -as [Version] )
5659
}
5760

61+
}
62+
63+
Describe 'Nuget specification Tests' -Tag 'Meta' {
64+
65+
It 'has a valid nuspec file' {
66+
$file = Resolve-Path $projectRoot\$moduleName.nuspec
67+
[xml]$script:nuspec = Get-Content $file
68+
$nuspec | Should Not BeNullOrEmpty
69+
}
70+
71+
It 'has a valid id' {
72+
$nuspec.package.metadata.id | Should Be ($moduleName)
73+
}
74+
75+
It 'nuspec and manifest descriptions are same' {
76+
$nuspec.package.metadata.Description | Should Be ($manifest.Description)
77+
}
78+
79+
It 'nuspec and manifest release notes are same' {
80+
$nuspecReleaseNotes = $nuspec.package.metadata.ReleaseNotes -replace '\s'
81+
$manifestReleaseNotes = $manifest.PrivateData.PSData.ReleaseNotes -replace '\s'
82+
83+
$nuspecReleaseNotes | Should Be $manifestReleaseNotes
84+
}
85+
86+
It 'nuspec and manifest projectUrl are same' {
87+
$nuspec.package.metadata.projectUrl | Should Be ($manifest.PrivateData.PSData.ProjectUri)
88+
}
89+
90+
It 'nuspec and manifest licenseUrl notes are same' {
91+
$nuspec.package.metadata.licenseUrl | Should Be ($manifest.PrivateData.PSData.LicenseUri)
92+
}
93+
94+
}
95+
96+
Describe 'README.md Tests' -Tag 'Meta' {
97+
98+
It "has a valid shields.io/badge/version in the $readme file" {
99+
Get-Content -Path $projectRoot\README.md |
100+
Where-Object { $_ -match '\!\[version\]\(https://img\.shields\.io/badge/version-(?<Version>(\d+\.){1,3}\d+)-green\.svg\)' } |
101+
Select-Object -First 1 | Should Not BeNullOrEmpty
102+
103+
$ReadmeVersion = $matches.Version
104+
$ReadmeVersion | Should Be $manifest.Version
105+
}
106+
58107
}
File renamed without changes.

‎xpoTools.nuspec

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,24 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
44
<id>xpoTools</id>
5-
<version>1.0.1</version>
5+
<version>1.1.0</version>
66
<authors>Sergey Mazurkin</authors>
77
<licenseUrl>https://github.com/mazzy-ax/xpoTools/blob/master/LICENSE</licenseUrl>
88
<projectUrl>https://github.com/mazzy-ax/xpoTools</projectUrl>
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1010
<description>Powershell cmdlets to split and to merge XPO files contains AOT objects of Microsoft Dynamics AX (Axapta) 3.0, 4.0, 2009, 2012</description>
1111
<releaseNotes>
12+
## 1.1.0
13+
14+
To increase a general performance:
15+
16+
* moved: the generation of xpp-files is moved from xpo-import to split-xpo cmdlet
17+
* removed: the xpptext property from class [xpoItem] is unused and have removed
18+
1219
## 1.0.1
1320

14-
* Added object types for ax2012 in `Get-XpoType.ps1`. See #1
15-
* Fixed couple bugs and type in `Select-FileName.ps1`, `parallel-split.ps1` and `Import-Xpo.ps1`
21+
* Added object types for ax2012 in Get-XpoType.ps1. See #1
22+
* Fixed couple bugs and type in Select-FileName.ps1, parallel-split.ps1 and Import-Xpo.ps1
1623
* Fixed readme.md
1724
</releaseNotes>
1825
<tags>xpo split merge Axapta Microsoft Dynamics AX</tags>

‎xpoTools/classes/classes.ps1

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class xpoItem {
4747
}
4848

4949
[xpoNode[]]$Node
50-
[string[]]$xppText
5150
[xpoNode[]]$Group
5251
[xpoNode[]]$GroupNode
5352

‎xpoTools/functions/Import-Xpo.ps1

+1-13
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Import-Xpo {
3030

3131
$Texts = Get-Content $xpoFile.FullName -Delimiter '***Element: ' -Encoding $Encoding
3232

33-
if ( $Texts.Length -gt 2 -and $Texts[-1] -match 'END\s+$' ) {
33+
if ( $Texts -and $Texts.Length -gt 2 -and $Texts[-1] -match 'END\s+$' ) {
3434
$FileHeader = $Texts[0]
3535

3636
$Items = $Texts |
@@ -48,18 +48,6 @@ function Import-Xpo {
4848

4949
Write-Progress -Activity $funcName -Completed
5050

51-
# TODO [performance]: is it need parallel threads for next sentense?
52-
53-
$Items | Where-Object { $_ -and $_.Type.Tag -EQ 'CLS' } | ForEach-Object {
54-
Write-Verbose "$funcName converts xpo to xpp $_"
55-
$_.xppText = $_.Text | Select-Source | Select-xppClass
56-
}
57-
58-
$Items | Where-Object { $_ -and $_.Type.Tag -EQ 'JOB' } | ForEach-Object {
59-
Write-Verbose "$funcName converts xpo to xpp $_"
60-
$_.xppText = $_.Text | Select-Source | Select-Object -First 1 -ExpandProperty Text | Select-TextLine
61-
}
62-
6351
$Nodes = $Items | Where-Object { $_ -and $_.Type.Tag -EQ 'PRN' } | ForEach-Object {
6452
Write-Verbose "$funcName collects nodes for the project $_"
6553
$_.GroupNode = $_ | select-ProjectGroup | select-ProjectNode

‎xpoTools/functions/Split-Xpo.ps1

+6-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ function Split-Xpo {
5959

6060
$Item = $_
6161

62-
if ( $xpp -and $Item.xppText ) {
62+
if ( $xpp -and $Item.Type.Tag -eq 'CLS' ) {
6363
$Ext = '.xpp'
64-
$s = $Item.xppText
64+
$s = $Item.Text | Select-Source | Select-xppClass
65+
}
66+
elseif( $xpp -and $Item.Type.Tag -eq 'JOB' ) {
67+
$Ext = '.xpp'
68+
$s = $Item.Text | Select-Source | Select-Object -First 1 -ExpandProperty Text | Select-TextLine
6569
}
6670
else {
6771
$Ext = '.xpo'

‎xpoTools/xpoTools.psd1

+10-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
RootModule = 'xpoTools.psm1'
88

99
# Version number of this module.
10-
ModuleVersion = '1.0.1'
10+
ModuleVersion = '1.1.0'
1111

1212
# Supported PSEditions
1313
# CompatiblePSEditions = @()
@@ -103,10 +103,17 @@ PrivateData = @{
103103

104104
# ReleaseNotes of this module
105105
ReleaseNotes = @'
106+
## 1.1.0
107+
108+
To increase a general performance:
109+
110+
* moved: the generation of xpp-files is moved from xpo-import to split-xpo cmdlet
111+
* removed: the xpptext property from class [xpoItem] is unused and have removed
112+
106113
## 1.0.1
107114
108-
* Added object types for ax2012 in `Get-XpoType.ps1`. See #1
109-
* Fixed couple bugs and type in `Select-FileName.ps1`, `parallel-split.ps1` and `Import-Xpo.ps1`
115+
* Added object types for ax2012 in Get-XpoType.ps1. See #1
116+
* Fixed couple bugs and type in Select-FileName.ps1, parallel-split.ps1 and Import-Xpo.ps1
110117
* Fixed readme.md
111118
'@
112119

0 commit comments

Comments
 (0)
Please sign in to comment.