shoes/shoes4 — pull request #731 by wasnotrice (2014-05-27 05:53:41+00:00)
Title: Add gemspecs and build tasks for shoes-dsl and shoes-swt

Warning: This is not very well tested.

This is an attempt to address #688, splitting Shoes into multiple gems, while at the same time respecting the advice we received to keep the code in the same repository. The strategy is to have multiple gemspecs.

I have confused myself greatly with some (very cool) diagrams, and even the hierarchy @PragTob [proposed](https://github.com/shoes/shoes4/issues/688#issuecomment-42812228) hurt my head once I got into the work. So here's my simple way of thinking about it now.

If you `gem install shoes-swt`, you get the Swt runtime. That includes `shoes-swt` and `shoes-dsl`. Any given backend depends on the dsl.

If you `gem install shoes`, you get the default runtime (dsl+swt) plus packaging. Maybe when we have another backend, you get that too.

If you `gem install shoes-dsl`, you just get the dsl.

With me so far? Good. Now, what do we do about `bin/shoes`? I haven't dealt with that. In fact, I think it's in the dsl gem, where it probably doesn't belong. I'm thinking about where the binary belongs when there are multiple possible backends. Opening an app with `bin/shoes` could mean very different things. And you could have multiple backends installed that needed different rubies loaded in order to run the app. I was playing with [graphviz](http://www.graphviz.org/) while I was thinking about dependencies...they support multiple output formats, but only if they can detect that your system can support them. I'm thinking that would be a good approach for us...have a generic binary that tries to load as many backend-specific opening/packaging adapters as it can, depending on what you have installed.

Any thoughts on how to smoke test the builds? I used the `shoes-dsl` gem with my atom backend and it seems to work (although that doesn't exercise very much).

I pulled the gem tasks into a separate file (intending to do the same with other parts of the Rakefile), and added a task for each gem. `rake build:all` builds them all.

```
$ rake -T
rake build:all # Build all gems
rake build:shoes # Build the shoes gem
rake build:shoes-dsl # Build the shoes-dsl gem
rake build:shoes-swt # Build the shoes-swt gem
```

What do you think?