repackage 1.0.30 → 1.2.1

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: 4fdc05b46d4354b945db15f713602e1e3440dad372a828edc0f8815eb274787e
4
- data.tar.gz: 55f1972e66f6edb4867c9aabd9d60140651010140a50fcbb13d32158c4e8c285
3
+ metadata.gz: cce85a8c9a73901eba853de68bcc06899e501d1ea49ef9d331f884d82fd309d4
4
+ data.tar.gz: d8849e6c2f2670d4eb5fa8516ca013d3ffba3fc3923e42759fb500f818e59176
5
5
  SHA512:
6
- metadata.gz: 8e1321698dfb40877514a0569dc87f10f2375ff0d31e0d0e65f55afc9b714d14f44c72ac40bdf2530c3b898b5a90664f5967c9cb6edc08cc003a07400bdf78de
7
- data.tar.gz: 9f83ff0a55d551a6d517da53aec3411cc4fea1abad1975ac2f07583e28a7886ad856a91e6107f2281c013ad668db1c7d67997e3ded3bdcc7365bef46f91d2047
6
+ metadata.gz: 1d13d34ebbed709e1187228512e2af63adf524a28dbcf08e51a0d65763d7f5df6b43875b48a78363b2fc0e90c81a73ae0c557861f982cc9b6de6583ef04173c0
7
+ data.tar.gz: 49150a9e9efbd1f2b1c51db8302acc85d737b7bffb5a9c39fa844cfb9bfd17b0caab57cbe4e2e9846ad2103151ffcebde9f91fbc3733d459a49b03872198eb61
data/README.md ADDED
@@ -0,0 +1,118 @@
1
+ [![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://www.gobolinux.org/)
2
+ [![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](https://www.ruby-lang.org/en/)
3
+ [![Gem Version](https://badge.fury.io/rb/repackage.svg)](https://badge.fury.io/rb/repackage)
4
+
5
+ This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">12.09.2022</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">04:23:04</span> o'clock.
6
+
7
+ # The repackage gem
8
+
9
+ <img src="https://i.imgur.com/7KpnuMj.jpg" style="margin: 0.5em">
10
+
11
+ ## Dependencies of the repackage gem
12
+
13
+ In the past the repackage gem specifically depended on four other
14
+ external projects. In <b>May 2022</b> this mandatory list of
15
+ dependencies has been reduced to just <b>one</b>. However had,
16
+ it is still recommended that two of the other three gems are
17
+ installed as well.
18
+
19
+ The official list of dependencies thus recommended for the
20
+ <b>repackage</b> gem is as follows, in alphabetical order:
21
+
22
+ - colours
23
+ - extracter
24
+ - opn
25
+
26
+ ## Clean working directory
27
+
28
+ As far as the **repackage** gem is concerned, a working
29
+ directory is needed to extract an archive. On my home
30
+ system this is:
31
+
32
+ /home/Temp/repackage/
33
+
34
+ For most other users this will be:
35
+
36
+ /tmp/repackage/
37
+
38
+ The reason why such a directory is necessary is so that
39
+ we do not begin to pollute any other directory. Some
40
+ archive files, in particular some .zip files, tend to
41
+ be messy and incorrectly archived, extracting right
42
+ into the current working directory as-is. This is not
43
+ always what the user wants to see.
44
+
45
+ This is specified here in the event that you may wonder
46
+ why there is code that checks for this - we have to
47
+ determine which working directory is to be used.
48
+
49
+ ## The main class
50
+
51
+ This subsection will mention a few noteworthy tidbits about
52
+ the main class of the repackage gem.
53
+
54
+ The name of the class is class **Repackage::Repackage**. The
55
+ constant called <b>DEFAULT_TARGET_FORMAT_TYPE</b> will be
56
+ used to determine initially into which target format the
57
+ class shall repackage an existing archive. By default this will
58
+ be set to the String '.tar.xz', thus meaning that an archive,
59
+ such as .tar.gz, will be repackaged into a .tar.xz archive
60
+ instead.
61
+
62
+ The constant <b>WORKING_DIRECTORY</b> is used to specify
63
+ a distinct working directory. Currently the default will
64
+ be at <b>/tmp/repackage/</b>, but this may be changed.
65
+ On my own home system I am using /home/Temp/repackage/
66
+ instead, for instance. We thus have to preserve some
67
+ flexibility here.
68
+
69
+ ## Executable at bin/repackage
70
+
71
+ Since as of May 2022 there is now an executable called
72
+ <b>repackage</b>. It used to be called repackager,
73
+ but I reconsidered; it seems simpler to remember
74
+ that the gem called <b>repackage</b> comes with an
75
+ executable called <b>repackage</b> rather than
76
+ <b>repackager</b>.
77
+
78
+
79
+ ## Contact information and mandatory 2FA coming up in 2022
80
+
81
+ If your creative mind has ideas and specific suggestions to make this gem
82
+ more useful in general, feel free to drop me an email at any time, via:
83
+
84
+ shevy@inbox.lt
85
+
86
+ Before that email I used an email account at Google gmail, but in **2021** I
87
+ decided to slowly abandon gmail for various reasons. In order to limit this
88
+ explanation here, allow me to just briefly state that I do not feel as if I
89
+ want to promote any Google service anymore, for various reasons.
90
+
91
+ Do keep in mind that responding to emails may take some time, depending on
92
+ the amount of work I may have at that moment.
93
+
94
+ In 2022 rubygems.org decided to make 2FA mandatory for every gem owner:
95
+ see https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
96
+
97
+ As I can not use 2FA, for reasons I will skip explaining here (see
98
+ various github issue discussions in the past), this effectively means that
99
+ Betty Li and others who run the show at rubygems.org will perma-ban me
100
+ from using rubygems as a developer.
101
+
102
+ As I disagree with that decision completely, this will mean that all my
103
+ gems will be removed from rubygems.org prior to that sunset date, e. g.
104
+ before they permanently lock me out from the code that I used
105
+ to maintain. It is pointless to want to discuss this with them anymore -
106
+ they have made up their minds and decided that you can only use
107
+ the code if 2FA is in place, even though the code itself works just
108
+ fine. If you don't use 2FA you are effectively locked out from your
109
+ own code; I consider this a malicious attack. See also how they limited
110
+ discussions to people with mandatory 2FA on the ruby-bugtracker, thus
111
+ banning everyone permanently without 2FA:
112
+
113
+ https://bugs.ruby-lang.org/issues/18800
114
+
115
+ Guess it may indeed be time to finally abandon ruby - not because
116
+ ruby is a bad language, but there are people now in charge who
117
+ really should not be part of ruby in the first place.
118
+
data/doc/README.gen ADDED
@@ -0,0 +1,81 @@
1
+ DEFAULT_HEADER
2
+
3
+ # The repackage gem
4
+
5
+ <img src="https://i.imgur.com/7KpnuMj.jpg" style="margin: 0.5em">
6
+
7
+ ## Dependencies of the repackage gem
8
+
9
+ In the past the repackage gem specifically depended on four other
10
+ external projects. In <b>May 2022</b> this mandatory list of
11
+ dependencies has been reduced to just <b>one</b>. However had,
12
+ it is still recommended that two of the other three gems are
13
+ installed as well.
14
+
15
+ The official list of dependencies thus recommended for the
16
+ <b>repackage</b> gem is as follows, in alphabetical order:
17
+
18
+ - colours
19
+ - extracter
20
+ - opn
21
+
22
+ However had, since as of November 2023, the colours gem is now
23
+ optional. If it is installed on your system then it will be
24
+ used; otherwise it will be silently ignored. Colours are nice
25
+ to have, but the repackage gem must also work with colours
26
+ not being available (e. g. the colours gem was NOT installed).
27
+
28
+ ## Clean working directory
29
+
30
+ As far as the **repackage** gem is concerned, a working
31
+ directory is needed to extract an archive. On my home
32
+ system this is:
33
+
34
+ /home/Temp/repackage/
35
+
36
+ For most other users this will be:
37
+
38
+ /tmp/repackage/
39
+
40
+ The reason why such a directory is necessary is so that
41
+ we do not begin to pollute any other directory. Some
42
+ archive files, in particular some .zip files, tend to
43
+ be messy and incorrectly archived, extracting right
44
+ into the current working directory as-is. This is not
45
+ always what the user wants to see.
46
+
47
+ This is specified here in the event that you may wonder
48
+ why there is code that checks for this - we have to
49
+ determine which working directory is to be used.
50
+
51
+ ## The main class
52
+
53
+ This subsection will mention a few noteworthy tidbits about
54
+ the main class of the repackage gem.
55
+
56
+ The name of the class is class **Repackage::Repackage**. The
57
+ constant called <b>DEFAULT_TARGET_FORMAT_TYPE</b> will be
58
+ used to determine initially into which target format the
59
+ class shall repackage an existing archive. By default this will
60
+ be set to the String '.tar.xz', thus meaning that an archive,
61
+ such as .tar.gz, will be repackaged into a .tar.xz archive
62
+ instead.
63
+
64
+ The constant <b>WORKING_DIRECTORY</b> is used to specify
65
+ a distinct working directory. Currently the default will
66
+ be at <b>/tmp/repackage/</b>, but this may be changed.
67
+ On my own home system I am using /home/Temp/repackage/
68
+ instead, for instance. We thus have to preserve some
69
+ flexibility here.
70
+
71
+ ## Executable at bin/repackage
72
+
73
+ Since as of May 2022 there is now an <b>executable</b> called
74
+ <b>repackage</b>. It used to be called <b>repackager</b>,
75
+ but I reconsidered; it seems simpler to remember that the gem
76
+ here is called <b>repackage</b>; then people may easily
77
+ and instantly know that there may be an executable called
78
+ <b>repackage</b>, residing at bin/repackage, rather than
79
+ a file residing at <b>bin/repackager</b>.
80
+
81
+ ADD_CONTACT_INFORMATION
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'repackage/class/constants.rb'
6
+ # =========================================================================== #
7
+ module Repackage
8
+
9
+ class Repackage # === Repackage::Repackage
10
+
11
+ # ========================================================================= #
12
+ # === NAMESPACE
13
+ # ========================================================================= #
14
+ NAMESPACE = inspect
15
+
16
+ # ========================================================================= #
17
+ # === COMMAND_TO_CREATE_A_TAR_XZ_ARCHIVE
18
+ #
19
+ # This is the command that is used when a .tar.xz file is to be created.
20
+ # ========================================================================= #
21
+ COMMAND_TO_CREATE_A_TAR_XZ_ARCHIVE = 'tar -vcJf'
22
+
23
+ # ========================================================================= #
24
+ # === DEFAULT_EXTRACT_TO_THIS_DIRECTORY
25
+ # ========================================================================= #
26
+ if ENV['MY_TEMP']
27
+ DEFAULT_EXTRACT_TO_THIS_DIRECTORY = ENV['MY_TEMP'].to_s+'/repackage/' # Denote where to extract the stuff to.
28
+ else
29
+ DEFAULT_EXTRACT_TO_THIS_DIRECTORY = '/tmp/repackage/'
30
+ end
31
+
32
+ # ========================================================================= #
33
+ # === SHALL_WE_DELETE_THE_OLD_ARCHIVE
34
+ #
35
+ # Remove the old source if this constant is true. Since as of June 2021
36
+ # this defaults to false, except in certain conditions met on my home
37
+ # setup where the variable that keeps track of it is turned to true
38
+ # actually. Most other users will probably never need to change this,
39
+ # though, so the default is to false.
40
+ # ========================================================================= #
41
+ SHALL_WE_DELETE_THE_OLD_ARCHIVE = false
42
+
43
+ # ========================================================================= #
44
+ # === COMMAND_TO_CREATE_A_ZIP_ARCHIVE
45
+ #
46
+ # Command to create a .zip archive.
47
+ # ========================================================================= #
48
+ COMMAND_TO_CREATE_A_ZIP_ARCHIVE = 'zip -r '
49
+
50
+ # ========================================================================= #
51
+ # === COMMAND_TO_CREATE_A_TAR_GZ_ARCHIVE
52
+ #
53
+ # Command to create a .tar.gz archive.
54
+ # ========================================================================= #
55
+ COMMAND_TO_CREATE_A_TAR_GZ_ARCHIVE = 'tar cfvz'
56
+
57
+ # ========================================================================= #
58
+ # === COMMAND_TO_CREATE_A_TAR_BZ2_ARCHIVE
59
+ #
60
+ # Command to create a .tar.bz2 archive.
61
+ # ========================================================================= #
62
+ COMMAND_TO_CREATE_A_TAR_BZ2_ARCHIVE = 'tar cfvj'
63
+
64
+ # ========================================================================= #
65
+ # === DEFAULT_TARGET_FORMAT_TYPE
66
+ #
67
+ # The target format comes here, thus allowing the user to change the
68
+ # default.
69
+ # ========================================================================= #
70
+ DEFAULT_TARGET_FORMAT_TYPE = '.tar.xz' # '.tar.bz2' '.zip'
71
+
72
+ # ========================================================================= #
73
+ # === DELETE_CODE_OF_CONDUCT_FILE_IF_IT_EXISTS
74
+ #
75
+ # The following variable is set to false by default. It has been added
76
+ # in September 2022 because another project (rbt) requires this
77
+ # setting - that is to toggle it on or off.
78
+ # ========================================================================= #
79
+ DELETE_CODE_OF_CONDUCT_FILE_IF_IT_EXISTS = false
80
+
81
+ # ========================================================================= #
82
+ # === LAST_DOWNLOADED_FILE
83
+ # ========================================================================= #
84
+ begin
85
+ require 'wget'
86
+ if Object.const_defined?(:Wget) and Wget.respond_to?(:download_to?)
87
+ LAST_DOWNLOADED_FILE = Wget.download_to?
88
+ end
89
+ rescue LoadError
90
+ LAST_DOWNLOADED_FILE = Dir.home.to_s+'/LAST_DOWNLOADED_FILE.md'
91
+ end
92
+
93
+ end; end