reaver 0.11.1 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +4 -2
- data/README.md +9 -4
- data/lib/reaver/collection.rb +7 -1
- data/lib/reaver/version.rb +1 -1
- data/lib/reaver/walk.rb +12 -2
- data.tar.gz.sig +0 -0
- metadata +14 -16
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71aeb61cce0d233f4805e0c63a95fd171638a4d0142379bc63d18f2e459be020
|
4
|
+
data.tar.gz: 4d5b980f10d77ff049425246af3860e1c4a3742c1d1248036afb622e472b90b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db92437ff4c2a4ccb20455fed86107dc5a7d5739552ff77a8c2053cfe6b4d047ed025db3553b1c537242948b157686b86c5e02726e578c7f728798e7409f3d27
|
7
|
+
data.tar.gz: fd890ce9dc9e2d74d14b4f838e892082761d3862e284ccab3781792289a8263460b9a65378a5d2894ab1929d7234730d950b7090fa0bf66810d7858911dea06d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
## 0.12.0
|
2
|
+
- Add `--strip-components=1` to tar, by default set to `1` may be changed by
|
3
|
+
`things[].strip_components: <number>` variable
|
2
4
|
|
3
5
|
## 0.11.0, release 10/2024
|
4
6
|
- can extract tar.xz archive.
|
5
7
|
|
6
8
|
## 0.10.1
|
7
|
-
- For `all_to_dir_path` or `things.dest_dir`, all paths are relative to `$HOME` (or
|
9
|
+
- For `all_to_dir_path` or `things[].dest_dir`, all paths are relative to `$HOME` (or
|
8
10
|
/home/<name>), so don't include shell variable `~` or `$HOME`.
|
9
11
|
- unzip not interactive with `-o`.
|
10
12
|
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# reaver
|
2
2
|
|
3
|
+
[![Gem
|
4
|
+
Version](https://badge.fury.io/rb/reaver.svg)](https://badge.fury.io/rb/reaver)
|
5
|
+
|
3
6
|
A tool that allows to download and track the latest version of stuff on the net.
|
4
7
|
Define your collections in .yml and launch Reaver to retrieve everything and
|
5
8
|
move things to the right spot.
|
@@ -47,12 +50,14 @@ A collection can include:
|
|
47
50
|
if not exist.
|
48
51
|
- `keep_name: <boolean>`, if `true`, use the name of the thing for the dest, e.g, for a name `ombre.tar.gz`, the final dest will be `all_into_dir/ombre` or `dest_dir/ombre`.
|
49
52
|
- `force_download: <boolean>`, if you make change and want to download now, change to `true`.
|
50
|
-
- `things.dest_dir: <dirname>`, if each files go in differents directory, use this.
|
51
|
-
- `things.name` the new name after download, may include the file extension.
|
52
|
-
- `things.
|
53
|
+
- `things[].dest_dir: <dirname>`, if each files go in differents directory, use this.
|
54
|
+
- `things[].name` the new name after download, may include the file extension.
|
55
|
+
- `things[].strip_components: <number>`, used on `tar`, default to 1, skip the first
|
56
|
+
directory from an archive, if no subdirectory exist, you should set to 0.
|
57
|
+
- `things[].url: <string>`
|
53
58
|
- `time: 86000` (in second) is for search every day ( 60 * 60 * 24 ).
|
54
59
|
|
55
|
-
If `all_into_dir` is defined, `things.dest_dir` is not used.
|
60
|
+
If `all_into_dir` is defined, `things[].dest_dir` is not used.
|
56
61
|
All paths given are relative to `$HOME` so don't include `~` or any shell
|
57
62
|
variables.
|
58
63
|
|
data/lib/reaver/collection.rb
CHANGED
@@ -68,7 +68,13 @@ module Reaver
|
|
68
68
|
def need_to_do_something_with(file)
|
69
69
|
dest = @tasks['all_to_dest_dir'] || file['dest_dir']
|
70
70
|
keep_name = @tasks['keep_name'] || false
|
71
|
-
|
71
|
+
strip_components = file['strip_components'] || '1'
|
72
|
+
return unless dest
|
73
|
+
|
74
|
+
Reaver::Walk.new(file['name'],
|
75
|
+
dest,
|
76
|
+
keep_name,
|
77
|
+
strip_components)
|
72
78
|
end
|
73
79
|
end
|
74
80
|
end
|
data/lib/reaver/version.rb
CHANGED
data/lib/reaver/walk.rb
CHANGED
@@ -6,10 +6,11 @@ require 'fileutils'
|
|
6
6
|
module Reaver
|
7
7
|
# extract, move file if need
|
8
8
|
class Walk
|
9
|
-
def initialize(filename, dest, keep_name)
|
9
|
+
def initialize(filename, dest, keep_name, strip)
|
10
10
|
@filename = filename
|
11
11
|
@dest = dest
|
12
12
|
@keep_name = keep_name || false
|
13
|
+
@strip = strip
|
13
14
|
check_extension
|
14
15
|
check_name
|
15
16
|
x
|
@@ -25,6 +26,8 @@ module Reaver
|
|
25
26
|
extract_gzip
|
26
27
|
when %r{^font/ttf}
|
27
28
|
copy_file
|
29
|
+
when %r{^application/(x-elf|x-sh)}
|
30
|
+
copy_file_with_x
|
28
31
|
else
|
29
32
|
puts "Filetype #{@extension} not yet supported, skipping..."
|
30
33
|
end
|
@@ -51,6 +54,13 @@ module Reaver
|
|
51
54
|
puts "Copying file #{@filename} at #{@final_dest}..."
|
52
55
|
FileUtils.mkdir_p @final_dest
|
53
56
|
FileUtils.cp @filename, "#{@final_dest}/#{@filename}"
|
57
|
+
rescue Errno::ETXTBSY => e
|
58
|
+
puts "You should stop program before update > #{e}"
|
59
|
+
end
|
60
|
+
|
61
|
+
def copy_file_with_x
|
62
|
+
copy_file
|
63
|
+
File.chmod 0700, "#{@final_dest}/#{@filename}"
|
54
64
|
end
|
55
65
|
|
56
66
|
def extract_zip
|
@@ -63,7 +73,7 @@ module Reaver
|
|
63
73
|
ext = @extension.split('/').last
|
64
74
|
puts "Extracting #{ext} archive #{@filename} at #{@final_dest}..."
|
65
75
|
FileUtils.mkdir_p @final_dest
|
66
|
-
`tar x --strip-components
|
76
|
+
`tar x --strip-components=#{@strip} -f #{@filename} --one-top-level=#{@final_dest}`
|
67
77
|
end
|
68
78
|
end
|
69
79
|
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.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- szorfein
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIEPDCCAqSgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBEMREwDwYDVQQDDAhzem9y
|
14
14
|
ZmVpbjEaMBgGCgmSJomT8ixkARkWCnByb3Rvbm1haWwxEzARBgoJkiaJk/IsZAEZ
|
15
|
-
|
15
|
+
FgNjb20wHhcNMjQxMDI1MTU0NTI4WhcNMjUxMDI1MTU0NTI4WjBEMREwDwYDVQQD
|
16
16
|
DAhzem9yZmVpbjEaMBgGCgmSJomT8ixkARkWCnByb3Rvbm1haWwxEzARBgoJkiaJ
|
17
17
|
k/IsZAEZFgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCqe1yx
|
18
18
|
EG2oM25jeHp08A8zkaDNmbI3MujjrRM/WPEYZX2dVwOxkIS20hQVuxcAsBBA4W/W
|
@@ -23,20 +23,18 @@ cert_chain:
|
|
23
23
|
xI2/BnS8zOsS6Te08iLxqZfI/lsG8wcPduekSetRI4VIOZ5QoRK54PiQjrOBhbnD
|
24
24
|
OQBB/XF1C80imZtRtdUqh6bK9WeWI4RYZ2/KwXL1AScEbXkBkkOECWoVrD18WgRm
|
25
25
|
siuX6RkNIelhtb0En7f3bizgPqlO0qPQV+wPi9TSBxdVG12C0OmjCQYMQD0CAwEA
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
urXgRIzALxd/xazPCnoLSXPzfJSI6Y77S1EBvhPd9RaSO8IyH9RhPDP9mnTvW2Kl
|
37
|
-
NAUnoL+txK5a
|
26
|
+
AaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFOUqdDeoxQXP
|
27
|
+
J29lorB0/52ePa5qMA0GCSqGSIb3DQEBCwUAA4IBgQAg+ig1ZbxY3KlXD5pfn7HV
|
28
|
+
tl7TIkkTznhCW33HZrswRQnQ5nC/w/MClasCCDjEL6tzE4dTs/Hn/DBBFPzb0WWI
|
29
|
+
sUYnBaf0k4uF5mEMUXjjAsNa6P+w35VJBHSPLgsBrVX/5H9hnptw5qquxDFuSvQ3
|
30
|
+
MeUCnhe8+YFSQCigJRA1h3b2XMQEw7KjdJAfYx2qd7zQgfqtKp46E3Jndk7PHpfQ
|
31
|
+
826uy2+rqHZJtRPfh/SPUIyMjxDpW7vZd1J8uTFgVoNn8OdFv5FKsjCEP9VfxgN7
|
32
|
+
hO51TYmCd7cvnGrwfx6j/AqA6N2nHZNojwQ98nfXWp5tdjET+gipjZwYGmM3+7o/
|
33
|
+
/WIxUcce8RaxYQ9kfz9zrNKeWqlviQ6dc3tnn3Ppu/27YjyC/tqodic1pPE6US9y
|
34
|
+
1Eu31LqT9K75BZgLoHDybDlvVJ1B2hZI31jZOFjqpCgVxwoHmuigy2iCUcLsCTJJ
|
35
|
+
6ct0vZN7gCQ/YSLa3jJf1N/CH4rQokbof1fehel4SPA=
|
38
36
|
-----END CERTIFICATE-----
|
39
|
-
date: 2024-10-
|
37
|
+
date: 2024-10-25 00:00:00.000000000 Z
|
40
38
|
dependencies:
|
41
39
|
- !ruby/object:Gem::Dependency
|
42
40
|
name: marcel
|
metadata.gz.sig
CHANGED
Binary file
|