neri 0.9.3 → 0.9.4

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
  SHA256:
3
- metadata.gz: c9c11506aa1729506a8f2386ea1a37e45c6ef5f72cec65e3677931ef6f18910f
4
- data.tar.gz: fb4307dd5e026985659ab652e27436759bd60531f1b9044ab6ca82f6d28eab22
3
+ metadata.gz: 8829588155f0a2fa2381d8a6da3f2010136a1c22b3b5e9168cacddb8d78cae1c
4
+ data.tar.gz: 5f0fcf15b0ea35ee9c1dfaf56a83b1284ad542eaa68ab805c077a70b3b487089
5
5
  SHA512:
6
- metadata.gz: b2d6307c498084b7327d96fb041304b6df4f2aca8756a81f90d6065b1a5b966eef64056d76ca6917267bd75f531ec1bead1e987195fc7379276d0de3233af7aa
7
- data.tar.gz: b2002fe10dc92c4c87ddf7e961d77c5bddda93f0b9782b41e87e2b4ae5cc969b11123217b98f4d91d75a25c64db934a3db8eab6ed39be6072f3c046214923811
6
+ metadata.gz: 7d8bb8a32247d0a4a8e3dfdd3bc933064f531384db15d2f01209c900905b8a1b59166bb61d1cb8137b97eec0d77677c20a8fb26c14e4a3dfbd0877834cff06ae
7
+ data.tar.gz: c6551635e0f20d969c770c5bb2b8355c1f0e1f4e1b815089690d3115140a2015d90f0c6221ac2fc927cf013ceac574f70f388a15ecda5a3904bba5e83853ffed
data/lib/neri/build.rb CHANGED
@@ -535,6 +535,7 @@ options:
535
535
  @data_files.select { |file| File.directory? file }.each do |dir|
536
536
  data_files += Dir.glob("#{dir}/**/*").select { |file| File.file? file }
537
537
  end
538
+ data_files = data_files.reverse.uniq { |file| File.expand_path(file) }
538
539
  if options[:encryption_key]
539
540
  require "digest/sha2"
540
541
  @encryption_key = Digest::SHA2.hexdigest(options[:encryption_key])
@@ -549,11 +550,15 @@ options:
549
550
  else
550
551
  file
551
552
  end
552
- filedata = [filename, File.size(file), pos]
553
+ filedata = [filename, File.size(file), pos].join("\t")
554
+ nputs_v " - #{filename}:#{File.size(file)} bytes"
555
+ if File.expand_path(filename).start_with?(Dir.pwd) && filename.include?("..")
556
+ cd_path = ".#{File.expand_path(filename).delete_prefix(Dir.pwd)}"
557
+ filedata += "\n" + [cd_path, File.size(file), pos].join("\t")
558
+ end
553
559
  pos += File.size(file)
554
560
  pos += BLOCK_LENGTH - pos % BLOCK_LENGTH unless pos % BLOCK_LENGTH == 0
555
- nputs_v " - #{filename}:#{File.size(file)} bytes"
556
- filedata.join("\t")
561
+ filedata
557
562
  }.join("\n").encode(Encoding::UTF_8)
558
563
 
559
564
  f.write(format("%#{BLOCK_LENGTH}d", files_str.bytesize))
data/lib/neri/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neri
2
- VERSION = -"0.9.3"
2
+ VERSION = -"0.9.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nodai2hITC
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-21 00:00:00.000000000 Z
11
+ date: 2021-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: win32api