annotations2triannon 0.2.2 → 0.3.0

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: fe88e8ee09cde6c32dd18f7a6165576ce6ccc55d
4
- data.tar.gz: abab22fb8d824bdf720a9b1f3df1c3b50d3a9408
3
+ metadata.gz: bf8a8db6a0fce3d99033b5a6f5c06c48debc16ce
4
+ data.tar.gz: e76a1f81fc653fad3e592fe7696a490aa288ddf0
5
5
  SHA512:
6
- metadata.gz: 13d06ed9903a01134c22f32d15a4f66e0cdd53cf0a1023270b7c6a2696d37f505e3c7cbdd8a4d1579d7a6e5bcfe9ecf7bf9a51213ca99cf22ccd669e1a1f8441
7
- data.tar.gz: cf0004e46eae1f7c8339e7ecf9608a6d30db70747dc72b09ef81cf199f695c0730ebe71cea987d6576b21f8b73d132ff75aa82471e00badf4277885b8c6f5d6b
6
+ metadata.gz: d4f8be59545e4488c5afbad2110d607780220a605979f07e50a3665a9aeeacee70b1d97a2e27afd6e1f4c59c920b7df8657f86e39703a93d1b30a769ca52236b
7
+ data.tar.gz: c9cb96aa7143d99a650fe8e0d3fd8e93ba74b982807c349dbeea599eb6a2cfa03dd9fbce2838efce347217234bf7b8eb9c793e8dda2e140b905f94c73152810f
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'annotations2triannon'
5
- s.version = '0.2.2'
5
+ s.version = '0.3.0'
6
6
  s.licenses = ['Apache-2.0']
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
@@ -30,9 +30,6 @@ Gem::Specification.new do |s|
30
30
  s.add_dependency 'rest-client'
31
31
  s.add_dependency 'rest-client-components'
32
32
  s.add_dependency 'rack-cache'
33
- # Concurrent HTTP requests
34
- s.add_dependency 'parallel'
35
- s.add_dependency 'ruby-progressbar'
36
33
  # dalli is a memcached ruby client
37
34
  s.add_dependency 'dalli'
38
35
  # Use pry for console and debug config
data/bin/dms.rb CHANGED
@@ -178,8 +178,7 @@ text_annotations.each_pair do |m,anno_lists|
178
178
  anno_lists.each_pair do |anno_list_uri, anno_list|
179
179
  puts "Posting:\t#{anno_list_uri}\t=> #{anno_list.length}"
180
180
  anno_tracking[m][anno_list_uri] = []
181
- # Allow Parallel to automatically determine the optimal concurrency model.
182
- Parallel.each(anno_list, :progress => 'Annotations: ') do |oa|
181
+ anno_list.each do |oa|
183
182
  response = tc.post_annotation(oa.to_jsonld_oa)
184
183
  # parse the response into an RDF::Graph
185
184
  graph = tc.response2graph(response)
@@ -191,8 +190,11 @@ text_annotations.each_pair do |m,anno_lists|
191
190
  chars: oa.body_contentChars.first
192
191
  }
193
192
  anno_tracking[m][anno_list_uri].push(anno_data)
193
+ else
194
+ CONFIG.logger.error("FAILURE to POST #{oa.id}")
194
195
  end
195
196
  end
197
+ anno_tracking_save(anno_tracking)
196
198
  end
197
199
  end
198
200
  anno_tracking_save(anno_tracking)
@@ -27,10 +27,7 @@ module Annotations2triannon
27
27
  else
28
28
  @graph = graph
29
29
  raise ArgumentError, 'graph must be an open annotation' unless is_annotation?
30
- if id.nil?
31
- @id = get_id
32
- else
33
- end
30
+ id.nil? ? @id = get_id : @id = id
34
31
  end
35
32
  end
36
33
 
data/lib/requires.rb CHANGED
@@ -39,9 +39,6 @@ require 'addressable/uri'
39
39
  require 'json'
40
40
  require 'uuid'
41
41
 
42
- require 'ruby-progressbar'
43
- require 'parallel'
44
-
45
42
  require 'linkeddata'
46
43
  require_relative 'rdf/vocab/sc.rb'
47
44
 
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.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Weber
@@ -136,34 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: parallel
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: ruby-progressbar
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
139
  - !ruby/object:Gem::Dependency
168
140
  name: dalli
169
141
  requirement: !ruby/object:Gem::Requirement