Skip to content

Commit

Permalink
♻️ Replace references to master branch
Browse files Browse the repository at this point in the history
- Refs replaced with `main`
- Refs to `master` in dbatools koans replaced with `primary`
  • Loading branch information
vexx32 committed Jun 13, 2020
1 parent af15e50 commit c6d7968
Show file tree
Hide file tree
Showing 34 changed files with 61 additions and 65 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ To do so, go to [the main page of the repo][pskoans] and click the Fork button a
1. Commit
- Committing saved changes to current branch
- Once you've made a change and saved it, GitHub Desktop will show the diffs
- Enter a Summary and Description of your commit and then hit "Commit to master"
- This with add the changes to a commit on your master branch of your local git copy.
- Enter a Summary and Description of your commit and then hit "Commit to main"
- This with add the changes to a commit on your main branch of your local git copy.
1. Push Origin
- Hit the "Push origin" button in GitHub Desktop to merge your local repository copy with the copy stored on GitHub.
1. Pull Request
- Option 1
- From GitHub Desktop, click the blue "Create Pull Request" button that appears after you hit "Push origin"
- This will take you to the "Open a pull request" GitHub page comparing your repo / branch against the PSKoans / master branch
- This will take you to the "Open a pull request" GitHub page comparing your repo / branch against the PSKoans / main branch
- Option 2
- Go to Github and do a pull request from the PSKoans main page. the process is the same!
1. Collaborate and have your change approved and merged into the main branch!
Expand Down Expand Up @@ -166,7 +166,7 @@ To do so, go to [the main page of the repo][pskoans] and click the Fork button a
- Check what your origin is by Changing your directory to your repository and running: `git remote -v`
- This should display `origin https://github.com/$Username/PSKoans`
- Push
- Run: `git push origin master` to push your local repo commits to your Github repo.
- Run: `git push origin main` to push your local repo commits to your Github repo.
- Running this command will pop up a dialog box to log into GitHub to authenticate your push.
1. Pull Request
- Go to Github and do a pull request from the PSKoans main page.
Expand All @@ -189,7 +189,7 @@ To do so, go to [the main page of the repo][pskoans] and click the Fork button a
- Hit the ✔️ above the files to commit them to the local repo.
1. Push Origin
- In the lower left hand corner you should see 0⬇️1⬆️
- This will push your commits up to the master branch of your fork.
- This will push your commits up to the main branch of your fork.
1. Pull Request
- Go to Github and do a pull request from the PSKoans main page.
1. Collaborate and have your change approved and merged into the main branch!
Expand Down
3 changes: 0 additions & 3 deletions PSKoans/Init/AddPesterAssertionOperator.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ try {
Add-AssertionOperator -Name Fail -Test {
param ($ActualValue, [switch] $Negate, [string] $Because)

# look at https://github.com/pester/Pester/blob/master/Functions/Assertions/BeTrueOrFalse.ps1
# for inspiration, or here https://mathieubuisson.github.io/pester-custom-assertions/

if ($Negate) {
return [PSCustomObject]@{
Succeeded = $false
Expand Down
14 changes: 7 additions & 7 deletions PSKoans/Koans/Modules/dbatools/AboutDbaDatabase.Koans.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ param()
Get-DbaDatabase
The Get-DbaDatabase command gets SQL database information for each database
that is present on the target instance(s) of SQL Server by default. If the
name of the database is provided, the command will return only the specific
that is present on the target instance(s) of SQL Server by default. If the
name of the database is provided, the command will return only the specific
database.
#>
Describe 'Get-DbaDatabase' {

#region Mocks
<#
Let's setup the environment for you. Unless you want your Koans to
Let's setup the environment for you. Unless you want your Koans to
nearly always fail I'd suggest not messing with this bit.
#>
BeforeAll {
Mock -CommandName Get-DbaDatabase -MockWith {
Import-Clixml -Path .\PSKoans\Koans\dbatools\Mocks\Database_All.xml
} -ParameterFilter { $_.SqlInstance -eq 'localhost' }

Mock -CommandName Get-DbaDatabase -MockWith {
Import-Clixml -Path .\PSKoans\Koans\dbatools\Mocks\Database_TestDb.xml
} -ParameterFilter { $_.SqlInstance -eq 'localhost' -and $_.Database -eq 'testdb' }
Expand Down Expand Up @@ -55,8 +55,8 @@ Describe 'Get-DbaDatabase' {
database, using the -Database parameter, we can get information on
that single database instead.
#>
$MasterDatabase = Get-DbaDatabase -SqlInstance localhost -Database ____
$MasterDatabase.Name | Should -Be 'testdb'
$primaryDatabase = Get-DbaDatabase -SqlInstance localhost -Database ____
$primaryDatabase.Name | Should -Be 'testdb'
}

It 'Gathers system databases only if specified...' {
Expand All @@ -73,7 +73,7 @@ Describe 'Get-DbaDatabase' {
ExcludeUser = $____
}
$UserDbsExcluded = Get-DbaDatabase @UserDbParams
$UserDbsExcluded.Name | Should -BeIn 'tempdb', 'master', 'model', 'msdb'
$UserDbsExcluded.Name | Should -BeIn 'tempdb', 'primary', 'model', 'msdb'
}

It 'Excludes system databases if specified...' {
Expand Down
10 changes: 5 additions & 5 deletions PSKoans/Koans/Modules/dbatools/AboutQueryingDatabases.Koans.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ Describe "Invoke-DbaQuery" {
}
}
#endregion

It 'Queries a SQL Server instance...' {
<#
Invoke-DbaQuery can be used to connect to the SQL Server, in much the same way that Get-DbaDatabase
does, by using the -SqlInstance parameter.
Complete the below command to query "localhost" using Invoke-DbaQuery.
#>
$Bar = Invoke-DbaQuery -SqlInstance __ -Query "SELECT DB_NAME() AS database_name;"
$Bar.database_name | Should -Be 'master'
$Bar.database_name | Should -Be 'primary'
}

It 'Queries multiple SQL Server instances...' {
Expand All @@ -75,7 +75,7 @@ Describe "Invoke-DbaQuery" {
We've created a file called SimpleTSQL.sql that contains a T-SQL statement, which we want to
run against the tempdb database on the localhost instance.
#>
Out-File - FilePath TestDrive:\SimpleTSQL.sql -InputObject "SELECT 'From a File' AS Origin;"
Out-File - FilePath TestDrive:\SimpleTSQL.sql -InputObject "SELECT 'From a File' AS Origin;"
$InvokeDbaQueryParams = @{
SqlInstance = 'localhost'
Database = 'tempdb'
Expand All @@ -88,7 +88,7 @@ Describe "Invoke-DbaQuery" {
It 'queries a database with passing values to parameters' {
<#
T-SQL may seem like a strict, rigid language. We have a script that returns a value or values.
If we want to get different values then we will have to change the full query.
If we want to get different values then we will have to change the full query.
From
"SELECT PersonName FROM Student WHERE PersonName = 'Bob';"
to
Expand Down Expand Up @@ -119,7 +119,7 @@ Describe "Invoke-DbaQuery" {
It 'shows Little Bobby Tables...' {
<#
You may ask "Why would I want to use parameters? I can just pass in a variable from PowerShell!"
If you are familiar with Little Bobby Tables (https://xkcd.com/327/) then you are aware of the
If you are familiar with Little Bobby Tables (https://xkcd.com/327/) then you are aware of the
dangers of un-sanitized inputs.
However, an example is nearly always better than a lecture.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</TN>
<ToString>System.Data.DataRow</ToString>
<Props>
<S N="master">database_name</S>
<S N="primary">database_name</S>
</Props>
</Obj>
</Objs>
2 changes: 1 addition & 1 deletion PSKoans/Koans/Modules/dbatools/Mocks/Database_All.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<S N="ComputerName">Server01</S>
<S N="InstanceName">MSSQLSERVER</S>
<S N="SqlInstance">Server01</S>
<S N="Name">master</S>
<S N="Name">primary</S>
<S N="Status">Normal</S>
<B N="IsAccessible">true</B>
<S N="RecoveryModel">Full</S>
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Koans/Modules/dbatools/Mocks/Database_System.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<S N="ComputerName">Server01</S>
<S N="InstanceName">MSSQLSERVER</S>
<S N="SqlInstance">Server01</S>
<S N="Name">master</S>
<S N="Name">primary</S>
<S N="Status">Normal</S>
<B N="IsAccessible">true</B>
<S N="RecoveryModel">Full</S>
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/PSKoans.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
)

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

# A URL to the main website for this project.
ProjectUri = 'https://github.com/vexx32/PSKoans'
Expand Down
18 changes: 9 additions & 9 deletions PSKoans/Public/Get-Blank.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,40 @@
.SYNOPSIS
Get-Blank returns a blank object that represents no value, and is considered equal to
no other object or value.
.DESCRIPTION
Get-Blank returns an object of type [Blank] as defined in the PSKoans module.
This object is not equivalent to any other type of object, including itself, when compared
with a standard `-eq` comparison.
The only exception, which is unavoidable, is that it is considered equal to $true when
$true is on the left-hand side of the comparison. Tthis kind of comparison may sometimes
need to be carefully avoided when framing a koan assertion.
For instance, the following assertion WILL pass, although it should not:
____ | Should -BeTrue
.EXAMPLE
__ | Should -Be (4 + 1)
.EXAMPLE
$Date = Get-Date
$____ | Should -Be $Date
.EXAMPLE
$Num = Get-Random
____ | Should -Not -Be $num
#>
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-Blank.md')]
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-Blank.md')]
[OutputType('Blank')]
[Alias('__', '____', 'FILL_ME_IN')]
param(
# Used to capture the input in a pipeline context, to avoid erroring out in those contexts.
[Parameter(ValueFromPipeline, DontShow)]
[object]
${|PipeInput},

# Used to capture parameter names and arguments when used as a substitute for any other cmdlet.
[Parameter(ValueFromRemainingArguments, DontShow)]
[object[]]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Get-Karma.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Get-Karma {
[CmdletBinding(DefaultParameterSetName = 'Default',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-Karma.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-Karma.md')]
[OutputType([void])]
[Alias()]
param(
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Get-PSKoan.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Get-PSKoan {
[CmdletBinding(DefaultParameterSetName = 'IncludeModule',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoan.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoan.md')]
[OutputType('PSKoans.KoanInfo')]
param(
[Parameter()]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Get-PSKoanLocation.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function Get-PSKoanLocation {
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoanLocation.md')]
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoanLocation.md')]
[OutputType([string])]
param()
process {
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Get-PSKoanSetting.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function Get-PSKoanSetting {
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoanSetting.md')]
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoanSetting.md')]
[OutputType([object], [PSCustomObject])]
param(
[Parameter()]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Move-PSKoanLibrary.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Move-PSKoanLibrary {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Move-PSKoanLibrary.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Move-PSKoanLibrary.md')]
[OutputType([void])]
param(
[Parameter(Mandatory, Position = 0, ValueFromPipeline)]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Register-Advice.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Register-Advice {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Low',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Register-Advice.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Register-Advice.md')]
[OutputType([void])]
param(
[Parameter(Position = 0)]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Reset-PSKoan.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Reset-PSKoan {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Reset-PSKoan.md',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Reset-PSKoan.md',
PositionalBinding = $false,
DefaultParameterSetName = 'NameOnly')]
[OutputType([void])]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Set-PSKoanLocation.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Set-PSKoanLocation {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Set-PSKoanLocation.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Set-PSKoanLocation.md')]
[OutputType([void])]
param(
[Parameter(Mandatory, Position = 0)]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Set-PSKoanSetting.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Set-PSKoanSetting {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium', DefaultParameterSetName = 'Single',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Set-PSKoanSetting.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Set-PSKoanSetting.md')]
[OutputType([void])]
param(
[Parameter(Position = 0, Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'Single')]
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Show-Advice.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function Show-Advice {
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Show-Advice.md')]
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Show-Advice.md')]
[Alias('Get-Advice')]
[OutputType([void])]
param(
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Show-Karma.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Show-Karma {
[CmdletBinding(DefaultParameterSetName = 'Default',
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Show-Karma.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Show-Karma.md')]
[OutputType([void])]
[Alias('Invoke-PSKoans', 'Test-Koans', 'Get-Enlightenment', 'Meditate', 'Clear-Path', 'Measure-Karma')]
param(
Expand Down
2 changes: 1 addition & 1 deletion PSKoans/Public/Update-PSKoan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using namespace System.Collections.Generic

function Update-PSKoan {
[CmdletBinding(SupportsShouldProcess, DefaultParameterSetName = 'TopicOnly', ConfirmImpact = "High",
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Update-PSKoan.md')]
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Update-PSKoan.md')]
[OutputType([void])]
param(
[Parameter()]
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
trigger:
branches:
include:
- master
- main
tags:
include:
- '*'

pr:
- master
- main

variables:
NupkgArtifactName: 'PSKoans.nupkg'
Expand All @@ -25,7 +25,7 @@ stages:
- stage: UploadChangelog
displayName: 'Upload Changelog'
dependsOn: []
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/main')

jobs:
- job: GenerateChangelog
Expand Down
2 changes: 1 addition & 1 deletion docs/Get-Blank.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: PSKoans-help.xml
Module Name: PSKoans
online version: https://github.com/vexx32/PSKoans/tree/master/docs/Get-Blank.md
online version: https://github.com/vexx32/PSKoans/tree/main/docs/Get-Blank.md
schema: 2.0.0
---

Expand Down
4 changes: 2 additions & 2 deletions docs/Get-Karma.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: PSKoans-help.xml
Module Name: PSKoans
online version: https://github.com/vexx32/PSKoans/tree/master/docs/Get-Karma.md
online version: https://github.com/vexx32/PSKoans/tree/main/docs/Get-Karma.md
schema: 2.0.0
---

Expand Down Expand Up @@ -154,4 +154,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## RELATED LINKS

[https://github.com/vexx32/PSKoans/tree/master/docs/Get-Karma.md](https://github.com/vexx32/PSKoans/tree/master/docs/Get-Karma.md)
[https://github.com/vexx32/PSKoans/tree/main/docs/Get-Karma.md](https://github.com/vexx32/PSKoans/tree/main/docs/Get-Karma.md)
5 changes: 2 additions & 3 deletions docs/Get-PSKoan.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: PSKoans-help.xml
Module Name: PSKoans
online version: https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoan.md
online version: https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoan.md
schema: 2.0.0
---

Expand Down Expand Up @@ -177,5 +177,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## RELATED LINKS

[https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoan.md](https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoan.md)

[https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoan.md](https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoan.md)
2 changes: 1 addition & 1 deletion docs/Get-PSKoanLocation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: PSKoans-help.xml
Module Name: PSKoans
online version: https://github.com/vexx32/PSKoans/tree/master/docs/Get-PSKoanLocation.md
online version: https://github.com/vexx32/PSKoans/tree/main/docs/Get-PSKoanLocation.md
schema: 2.0.0
---

Expand Down
Loading

0 comments on commit c6d7968

Please sign in to comment.