Skip to content

Commit

Permalink
Add the "json" Rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
dustalov committed Nov 9, 2013
1 parent f0a0d76 commit 8a0371c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'psych'
require 'json'

desc 'Generate rules.json from rules.yml'
task :json do
File.open('rules.json', 'w') do |f|
f.puts JSON.pretty_generate(Psych.load(File.read('rules.yml')))
end
end

task :default => :json

0 comments on commit 8a0371c

Please sign in to comment.