Skip to content
This repository has been archived by the owner on Nov 1, 2017. It is now read-only.

Commit

Permalink
Sync changes from upstream repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubot committed Feb 25, 2016
1 parent edd1e07 commit a8d460c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ task :publish, [:no_commit_msg] => [:remove_tmp_dir, :remove_output_dir, :build]
end

desc "Generate JSON from the sample responses"
task :generate_json_from_responses
Dir[File.join(File.dirname(__FILE__), 'lib', 'responses', '*.rb')].each { |file| load file }
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), 'json-dump'))
GitHub::Resources::Responses.constants.each { |constant|
File.open('json-dump/' + constant.to_s + '.json', 'w') { |file|
file.write(JSON.pretty_generate(GitHub::Resources::Helpers.get_resource(constant)))
task :generate_json_from_responses do
Dir[File.join(File.dirname(__FILE__), 'lib', 'responses', '*.rb')].each { |file| load file }
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), 'json-dump'))
GitHub::Resources::Responses.constants.each { |constant|
File.open('json-dump/' + constant.to_s + '.json', 'w') { |file|
file.write(JSON.pretty_generate(GitHub::Resources::Helpers.get_resource(constant)))
}
}
}
end

0 comments on commit a8d460c

Please sign in to comment.