Skip to content

Commit

Permalink
Added code and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite committed Mar 26, 2018
1 parent 3340ae6 commit 6e674b4
Show file tree
Hide file tree
Showing 10 changed files with 1,782 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
notify:
require_ci_to_pass: no
# dev should be the baseline for reporting
branch: master

comment:
layout: "reach, diff"
behavior: default

coverage:
range: 50..80
round: down
precision: 0

status:
project:
default:
# Set the overall project code coverage requirement to 70%
target: 80
patch:
default:
# Set the pull request requirement to not regress overall coverage by more than 5%
# and let codecov.io set the goal for the code changed in the patch.
target: auto
threshold: 5
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

/**/.vs/
/**/bin/
/**/obj/
/artifacts/
/build/
/reports/
/**/*.user
/src/**/*-help.xml
/src/**/*.help.txt
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Change log

## Unreleased
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Bernie White
Copyright (c) 2017 Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# PSRule

A PowerShell module with commands to validate objects on the pipeline.

| AppVeyor (Windows) | Codecov (Windows) |
| --- | --- |
| [![av-image][]][av-site] | [![cc-image][]][cc-site] |

[av-image]: https://ci.appveyor.com/api/projects/status/pl7tu7ktue388n7s
[av-site]: https://ci.appveyor.com/project/BernieWhite/PSRule
[cc-image]: https://codecov.io/gh/BernieWhite/PSRule/branch/master/graph/badge.svg
[cc-site]: https://codecov.io/gh/BernieWhite/PSRule

## Disclaimer

This project is to be considered a **proof-of-concept** and **not a supported Microsoft product**.

## Modules

The following modules are included in this repository.

| Module | Description | Latest version |
| ------ | ----------- | -------------- |
| PSRule | A PowerShell rules engine. | Unreleased |

## Getting started

### Prerequsits

- Windows PowerShell 5.1 or PowerShell Core 6.0

## Language reference

PSRule extends PowerShell with domain specific language (DSL) keywords and cmdlets.

### Keywords

The following language keywords are used by the `PSRule` module:

- [Rule](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Rule) -
- [Exists](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Exists) -
- [Match](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Match) -
- [AnyOf](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#AnyOf) -
- [AllOf](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#AllOf) -
- [Within](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#Within) -
- [When](docs/keywords/PSRule/en-US/about_PSRule_Keywords.md#When) -

### Commands

The following commands exist in the `PSRule` module:

- [Invoke-RuleEngine](docs/commands/PSRule/en-US/Invoke-RuleEngine.md)

## Changes and versioning

Modules in this repository will use the [semantic versioning](http://semver.org/) model to declare breaking changes from v1.0.0. Prior to v1.0.0, breaking changes may be introduced in minor (0.x.0) version increments. For a list of module changes please see the [change log](CHANGELOG.md).

## Maintainers

- [Bernie White](https://github.com/BernieWhite)

## License

This project is [licensed under the MIT License](LICENSE).

[psg-psrule]: https://www.powershellgallery.com/packages/PSRule
114 changes: 114 additions & 0 deletions docs/commands/PSRule/en-US/Invoke-RuleEngine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
external help file: PSRule-help.xml
Module Name: PSRule
online version:
schema: 2.0.0
---

# Invoke-RuleEngine

## SYNOPSIS

Evaluate pipeline objects against matching rules.

## SYNTAX

```
Invoke-RuleEngine [-Path] <String> [[-ConfigurationData] <Object>] [-InputObject] <PSObject>
[[-Status] <String[]>] [<CommonParameters>]
```

## DESCRIPTION

Evaluate pipeline objects against matching rules.

## EXAMPLES

### Example 1

```powershell
PS C:\> @{ Name = 'Item 1' } | Invoke-RuleEngine .
```

{{ Add example description here }}

## PARAMETERS

### -ConfigurationData
{{Fill ConfigurationData Description}}

```yaml
Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -InputObject
The pipeline object to process rules for.
```yaml
Type: PSObject
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Path
A path to one or more rules to evaluate.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Status
Filter output to only show rules with a specific status.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Accepted values: Success, Failed

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.Management.Automation.PSObject
## OUTPUTS
### System.Object
## NOTES
## RELATED LINKS
Loading

0 comments on commit 6e674b4

Please sign in to comment.