mass-client 1.0.3 → 1.0.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 +4 -4
- data/lib/base-line/profile.rb +0 -1
- 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/base-line/profile.rb
CHANGED
@@ -23,7 +23,6 @@ module Mass
|
|
23
23
|
def child_class_instance
|
24
24
|
profile_type = self.desc['profile_type']
|
25
25
|
key = self.class_name_from_profile_type
|
26
|
-
binding.pry
|
27
26
|
raise "Source code of profile type #{profile_type} not found. Create a class #{key} in the folder `/lib` of your mass-sdk." unless Kernel.const_defined?(key)
|
28
27
|
ret = Kernel.const_get(key).new(self.desc)
|
29
28
|
return ret
|
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
|
|