reaver 0.12.0 → 0.14.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 +3 -0
- data/README.md +3 -2
- data/lib/reaver/collection.rb +5 -1
- data/lib/reaver/git.rb +39 -0
- data/lib/reaver/version.rb +1 -1
- data/lib/reaver/walk.rb +9 -0
- data/lib/reaver.rb +1 -0
- data.tar.gz.sig +0 -0
- metadata +16 -17
- 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: 11f9df0aabd618b5bf7aab285589005337370b29d434aa31609299a859a3a3df
|
4
|
+
data.tar.gz: 1a7cd410c41212268eb2a7d4f481d514912f5a337ab3d1619423c11d2b1263ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a30ca1a17864e1f7bfa169d357df180125b362d84cc36e115a43e6f08a6b1a9c92b1f287fa7c22d6fa1be0d6d8d7f9464d24132bee83b3d577e8ec14a43d784c
|
7
|
+
data.tar.gz: 042e5aaa0569b07318f6a9437bf6463bea0a282946edebae1242a6035fafea1eeb3b63ef96792fe7f5c68d59ccf48cf397fdbf30341ed68682465e2c7537a713
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@ move things to the right spot.
|
|
9
9
|
|
10
10
|
## Dependencies
|
11
11
|
|
12
|
-
Reaver need only `unzip`, `xz` and `
|
12
|
+
Reaver need only `unzip`, `xz`, `tar` and `git`, depending what you'll use.
|
13
13
|
|
14
14
|
## Collections
|
15
15
|
|
@@ -48,13 +48,14 @@ To see more examples, go
|
|
48
48
|
A collection can include:
|
49
49
|
- `all_into_dir: <dirname>` if all files go in a directory. Directory is created
|
50
50
|
if not exist.
|
51
|
-
- `keep_name: <boolean>`, if `true`,
|
51
|
+
- `keep_name: <boolean>`, if `true`, create a directory with the name of the thing, e.g, for a name `ombre.tar.gz`, the final dest will be `all_into_dir/ombre` or `dest_dir/ombre`.
|
52
52
|
- `force_download: <boolean>`, if you make change and want to download now, change to `true`.
|
53
53
|
- `things[].dest_dir: <dirname>`, if each files go in differents directory, use this.
|
54
54
|
- `things[].name` the new name after download, may include the file extension.
|
55
55
|
- `things[].strip_components: <number>`, used on `tar`, default to 1, skip the first
|
56
56
|
directory from an archive, if no subdirectory exist, you should set to 0.
|
57
57
|
- `things[].url: <string>`
|
58
|
+
- `things[].git: <boolean>`, If the thing need to be managed with git.
|
58
59
|
- `time: 86000` (in second) is for search every day ( 60 * 60 * 24 ).
|
59
60
|
|
60
61
|
If `all_into_dir` is defined, `things[].dest_dir` is not used.
|
data/lib/reaver/collection.rb
CHANGED
@@ -34,7 +34,11 @@ module Reaver
|
|
34
34
|
return unless @tasks || @tasks['things'].length.zero?
|
35
35
|
|
36
36
|
@tasks['things'].each do |task|
|
37
|
-
|
37
|
+
if task['git']
|
38
|
+
Reaver::Git.new(task['url'], task['dest_dir'])
|
39
|
+
else
|
40
|
+
do_thing(task)
|
41
|
+
end
|
38
42
|
metadata.info['changed'] = @changed
|
39
43
|
end
|
40
44
|
end
|
data/lib/reaver/git.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
module Reaver
|
6
|
+
# Treat git
|
7
|
+
class Git
|
8
|
+
def initialize(url, dest)
|
9
|
+
@dest = "#{ENV['HOME']}/#{dest}"
|
10
|
+
@url = url
|
11
|
+
x
|
12
|
+
end
|
13
|
+
|
14
|
+
protected
|
15
|
+
|
16
|
+
def x
|
17
|
+
if !Dir.exist?(@dest)
|
18
|
+
git_clone
|
19
|
+
elsif Dir.exist?(@dest) && !Dir.exist?("#{@dest}/.git")
|
20
|
+
FileUtils.rm_rf @dest
|
21
|
+
git_clone
|
22
|
+
elsif Dir.exist?(@dest) && Dir.exist?("#{@dest}/.git")
|
23
|
+
git_sync
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def git_clone
|
30
|
+
puts "Git cloning #{@url} to #{@dest}..."
|
31
|
+
`git clone #{@url} #{@dest}`
|
32
|
+
end
|
33
|
+
|
34
|
+
def git_sync
|
35
|
+
puts "Git fetching update(s) on #{@dest}..."
|
36
|
+
`cd #{@dest} && git pull`
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/reaver/version.rb
CHANGED
data/lib/reaver/walk.rb
CHANGED
@@ -26,6 +26,8 @@ module Reaver
|
|
26
26
|
extract_gzip
|
27
27
|
when %r{^font/ttf}
|
28
28
|
copy_file
|
29
|
+
when %r{^application/(x-elf|x-sh)}
|
30
|
+
copy_file_with_x
|
29
31
|
else
|
30
32
|
puts "Filetype #{@extension} not yet supported, skipping..."
|
31
33
|
end
|
@@ -52,6 +54,13 @@ module Reaver
|
|
52
54
|
puts "Copying file #{@filename} at #{@final_dest}..."
|
53
55
|
FileUtils.mkdir_p @final_dest
|
54
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}"
|
55
64
|
end
|
56
65
|
|
57
66
|
def extract_zip
|
data/lib/reaver.rb
CHANGED
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.14.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-
|
37
|
+
date: 2024-11-29 00:00:00.000000000 Z
|
40
38
|
dependencies:
|
41
39
|
- !ruby/object:Gem::Dependency
|
42
40
|
name: marcel
|
@@ -98,6 +96,7 @@ files:
|
|
98
96
|
- lib/reaver/banner.rb
|
99
97
|
- lib/reaver/collection.rb
|
100
98
|
- lib/reaver/download.rb
|
99
|
+
- lib/reaver/git.rb
|
101
100
|
- lib/reaver/metadata.rb
|
102
101
|
- lib/reaver/version.rb
|
103
102
|
- lib/reaver/walk.rb
|
@@ -126,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
125
|
- !ruby/object:Gem::Version
|
127
126
|
version: '0'
|
128
127
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
128
|
+
rubygems_version: 3.5.16
|
130
129
|
signing_key:
|
131
130
|
specification_version: 4
|
132
131
|
summary: A tool to downloads and track updates of things on the Net.
|
metadata.gz.sig
CHANGED
Binary file
|