Last active
August 29, 2015 13:57
-
-
Save puyo/9825681 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
gem 'activesupport' | |
require 'active_support/core_ext/string/inflections' | |
snake = ARGV.first | |
camel = snake.camelize(:lower) | |
system %{git grep -l #{snake} | xargs ruby -p -i -e '$_.gsub! /#{snake}/, "#{camel}"'} | |
# encamel.rb my_variable | |
# encamel.rb my_other_variable | |
# ... | |
# git status | |
# git commit -am "Standardized to JS naming convention." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment