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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b39f31660fea8f755f7e46e103a528b16a8bba380ff779b3c6dae51667ff92e6
4
- data.tar.gz: c0314095bca0797e71f463734f2029e6e1e0c57dbd392fc77bcb014036b68e10
3
+ metadata.gz: 382b38771193f1301f4168e9ea406245d1d43e2480741865a30013bd4a4dffca
4
+ data.tar.gz: 8081a7280f5e5f895d23f6ba9140cffd2913d147db0be43492fc0e6e8427dbf0
5
5
  SHA512:
6
- metadata.gz: c3cc9ac5feba39b3c8a633ddbe53e0c35655be0b6b8ddee596e46c98bf675883e3ccecd044368f84a4259b62119f9071d10e4f935ac3717b33ebd9ed380c5667
7
- data.tar.gz: 87e82ad60b280a35f650f0c22f4a6b41a6fff921cd73afa785423e8f92abbd218951d184a4b1229d57558df543bfbd2d104024f3233bd087cf9d4de523e8cfbd
6
+ metadata.gz: 9096755864c2375ab83f3044ee7a60f6ce043cf3277d236183f311295ceacfde7d493010e7fe0f34a36d75a823bcd1e327a295318c620719881716c4aefa2eb1
7
+ data.tar.gz: f779ed0845d547011ad08e174394ac441505d547e4bcc7c77f6a781db71a39e70a4861fd47b290e860bb2602628d553fec10953ca5f76b43f24ee2f4064c121e
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mass-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi