mass-client 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mass-client.rb +30 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 382b38771193f1301f4168e9ea406245d1d43e2480741865a30013bd4a4dffca
|
4
|
+
data.tar.gz: 8081a7280f5e5f895d23f6ba9140cffd2913d147db0be43492fc0e6e8427dbf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9096755864c2375ab83f3044ee7a60f6ce043cf3277d236183f311295ceacfde7d493010e7fe0f34a36d75a823bcd1e327a295318c620719881716c4aefa2eb1
|
7
|
+
data.tar.gz: f779ed0845d547011ad08e174394ac441505d547e4bcc7c77f6a781db71a39e70a4861fd47b290e860bb2602628d553fec10953ca5f76b43f24ee2f4064c121e
|
data/lib/mass-client.rb
CHANGED
@@ -6,6 +6,36 @@ require 'simple_cloud_logging'
|
|
6
6
|
require 'simple_command_line_parser'
|
7
7
|
require 'colorize'
|
8
8
|
|
9
|
+
# mass client configuration
|
10
|
+
module Mass
|
11
|
+
@@js_path
|
12
|
+
@@drownload_path
|
13
|
+
|
14
|
+
def self.set(download_path: )
|
15
|
+
# validate: download_path must be a string or an arrow of strings
|
16
|
+
if download_path.is_a?(String)
|
17
|
+
raise ArgumentError.new("The parameter 'download_path' must be a string or an array of strings.") if download_path.to_s.empty?
|
18
|
+
elsif download_path.is_a?(Array)
|
19
|
+
download_path.each { |p|
|
20
|
+
raise ArgumentError.new("The parameter 'download_path' must be a string or an array of strings.") if p.to_s.empty?
|
21
|
+
}
|
22
|
+
else
|
23
|
+
raise ArgumentError.new("The parameter 'download_path' must be a string or an array of strings.")
|
24
|
+
end
|
25
|
+
|
26
|
+
@@js_path = js_path
|
27
|
+
@@download_path = download_path
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.download_path
|
31
|
+
@@download_path
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.js_path
|
35
|
+
@@js_path
|
36
|
+
end
|
37
|
+
end # module Mass
|
38
|
+
|
9
39
|
# base classes
|
10
40
|
require_relative './/base-line/channel'
|
11
41
|
|