reaver 0.10.0 → 0.11.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
  SHA256:
3
- metadata.gz: 3dfb30ee44d119ba98c2d8f0aa24a12db7d333447aac2acd371a3a0a668c6685
4
- data.tar.gz: 7ce4e56102a407c06ed8895dc1a9191c1070bcf3705fe4f61c8d6af9dc9a89b2
3
+ metadata.gz: 0fa3014398fc15a35e20032c065846bff2a3e9046ee13ebfec9e2c618f6d5a1e
4
+ data.tar.gz: 88d073275dcc5e1908c1156876722580bc7123995a9ddac1d7ef32104219517f
5
5
  SHA512:
6
- metadata.gz: 3d51222bcd09ef5f123f14d17219fee0b2e59053b3743bea8efecf303004c8c7523176fd0afec27d5b396f68ac7246cc35bd3daf911941e09de23d61fb0e90c1
7
- data.tar.gz: 98d6e1025629ac00371ae10c909363439662e80adb4d5d7ed233c34d2b1beb8921ea32868fc2b89cd7b271c21743a0b1e3d186d1c3fb5cdf3face02cc06887fe
6
+ metadata.gz: 6333e552024a93186a22fc87be8500027117091796ffcb1c44a791d2e899fe29485c65f51340519bd7fed0f59ad44f8a9b59b3b84074357e76cf5f41c9beb1ff
7
+ data.tar.gz: b148922de512faebf56e415facbc10c84bc0f6bb2af0a84e966e4feb528b39c9d62d72fb9aea97e95c36252593193e7f2b90f40a9e43825b43caefc6f0795eae
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.11.0, release 10/2024
2
+ - can extract tar.xz archive.
3
+
4
+ ## 0.10.1
5
+ - For `all_to_dir_path` or `things.dest_dir`, all paths are relative to `$HOME` (or
6
+ /home/<name>), so don't include shell variable `~` or `$HOME`.
7
+ - unzip not interactive with `-o`.
8
+
1
9
  ## 0.10.0, release 10/2024
2
10
  - New variable for collections, all_into_dir, things.dest_dir, keep_name and
3
11
  force_download.
data/README.md CHANGED
@@ -35,7 +35,7 @@ things:
35
35
  - name: nerdtree.tar.gz
36
36
  url: https://github.com/preservim/nerdtree/archive/refs/heads/master.tar.gz
37
37
  time: 86000
38
- all_into_dir: ~/.config/pack/myvimpluggins/start
38
+ all_into_dir: .config/pack/myvimpluggins/start
39
39
  keep_name: true
40
40
  ```
41
41
 
@@ -52,7 +52,9 @@ A collection can include:
52
52
  - `things.url: <string>`
53
53
  - `time: 86000` (in second) is for search every day ( 60 * 60 * 24 ).
54
54
 
55
- If `all_into_dir` is defined, `things.dest_dir` is not used.
55
+ If `all_into_dir` is defined, `things.dest_dir` is not used.
56
+ All paths given are relative to `$HOME` so don't include `~` or any shell
57
+ variables.
56
58
 
57
59
  And start reaver simply with:
58
60
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reaver
4
- VERSION = '0.10.0'
4
+ VERSION = '0.11.0'
5
5
  end
data/lib/reaver/walk.rb CHANGED
@@ -17,11 +17,11 @@ module Reaver
17
17
 
18
18
  def x
19
19
  case @extension
20
- when %r{^image/jpeg} || %r{^image/png}
20
+ when %r{^image/(jpeg|png)}
21
21
  copy_file
22
22
  when %r{^application/zip}
23
23
  extract_zip
24
- when %r{^application/gzip}
24
+ when %r{^application/(gzip|x-xz)}
25
25
  extract_gzip
26
26
  when %r{^font/ttf}
27
27
  copy_file
@@ -40,7 +40,11 @@ module Reaver
40
40
 
41
41
  def check_name
42
42
  name = @filename.split('.').first
43
- @final_dest = @keep_name ? "#{@dest}/#{name}" : @dest
43
+ @final_dest = if @keep_name
44
+ "#{ENV['HOME']}/#{@dest}/#{name}"
45
+ else
46
+ "#{ENV['HOME']}/#{@dest}"
47
+ end
44
48
  end
45
49
 
46
50
  def copy_file
@@ -52,13 +56,14 @@ module Reaver
52
56
  def extract_zip
53
57
  puts "Extracting zip archive #{@filename} at #{@final_dest}..."
54
58
  FileUtils.mkdir_p @final_dest
55
- `unzip -j #{@filename} -d #{@final_dest}`
59
+ `unzip -o -j #{@filename} -d #{@final_dest}`
56
60
  end
57
61
 
58
62
  def extract_gzip
59
- puts "Extracting gzip archive #{@filename} at #{@final_dest}..."
63
+ ext = @extension.split('/').last
64
+ puts "Extracting #{ext} archive #{@filename} at #{@final_dest}..."
60
65
  FileUtils.mkdir_p @final_dest
61
- `tar -x --strip-components=1 -f #{@filename} --one-top-level=#{@final_dest}`
66
+ `tar x -f #{@filename} --one-top-level=#{@final_dest}`
62
67
  end
63
68
  end
64
69
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reaver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - szorfein
@@ -36,7 +36,7 @@ cert_chain:
36
36
  urXgRIzALxd/xazPCnoLSXPzfJSI6Y77S1EBvhPd9RaSO8IyH9RhPDP9mnTvW2Kl
37
37
  NAUnoL+txK5a
38
38
  -----END CERTIFICATE-----
39
- date: 2024-10-06 00:00:00.000000000 Z
39
+ date: 2024-10-07 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: marcel
metadata.gz.sig CHANGED
Binary file