Skip to content

Commit

Permalink
(maint) re-do appveyor badge after recreating the project
Browse files Browse the repository at this point in the history
For some reason appveyor did not report back anymore to PRs, although
it was still building. I've recreated the project to try to fix the link,
but this also required updating the badge here.
  • Loading branch information
DavidS committed Jan 4, 2018
1 parent d376be1 commit e07b78d
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Puppet::ResourceApi [![Build Status](https://travis-ci.org/puppetlabs/puppet-resource_api.svg?branch=master)](https://travis-ci.org/puppetlabs/puppet-resource_api) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/qvor6rkh0d1e4suc?svg=true)](https://ci.appveyor.com/project/puppetlabs/puppet-resource-api) [![Coverage Status](https://coveralls.io/repos/github/puppetlabs/puppet-resource_api/badge.svg?branch=master)](https://coveralls.io/github/puppetlabs/puppet-resource_api?branch=master) [![codecov](https://codecov.io/gh/puppetlabs/puppet-resource_api/branch/master/graph/badge.svg)](https://codecov.io/gh/puppetlabs/puppet-resource_api)
# Puppet::ResourceApi [![TravisCI Build Status](https://travis-ci.org/puppetlabs/puppet-resource_api.svg?branch=master)](https://travis-ci.org/puppetlabs/puppet-resource_api) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/e86ftn3jjmq5sao4?svg=true)](https://ci.appveyor.com/project/puppetlabs/puppet-resource-api)
[![Coverage Status](https://coveralls.io/repos/github/puppetlabs/puppet-resource_api/badge.svg?branch=master)](https://coveralls.io/github/puppetlabs/puppet-resource_api?branch=master) [![codecov](https://codecov.io/gh/puppetlabs/puppet-resource_api/branch/master/graph/badge.svg)](https://codecov.io/gh/puppetlabs/puppet-resource_api)


This is an implementation of the [Resource API](https://github.com/DavidS/puppet-specifications/blob/resourceapi/language/resource-api/README.md) proposal. Find a working example of a new-style provider in the [experimental puppetlabs-apt branch](https://github.com/DavidS/puppetlabs-apt/blob/resource-api-experiments/lib/puppet/provider/apt_key2/apt_key2.rb). There is also the corresponding [type](https://github.com/DavidS/puppetlabs-apt/blob/resource-api-experiments/lib/puppet/type/apt_key2.rb), [provider](https://github.com/DavidS/puppetlabs-apt/blob/resource-api-experiments/lib/puppet/provider/apt_key2/apt_key2.rb), and [new unit tests](https://github.com/DavidS/puppetlabs-apt/blob/resource-api-experiments/spec/unit/puppet/provider/apt_key2/apt_key2_spec.rb) for 100% coverage.
Expand All @@ -21,7 +22,9 @@ Or install it yourself as:

## Usage

The [Resource API](https://github.com/DavidS/puppet-specifications/blob/resourceapi/language/resource-api/README.md) explains the usage and capabilities of this gem.
The [Resource API](https://github.com/DavidS/puppet-specifications/blob/resourceapi/language/resource-api/README.md) explains the capabilities of this gem.

### Known Limitations

Already working:
* basic type and provider definition, using `name`, `desc`, and `attributes`
Expand All @@ -39,6 +42,34 @@ There are still a few notable gaps between the implementation, and the specifica
* `auto*` definitions
* the Commands API is mostly implemented, but deployment is blocked on upstream work (PDK-580). You can use regular Ruby `system()` calls as a workaround, with all their attendant encoding, and safety issues.

### How to use this gem

To create a new provider using this API, start with a new module:

```
david@davids:~/tmp$ pdk new module example
[...]
pdk (INFO): Module 'example' generated at path '/home/david/tmp/example'.
pdk (INFO): In your module directory, add classes with the 'pdk new class' command.
david@davids:~/tmp$
david@davids:~/tmp$ cd example/
david@davids:~/tmp/example$
```

In the module, create the following files:

* `lib/puppet/provider/example/example.rb`: this will contain the code to interact with the resources you want to manage.
* `lib/puppet/type/example.rb`: this will describe the shape of the resources
* `lib/puppet/provider/example/example.rb`: this will contain some

```
lib/puppet/provider/example/example.rb
```

## Roadmap



## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Expand Down

0 comments on commit e07b78d

Please sign in to comment.