michaeldv/awesome_print — Issue #79: gemspec doesn't play well with bundler loading from git
Author: denishaskin
Created: 2012-03-03 21:54:45+00:00
State: open

While trying to test my changes, awesome_print was not loading properly when I was loading it from my fork, e.g. I had this in my `Gemfile`:

```ruby
gem 'awesome_print', :git => 'https://github.com/ceromancy/awesome_print.git'
```

What was happening was that because awesome_print was being loaded in `awesome_print.gemspec` (to get the version number), when `lib/awesome_print.rb` was finally loaded the `AwesomePrint` constant was defined, so the test in `lib/awesome_print.rb` to prevent it from being loaded multiple times was preventing it from *ever* being loaded.

What I've done is remove the

```ruby
require File.dirname(__FILE__) + "/lib/awesome_print/version"
```

from the ```.gemspec``` and hardcoded the version in there (at the moment in my fork it's bumped to 1.0.3 because I wanted to make sure I was getting the right version).

I also removed the rake tasks in there, which was probably unnecessary. But it seems that keeping a gemspec file focused on the task of providing gem specification is probably a good idea.

My commit is 4abee8015cf36a0486a856f9c3a876854b272473 . Want me to try and clean this up for a pull request?