lib/jirasync/local_repository.rb in jirasync-0.2 vs lib/jirasync/local_repository.rb in jirasync-0.3
- old
+ new
@@ -18,9 +18,14 @@
updateTime = DateTime.parse(issue['fields']['updated'])
File.utime(DateTime.now.to_time, updateTime.to_time, file_path)
end
+ def state_exists?
+ file_path = "#{@path}/sync_state.json"
+ File.exist?(file_path)
+ end
+
def save_state(state)
json = JSON.pretty_generate(state)
file_path = "#{@path}/sync_state.json"
File.write(file_path, json)
end