libis-tools 0.9.62 → 0.9.63

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: a2464bf3e02e56791cd56ff6c266ab875fec58b5
4
- data.tar.gz: cbef32af7fde215e0b7cf2b3e8f1ca4d0c5609b9
3
+ metadata.gz: 2420c110c403a832c83cd93342782f4fc792de78
4
+ data.tar.gz: 2311ad5757cfbb2179a14c811586c90d5e6fe4f5
5
5
  SHA512:
6
- metadata.gz: 94c9e9154bfdb7b56ef646dded3b31031f8011c01a1cfd9e6f15e23349a680bcecb984734da1a383663993e0ae69c36b066f9b71364d4b39842645cd33e65e47
7
- data.tar.gz: d67f4c5487a564cf9d24a55fd500017706d669caa3b7d7667ddf2767e3f4430d99051993073531cbad57a053f52be0860097cd94b2ed66947f90d58d18f8c1ea
6
+ metadata.gz: 83f2a52b70d446da36dfd38d63dbf75dd4a8662ad9fa168d373af1efdebd4f02cd1cc64572eac8ea296f5db1bb93b55275d5d9ba32bc0382f86463e9d4ad510c
7
+ data.tar.gz: b05ff83e1522007fec1aa9641bcf588cc13a365cd632375e99c5b11d555422b06dfe9fe4121db0b31e07f863a5fc14ac5d0d0a52d0c992d21c20a0531e72475a
@@ -1,5 +1,5 @@
1
1
  require 'libis/tools/thread_safe'
2
- require 'uri'
2
+ require 'cgi'
3
3
 
4
4
  module Libis
5
5
  module Tools
@@ -267,6 +267,14 @@ module Libis
267
267
  target_location
268
268
  end
269
269
 
270
+ def target_name
271
+ ::File.basename(target)
272
+ end
273
+
274
+ def target_path
275
+ ::File.dirname(target)
276
+ end
277
+
270
278
  # This method creates the appropriate {DnxSection}s based on what attributes are filled in.
271
279
  def amd
272
280
  dnx = {}
@@ -280,14 +288,14 @@ module Libis
280
288
  FileEntityType: entity_type,
281
289
  compositionLevel: composition_level,
282
290
  # fileLocationType: 'FILE',
283
- # fileLocation: '',
284
- fileOriginalName: URI.encode(orig_name),
285
- fileOriginalPath: URI.encode(orig_path),
286
- fileOriginalID: URI.encode(location),
287
- fileExtension: ::File.extname(orig_name),
291
+ fileLocation: location,
292
+ fileOriginalName: CGI.encode(target_name).gsub('+', '%20'),
293
+ fileOriginalPath: target_path,
294
+ # fileOriginalID: URI.encode(location),
295
+ # fileExtension: ::File.extname(orig_name),
288
296
  fileMIMEType: mimetype,
289
297
  fileSizeBytes: size,
290
- formatLibraryId: puid
298
+ # formatLibraryId: puid
291
299
  }.cleanup
292
300
  tech_data << GeneralFileCharacteristics.new(data) unless data.empty?
293
301
  # Fixity
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Tools
3
- VERSION = '0.9.62'
3
+ VERSION = '0.9.63'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.62
4
+ version: 0.9.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-19 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler