Created
July 24, 2015 15:28
-
-
Save anonymous/5a75172626e2f7d3f2e5 to your computer and use it in GitHub Desktop.
This file contains 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
Dir.glob('Modified/*.json').each do |item| | |
file = File.open(item, "r+") | |
puts item | |
hash = JSON.parse(file.read) | |
file.rewind | |
hash['version'] += 1 | |
file.write(JSON.generate(hash)) | |
file.close | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment