Permalink
Browse files

Prepare for version 0.18.0

  • Loading branch information...
1 parent 8452893 commit 08265a380d0ff3fce014e98e87bb8c2330858e4a @sferik sferik committed Mar 26, 2013
Showing with 10 additions and 1 deletion.
  1. +9 −0 CHANGELOG.md
  2. +1 −1 lib/thor/version.rb
View
@@ -1,3 +1,12 @@
+## 0.18.0, release 2013-03-26
+* Remove rake2thor
+* Only display colors if output medium supports colors
+* Pass parent_options to subcommands
+* Fix non-dash-prefixed aliases
+* Make error messages more helpful
+* Rename "task" to "command"
+* Add the method to allow for custom package name
+
## 0.17.0, release 2013-01-24
* Add better support for tasks that accept arbitrary additional arguments (e.g. things like `bundle exec`)
* Add #stop_on_unknown_option!
View
@@ -1,3 +1,3 @@
class Thor
- VERSION = "0.17.0"
+ VERSION = "0.18.0"
end

10 comments on commit 08265a3

Contributor

rafaelfranca replied Mar 26, 2013

This release broke the railties tests with Ruby 2.0 https://travis-ci.org/rails/rails/jobs/5811378#L589

Owner

sferik replied Mar 26, 2013

I ran tests on Ruby 1.9.3 before releasing but didn't think to run them again on Ruby 2.0.0? Have you bisected to determine specifically which commit is broke things?

Contributor

rafaelfranca replied Mar 26, 2013

I'm running the tests right now. I'll bisect and send and report back later

Owner

sferik replied Mar 26, 2013

Thanks! If you can find the problem, I'm happy to push 0.18.1 later today.

Contributor

rafaelfranca replied Mar 26, 2013

I could track down the commit that changed the behavior. https://github.com/thor/thor/commit/fb149e3dd8b71124d194cee81e5f5f1f788be6c5

But I think it is a Rails fault, it is defining a protected attr_reader to file_name, but is using in a template name that method.

I think that the methods used in template names should be public right?

Owner

sferik replied Mar 26, 2013

Any idea why they’re protected? Looks like that was added by @drogus in rails/rails@0134c5c.

Contributor

drogus replied Mar 26, 2013

@sferik I don't think that there was any particular reason to make file_name protected, I was just following what was already there.

@rafaelfranca I'm not sure what's the difference in using the method in a template name and in the template itself, shouldn't both cases use NamedBase as a context?

Contributor

josevalim replied Mar 26, 2013

The method is protected because if it is public, it will be run every time as a task, although for file_name, it is not really an issue.

In any case, I think the implementation in this commit fb149e3 is not good at all. I am skeptical all ruby implementations would have attr_* as the first line in the caller in there.

I think what Rails is doing is fine. The real bug is here: d02f275

When rendering files, Thor behaves like Sinatra. It works as if the file was embedded in the current Thor class. Therefore, restricting the filename to be just public methods is a silly limitation that doesn't work well with how Thor is meant to be used.

Contributor

rafaelfranca replied Mar 26, 2013

👍 for not limiting the filename to be public methods.

Contributor

josevalim replied Mar 26, 2013

I have opened a pull request that reverts these two regressions: wycats#316

Please sign in to comment.