Skip to content

Commit

Permalink
Merge pull request #44 from dsccommunity/dev
Browse files Browse the repository at this point in the history
Merge new CI to Master
  • Loading branch information
PlagueHO authored Apr 14, 2020
2 parents 51fe7f3 + 28bba66 commit 7804035
Show file tree
Hide file tree
Showing 62 changed files with 1,924 additions and 1,087 deletions.
14 changes: 0 additions & 14 deletions .MetaTestOptIn.json

This file was deleted.

26 changes: 0 additions & 26 deletions .codecov.yml

This file was deleted.

64 changes: 5 additions & 59 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,8 @@
###############################################################################
* text eol=crlf

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
*.jpg binary
*.png binary
*.gif binary
*.exe binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
# Ensure any exe files are treated as binary
*.exe binary
*.jpg binary
*.xl* binary
*.pfx binary
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
*.user
*.coverage
.vs
.vscode
.psproj
.sln
DscResource.Tests
DscResource.Tests/*
Modules/xNetworking/DscResource.Tests
Modules/xNetworking/DscResource.Tests/*
node_modules
node_modules/*
markdownissues.txt
TestResults.xml
launch.json
output/
15 changes: 3 additions & 12 deletions .vscode/analyzersettings.psd1
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
@{
<#
For the custom rules to work, the DscResource.Tests repo must be
cloned. It is automatically clone as soon as any unit or
integration tests are run.
#>
CustomRulePath = '.\DSCResource.Tests\DscResource.AnalyzerRules'

CustomRulePath = '.\output\RequiredModules\DscResource.AnalyzerRules'
includeDefaultRules = $true
IncludeRules = @(
# DSC Resource Kit style guideline rules.
'PSAvoidDefaultValueForMandatoryParameter',
Expand Down Expand Up @@ -43,11 +38,7 @@
'PSUseDeclaredVarsMoreThanAssignments',
'PSUsePSCredentialType',

<#
This is to test all the DSC Resource Kit custom rules.
The name of the function-blocks of each custom rule start
with 'Measure*'.
#>
'Measure-*'
)

}
29 changes: 26 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
// Place your settings in this file to overwrite default and user settings.
{
"powershell.codeFormatting.openBraceOnSameLine": false,
"powershell.codeFormatting.newLineAfterOpenBrace": false,
"powershell.codeFormatting.newLineAfterOpenBrace": true,
"powershell.codeFormatting.newLineAfterCloseBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
"powershell.codeFormatting.whitespaceAroundOperator": true,
"powershell.codeFormatting.whitespaceAfterSeparator": true,
"powershell.codeFormatting.ignoreOneLineBlock": false,
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationAfterEveryPipeline",
"powershell.codeFormatting.preset": "Custom",
"powershell.codeFormatting.alignPropertyValuePairs": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"powershell.scriptAnalysis.settingsPath": ".vscode\\analyzersettings.psd1"
"powershell.scriptAnalysis.settingsPath": ".vscode\\analyzersettings.psd1",
"powershell.scriptAnalysis.enable": true,
"files.associations": {
"*.ps1xml": "xml"
},
"cSpell.words": [
"COMPANYNAME",
"ICONURI",
"LICENSEURI",
"PROJECTURI",
"RELEASENOTES",
"buildhelpers",
"endregion",
"gitversion",
"icontains",
"keepachangelog",
"notin",
"pscmdlet",
"steppable"
],
"[markdown]": {
"files.encoding": "utf8"
}
}
64 changes: 10 additions & 54 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,13 @@
# Versions
# Change log for FileContentDsc

## 1.3.0.0
The format is based on and uses the types of changes according to [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).

- Opted into Common Tests 'Common Tests - Validate Localization' -
fixes [Issue #31](https://github.com/PlagueHO/FileContentDsc/issues/32).
- Combined all `FileContent.ResourceHelper` module functions into
`FileContent.Common` module - fixes [Issue #32](https://github.com/PlagueHO/FileContentDsc/issues/32).
- Renamed all localization strings so that they are detected by
'Common Tests - Validate Localization'.
- Correct style violations in unit tests:
- Adding `Get`, `Set` and `Test` tags to appropriate `describe` blocks.
- Removing uneccesary `#region` blocks.
- Conversion of double quotes to single quotes where possible.
- Replace variables with string litterals in `describe` block description.
- KeyValuePairFile:
- Improve unit tests to simplify and cover additional test cases.
- Fix error occuring when file is empty or does not exist - fixes [Issue #34](https://github.com/PlagueHO/FileContentDsc/issues/34).
## [Unreleased]

## 1.2.0.0

- Added .VSCode settings for applying DSC PSSA rules - fixes [Issue #25](https://github.com/PlagueHO/FileContentDsc/issues/25).
- Added an Encoding parameter to the KeyValuePairFile and ReplaceText
resources - fixes [Issue #5](https://github.com/PlagueHO/FileContentDsc/issues/5).

## 1.1.0.0

- Enabled PSSA rule violations to fail build - Fixes [Issue #6](https://github.com/PlagueHO/FileContentDsc/issues/6).
- Updated tests to meet Pester v4 standard.
- Added Open Code of Conduct.
- Refactored module folder structure to move resource
to root folder of repository and remove test harness - Fixes [Issue #11](https://github.com/PlagueHO/FileContentDsc/issues/11).
- Converted Examples to support format for publishing to PowerShell
Gallery.
- Refactor Test-TargetResource to return $false in all DSC resource - Fixes
[Issue #12](https://github.com/PlagueHO/FileContentDsc/issues/13).
- Correct configuration names in Examples - fixes [Issue #15](https://github.com/PowerShell/FileContentDsc/issues/15).
- Refactor Test/Set-TargetResource in ReplaceText to be able to add a key if it
doesn't exist but should -Fixes
[Issue#20](https://github.com/PlagueHO/FileContentDsc/issues/20).
- Opted into common tests:
- Common Tests - Validate Example Files To Be Published
- Common Tests - Validate Markdown Links
- Common Tests - Relative Path Length
- Common Tests - Relative Path Length
- Correct test context description in IniSettingsFile tests to include 'When'.
- Change IniSettingsFile unit tests to be non-destructive - fixes [Issue #22](https://github.com/PowerShell/FileContentDsc/issues/22).
- Update to new format LICENSE.

## 1.0.0.0

- DSR_ReplaceText:
- Created new resource for replacing text in text files.
- DSR_KeyValuePairFile:
- Created new resource for setting key value pairs in text files.
- DSR_IniSettingsFile:
- Created new resource for setting Windows INI file settings.
- Transferred ownership to DSCCommunity.org -
fixes [Issue #31](https://github.com/dsccommunity/FileContentDsc/issues/39).
- BREAKING CHANGE: Changed resource prefix from MSFT to DSC.
- Updated to use continuous delivery pattern using Azure DevOps - fixes
[Issue #41](https://github.com/dsccommunity/FileContentDsc/issues/41).
- Updated build badges in README.MD.
134 changes: 2 additions & 132 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,133 +1,3 @@
# Open Source Code of Conduct
# Code of Conduct

This code of conduct outlines our expectations for participants within this
DSC Resource Module community, as well as steps to reporting unacceptable behavior.
We are committed to providing a welcoming and inspiring community for all and expect
our code of conduct to be honored. Anyone who violates this code of conduct may be
banned from the community.

Our open source communities strive to:

- **Be friendly and patient.**
- **Be welcoming:** We strive to be a community that welcomes and supports people
of all backgrounds and identities. This includes, but is not limited to members
of any race, ethnicity, culture, national origin, colour, immigration status,
social and economic class, educational level, sex, sexual orientation, gender
identity and expression, age, size, family status, political belief, religion,
and mental and physical ability.
- **Be considerate:** Your work will be used by other people, and you in turn
will depend on the work of others. Any decision you take will affect users and
colleagues, and you should take those consequences into account when making
decisions. Remember that we're a world-wide community, so you might not be
communicating in someone else's primary language.
- **Be respectful:** Not all of us will agree all the time, but disagreement is
no excuse for poor behavior and poor manners. We might all experience some
frustration now and then, but we cannot allow that frustration to turn into a
personal attack. It's important to remember that a community where people feel
uncomfortable or threatened is not a productive one.
- **Be careful in the words that we choose:** we are a community of professionals,
and we conduct ourselves professionally. Be kind to others. Do not insult or
put down other participants. Harassment and other exclusionary behavior aren't
acceptable.
- **Try to understand why we disagree:** Disagreements, both social and technical,
happen all the time. It is important that we resolve disagreements and differing
views constructively. Remember that we're different. The strength of our community
comes from its diversity, people from a wide range of backgrounds. Different people
have different perspectives on issues. Being unable to understand why someone holds
a viewpoint doesn't mean that they're wrong. Don't forget that it is human to err
and blaming each other doesn't get us anywhere. Instead, focus on helping to resolve
issues and learning from mistakes.

## Definitions

Harassment includes, but is not limited to:

- Offensive comments related to gender, gender identity and expression, sexual
orientation, disability, mental illness, neuro(a)typicality, physical appearance,
body size, race, age, regional discrimination, political or religious affiliation
- Unwelcome comments regarding a person's lifestyle choices and practices,
including those related to food, health, parenting, drugs, and employment
- Deliberate misgendering. This includes deadnaming or persistently using a
pronoun that does not correctly reflect a person's gender identity. You must
address people by the name they give you when not addressing them by their username
or handle
- Physical contact and simulated physical contact (eg, textual descriptions like
"hug" or "backrub") without consent or after a request to stop
- Threats of violence, both physical and psychological
- Incitement of violence towards any individual, including encouraging a person
to commit suicide or to engage in self-harm
- Deliberate intimidation
- Stalking or following
- Harassing photography or recording, including logging online activity for
harassment purposes
- Sustained disruption of discussion
- Unwelcome sexual attention, including gratuitous or off-topic sexual images or
behaviour
- Pattern of inappropriate social contact, such as requesting/assuming inappropriate
levels of intimacy with others
- Continued one-on-one communication after requests to cease
- Deliberate "outing" of any aspect of a person's identity without their consent
except as necessary to protect others from intentional abuse
- Publication of non-harassing private communication

Our open source community prioritizes marginalized people's safety over privileged
people's comfort. We will not act on complaints regarding:

- 'Reverse' -isms, including 'reverse racism,' 'reverse sexism,' and 'cisphobia'
- Reasonable communication of boundaries, such as "leave me alone," "go away," or
"I'm not discussing this with you"
- Refusal to explain or debate social justice concepts
- Communicating in a 'tone' you don't find congenial
- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions

## Diversity Statement

We encourage everyone to participate and are committed to building a community
for all. Although we will fail at times, we seek to treat everyone both as fairly
and equally as possible. Whenever a participant has made a mistake, we expect them
to take responsibility for it. If someone has been harmed or offended, it is our
responsibility to listen carefully and respectfully, and do our best to right the
wrong.

Although this list cannot be exhaustive, we explicitly honor diversity in age,
gender, gender identity or expression, culture, ethnicity, language, national
origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic
status, and technical ability. We will not tolerate discrimination based on any
of the protected characteristics above, including participants with disabilities.

## Reporting Code of Conduct Issues

If you experience or witness unacceptable behavior—or have any other concerns,
please report it by contacting us via [[email protected]](mailto:[email protected]).
All reports will be handled with discretion.

In your report please include:

- Your contact information.
- Names (real, usernames or pseudonyms) of any individuals involved. If there
are additional witnesses, please include them as well.
- Your account of what occurred, and if you believe the incident is ongoing.
- If there is a publicly available record (e.g. a mailing list archive or a
public chat log), please include a link or attachment.
- Any additional information that may be helpful.

After filing a report, a representative will contact you personally, review the
incident, follow up with any additional questions, and make a decision as to how
to respond. If the person who is harassing you is part of the response team, they
will recuse themselves from handling your incident. If the complaint originates
from a member of the response team, it will be handled by a different member of
the response team. We will respect confidentiality requests for the purpose of
protecting victims of abuse.

## Attribution & Acknowledgements

We all stand on the shoulders of giants across many open source communities.
We’d like to thank the communities and projects that established code of conducts
and diversity statements as our inspiration:

- [Django](https://www.djangoproject.com/conduct/reporting/)
- [Python](https://www.python.org/community/diversity/)
- [Ubuntu](http://www.ubuntu.com/about/about-ubuntu/conduct)
- [Contributor Covenant](http://contributor-covenant.org/)
- [Geek Feminism](http://geekfeminism.org/about/code-of-conduct/)
- [Citizen Code of Conduct](http://citizencodeofconduct.org/)
This project has adopted the [DSC Community Code of Conduct](https://dsccommunity.org/code_of_conduct).
Loading

0 comments on commit 7804035

Please sign in to comment.