awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.08k stars 454 forks source link

Fixes michaeldv/awesome_print#218 #222

Closed aleandros closed 8 years ago

aleandros commented 8 years ago

Explicitly requires rake and bundle as developement dependencies at awesme_print.gemspec, following the convention used by the 'bundle gem' command.

Requiring rake at the top of the gemspec caused an error in environments without rake installed, resulting in a failed 'bundle install'.

aleandros commented 8 years ago

Ok, I clearly missed something important. It's a classic "Works in my machine" case but I get a lot of errors in different travis builds. The ones marked with an exclamation sign (!) output the following:

An error occurred while installing awesome_print (1.6.2), and Bundler cannot continue

And this is for most of the builds. A few of them pass and there are a couple that fail (marked with an X) with the following:

An error occurred in anafter(:context)hook. NameError: constant Object::SomeModel not defined occurred at /home/travis/build/michaeldv/awesome_print/spec/ext/nobrainer_spec.rb:21:inremove_const' `

And my guess is that it is unrelated to my changes. I love this gem and would love to contribute with something meaningful in the future, but maybe I'm doing something wrong here. Any help?

Thanks in advance!

gerrywastaken commented 8 years ago

@aleandros It seems the last time a master build came back successful, the nobrainer specs were skipped: https://s3.amazonaws.com/archive.travis-ci.org/jobs/50553569/log.txt

That skip was due to the following skip condition: https://github.com/michaeldv/awesome_print/blob/master/spec/ext/nobrainer_spec.rb#L3

Which basically just checks if NoBrainer is defined: https://github.com/michaeldv/awesome_print/blob/master/spec/support/ext_verifier.rb#L34

I'm not sure why it's defined now when on previous runs it was not defined as nothing has changed in the code. Perhaps a change to the environment in which Travis runs it's tests. Either way this is not due to your changes.

gerrywastaken commented 8 years ago

Running a new build now: https://travis-ci.org/gerrywastaken/awesome_print/builds/129529176

Apparently there is no way to force a complete rebuild of the Travis build associated with this PR (and others) without pushing another commit to it: https://github.com/travis-ci/travis-ci/issues/6031#issuecomment-218198176

gerrywastaken commented 8 years ago

Oh and this PR seems to be almost the same as this one: https://github.com/awesome-print/awesome_print/pull/216

aleandros commented 8 years ago

You're right. The only difference seems to be adding rake directly as a development dependency. Now I'm not sure if that's even necessary.

gerrywastaken commented 8 years ago

Never mind, how about we close this one just give you some credit in the change log instead: https://github.com/gerrywastaken/awesome_print/blob/c0df203f0308347ffb3288ba701f06dece0cc329/CHANGELOG#L4

Thanks heaps for the PR though, it's really appreciated.

aleandros commented 8 years ago

Wow, I really appreciate that. Thanks!

gerrywastaken commented 8 years ago

Your change went live in version 1.7.0. Thank you. :)