nebulab/pulsar — pull request #20 by lukaszkorecki (2013-09-15 21:58:03+00:00)
Title: Add matching application names with a pattern

Hi!

**tl;dr** I've added an option to use simple `*`-based matching of application names.
Rather than typing `app1,app2,app3` pulsar can now accept arguments like `app*`.

### Bit of background

We're using pulsar to deploy quite a lot of applications, some of which are broken down into separate projects, for example an application would consist of a web frontend, a worker and a process manager.

So given this pulsar project layout:

```
apps/
app1_web
app1_worker
app2_web
app2_queue
```

it's sometimes quite tedious to type all app names and comma separate them.

### the fix

Instead of

```bash

$ pulsar app1_web,app2_web,app2_queue production
```

we can now use:

```bash
$ pulsar *_web,*_queue production
```

before this PR I've created a shell wrapper for pulsar, but I still think it should be fixed here.
At the moment the approach is a bit simple, and only accepts basic globbing with `*` - it seems that's the most common use case, based on our usage.

As a bonus I fixed a bug where it was possible to run a deploy (or any cap task twice if an application was listed twice. So this invocation:

```bash
$ pulsar app1,app2,app3,app1 staging
```

would deploy `app1` twice.

Let me know what you guys think!