rackerlabs/developer.rackspace.com — pull request #187 by smashwilson (2014-05-21 20:58:07+00:00)
Title: [wip] Script to find missing samples

This is a quick Ruby script designed to find missing samples anywhere in the `docs/` directory. It currently reports a line for each (service, sample, language) tuple that doesn't contain at least one nonempty line in the appropriate `.rst` file, along with the total counts.

To run it, use:

```bash
vagrant ssh -c 'ruby /vagrant_data/sample_completion.rb'
```

Of course the `vagrant ssh` bit isn't strictly necessary if you've got a recent, sane Ruby install on your local box.

The output format looks like:

```
(...)
orchestration / delete_stack / csharp : missing
orchestration / delete_stack / java : missing
orchestration / delete_stack / javascript : missing
orchestration / delete_stack / php : missing
orchestration / delete_stack / python : missing
orchestration / create_stack / csharp : missing
orchestration / create_stack / java : missing
orchestration / create_stack / javascript : missing
orchestration / create_stack / php : missing
orchestration / create_stack / python : missing
orchestration / authentication / csharp : missing
orchestration / authentication / java : missing
orchestration / authentication / javascript : missing
orchestration / authentication / php : missing
orchestration / authentication / python : missing
summary: 402 complete / 438 missing / 840 total
```

If you want, you can use `grep` and `wc` to see only what's left for a particular language or service:

```bash
smash@tiger ~/writings/developer.rackspace.com (find-holes=) $ ruby sample_completion.rb | grep python
auto-scaling / create_scaling_group / python : missing
auto-scaling / create_scaling_policy / python : missing
auto-scaling / create_scaling_webhook / python : missing
auto-scaling / delete_scaling_group / python : missing
auto-scaling / delete_scaling_policy / python : missing
auto-scaling / delete_scaling_webhook / python : missing
auto-scaling / execute_scaling_policy / python : missing
# (...)
smash@tiger ~/writings/developer.rackspace.com (find-holes=) $ ruby sample_completion.rb | grep python | wc -l
46
```

Hopefully, this should give us a source of truth for tracking progress on #119, and make sure that no samples fall through the cracks, especially if we add samples to a service after someone has already "completed" that service for another SDK.