lib/projects.rb in dev_projects-0.0.13 vs lib/projects.rb in dev_projects-0.0.14
- old
+ new
@@ -1,10 +1,11 @@
-require 'dev_environment'
-require 'dev_git'
-require 'dev_svn'
require 'json'
require 'rake'
+require 'dev_git'
+require 'dev_svn'
+require 'dev_msbuild'
+require 'dev_environment'
class Projects < Hash
attr_accessor :filename
def initialize
@@ -19,10 +20,10 @@
}
end
def save filename=''
@filename=filename if !filename.nil? && filename.length > 0
- File.open(@filename,'w'){|f|f.write(self.to_json)} if @filename.length > 0
+ File.open(@filename,'w'){|f|f.write(JSON.pretty_generate(self))} if @filename.length > 0
end
def open filename=''
@filename=filename if filename.length > 0
JSON.parse(IO.read(@filename)).each{|k,v| self[k]=v}
\ No newline at end of file