Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby beautification support #25

Closed
Glavin001 opened this issue Jun 14, 2014 · 11 comments
Closed

Ruby beautification support #25

Glavin001 opened this issue Jun 14, 2014 · 11 comments

Comments

@Glavin001
Copy link
Owner

See https://github.com/CraigWilliams/BeautifyRuby

@Glavin001
Copy link
Owner Author

@seanbuscay
Copy link

Just an FYI. ruby-beautify is no longer maintained:

erniebrodeur/ruby-beautify#3

@Glavin001
Copy link
Owner Author

Thanks for the notice @seanbuscay!

Any recommendations for alternatives by Ruby developers?

@seanbuscay
Copy link

Not really, in terms of alternatives. It seems for now, it is still good to use. Just looks like if no one picks it up, it may become necessary to change. But, hey PHP_beatifier hasn't been updated for years and it is still used a lot.

Here's a list of results from the term: beautify off of RubyGems.org

http://rubygems.org/search?utf8=%E2%9C%93&query=beautify

Nothing looks any better.

@erniebrodeur
Copy link

I didn't know if I should reopen this, or open a new one. I've recently rebuilt the core of ruby-beautify around a much better lexing engine. I've already added a few options and run it against all my code, it works as I would expect it too.

You can now pick tabs or spaces as well as the indent count via options. I'm open to suggestions on other methods/ideas, and any bugs found against use cases out there.

@Glavin001
Copy link
Owner Author

Awesome! Great to see some development, @erniebrodeur. I am not a Ruby developer myself, however I can imagine that Ruby developers using Atom Beautify and Ruby Beautify will be very excited. Let me know if there's anything I should add to Atom Beautify to maximize usage of Ruby Beautify's new features. I don't think Atom Beautify currently supports any options right now: https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/ruby-beautify.coffee

@huanzhang
Copy link

@Glavin001 Could you tell me how to set spaces as the default indent character for ruby-beautify?

@mh61503891
Copy link

@huanzhang This is just a makeshift way, but I have created the following ruby script named /path/to/my_rbeautify and set "Ruby rbeautify path" of the atom-beautify's Settings to the path of this script.

ARGV = %w(--spaces --indent_count 2) + ARGV
load '/Users/masayuki/.gem/ruby/2.2.0/bin/rbeautify'

The real path of the rbeautify can be detected by '$ type -a rbeautify'

@huanzhang
Copy link

@mh61503891 Seems your solution is more convenient for configuration, but I have just solved this by rebuild ruby-beautify(https://github.com/huanzhang/ruby-beautify/commit/4152fe6bbb37e11386b60daf52318004fa84eb6f).

To have spaces as default indention for ruby, I have submit a pull request to ruby-beautify(erniebrodeur/ruby-beautify#15)

@ahmetabdi
Copy link

rbeautify is completely messed up, if you try beautify a ruby file with it everything just gets removed inside the file! 👎

@ahmetabdi
Copy link

Could update to using rubocop with the -a/--auto-correct flag? at least it's something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants