Skip to content

Commit

Permalink
Merge pull request #4 from techthoughts2/Enhancements
Browse files Browse the repository at this point in the history
Enhancements
  • Loading branch information
techthoughts2 authored Jan 15, 2024
2 parents 5af889d + 91ea43b commit 80008e3
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ reported the issue. Please try to include as much information as you can. Detail

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

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

To send a pull request, please:

1. Fork the repository.
2. Checkout the *dev* branch
2. Checkout the *Enhancements* branch
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.
4. Ensure local tests pass.
5. Commit to your fork using clear commit messages.
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
[psgallery-v1]: https://www.powershellgallery.com/packages/pwshPlaces/0.8.1
[license-badge]: https://img.shields.io/github/license/techthoughts2/pwshPlaces

<p align="center">
<img src="docs/assets/pwshPlaces.png" alt="pwshPlaces Logo" >
</p>

Branch | Windows - PowerShell | Windows - pwsh | Linux | MacOS
--- | --- | --- | --- | --- |
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)
Expand Down
9 changes: 9 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.3]

- Module Changes
- Updated links in `psd1` manifest
- Updated to use `System.Collections.Generic.List` instead of `System.Collections.ArrayList`
- Misc
- Added new pwshPlaces logo and icons
- Updated CONTRIBUTING guidelines

## [1.0.0]

- Module Changes
Expand Down
Binary file added docs/assets/pwshPlaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/pwshPlaces_favicon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/pwshPlaces_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

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.

<p align="center">
<img src="assets/pwshPlaces.png" alt="pwshPlaces Logo" >
</p>


## Why pwshPlaces?

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.
Expand Down
2 changes: 1 addition & 1 deletion docs/pwshPlaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: pwshPlaces
Module Guid: 9a9914bd-d115-4f42-bb5d-19c5e5561a3f
Download Help Link: NA
Help Version: 1.0.0
Help Version: 1.0.3
Locale: en-US
---

Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ theme:
# - navigation.tabs
# - navigation.tabs.sticky
# - navigation.path
# favicon:
favicon: assets/pwshPlaces_favicon_32x32.png
# icon:
# repo:
# font:
# text: Work Sans
# logo:
logo: assets/pwshPlaces_icon.png
# palette:
# primary: teal
# palette:
Expand Down
31 changes: 17 additions & 14 deletions src/Tests/Integration/pwshPlaces-Infra.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ $PathToManifest = [System.IO.Path]::Combine('..', '..', 'Artifacts', "$ModuleNam
#-------------------------------------------------------------------------
Import-Module $PathToManifest -Force
#-------------------------------------------------------------------------
Describe 'Integration Tests' -Tag Infrastructure {
Describe 'Integration Tests' -Tag Integration {
# for local dev testing only
# BeforeEach {
# $env:GoogleAPIKey = ''
# $env:BingAPIKey = ''
# }
BeforeEach {
Start-Sleep -Milliseconds (Get-Random -Minimum 550 -Maximum 1550)
}
Context 'Google Maps Function Tests' {

Context 'Find-GMapPlace' {
Expand All @@ -34,7 +37,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
$eval.name | Should -BeExactly "Krause's Cafe"
$eval.Open | Should -Not -BeNullOrEmpty
$eval.rating | Should -Not -BeNullOrEmpty
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)

} #it

} #context_Find-GMapPlace
Expand Down Expand Up @@ -64,7 +67,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
$eval.price_level | Should -Not -BeNullOrEmpty
$eval.Latitude | Should -Not -BeNullOrEmpty
$eval.Longitude | Should -Not -BeNullOrEmpty
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)

} #it

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

} #it

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

} #it

It 'should return expected results for place lookup' {
Expand All @@ -102,7 +105,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
$eval.City | Should -BeExactly 'New Braunfels'
$eval.Latitude | Should -Not -BeNullOrEmpty
$eval.Longitude | Should -Not -BeNullOrEmpty
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)

} #it

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

} #it

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

} #it

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

} #it

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

} #it

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

} #it

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

} #it

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

} #it

It 'should return the expected results for point' {
Expand All @@ -247,7 +250,7 @@ Describe 'Integration Tests' -Tag Infrastructure {
$eval.TimeZoneShort | Should -BeExactly 'CST'
$eval.dstRule.dstStartMonth | Should -BeExactly 'Mar'
$eval.dstRule.dstEndMonth | Should -BeExactly 'Nov'
Start-Sleep -Milliseconds (Get-Random -Minimum 250 -Maximum 1000)

} #it

} #context_Find-BingPlace
Expand Down
2 changes: 1 addition & 1 deletion src/pwshPlaces/Public/Search-GMapNearbyPlace.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function Search-GMapNearbyPlace {
$uri += $fAPIKey
Write-Debug -Message ('Final URI: {0}' -f $uri)

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

$invokeRestMethodSplat = @{
Uri = $uri
Expand Down
2 changes: 1 addition & 1 deletion src/pwshPlaces/Public/Search-GMapText.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function Search-GMapText {
$uri += $fAPIKey
Write-Debug -Message ('Final URI: {0}' -f $uri)

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

$invokeRestMethodSplat = @{
Uri = $uri
Expand Down
8 changes: 4 additions & 4 deletions src/pwshPlaces/pwshPlaces.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'pwshPlaces.psm1'

# Version number of this module.
ModuleVersion = '1.0.0'
ModuleVersion = '1.0.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -143,16 +143,16 @@
)

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

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

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

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

# Prerelease string of this module
# Prerelease = ''
Expand Down

0 comments on commit 80008e3

Please # to comment.