ftp_paradise 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +319 -0
- data/bin/create_remote_directory +9 -0
- data/bin/ftp_get +17 -0
- data/bin/ftp_gtk3 +7 -0
- data/bin/ftp_upload +42 -0
- data/bin/ftp_upload_binary +18 -0
- data/bin/iftp +7 -0
- data/bin/remote_remove +28 -0
- data/doc/README.gen +302 -0
- data/doc/todo/TODO_FOR_FTP_PARADISE_PROJECT.md +79 -0
- data/ftp_paradise.gemspec +122 -0
- data/lib/ftp_paradise.rb +5 -0
- data/lib/ftp_paradise/base/cliner.rb +23 -0
- data/lib/ftp_paradise/base/colours.rb +83 -0
- data/lib/ftp_paradise/base/prototype.rb +171 -0
- data/lib/ftp_paradise/base/reset.rb +29 -0
- data/lib/ftp_paradise/colours/colours.rb +141 -0
- data/lib/ftp_paradise/colours/use_colours.rb +76 -0
- data/lib/ftp_paradise/configuration/configuration.rb +49 -0
- data/lib/ftp_paradise/connection/README.md +1 -0
- data/lib/ftp_paradise/connection/connection.rb +35 -0
- data/lib/ftp_paradise/connection/constants.rb +46 -0
- data/lib/ftp_paradise/connection/data.rb +164 -0
- data/lib/ftp_paradise/connection/debug.rb +78 -0
- data/lib/ftp_paradise/connection/directory_handling.rb +271 -0
- data/lib/ftp_paradise/connection/do_login.rb +108 -0
- data/lib/ftp_paradise/connection/download.rb +86 -0
- data/lib/ftp_paradise/connection/file_handling.rb +174 -0
- data/lib/ftp_paradise/connection/ftp_object.rb +21 -0
- data/lib/ftp_paradise/connection/initialize.rb +88 -0
- data/lib/ftp_paradise/connection/initialize_a_new_net_ftp_object_with_this_url.rb +20 -0
- data/lib/ftp_paradise/connection/is_connected.rb +46 -0
- data/lib/ftp_paradise/connection/misc.rb +474 -0
- data/lib/ftp_paradise/connection/notify.rb +71 -0
- data/lib/ftp_paradise/connection/password.rb +47 -0
- data/lib/ftp_paradise/connection/port.rb +33 -0
- data/lib/ftp_paradise/connection/remote_pwd.rb +72 -0
- data/lib/ftp_paradise/connection/remote_url.rb +164 -0
- data/lib/ftp_paradise/connection/remove.rb +143 -0
- data/lib/ftp_paradise/connection/reset.rb +78 -0
- data/lib/ftp_paradise/connection/run.rb +18 -0
- data/lib/ftp_paradise/connection/set_array_available_hosts.rb +27 -0
- data/lib/ftp_paradise/connection/set_input.rb +18 -0
- data/lib/ftp_paradise/connection/show.rb +153 -0
- data/lib/ftp_paradise/connection/sync_ftp_object_onto_the_main_namespace.rb +24 -0
- data/lib/ftp_paradise/connection/transfer_mode.rb +163 -0
- data/lib/ftp_paradise/connection/upload.rb +253 -0
- data/lib/ftp_paradise/connection/use_default_dataset.rb +40 -0
- data/lib/ftp_paradise/connection/username.rb +42 -0
- data/lib/ftp_paradise/constants/constants.rb +19 -0
- data/lib/ftp_paradise/constants/misc.rb +57 -0
- data/lib/ftp_paradise/constants/namespace.rb +14 -0
- data/lib/ftp_paradise/constants/newline.rb +14 -0
- data/lib/ftp_paradise/constants/roebe.rb +31 -0
- data/lib/ftp_paradise/constants/roebe_ftp_constants.rb +233 -0
- data/lib/ftp_paradise/entry/entry.rb +300 -0
- data/lib/ftp_paradise/gui/gtk2/ftp_paradise.rb +34 -0
- data/lib/ftp_paradise/gui/gtk3/ftp_paradise.rb +34 -0
- data/lib/ftp_paradise/gui/shared_code/ftp_paradise/ftp_paradise_module.rb +709 -0
- data/lib/ftp_paradise/images/connection_image.png +0 -0
- data/lib/ftp_paradise/interactive_ftp/constants.rb +103 -0
- data/lib/ftp_paradise/interactive_ftp/directory_handling.rb +216 -0
- data/lib/ftp_paradise/interactive_ftp/help.rb +50 -0
- data/lib/ftp_paradise/interactive_ftp/initialize.rb +27 -0
- data/lib/ftp_paradise/interactive_ftp/interactive_ftp.rb +998 -0
- data/lib/ftp_paradise/interactive_ftp/main_loop.rb +51 -0
- data/lib/ftp_paradise/interactive_ftp/menu.rb +786 -0
- data/lib/ftp_paradise/interactive_ftp/misc.rb +208 -0
- data/lib/ftp_paradise/interactive_ftp/mode.rb +124 -0
- data/lib/ftp_paradise/interactive_ftp/readline.rb +113 -0
- data/lib/ftp_paradise/interactive_ftp/remove.rb +97 -0
- data/lib/ftp_paradise/interactive_ftp/reset.rb +90 -0
- data/lib/ftp_paradise/interactive_ftp/run.rb +22 -0
- data/lib/ftp_paradise/interactive_ftp/show.rb +184 -0
- data/lib/ftp_paradise/interactive_ftp/upload.rb +90 -0
- data/lib/ftp_paradise/interactive_ftp/user_input.rb +53 -0
- data/lib/ftp_paradise/project/project.rb +64 -0
- data/lib/ftp_paradise/requires/common_basic_requires.rb +14 -0
- data/lib/ftp_paradise/requires/common_external_requires.rb +9 -0
- data/lib/ftp_paradise/requires/require_the_constants.rb +7 -0
- data/lib/ftp_paradise/requires/require_the_ftp_paradise_project.rb +18 -0
- data/lib/ftp_paradise/requires/require_the_ftp_paradise_project_with_the_GUI_bindings.rb +10 -0
- data/lib/ftp_paradise/requires/require_the_toplevel_methods.rb +24 -0
- data/lib/ftp_paradise/toplevel_methods/can_connect_to_remote_site.rb +28 -0
- data/lib/ftp_paradise/toplevel_methods/clear_user_dataset.rb +28 -0
- data/lib/ftp_paradise/toplevel_methods/connect.rb +50 -0
- data/lib/ftp_paradise/toplevel_methods/data.rb +31 -0
- data/lib/ftp_paradise/toplevel_methods/determine_user_dataset_from_this_hash.rb +37 -0
- data/lib/ftp_paradise/toplevel_methods/directory_related_actions.rb +33 -0
- data/lib/ftp_paradise/toplevel_methods/e.rb +16 -0
- data/lib/ftp_paradise/toplevel_methods/file_related_actions.rb +49 -0
- data/lib/ftp_paradise/toplevel_methods/ftp_object.rb +270 -0
- data/lib/ftp_paradise/toplevel_methods/is_on_roebe.rb +20 -0
- data/lib/ftp_paradise/toplevel_methods/login_name.rb +49 -0
- data/lib/ftp_paradise/toplevel_methods/misc.rb +16 -0
- data/lib/ftp_paradise/toplevel_methods/opn.rb +24 -0
- data/lib/ftp_paradise/toplevel_methods/password.rb +50 -0
- data/lib/ftp_paradise/toplevel_methods/port.rb +41 -0
- data/lib/ftp_paradise/toplevel_methods/rds.rb +18 -0
- data/lib/ftp_paradise/toplevel_methods/remote_url.rb +57 -0
- data/lib/ftp_paradise/toplevel_methods/time.rb +45 -0
- data/lib/ftp_paradise/toplevel_methods/upload_and_download.rb +108 -0
- data/lib/ftp_paradise/version/version.rb +19 -0
- data/lib/ftp_paradise/www/public/css/style.css +3 -0
- data/lib/ftp_paradise/www/sinatra_web_interface.rb +242 -0
- data/lib/ftp_paradise/www/views/index.slim +3 -0
- data/lib/ftp_paradise/www/views/layout.slim +11 -0
- data/lib/ftp_paradise/www/web_interface.cgi +34 -0
- data/lib/ftp_paradise/yaml/automatically_connect_on_startup_of_the_interactive_ftp_shell.yml +1 -0
- data/lib/ftp_paradise/yaml/debug.yml +1 -0
- data/lib/ftp_paradise/yaml/open_in_default_editor.yml +1 -0
- data/lib/ftp_paradise/yaml/show_full_names.yml +1 -0
- data/lib/ftp_paradise/yaml/use_colours.yml +1 -0
- data/test/testing_ftp_paradise.rb +94 -0
- data/test/testing_minimal_pure_net_ftp_example_to_connect.rb +28 -0
- data/test/testing_the_ftp_connection_component.rb +70 -0
- data/test/testing_upload_a_local_directory.rb +10 -0
- metadata +336 -0
data/lib/ftp_paradise.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'ftp_paradise/base/cliner.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module FtpParadise
|
8
|
+
|
9
|
+
module Base
|
10
|
+
|
11
|
+
require 'ftp_paradise/requires/common_external_requires.rb'
|
12
|
+
# =========================================================================== #
|
13
|
+
# === cliner
|
14
|
+
# =========================================================================== #
|
15
|
+
def cliner
|
16
|
+
Cliner.cliner
|
17
|
+
if block_given?
|
18
|
+
yield
|
19
|
+
Cliner.cliner
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end; end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'ftp_paradise/base/colours.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module FtpParadise
|
8
|
+
|
9
|
+
module Base
|
10
|
+
|
11
|
+
require 'ftp_paradise/colours/colours.rb'
|
12
|
+
|
13
|
+
# ========================================================================= #
|
14
|
+
# === swarn
|
15
|
+
# ========================================================================= #
|
16
|
+
def swarn(i = '')
|
17
|
+
return ::FtpParadise.swarn(i) if use_colours?
|
18
|
+
i
|
19
|
+
end
|
20
|
+
|
21
|
+
# ========================================================================= #
|
22
|
+
# === sfile
|
23
|
+
# ========================================================================= #
|
24
|
+
def sfile(i = '')
|
25
|
+
return ::FtpParadise.sfile(i) if use_colours?
|
26
|
+
i
|
27
|
+
end
|
28
|
+
|
29
|
+
# ========================================================================= #
|
30
|
+
# === sfancy
|
31
|
+
# ========================================================================= #
|
32
|
+
def sfancy(i = '')
|
33
|
+
return ::FtpParadise.sfancy(i) if use_colours?
|
34
|
+
i
|
35
|
+
end
|
36
|
+
|
37
|
+
# ========================================================================= #
|
38
|
+
# === sdir
|
39
|
+
# ========================================================================= #
|
40
|
+
def sdir(i = '')
|
41
|
+
return ::FtpParadise.sdir(i) if use_colours?
|
42
|
+
i
|
43
|
+
end
|
44
|
+
|
45
|
+
# ========================================================================= #
|
46
|
+
# === simp
|
47
|
+
# ========================================================================= #
|
48
|
+
def simp(i = '')
|
49
|
+
return ::FtpParadise.simp(i) if use_colours?
|
50
|
+
i
|
51
|
+
end; alias simportant simp # === simportant
|
52
|
+
|
53
|
+
# ========================================================================= #
|
54
|
+
# === orange
|
55
|
+
# ========================================================================= #
|
56
|
+
def orange(i = '')
|
57
|
+
return ::Colours.orange(i) if use_colours?
|
58
|
+
i
|
59
|
+
end
|
60
|
+
|
61
|
+
# ========================================================================= #
|
62
|
+
# === sandybrown
|
63
|
+
# ========================================================================= #
|
64
|
+
def sandybrown(i = '')
|
65
|
+
return ::Colours.sandybrown(i) if use_colours?
|
66
|
+
i
|
67
|
+
end
|
68
|
+
|
69
|
+
# ========================================================================= #
|
70
|
+
# === royalblue
|
71
|
+
# ========================================================================= #
|
72
|
+
def royalblue(i = '')
|
73
|
+
FtpParadise.royalblue(i)
|
74
|
+
end
|
75
|
+
|
76
|
+
# ========================================================================= #
|
77
|
+
# === slateblue
|
78
|
+
# ========================================================================= #
|
79
|
+
def slateblue(i = '')
|
80
|
+
FtpParadise.slateblue(i)
|
81
|
+
end
|
82
|
+
|
83
|
+
end; end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'ftp_paradise/base/prototype.rb'
|
6
|
+
# include ::FtpParadise::Base
|
7
|
+
# =========================================================================== #
|
8
|
+
require 'ftp_paradise/constants/constants.rb'
|
9
|
+
# =========================================================================== #
|
10
|
+
# The next .rb file will pull in "cliner":
|
11
|
+
# =========================================================================== #
|
12
|
+
require 'ftp_paradise/requires/common_external_requires.rb'
|
13
|
+
|
14
|
+
module FtpParadise
|
15
|
+
|
16
|
+
module Base
|
17
|
+
|
18
|
+
# ========================================================================= #
|
19
|
+
# The various project's toplevel_methods files are required next:
|
20
|
+
# ========================================================================= #
|
21
|
+
require 'ftp_paradise/requires/require_the_toplevel_methods.rb'
|
22
|
+
|
23
|
+
# =========================================================================== #
|
24
|
+
# Colour support comes next:
|
25
|
+
# =========================================================================== #
|
26
|
+
require 'ftp_paradise/base/colours.rb'
|
27
|
+
require 'ftp_paradise/base/cliner.rb'
|
28
|
+
require 'ftp_paradise/base/reset.rb'
|
29
|
+
|
30
|
+
# ========================================================================= #
|
31
|
+
# === N
|
32
|
+
# ========================================================================= #
|
33
|
+
N = "\n"
|
34
|
+
|
35
|
+
# ========================================================================= #
|
36
|
+
# === be_verbose?
|
37
|
+
# ========================================================================= #
|
38
|
+
def be_verbose?
|
39
|
+
@internal_hash[:be_verbose]
|
40
|
+
end
|
41
|
+
|
42
|
+
# ========================================================================= #
|
43
|
+
# === be_quiet
|
44
|
+
# ========================================================================= #
|
45
|
+
def be_quiet
|
46
|
+
@internal_hash[:be_verbose] = false
|
47
|
+
end; alias be_silent be_quiet # === be_silent
|
48
|
+
|
49
|
+
# ========================================================================= #
|
50
|
+
# === set_be_verbose
|
51
|
+
#
|
52
|
+
# Set the verbosity mode.
|
53
|
+
# ========================================================================= #
|
54
|
+
def set_be_verbose(i = true)
|
55
|
+
@internal_hash[:be_verbose] = i
|
56
|
+
end; alias be_verbose= set_be_verbose # === be_verbose=
|
57
|
+
alias be_verbose set_be_verbose # === be_verbose
|
58
|
+
|
59
|
+
# ========================================================================= #
|
60
|
+
# === opnn
|
61
|
+
# ========================================================================= #
|
62
|
+
def opnn(i = NAMESPACE)
|
63
|
+
if i.is_a? String
|
64
|
+
i = { namespace: i }
|
65
|
+
end
|
66
|
+
FtpParadise.opnn(i)
|
67
|
+
end
|
68
|
+
|
69
|
+
# ========================================================================= #
|
70
|
+
# === rds
|
71
|
+
# ========================================================================= #
|
72
|
+
def rds(i = '')
|
73
|
+
FtpParadise.rds(i)
|
74
|
+
end
|
75
|
+
|
76
|
+
# ========================================================================= #
|
77
|
+
# === touch
|
78
|
+
# ========================================================================= #
|
79
|
+
def touch(i = '')
|
80
|
+
FtpParadise.touch(i)
|
81
|
+
end
|
82
|
+
|
83
|
+
# ========================================================================= #
|
84
|
+
# === get_files
|
85
|
+
# ========================================================================= #
|
86
|
+
def get_files(i = '')
|
87
|
+
FtpParadise.get_files(i)
|
88
|
+
end
|
89
|
+
|
90
|
+
# ========================================================================= #
|
91
|
+
# === return_all_local_entries
|
92
|
+
#
|
93
|
+
# This will return an array.
|
94
|
+
# ========================================================================= #
|
95
|
+
def return_all_local_entries(
|
96
|
+
from_where = Dir.pwd
|
97
|
+
)
|
98
|
+
Dir["#{from_where}/**/**"]
|
99
|
+
end; alias return_directory_content return_all_local_entries # === return_directory_content
|
100
|
+
|
101
|
+
# ========================================================================= #
|
102
|
+
# === e
|
103
|
+
# ========================================================================= #
|
104
|
+
def e(i = '')
|
105
|
+
FtpParadise.e(i)
|
106
|
+
end
|
107
|
+
|
108
|
+
# ========================================================================= #
|
109
|
+
# === use_colours?
|
110
|
+
# ========================================================================= #
|
111
|
+
def use_colours?
|
112
|
+
@internal_hash[:use_colours]
|
113
|
+
end
|
114
|
+
|
115
|
+
# ========================================================================= #
|
116
|
+
# === parens (parens tag)
|
117
|
+
# ========================================================================= #
|
118
|
+
def parens(i)
|
119
|
+
padding_to_use = ' ' * 5
|
120
|
+
return sfancy("#{padding_to_use}(#{i}) ")
|
121
|
+
end
|
122
|
+
|
123
|
+
# ========================================================================= #
|
124
|
+
# === pound_token
|
125
|
+
#
|
126
|
+
# Simply return a colourized pound token next, but only if we use colours.
|
127
|
+
# ========================================================================= #
|
128
|
+
def pound_token
|
129
|
+
_ = '# '
|
130
|
+
if use_colours?
|
131
|
+
return "#{Colours::CYAN}#{_}#{Colours::WHITE}"
|
132
|
+
end
|
133
|
+
_
|
134
|
+
end
|
135
|
+
|
136
|
+
# ========================================================================= #
|
137
|
+
# === on_roebe?
|
138
|
+
# ========================================================================= #
|
139
|
+
def on_roebe?
|
140
|
+
ENV['IS_ROEBE'].to_s == '1'
|
141
|
+
end; alias are_we_on_roebe? on_roebe? # === are_we_on_roebe?
|
142
|
+
|
143
|
+
# ========================================================================= #
|
144
|
+
# === return_time
|
145
|
+
# ========================================================================= #
|
146
|
+
def return_time
|
147
|
+
FtpParadise.return_time
|
148
|
+
end
|
149
|
+
|
150
|
+
# ========================================================================= #
|
151
|
+
# === do_use_colours
|
152
|
+
# ========================================================================= #
|
153
|
+
def do_use_colours
|
154
|
+
@internal_hash[:use_colours] = true
|
155
|
+
end
|
156
|
+
|
157
|
+
# ========================================================================= #
|
158
|
+
# === cd
|
159
|
+
# ========================================================================= #
|
160
|
+
def cd(i)
|
161
|
+
Dir.chdir(i) if File.directory? i
|
162
|
+
end; alias change_local_directory cd # === change_local_directory
|
163
|
+
|
164
|
+
# ========================================================================= #
|
165
|
+
# === return_pwd
|
166
|
+
# ========================================================================= #
|
167
|
+
def return_pwd
|
168
|
+
::FtpParadise.return_pwd.to_s
|
169
|
+
end; alias return_current_directory return_pwd # === return_current_directory
|
170
|
+
|
171
|
+
end; end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'ftp_paradise/base/reset.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module FtpParadise
|
8
|
+
|
9
|
+
module Base
|
10
|
+
|
11
|
+
# ========================================================================= #
|
12
|
+
# === reset
|
13
|
+
# ========================================================================= #
|
14
|
+
def reset
|
15
|
+
# ======================================================================= #
|
16
|
+
# === @internal_hash
|
17
|
+
# ======================================================================= #
|
18
|
+
@internal_hash = {}
|
19
|
+
# ======================================================================= #
|
20
|
+
# === :use_colours
|
21
|
+
# ======================================================================= #
|
22
|
+
@internal_hash[:use_colours] = true
|
23
|
+
# ======================================================================= #
|
24
|
+
# === :be_verbose
|
25
|
+
# ======================================================================= #
|
26
|
+
@internal_hash[:be_verbose] = true
|
27
|
+
end
|
28
|
+
|
29
|
+
end; end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen-string-literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# This file will add colour-related methods to the ftp_paradise project.
|
6
|
+
# =========================================================================== #
|
7
|
+
# require 'ftp_paradise/colours/colours.rb'
|
8
|
+
# =========================================================================== #
|
9
|
+
module FtpParadise
|
10
|
+
|
11
|
+
require 'ftp_paradise/colours/use_colours.rb'
|
12
|
+
|
13
|
+
# ========================================================================= #
|
14
|
+
# === rev
|
15
|
+
# ========================================================================= #
|
16
|
+
def rev
|
17
|
+
return Colours.rev if use_colours?
|
18
|
+
return ''
|
19
|
+
end
|
20
|
+
|
21
|
+
# ========================================================================= #
|
22
|
+
# === FtpParadise.sdir
|
23
|
+
# ========================================================================= #
|
24
|
+
def self.sdir(i)
|
25
|
+
return Colours.sdir(i) if use_colours?
|
26
|
+
i
|
27
|
+
end
|
28
|
+
|
29
|
+
# ========================================================================= #
|
30
|
+
# === FtpParadise.swarn
|
31
|
+
# ========================================================================= #
|
32
|
+
def self.swarn(i)
|
33
|
+
return Colours.swarn(i) if use_colours?
|
34
|
+
return i
|
35
|
+
end
|
36
|
+
|
37
|
+
# ========================================================================= #
|
38
|
+
# === FtpParadise.sfile
|
39
|
+
# ========================================================================= #
|
40
|
+
def self.sfile(i)
|
41
|
+
return Colours.sfile(i) if use_colours?
|
42
|
+
return i
|
43
|
+
end
|
44
|
+
|
45
|
+
# ========================================================================= #
|
46
|
+
# === FtpParadise.sfancy
|
47
|
+
# ========================================================================= #
|
48
|
+
def self.sfancy(i)
|
49
|
+
return Colours.sfancy(i) if use_colours? # Else we won't modify this at all.
|
50
|
+
return i
|
51
|
+
end
|
52
|
+
|
53
|
+
# ========================================================================= #
|
54
|
+
# === FtpParadise.simp
|
55
|
+
# ========================================================================= #
|
56
|
+
def self.simp(i)
|
57
|
+
return Colours.simp(i) if use_colours? # Else we won't modify this.
|
58
|
+
return i
|
59
|
+
end
|
60
|
+
|
61
|
+
# ========================================================================= #
|
62
|
+
# === sfancy
|
63
|
+
# ========================================================================= #
|
64
|
+
def sfancy(i)
|
65
|
+
FtpParadise.sfancy(i) # We can delegate here, because FtpParadise.sfancy() will take care of colours.
|
66
|
+
end
|
67
|
+
|
68
|
+
# ========================================================================= #
|
69
|
+
# === simp
|
70
|
+
# ========================================================================= #
|
71
|
+
def simp(i) # Link to FtpParadise.simp
|
72
|
+
FtpParadise.simp(i) # We can delegate here, because FtpParadise.sfancy will take care of colours.
|
73
|
+
end
|
74
|
+
|
75
|
+
# ========================================================================= #
|
76
|
+
# === sdir
|
77
|
+
# ========================================================================= #
|
78
|
+
def sdir(i)
|
79
|
+
FtpParadise.sdir(i)
|
80
|
+
end
|
81
|
+
|
82
|
+
# ========================================================================= #
|
83
|
+
# === sfile
|
84
|
+
# ========================================================================= #
|
85
|
+
def sfile(i)
|
86
|
+
FtpParadise.sfile(i)
|
87
|
+
end
|
88
|
+
|
89
|
+
# ========================================================================= #
|
90
|
+
# === swarn
|
91
|
+
# ========================================================================= #
|
92
|
+
def swarn(i)
|
93
|
+
FtpParadise.swarn(i)
|
94
|
+
end
|
95
|
+
|
96
|
+
# ========================================================================= #
|
97
|
+
# === FtpParadise.lightyellow
|
98
|
+
# ========================================================================= #
|
99
|
+
def self.lightyellow(i = '')
|
100
|
+
if use_colours?
|
101
|
+
return ::Colours.lightyellow(i)
|
102
|
+
end
|
103
|
+
return "#{Colours.yellow}#{i}#{Colours.rev}"
|
104
|
+
end; self.instance_eval { alias yellow lightyellow } # === FtpParadise.lightyellow
|
105
|
+
|
106
|
+
# ========================================================================= #
|
107
|
+
# === FtpParadise.royalblue
|
108
|
+
# ========================================================================= #
|
109
|
+
def self.royalblue(i = '')
|
110
|
+
if use_colours?
|
111
|
+
return ::Colours.royalblue(i)
|
112
|
+
end
|
113
|
+
return i
|
114
|
+
end
|
115
|
+
|
116
|
+
# ========================================================================= #
|
117
|
+
# === FtpParadise.slateblue
|
118
|
+
# ========================================================================= #
|
119
|
+
def self.slateblue(i = '')
|
120
|
+
if use_colours?
|
121
|
+
return ::Colours.slateblue(i)
|
122
|
+
end
|
123
|
+
return i
|
124
|
+
end
|
125
|
+
|
126
|
+
# ========================================================================= #
|
127
|
+
# === FtpParadise.testing_colours (colour test, testing colours)
|
128
|
+
#
|
129
|
+
# This just is a test whether we use colours or whether we won't.
|
130
|
+
# ========================================================================= #
|
131
|
+
def self.testing_colours
|
132
|
+
e 'We will now test some colours.'
|
133
|
+
e "Will we use colours? #{FtpParadise.use_colours?.to_s}"
|
134
|
+
e 'Testing '+sfancy('sfancy')+' next.'
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
if __FILE__ == $PROGRAM_NAME
|
140
|
+
puts FtpParadise.swarn('Oh noes!')
|
141
|
+
end
|