Skip to content

Commit c6d7968

Browse files
committed
♻️ Replace references to master branch
- Refs replaced with `main` - Refs to `master` in dbatools koans replaced with `primary`
1 parent af15e50 commit c6d7968

34 files changed

+61
-65
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ To do so, go to [the main page of the repo][pskoans] and click the Fork button a
127127
1. Commit
128128
- Committing saved changes to current branch
129129
- Once you've made a change and saved it, GitHub Desktop will show the diffs
130-
- Enter a Summary and Description of your commit and then hit "Commit to master"
131-
- This with add the changes to a commit on your master branch of your local git copy.
130+
- Enter a Summary and Description of your commit and then hit "Commit to main"
131+
- This with add the changes to a commit on your main branch of your local git copy.
132132
1. Push Origin
133133
- Hit the "Push origin" button in GitHub Desktop to merge your local repository copy with the copy stored on GitHub.
134134
1. Pull Request
135135
- Option 1
136136
- From GitHub Desktop, click the blue "Create Pull Request" button that appears after you hit "Push origin"
137-
- This will take you to the "Open a pull request" GitHub page comparing your repo / branch against the PSKoans / master branch
137+
- This will take you to the "Open a pull request" GitHub page comparing your repo / branch against the PSKoans / main branch
138138
- Option 2
139139
- Go to Github and do a pull request from the PSKoans main page. the process is the same!
140140
1. Collaborate and have your change approved and merged into the main branch!
@@ -166,7 +166,7 @@ To do so, go to [the main page of the repo][pskoans] and click the Fork button a
166166
- Check what your origin is by Changing your directory to your repository and running: `git remote -v`
167167
- This should display `origin https://github.com/$Username/PSKoans`
168168
- Push
169-
- Run: `git push origin master` to push your local repo commits to your Github repo.
169+
- Run: `git push origin main` to push your local repo commits to your Github repo.
170170
- Running this command will pop up a dialog box to log into GitHub to authenticate your push.
171171
1. Pull Request
172172
- Go to Github and do a pull request from the PSKoans main page.
@@ -189,7 +189,7 @@ To do so, go to [the main page of the repo][pskoans] and click the Fork button a
189189
- Hit the ✔️ above the files to commit them to the local repo.
190190
1. Push Origin
191191
- In the lower left hand corner you should see 0⬇️1⬆️
192-
- This will push your commits up to the master branch of your fork.
192+
- This will push your commits up to the main branch of your fork.
193193
1. Pull Request
194194
- Go to Github and do a pull request from the PSKoans main page.
195195
1. Collaborate and have your change approved and merged into the main branch!

PSKoans/Init/AddPesterAssertionOperator.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ try {
22
Add-AssertionOperator -Name Fail -Test {
33
param ($ActualValue, [switch] $Negate, [string] $Because)
44

5-
# look at https://github.com/pester/Pester/blob/master/Functions/Assertions/BeTrueOrFalse.ps1
6-
# for inspiration, or here https://mathieubuisson.github.io/pester-custom-assertions/
7-
85
if ($Negate) {
96
return [PSCustomObject]@{
107
Succeeded = $false

PSKoans/Koans/Modules/dbatools/AboutDbaDatabase.Koans.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ param()
66
Get-DbaDatabase
77
88
The Get-DbaDatabase command gets SQL database information for each database
9-
that is present on the target instance(s) of SQL Server by default. If the
10-
name of the database is provided, the command will return only the specific
9+
that is present on the target instance(s) of SQL Server by default. If the
10+
name of the database is provided, the command will return only the specific
1111
database.
1212
#>
1313
Describe 'Get-DbaDatabase' {
1414

1515
#region Mocks
1616
<#
17-
Let's setup the environment for you. Unless you want your Koans to
17+
Let's setup the environment for you. Unless you want your Koans to
1818
nearly always fail I'd suggest not messing with this bit.
1919
#>
2020
BeforeAll {
2121
Mock -CommandName Get-DbaDatabase -MockWith {
2222
Import-Clixml -Path .\PSKoans\Koans\dbatools\Mocks\Database_All.xml
2323
} -ParameterFilter { $_.SqlInstance -eq 'localhost' }
24-
24+
2525
Mock -CommandName Get-DbaDatabase -MockWith {
2626
Import-Clixml -Path .\PSKoans\Koans\dbatools\Mocks\Database_TestDb.xml
2727
} -ParameterFilter { $_.SqlInstance -eq 'localhost' -and $_.Database -eq 'testdb' }
@@ -55,8 +55,8 @@ Describe 'Get-DbaDatabase' {
5555
database, using the -Database parameter, we can get information on
5656
that single database instead.
5757
#>
58-
$MasterDatabase = Get-DbaDatabase -SqlInstance localhost -Database ____
59-
$MasterDatabase.Name | Should -Be 'testdb'
58+
$primaryDatabase = Get-DbaDatabase -SqlInstance localhost -Database ____
59+
$primaryDatabase.Name | Should -Be 'testdb'
6060
}
6161

6262
It 'Gathers system databases only if specified...' {
@@ -73,7 +73,7 @@ Describe 'Get-DbaDatabase' {
7373
ExcludeUser = $____
7474
}
7575
$UserDbsExcluded = Get-DbaDatabase @UserDbParams
76-
$UserDbsExcluded.Name | Should -BeIn 'tempdb', 'master', 'model', 'msdb'
76+
$UserDbsExcluded.Name | Should -BeIn 'tempdb', 'primary', 'model', 'msdb'
7777
}
7878

7979
It 'Excludes system databases if specified...' {

PSKoans/Koans/Modules/dbatools/AboutQueryingDatabases.Koans.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ Describe "Invoke-DbaQuery" {
4545
}
4646
}
4747
#endregion
48-
48+
4949
It 'Queries a SQL Server instance...' {
5050
<#
5151
Invoke-DbaQuery can be used to connect to the SQL Server, in much the same way that Get-DbaDatabase
5252
does, by using the -SqlInstance parameter.
5353
Complete the below command to query "localhost" using Invoke-DbaQuery.
5454
#>
5555
$Bar = Invoke-DbaQuery -SqlInstance __ -Query "SELECT DB_NAME() AS database_name;"
56-
$Bar.database_name | Should -Be 'master'
56+
$Bar.database_name | Should -Be 'primary'
5757
}
5858

5959
It 'Queries multiple SQL Server instances...' {
@@ -75,7 +75,7 @@ Describe "Invoke-DbaQuery" {
7575
We've created a file called SimpleTSQL.sql that contains a T-SQL statement, which we want to
7676
run against the tempdb database on the localhost instance.
7777
#>
78-
Out-File - FilePath TestDrive:\SimpleTSQL.sql -InputObject "SELECT 'From a File' AS Origin;"
78+
Out-File - FilePath TestDrive:\SimpleTSQL.sql -InputObject "SELECT 'From a File' AS Origin;"
7979
$InvokeDbaQueryParams = @{
8080
SqlInstance = 'localhost'
8181
Database = 'tempdb'
@@ -88,7 +88,7 @@ Describe "Invoke-DbaQuery" {
8888
It 'queries a database with passing values to parameters' {
8989
<#
9090
T-SQL may seem like a strict, rigid language. We have a script that returns a value or values.
91-
If we want to get different values then we will have to change the full query.
91+
If we want to get different values then we will have to change the full query.
9292
From
9393
"SELECT PersonName FROM Student WHERE PersonName = 'Bob';"
9494
to
@@ -119,7 +119,7 @@ Describe "Invoke-DbaQuery" {
119119
It 'shows Little Bobby Tables...' {
120120
<#
121121
You may ask "Why would I want to use parameters? I can just pass in a variable from PowerShell!"
122-
If you are familiar with Little Bobby Tables (https://xkcd.com/327/) then you are aware of the
122+
If you are familiar with Little Bobby Tables (https://xkcd.com/327/) then you are aware of the
123123
dangers of un-sanitized inputs.
124124
However, an example is nearly always better than a lecture.
125125

PSKoans/Koans/Modules/dbatools/Mocks/BasicInvokeDbaQuery.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</TN>
77
<ToString>System.Data.DataRow</ToString>
88
<Props>
9-
<S N="master">database_name</S>
9+
<S N="primary">database_name</S>
1010
</Props>
1111
</Obj>
1212
</Objs>

PSKoans/Koans/Modules/dbatools/Mocks/Database_All.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<S N="ComputerName">Server01</S>
5656
<S N="InstanceName">MSSQLSERVER</S>
5757
<S N="SqlInstance">Server01</S>
58-
<S N="Name">master</S>
58+
<S N="Name">primary</S>
5959
<S N="Status">Normal</S>
6060
<B N="IsAccessible">true</B>
6161
<S N="RecoveryModel">Full</S>

PSKoans/Koans/Modules/dbatools/Mocks/Database_System.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<S N="ComputerName">Server01</S>
2929
<S N="InstanceName">MSSQLSERVER</S>
3030
<S N="SqlInstance">Server01</S>
31-
<S N="Name">master</S>
31+
<S N="Name">primary</S>
3232
<S N="Status">Normal</S>
3333
<B N="IsAccessible">true</B>
3434
<S N="RecoveryModel">Full</S>

PSKoans/PSKoans.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
)
153153

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

157157
# A URL to the main website for this project.
158158
ProjectUri = 'https://github.com/vexx32/PSKoans'

PSKoans/Public/Get-Blank.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@
33
.SYNOPSIS
44
Get-Blank returns a blank object that represents no value, and is considered equal to
55
no other object or value.
6-
6+
77
.DESCRIPTION
88
Get-Blank returns an object of type [Blank] as defined in the PSKoans module.
99
This object is not equivalent to any other type of object, including itself, when compared
1010
with a standard `-eq` comparison.
11-
11+
1212
The only exception, which is unavoidable, is that it is considered equal to $true when
1313
$true is on the left-hand side of the comparison. Tthis kind of comparison may sometimes
1414
need to be carefully avoided when framing a koan assertion.
15-
15+
1616
For instance, the following assertion WILL pass, although it should not:
17-
17+
1818
____ | Should -BeTrue
19-
19+
2020
.EXAMPLE
2121
__ | Should -Be (4 + 1)
22-
22+
2323
.EXAMPLE
2424
$Date = Get-Date
2525
$____ | Should -Be $Date
26-
26+
2727
.EXAMPLE
2828
$Num = Get-Random
2929
____ | Should -Not -Be $num
3030
#>
31-
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-Blank.md')]
31+
[CmdletBinding(HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-Blank.md')]
3232
[OutputType('Blank')]
3333
[Alias('__', '____', 'FILL_ME_IN')]
3434
param(
3535
# Used to capture the input in a pipeline context, to avoid erroring out in those contexts.
3636
[Parameter(ValueFromPipeline, DontShow)]
3737
[object]
3838
${|PipeInput},
39-
39+
4040
# Used to capture parameter names and arguments when used as a substitute for any other cmdlet.
4141
[Parameter(ValueFromRemainingArguments, DontShow)]
4242
[object[]]

PSKoans/Public/Get-Karma.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function Get-Karma {
22
[CmdletBinding(DefaultParameterSetName = 'Default',
3-
HelpUri = 'https://github.com/vexx32/PSKoans/tree/master/docs/Get-Karma.md')]
3+
HelpUri = 'https://github.com/vexx32/PSKoans/tree/main/docs/Get-Karma.md')]
44
[OutputType([void])]
55
[Alias()]
66
param(

0 commit comments

Comments
 (0)