dyntool 0.0.12 → 0.0.13

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.
Files changed (2) hide show
  1. data/lib/dyntool.rb +20 -1
  2. metadata +3 -3
data/lib/dyntool.rb CHANGED
@@ -47,7 +47,7 @@ class LoadConfig
47
47
  end
48
48
  end
49
49
  ## Getting authentication creds from users
50
- class Authentication
50
+ class Utils
51
51
  # Getting creds from user to authenticate upon dyn
52
52
  def AuthUser()
53
53
  @creds = []
@@ -92,6 +92,25 @@ class Parameters
92
92
  @sconf.SetConfFile
93
93
  @sconf.GetHandler
94
94
  end
95
+ def SendEvent(user,suffix)
96
+ @data = []
97
+ @flag = "false"
98
+ @ARGV.each do |arg|
99
+ @data << "#{arg} "
100
+ end
101
+ @data << " #{user}"
102
+ @dcs = @sconf.GetDcs
103
+ @dcs.each do |dc|
104
+ @result = `echo "Key73512383ghtyA1109 #{@data} " | nc -w 1 obevent.#{dc}.#{suffix} 7279 2> /dev/null`
105
+ if @result == "accepted"
106
+ @flag = "true"
107
+ break
108
+ end
109
+ end
110
+ if @flag == "false"
111
+ abort("You are not connected to outbrain network / cant send event to obevent, aborting...")
112
+ end
113
+ end
95
114
  # Opening Session to dyn using creds from the command line
96
115
  def OpenTheSession(customer,user,password)
97
116
  puts "opening a session to DYN"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 12
9
- version: 0.0.12
8
+ - 13
9
+ version: 0.0.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ariel Moskovich
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-09-08 00:00:00 +03:00
17
+ date: 2013-09-14 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20