mass-client 1.0.4 → 1.0.7
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/first-line/profile_rpa.rb +1 -1
- data/lib/mass-client.rb +30 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 516f971998927cf0c00eb5f178dc55b16169c8b734aad1708c5dff40f3fcadd9
|
4
|
+
data.tar.gz: d9c1f7850104f456e77b9f0bd45bde755d4e462a7784a730846597f3aa1fa093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b483b1f1470e9234a6c094ed92afc9b67019e682e4c73a6d2b957ffd914e8f25ec1fd45ac91952e1f6d1344edd1d70592a8d3ea421ef323be2a48491a2184c44
|
7
|
+
data.tar.gz: eb860c40120d287ee1f7c1f7e7bbd6dd6e82aa73a36b313d91c0dda15cef86b99475c16c651d3f2798b30f1e2ff6768d86815bc13daf7add322fd982fc1036df
|
@@ -324,7 +324,7 @@ module Mass
|
|
324
324
|
# call ls command to get array of files in the folder
|
325
325
|
# iterate all the *.js files inside the folder $RUBYLIB/extensions/mass.subaccount/js
|
326
326
|
js2 = ''
|
327
|
-
filenames = `ls #{
|
327
|
+
filenames = `ls #{Mass.js_path}/*.js`.split("\n")
|
328
328
|
filenames.each { |filename|
|
329
329
|
# Get the source code of the scraper
|
330
330
|
js2 += `cat #{filename}`
|
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(js_path:, 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.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
@@ -76,20 +76,20 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 1.2.
|
79
|
+
version: 1.2.20
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.2.
|
82
|
+
version: 1.2.20
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.2.
|
89
|
+
version: 1.2.20
|
90
90
|
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 1.2.
|
92
|
+
version: 1.2.20
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: colorize
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|