nextbot 1.1.18 → 1.1.20
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/basecommand.rb +6 -3
- data/lib/remotecommand.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae3e4393f9b08c54e0479f202e2ce6d1e03689f0
|
4
|
+
data.tar.gz: 992677b07b7b4ce619533d8fc6dc5da58caea51f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10850f22757eb21e7625decbd1bcabf3944bdfcf4e425ae8579c91e95567b97e4e6ae83d7874e2c89548b42113871a1c192af2f8ee5265a08930b417d70ffed0
|
7
|
+
data.tar.gz: 09e2ace91380e6452317121e5ed21196376c42043bae6fc715ce8458535e7134151391e7c8a1bfc57ee45023afca88308a11ab9b32603bda21ea19e258e10b72
|
data/lib/basecommand.rb
CHANGED
@@ -11,9 +11,10 @@ module BlackStack
|
|
11
11
|
# => be receive the data from an API call.
|
12
12
|
#
|
13
13
|
module BaseCommand
|
14
|
-
|
14
|
+
TYPE_START_BOT = 100 # start browser. params: username
|
15
15
|
TYPE_LOGIN = 110 # login to account. param: social_media (LinkedIn, Facebook, Twitter)
|
16
16
|
TYPE_GOTO = 120 # param: url
|
17
|
+
TYPE_TRAFFIC = 510
|
17
18
|
#TYPE_FIND = 1
|
18
19
|
#TYPE_MOUSE = 2
|
19
20
|
#TYPE_WRITE = 3
|
@@ -32,9 +33,10 @@ module BlackStack
|
|
32
33
|
|
33
34
|
def self.types()
|
34
35
|
[
|
35
|
-
|
36
|
+
TYPE_START_BOT,
|
36
37
|
TYPE_LOGIN,
|
37
38
|
TYPE_GOTO,
|
39
|
+
TYPE_TRAFFIC,
|
38
40
|
#TYPE_FIND,
|
39
41
|
#TYPE_MOUSE,
|
40
42
|
#TYPE_WRITE,
|
@@ -58,9 +60,10 @@ module BlackStack
|
|
58
60
|
end
|
59
61
|
|
60
62
|
def self.typeDescription(n)
|
61
|
-
return "start" if n ==
|
63
|
+
return "start" if n == TYPE_START_BOT
|
62
64
|
return "login" if n == TYPE_LOGIN
|
63
65
|
return "goto" if n == TYPE_GOTO
|
66
|
+
return "traffic" if n == TYPE_TRAFFIC
|
64
67
|
#return "find" if n == TYPE_FIND
|
65
68
|
#return "mouse" if n == TYPE_MOUSE
|
66
69
|
#return "write" if n == TYPE_WRITE
|
data/lib/remotecommand.rb
CHANGED
@@ -38,9 +38,13 @@ module BlackStack
|
|
38
38
|
# => regarding child class, to invoke the "run" method of
|
39
39
|
# => such child class.
|
40
40
|
def create_child()
|
41
|
-
return
|
41
|
+
return RemoteStepStartBot.new(self.browser).build(self.descritor) if self.type == TYPE_START_BOT
|
42
42
|
return RemoteStepLogin.new(self.browser).build(self.descritor) if self.type == TYPE_LOGIN
|
43
43
|
return RemoteStepGoto.new(self.browser).build(self.descritor) if self.type == TYPE_GOTO
|
44
|
+
|
45
|
+
# TODO: add RemoteStepStartScraper
|
46
|
+
# TODO: add RemoteStepTraffic
|
47
|
+
|
44
48
|
#return RemoteStepFind.new(self.browser).build(self.descritor) if self.type == TYPE_FIND
|
45
49
|
#return RemoteStepMouse.new(self.browser).build(self.descritor) if self.type == TYPE_MOUSE
|
46
50
|
#return RemoteStepWrite.new(self.browser).build(self.descritor) if self.type == TYPE_WRITE
|
@@ -67,7 +71,7 @@ module BlackStack
|
|
67
71
|
##################################################################################
|
68
72
|
### RemoteStepStart
|
69
73
|
##################################################################################
|
70
|
-
class
|
74
|
+
class RemoteCommandStartBot < RemoteCommand
|
71
75
|
# run the specified operation for this "type" of "step"
|
72
76
|
def run()
|
73
77
|
# TODO: Code Me!
|