annotations2triannon 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be627ca60bec60df86a137d16aed45a25eec9ae1
4
- data.tar.gz: ca5c4ff884b7b1f4e9776ae714ddc0b8bd298bad
3
+ metadata.gz: 54f2c2055aa2445af8a1f5693c49240c2e363502
4
+ data.tar.gz: 5d8c7509a83581b8cd07254b60158fd5febeda90
5
5
  SHA512:
6
- metadata.gz: 327eafd4f8dbe39604c0d64335c7478fc27e84cdf34e271e4678dc4bc080962f1cc7bd787bc2fa6e768e013ef0aabe663ee8a076d60b8f4da5e9f9db8ce1298f
7
- data.tar.gz: 74ab40714d94deb562fdf3756b1598c094e857bd53dbbc3ed25174d616e8c10825d32b1a8341dd26d537bceb185300e01772cfc45f6056ad86df182022de1c89
6
+ metadata.gz: 4a5a3d420dd423bb37626d02448be680c917f7d01837e86f0ec23502ee1367f2f5096863dc86d4dbb6b27f80b298b9208ed84a8857df606c6e03f3c41e35eb86
7
+ data.tar.gz: bc43fe06a962a028f9dfdf5d4c151f68e3ea63f17073df45aedba769e1a8361d5fc9f3e69aa2aeb22db72f13778a575457d4dd214ba1db7ccb592b5e74d7cdb3
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'annotations2triannon'
5
- s.version = '0.2.0'
5
+ s.version = '0.2.1'
6
6
  s.licenses = ['Apache-2.0']
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
data/bin/dms.rb CHANGED
@@ -64,18 +64,30 @@ ANNO_TRACKING_FILE = File.join(CONFIG.log_path, 'dms_annotation_tracking.json')
64
64
  # persist the anno_tracking data to a file
65
65
  # @param anno_data [Hash]
66
66
  def anno_tracking_save(anno_data)
67
- dump_json(ANNO_TRACKING_FILE, anno_data)
68
- puts "Annotation records updated in: #{ANNO_TRACKING_FILE}"
67
+ begin
68
+ dump_json(ANNO_TRACKING_FILE, anno_data)
69
+ puts "Annotation records updated in: #{ANNO_TRACKING_FILE}"
70
+ rescue
71
+ msg = "FAILURE to save annotation tracking file #{ANNO_TRACKING_FILE}"
72
+ CONFIG.logger.error(msg)
73
+ end
69
74
  end
70
75
 
71
76
  # retrieve the anno_tracking data from a file
72
77
  # @returns anno_data [Hash]
73
78
  def anno_tracking_load
74
- if File.exists? ANNO_TRACKING_FILE
75
- if File.size(ANNO_TRACKING_FILE).to_i > 0
76
- return JSON.parse( File.read(ANNO_TRACKING_FILE) )
79
+ data = {}
80
+ begin
81
+ if File.exists? ANNO_TRACKING_FILE
82
+ if File.size(ANNO_TRACKING_FILE).to_i > 0
83
+ data = JSON.parse( File.read(ANNO_TRACKING_FILE) )
84
+ end
77
85
  end
86
+ rescue
87
+ msg = "FAILURE to load annotation tracking file #{ANNO_TRACKING_FILE}"
88
+ CONFIG.logger.error(msg)
78
89
  end
90
+ return data
79
91
  end
80
92
 
81
93
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotations2triannon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Weber