Sha256: a31d147678e53130833ef53e86f1e1d14cdb5a169536e9e3b001719daacc797e
Contents?: true
Size: 759 Bytes
Versions: 7
Compression:
Stored size: 759 Bytes
Contents
module Churn class ChurnHistory def self.store_revision_history(revision, hash_data) FileUtils.mkdir 'tmp' unless File.directory?('tmp') File.open("tmp/#{revision}.json", 'w') {|f| f.write(hash_data.to_json) } end def self.load_revision_data(revision) #load revision data from scratch folder if it exists filename = "tmp/#{revision}.json" if File.exists?(filename) json_data = File.read(filename) data = JSON.parse(json_data) changed_files = data['churn']['changed_files'] changed_classes = data['churn']['changed_classes'] changed_methods = data['churn']['changed_methods'] end [changed_files, changed_classes, changed_methods] end end end
Version data entries
7 entries across 7 versions & 1 rubygems