Skip to content

Commit 80008e3

Browse files
Merge pull request #4 from techthoughts2/Enhancements
Enhancements
2 parents 5af889d + 91ea43b commit 80008e3

File tree

13 files changed

+46
-25
lines changed

13 files changed

+46
-25
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ reported the issue. Please try to include as much information as you can. Detail
2222

2323
Contributions via pull requests are much appreciated. Before sending a pull request, please ensure that:
2424

25-
1. You are working against the latest source on the *dev* branch.
25+
1. You are working against the latest source on the *Enhancements* branch.
2626
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
2727
3. You open an issue to discuss any significant work - I'd hate for your time to be wasted.
2828

2929
To send a pull request, please:
3030

3131
1. Fork the repository.
32-
2. Checkout the *dev* branch
32+
2. Checkout the *Enhancements* branch
3333
3. Modify the source; please focus on the specific change you are contributing. Please refrain from code styling changes, it will be harder to focus on your change.
3434
4. Ensure local tests pass.
3535
5. Commit to your fork using clear commit messages.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
[psgallery-v1]: https://www.powershellgallery.com/packages/pwshPlaces/0.8.1
88
[license-badge]: https://img.shields.io/github/license/techthoughts2/pwshPlaces
99

10+
<p align="center">
11+
<img src="docs/assets/pwshPlaces.png" alt="pwshPlaces Logo" >
12+
</p>
13+
1014
Branch | Windows - PowerShell | Windows - pwsh | Linux | MacOS
1115
--- | --- | --- | --- | --- |
1216
main | [![Build Status Windows PowerShell main](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_Windows.yml/badge.svg?branch=main)](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_Windows.yml) | [![Build Status Windows pwsh main](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_Windows_Core.yml/badge.svg?branch=main)](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_Windows_Core.yml) | [![Build Status Linux main](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_Linux.yml/badge.svg?branch=main)](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_Linux.yml) | [![Build Status MacOS main](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_MacOS.yml/badge.svg?branch=main)](https://github.com/techthoughts2/pwshPlaces/actions/workflows/wf_MacOS.yml)

docs/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.3]
9+
10+
- Module Changes
11+
- Updated links in `psd1` manifest
12+
- Updated to use `System.Collections.Generic.List` instead of `System.Collections.ArrayList`
13+
- Misc
14+
- Added new pwshPlaces logo and icons
15+
- Updated CONTRIBUTING guidelines
16+
817
## [1.0.0]
918

1019
- Module Changes

docs/assets/pwshPlaces.png

24.9 KB
Loading
3.63 KB
Loading

docs/assets/pwshPlaces_icon.png

47.1 KB
Loading

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
pwshPlaces is a PowerShell module that integrates with leading mapping services like Google Maps and Bing Maps. Offering a suite of commands for interacting with maps, it enables you to perform searches, read reviews, and retrieve detailed information about locations worldwide. From discovering nearby restaurants to geocoding addresses, pwshPlaces equips you with a wealth of geographical data, accessible through simple and intuitive PowerShell commands.
1414

15+
<p align="center">
16+
<img src="assets/pwshPlaces.png" alt="pwshPlaces Logo" >
17+
</p>
18+
19+
1520
## Why pwshPlaces?
1621

1722
pwshPlaces streamlines your interaction with Google Maps and Bing Maps, transforming complex API requirements into simple PowerShell commands. Unlike the often overwhelming and visually dense web interfaces, pwshPlaces delivers essential information efficiently, enabling rapid decision-making based on concise and relevant data. Quickly compare restaurants, parks, or any places of interest with just a few lines of code, receiving straightforward, concise data like ratings and locations.

docs/pwshPlaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Module Name: pwshPlaces
33
Module Guid: 9a9914bd-d115-4f42-bb5d-19c5e5561a3f
44
Download Help Link: NA
5-
Help Version: 1.0.0
5+
Help Version: 1.0.3
66
Locale: en-US
77
---
88

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ theme:
4747
# - navigation.tabs
4848
# - navigation.tabs.sticky
4949
# - navigation.path
50-
# favicon:
50+
favicon: assets/pwshPlaces_favicon_32x32.png
5151
# icon:
5252
# repo:
5353
# font:
5454
# text: Work Sans
55-
# logo:
55+
logo: assets/pwshPlaces_icon.png
5656
# palette:
5757
# primary: teal
5858
# palette:

src/Tests/Integration/pwshPlaces-Infra.Tests.ps1

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ $PathToManifest = [System.IO.Path]::Combine('..', '..', 'Artifacts', "$ModuleNam
99
#-------------------------------------------------------------------------
1010
Import-Module $PathToManifest -Force
1111
#-------------------------------------------------------------------------
12-
Describe 'Integration Tests' -Tag Infrastructure {
12+
Describe 'Integration Tests' -Tag Integration {
1313
# for local dev testing only
1414
# BeforeEach {
1515
# $env:GoogleAPIKey = ''
1616
# $env:BingAPIKey = ''
1717
# }
18+
BeforeEach {
19+
Start-Sleep -Milliseconds (Get-Random -Minimum 550 -Maximum 1550)
20+
}
1821
Context 'Google Maps Function Tests' {
1922

2023
Context 'Find-GMapPlace' {
@@ -34,7 +37,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
3437
$eval.name | Should -BeExactly "Krause's Cafe"
3538
$eval.Open | Should -Not -BeNullOrEmpty
3639
$eval.rating | Should -Not -BeNullOrEmpty
37-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
40+
3841
} #it
3942

4043
} #context_Find-GMapPlace
@@ -64,7 +67,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
6467
$eval.price_level | Should -Not -BeNullOrEmpty
6568
$eval.Latitude | Should -Not -BeNullOrEmpty
6669
$eval.Longitude | Should -Not -BeNullOrEmpty
67-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
70+
6871
} #it
6972

7073
} #context_Get-GMapPlaceDetails
@@ -78,7 +81,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
7881
}
7982
$eval = Invoke-GMapGeoCode @invokeGMapGeoCodeSplat
8083
($eval.place_id | Measure-Object).Count | Should -BeGreaterOrEqual 1
81-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
84+
8285
} #it
8386

8487
It 'should return the expected results for reverse geocoding' {
@@ -89,7 +92,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
8992
}
9093
$eval = Invoke-GMapGeoCode @invokeGMapGeoCodeSplat
9194
($eval.place_id | Measure-Object).Count | Should -BeGreaterOrEqual 1
92-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
95+
9396
} #it
9497

9598
It 'should return expected results for place lookup' {
@@ -102,7 +105,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
102105
$eval.City | Should -BeExactly 'New Braunfels'
103106
$eval.Latitude | Should -Not -BeNullOrEmpty
104107
$eval.Longitude | Should -Not -BeNullOrEmpty
105-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
108+
106109
} #it
107110

108111
} #context_Invoke-GMapGeoCode
@@ -125,7 +128,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
125128
}
126129
$eval = Search-GMapNearbyPlace @searchGMapNearbyPlaceSplat
127130
($eval.place_id | Measure-Object).Count | Should -BeGreaterOrEqual 2
128-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
131+
129132
} #it
130133

131134
} #context_Search-GMapNearbyPlace
@@ -147,7 +150,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
147150
}
148151
$eval = Search-GMapText @searchGMapTextSplat
149152
($eval.place_id | Measure-Object).Count | Should -BeGreaterOrEqual 8
150-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
153+
151154
} #it
152155

153156
} #context_Search-GMapText
@@ -167,7 +170,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
167170
}
168171
$eval = Invoke-BingGeoCode @invokeBingGeoCodeSplat
169172
($eval.name | Measure-Object).Count | Should -BeGreaterOrEqual 1
170-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
173+
171174
} #it
172175

173176
It 'should return the expected results for reverse geocoding' {
@@ -178,7 +181,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
178181
}
179182
$eval = Invoke-BingGeoCode @invokeBingGeoCodeSplat
180183
($eval.name | Measure-Object).Count | Should -BeGreaterOrEqual 1
181-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
184+
182185
} #it
183186

184187
} #context_Invoke-GMapGeoCode
@@ -196,7 +199,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
196199
}
197200
$eval = Find-BingPlace @findBingPlaceSplat
198201
($eval.name | Measure-Object).Count | Should -BeGreaterOrEqual 1
199-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
202+
200203
} #it
201204

202205
} #context_Find-BingPlace
@@ -214,7 +217,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
214217
}
215218
$eval = Search-BingNearbyPlace @searchBingNearbyPlaceSplat
216219
($eval.name | Measure-Object).Count | Should -BeGreaterOrEqual 1
217-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
220+
218221
} #it
219222

220223
} #context_Find-BingPlace
@@ -232,7 +235,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
232235
$eval.TimeZoneShort | Should -BeExactly 'CST'
233236
$eval.dstRule.dstStartMonth | Should -BeExactly 'Mar'
234237
$eval.dstRule.dstEndMonth | Should -BeExactly 'Nov'
235-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
238+
236239
} #it
237240

238241
It 'should return the expected results for point' {
@@ -247,7 +250,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
247250
$eval.TimeZoneShort | Should -BeExactly 'CST'
248251
$eval.dstRule.dstStartMonth | Should -BeExactly 'Mar'
249252
$eval.dstRule.dstEndMonth | Should -BeExactly 'Nov'
250-
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)
253+
251254
} #it
252255

253256
} #context_Find-BingPlace

src/pwshPlaces/Public/Search-GMapNearbyPlace.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function Search-GMapNearbyPlace {
277277
$uri += $fAPIKey
278278
Write-Debug -Message ('Final URI: {0}' -f $uri)
279279

280-
$allResults = [System.Collections.ArrayList]::new()
280+
$allResults = New-Object System.Collections.Generic.List[object]
281281

282282
$invokeRestMethodSplat = @{
283283
Uri = $uri

src/pwshPlaces/Public/Search-GMapText.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function Search-GMapText {
304304
$uri += $fAPIKey
305305
Write-Debug -Message ('Final URI: {0}' -f $uri)
306306

307-
$allResults = [System.Collections.ArrayList]::new()
307+
$allResults = New-Object System.Collections.Generic.List[object]
308308

309309
$invokeRestMethodSplat = @{
310310
Uri = $uri

src/pwshPlaces/pwshPlaces.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'pwshPlaces.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.0.0'
15+
ModuleVersion = '1.0.3'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -143,16 +143,16 @@
143143
)
144144

145145
# A URL to the license for this module.
146-
# LicenseUri = ''
146+
LicenseUri = 'https://github.com/techthoughts2/pwshPlaces/blob/main/LICENSE'
147147

148148
# A URL to the main website for this project.
149149
ProjectUri = 'https://github.com/techthoughts2/pwshPlaces'
150150

151151
# A URL to an icon representing this module.
152-
# IconUri = ''
152+
IconUri = 'https://github.com/techthoughts2/pwshPlaces/raw/main/docs/assets/pwshPlaces_icon.png'
153153

154154
# ReleaseNotes of this module
155-
ReleaseNotes = 'https://github.com/techthoughts2/pwshPlaces/blob/master/.github/CHANGELOG.md'
155+
ReleaseNotes = 'https://github.com/techthoughts2/pwshPlaces/blob/main/docs/CHANGELOG.md'
156156

157157
# Prerelease string of this module
158158
# Prerelease = ''

0 commit comments

Comments
 (0)