trisulrp 1.2.2
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.
- data/.document +5 -0
- data/Gemfile +13 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +54 -0
- data/VERSION +1 -0
- data/examples/strp.rb +38 -0
- data/lib/trisulrp.rb +15 -0
- data/lib/trp.pb.rb +541 -0
- data/lib/trp.proto +462 -0
- data/lib/trplib.rb +333 -0
- data/test/Demo_Client.crt +71 -0
- data/test/Demo_Client.key +18 -0
- data/test/helper.rb +18 -0
- data/test/test_trisulrp.rb +7 -0
- data/trisulrp.gemspec +76 -0
- metadata +176 -0
data/lib/trplib.rb
ADDED
@@ -0,0 +1,333 @@
|
|
1
|
+
# TRP Helper functions
|
2
|
+
#
|
3
|
+
# dependency = ruby_protobuf
|
4
|
+
#
|
5
|
+
# Akhil.M & Dhinesh.K (c) 2010 Unleash Networks
|
6
|
+
|
7
|
+
require 'openssl'
|
8
|
+
require 'socket'
|
9
|
+
require 'time'
|
10
|
+
require 'trp.pb'
|
11
|
+
|
12
|
+
module TRPLib
|
13
|
+
|
14
|
+
# dispatch and get trp response
|
15
|
+
def get_trp_response(trp_socket,trp_request)
|
16
|
+
|
17
|
+
outbuf=""
|
18
|
+
outbuf=trp_request.serialize_to_string
|
19
|
+
trp_socket.write([outbuf.length].pack("N*"))
|
20
|
+
trp_socket.write(outbuf)
|
21
|
+
inbuf = trp_socket.read(4)
|
22
|
+
buflenarr=inbuf.unpack("N*")
|
23
|
+
datalen=buflenarr[0]
|
24
|
+
dataarray=trp_socket.read(datalen)
|
25
|
+
resp =TRP::Message.new
|
26
|
+
resp.parse dataarray
|
27
|
+
yield resp if block_given?
|
28
|
+
return resp
|
29
|
+
end
|
30
|
+
|
31
|
+
def connect_trp(server,port,client_cert_file,client_key_file)
|
32
|
+
tcp_sock=TCPSocket.open(server,port)
|
33
|
+
ctx = OpenSSL::SSL::SSLContext.new
|
34
|
+
ctx.cert = OpenSSL::X509::Certificate.new(File.read(client_cert_file))
|
35
|
+
ctx.key = OpenSSL::PKey::RSA.new(File.read(client_key_file))
|
36
|
+
ssl_sock = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx)
|
37
|
+
ssl_sock.connect
|
38
|
+
yield ssl_sock if block_given?
|
39
|
+
return ssl_sock
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
# creates a counter item request message by filling in the
|
45
|
+
# protobuf
|
46
|
+
def mk_counter_item_request(guid,key,time_from,time_to)
|
47
|
+
|
48
|
+
# create a new command of type CounterItemRequest
|
49
|
+
msg =TRP::Message.new
|
50
|
+
msg.trp_command = TRP::Message::Command::COUNTER_ITEM_REQUEST
|
51
|
+
msg.counter_item_request =TRP:: CounterItemRequest.new
|
52
|
+
cir_msg=msg.counter_item_request
|
53
|
+
|
54
|
+
# fill in basic info
|
55
|
+
cir_msg.context =0
|
56
|
+
cir_msg.counter_group=guid
|
57
|
+
cir_msg.meter=0
|
58
|
+
cir_msg.key=key
|
59
|
+
|
60
|
+
# fill in time_interval
|
61
|
+
cir_msg.time_interval=TRP::TimeInterval.new
|
62
|
+
tint=cir_msg.time_interval
|
63
|
+
tint.from=TRP::Timestamp.new
|
64
|
+
tint.from.tv_sec=time_from.tv_sec
|
65
|
+
tint.from.tv_usec=0
|
66
|
+
tint.to=TRP::Timestamp.new
|
67
|
+
tint.to.tv_sec=time_to.tv_sec
|
68
|
+
tint.to.tv_usec=0
|
69
|
+
return msg
|
70
|
+
end
|
71
|
+
|
72
|
+
# print stats
|
73
|
+
def print_counter_item_response(resp_in)
|
74
|
+
|
75
|
+
resp=resp_in.counter_item_response
|
76
|
+
p "---------------------"
|
77
|
+
p "Counter Item Response"
|
78
|
+
p "---------------------"
|
79
|
+
p "Key = " + resp.stats.key
|
80
|
+
p "CounterGroup = " + resp.stats.counter_group
|
81
|
+
p "Context = #{ resp.stats.context}"
|
82
|
+
resp.stats.meters.each do |meter|
|
83
|
+
p "Meter = #{meter.meter }"
|
84
|
+
meter.values.each do |stats_tuple|
|
85
|
+
print Time.at(stats_tuple.ts.tv_sec)
|
86
|
+
print "#{stats_tuple.val }".rjust(16)
|
87
|
+
print "\n"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
def mk_counter_group_info_request(guid)
|
94
|
+
|
95
|
+
# create a new command of type CounterGroupInfoRequest
|
96
|
+
|
97
|
+
msg =TRP::Message.new
|
98
|
+
msg.trp_command = TRP::Message::Command::COUNTER_GROUP_INFO_REQUEST
|
99
|
+
msg.counter_group_info_request =TRP:: CounterGroupInfoRequest.new
|
100
|
+
cgir_msg=msg.counter_group_info_request
|
101
|
+
|
102
|
+
# fill in basic info
|
103
|
+
|
104
|
+
cgir_msg.context =0
|
105
|
+
cgir_msg.counter_group=guid
|
106
|
+
return msg
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
def print_counter_group_info_response(resp_in)
|
112
|
+
|
113
|
+
resp=resp_in.counter_group_info_response
|
114
|
+
|
115
|
+
p "----------------------------"
|
116
|
+
p "Counter Group Info Response"
|
117
|
+
p "----------------------------"
|
118
|
+
p "Context = #{ resp.context}"
|
119
|
+
resp.group_details.each do |group_detail|
|
120
|
+
p "Name = #{ group_detail.name}"
|
121
|
+
p "Guid = " + group_detail.guid
|
122
|
+
p "Bucket Size = #{ group_detail.bucket_size}"
|
123
|
+
p Time.at(group_detail.time_interval.from.tv_sec)
|
124
|
+
p Time.at(group_detail.time_interval.to.tv_sec)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
def mk_session_group_request()
|
131
|
+
|
132
|
+
# create a new command of type CounterItemRequest
|
133
|
+
msg =TRP::Message.new
|
134
|
+
msg.trp_command = TRP::Message::Command::SESSION_GROUP_REQUEST
|
135
|
+
msg.session_group_request =TRP:: SessionGroupRequest.new
|
136
|
+
sgr_msg=msg.session_group_request
|
137
|
+
|
138
|
+
# fill in basic info
|
139
|
+
sgr_msg.context =0
|
140
|
+
sgr_msg.maxitems=100
|
141
|
+
sgr_msg.tracker_id=1
|
142
|
+
sgr_msg.session_group="{99A78737-4B41-4387-8F31-8077DB917336}"
|
143
|
+
|
144
|
+
return msg
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
def print_session_group_response(resp_in)
|
149
|
+
|
150
|
+
resp=resp_in.session_group_response
|
151
|
+
|
152
|
+
p "----------------------------"
|
153
|
+
p "Session Group Response"
|
154
|
+
p "----------------------------"
|
155
|
+
p "Context = #{ resp.context}"
|
156
|
+
p "Session Group = " + resp.session_group
|
157
|
+
resp.session_keys.each do |session_key|
|
158
|
+
p "Session Key = " + session_key
|
159
|
+
end
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
# creates a counter group request message by filling in the
|
164
|
+
# protobuf
|
165
|
+
|
166
|
+
def mk_counter_group_request(guid,time_from,time_to,time_instant)
|
167
|
+
|
168
|
+
# create a new command of type CounterGroupRequest
|
169
|
+
msg =TRP::Message.new
|
170
|
+
msg.trp_command = TRP::Message::Command::COUNTER_GROUP_REQUEST
|
171
|
+
msg.counter_group_request =TRP:: CounterGroupRequest.new
|
172
|
+
cir_msg=msg.counter_group_request
|
173
|
+
|
174
|
+
# fill in basic info
|
175
|
+
cir_msg.context =0
|
176
|
+
cir_msg.counter_group=guid
|
177
|
+
cir_msg.meter=0
|
178
|
+
cir_msg.maxitems=20
|
179
|
+
|
180
|
+
|
181
|
+
# fill in time_interval
|
182
|
+
cir_msg.time_interval=TRP::TimeInterval.new
|
183
|
+
tint=cir_msg.time_interval
|
184
|
+
tint.from=TRP::Timestamp.new
|
185
|
+
tint.from.tv_sec=time_from.tv_sec
|
186
|
+
tint.from.tv_usec=0
|
187
|
+
tint.to=TRP::Timestamp.new
|
188
|
+
tint.to.tv_sec=time_to.tv_sec
|
189
|
+
tint.to.tv_usec=0
|
190
|
+
|
191
|
+
#fill in time_instant
|
192
|
+
#cir_msg.time_instant=TRP::Timestamp.new
|
193
|
+
#cir_msg.time_instant.tv_sec=time_instant.tv_sec+1000
|
194
|
+
#cir_msg.time_instant.tv_usec=0
|
195
|
+
return msg
|
196
|
+
end
|
197
|
+
|
198
|
+
# print response
|
199
|
+
|
200
|
+
def print_counter_group_response(resp_in)
|
201
|
+
resp=resp_in.counter_group_response
|
202
|
+
p "..........................."
|
203
|
+
p "Counter Group Response"
|
204
|
+
p "---------------------"
|
205
|
+
p "Context = #{ resp.context}"
|
206
|
+
p "CounterGroup = " + resp.counter_group
|
207
|
+
p "Meters= #{resp.meter}"
|
208
|
+
resp.keys.each do|key|
|
209
|
+
p "key => " + key.label
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
def mk_key_session_activity_request(key,time_from,time_to)
|
214
|
+
|
215
|
+
# create a new command of type CounterItemRequest
|
216
|
+
msg =TRP::Message.new
|
217
|
+
msg.trp_command = TRP::Message::Command::KEY_SESS_ACTIVITY_REQUEST
|
218
|
+
msg.key_session_activity_request =TRP::KeySessionActivityRequest.new
|
219
|
+
ksar_msg=msg.key_session_activity_request
|
220
|
+
|
221
|
+
# fill in basic info
|
222
|
+
ksar_msg.context =0
|
223
|
+
ksar_msg.maxitems=100
|
224
|
+
ksar_msg.session_group="{99A78737-4B41-4387-8F31-8077DB917336}"
|
225
|
+
ksar_msg.key= key
|
226
|
+
ksar_msg.duration_filter=9
|
227
|
+
ksar_msg.volume_filter=10
|
228
|
+
|
229
|
+
# fill in time_interval
|
230
|
+
ksar_msg.time_interval=TRP::TimeInterval.new
|
231
|
+
tint=ksar_msg.time_interval
|
232
|
+
tint.from=TRP::Timestamp.new
|
233
|
+
tint.from.tv_sec=time_from.tv_sec
|
234
|
+
tint.from.tv_usec=0
|
235
|
+
tint.to=TRP::Timestamp.new
|
236
|
+
tint.to.tv_sec=time_to.tv_sec
|
237
|
+
tint.to.tv_usec=0
|
238
|
+
return msg
|
239
|
+
|
240
|
+
end
|
241
|
+
|
242
|
+
def print_key_session_activity_response(resp_in)
|
243
|
+
|
244
|
+
resp=resp_in.key_session_activity_response
|
245
|
+
|
246
|
+
p "----------------------------"
|
247
|
+
p "Session Item Response"
|
248
|
+
p "----------------------------"
|
249
|
+
p "Context = #{ resp.context}"
|
250
|
+
p "Session Group = " + resp.session_group
|
251
|
+
|
252
|
+
end
|
253
|
+
|
254
|
+
# creates a session item request
|
255
|
+
# gets details about a sessionid
|
256
|
+
def mk_session_item_request(slice_id,session_id)
|
257
|
+
|
258
|
+
# create a new command of type SessionItemRequest
|
259
|
+
msg =TRP::Message.new
|
260
|
+
msg.trp_command = TRP::Message::Command::SESSION_ITEM_REQUEST
|
261
|
+
msg.session_item_request =TRP::SessionItemRequest.new
|
262
|
+
cir_msg=msg.session_item_request
|
263
|
+
|
264
|
+
# fill in basic info (guid = session id for flows)
|
265
|
+
cir_msg.context =0
|
266
|
+
cir_msg.session_group="{99A78737-4B41-4387-8F31-8077DB917336}"
|
267
|
+
cir_msg.session_id = TRP::SessionID.new
|
268
|
+
cir_msg.session_id.slice_id=slice_id
|
269
|
+
cir_msg.session_id.session_id=session_id
|
270
|
+
|
271
|
+
return msg
|
272
|
+
end
|
273
|
+
|
274
|
+
# prints a neat table of session activity
|
275
|
+
def print_session_item_response(resp_in)
|
276
|
+
resp=resp_in.session_item_response
|
277
|
+
print "#{resp.state} "
|
278
|
+
print "#{Time.at(resp.time_interval.from.tv_sec)} "
|
279
|
+
print "#{resp.time_interval.to.tv_sec-resp.time_interval.from.tv_sec} ".rjust(8)
|
280
|
+
print "#{resp.key1A.label}".ljust(28)
|
281
|
+
print "#{resp.key2A.label}".ljust(11)
|
282
|
+
print "#{resp.key1Z.label}".ljust(28)
|
283
|
+
print "#{resp.key2Z.label}".ljust(11)
|
284
|
+
print "#{resp.az_bytes}".rjust(10)
|
285
|
+
print "#{resp.za_bytes}".rjust(10)
|
286
|
+
print "\n"
|
287
|
+
|
288
|
+
end
|
289
|
+
|
290
|
+
|
291
|
+
def mk_session_tracker_request(time_from,time_to)
|
292
|
+
|
293
|
+
# create a new command of type CounterItemRequest
|
294
|
+
msg =TRP::Message.new
|
295
|
+
msg.trp_command = TRP::Message::Command::SESSION_TRACKER_REQUEST
|
296
|
+
msg.session_tracker_request =TRP:: SessionTrackerRequest.new
|
297
|
+
str_msg=msg.session_tracker_request
|
298
|
+
|
299
|
+
# fill in basic info
|
300
|
+
str_msg.context =0
|
301
|
+
str_msg.maxitems=100
|
302
|
+
str_msg.tracker_id=1
|
303
|
+
str_msg.session_group="{99A78737-4B41-4387-8F31-8077DB917336}"
|
304
|
+
|
305
|
+
# fill in time_interval
|
306
|
+
str_msg.time_interval=TRP::TimeInterval.new
|
307
|
+
tint=str_msg.time_interval
|
308
|
+
tint.from=TRP::Timestamp.new
|
309
|
+
tint.from.tv_sec=time_from.tv_sec
|
310
|
+
tint.from.tv_usec=0
|
311
|
+
tint.to=TRP::Timestamp.new
|
312
|
+
tint.to.tv_sec=time_to.tv_sec
|
313
|
+
tint.to.tv_usec=0
|
314
|
+
return msg
|
315
|
+
|
316
|
+
end
|
317
|
+
|
318
|
+
def print_session_tracker_response(resp_in)
|
319
|
+
|
320
|
+
resp=resp_in.session_tracker_response
|
321
|
+
|
322
|
+
p "----------------------------"
|
323
|
+
p "Session Tracker Response"
|
324
|
+
p "----------------------------"
|
325
|
+
p "Context = #{ resp.context}"
|
326
|
+
p "Session Group = " + resp.session_group
|
327
|
+
|
328
|
+
end
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
Certificate:
|
2
|
+
Data:
|
3
|
+
Version: 3 (0x2)
|
4
|
+
Serial Number: 1 (0x1)
|
5
|
+
Signature Algorithm: sha1WithRSAEncryption
|
6
|
+
Issuer: C=IN, ST=TN, L=Gowrivakkam, O=Unleash Networks Trisul Demo , OU=Trisul Demo CA, CN=trisuldemo
|
7
|
+
Validity
|
8
|
+
Not Before: Aug 23 06:21:57 2010 GMT
|
9
|
+
Not After : Aug 23 06:21:57 2011 GMT
|
10
|
+
Subject: C=IN, ST=TN, O=Unleash Networks Trisul Demo , CN=trisul_client_00
|
11
|
+
Subject Public Key Info:
|
12
|
+
Public Key Algorithm: rsaEncryption
|
13
|
+
RSA Public Key: (1024 bit)
|
14
|
+
Modulus (1024 bit):
|
15
|
+
00:b7:f8:3e:5b:e5:a6:87:b6:e3:5d:91:ab:f1:e3:
|
16
|
+
60:74:78:d7:e7:39:51:c1:59:5f:29:42:e0:03:b6:
|
17
|
+
d5:f0:36:ee:94:8e:df:36:02:9a:a3:95:2a:b8:e3:
|
18
|
+
aa:7e:75:84:36:6a:67:b8:b8:c9:3d:cc:36:25:80:
|
19
|
+
f3:64:9f:77:8a:f7:37:c1:ec:ba:b5:28:6a:61:b3:
|
20
|
+
54:26:a7:89:73:7b:47:8d:fc:67:00:da:35:91:62:
|
21
|
+
1e:ca:1d:33:54:b9:d2:1c:e8:e2:dc:99:8e:25:dc:
|
22
|
+
7b:de:21:e7:ce:a3:7e:68:07:ad:c9:3a:71:60:6d:
|
23
|
+
45:f2:34:f2:77:1c:31:8a:31
|
24
|
+
Exponent: 65537 (0x10001)
|
25
|
+
X509v3 extensions:
|
26
|
+
X509v3 Basic Constraints:
|
27
|
+
CA:FALSE
|
28
|
+
Netscape Comment:
|
29
|
+
OpenSSL Generated Certificate For Trisul / Unsniff PKI
|
30
|
+
X509v3 Subject Key Identifier:
|
31
|
+
22:2B:15:63:BD:55:2B:DB:3E:3B:10:08:E8:4B:53:ED:02:A5:83:FB
|
32
|
+
X509v3 Authority Key Identifier:
|
33
|
+
keyid:61:D3:24:23:7E:D2:64:30:54:DB:A9:21:E2:33:BF:46:E0:79:00:2D
|
34
|
+
|
35
|
+
Signature Algorithm: sha1WithRSAEncryption
|
36
|
+
04:22:51:df:8b:fb:ed:b5:bf:5d:ad:54:e8:e4:9a:cc:63:1b:
|
37
|
+
7a:e3:7e:d2:df:6d:79:44:5f:8f:ef:a0:35:05:2c:25:b8:4a:
|
38
|
+
82:f1:21:54:3a:ca:5f:2b:cb:a6:d8:40:1f:16:db:96:10:35:
|
39
|
+
c8:c4:81:9c:b4:92:e4:0e:a9:76:ed:35:a1:f8:96:cf:65:53:
|
40
|
+
5c:c1:73:59:a3:7e:36:80:64:c2:64:78:58:b9:da:46:ae:44:
|
41
|
+
be:5d:53:d5:37:67:9f:62:3b:53:57:71:9d:85:80:65:db:94:
|
42
|
+
e4:7c:8d:7f:35:e3:c1:1c:4d:9d:0d:43:f9:ea:3f:1b:b0:0b:
|
43
|
+
73:fb:13:a8:20:fc:cb:56:ef:a4:45:42:a5:59:b0:46:57:16:
|
44
|
+
17:15:d3:dd:75:05:03:08:08:7f:e8:44:31:4d:e8:51:bc:fc:
|
45
|
+
44:05:e8:e9:49:aa:56:e2:ad:88:8b:92:cf:fc:90:21:8c:17:
|
46
|
+
4c:1b:ca:55:b5:cd:fb:7f:c8:eb:ef:41:91:7f:c5:7f:47:2e:
|
47
|
+
10:e8:0e:57:56:c4:1b:47:b3:66:cc:14:ea:de:4e:ab:b5:ad:
|
48
|
+
55:55:b8:78:95:b2:c4:05:8a:9c:90:f2:d4:7a:e7:16:42:d5:
|
49
|
+
0b:0f:45:af:83:85:37:bc:14:05:2e:10:b6:5e:58:e0:23:12:
|
50
|
+
bb:08:35:4c
|
51
|
+
-----BEGIN CERTIFICATE-----
|
52
|
+
MIIDcTCCAlmgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhjELMAkGA1UEBhMCSU4x
|
53
|
+
CzAJBgNVBAgTAlROMRQwEgYDVQQHEwtHb3dyaXZha2thbTEmMCQGA1UEChMdVW5s
|
54
|
+
ZWFzaCBOZXR3b3JrcyBUcmlzdWwgRGVtbyAxFzAVBgNVBAsTDlRyaXN1bCBEZW1v
|
55
|
+
IENBMRMwEQYDVQQDEwp0cmlzdWxkZW1vMB4XDTEwMDgyMzA2MjE1N1oXDTExMDgy
|
56
|
+
MzA2MjE1N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
-----END RSA PRIVATE KEY-----
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'trisulrp'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
data/trisulrp.gemspec
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{trisulrp}
|
8
|
+
s.version = "1.2.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["vivek"]
|
12
|
+
s.date = %q{2010-12-31}
|
13
|
+
s.description = %q{This gem deals about the trisul remote protocol}
|
14
|
+
s.email = %q{vivek_rajagopal@yahoo.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"LICENSE.txt",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"examples/strp.rb",
|
27
|
+
"lib/trisulrp.rb",
|
28
|
+
"lib/trp.pb.rb",
|
29
|
+
"lib/trp.proto",
|
30
|
+
"lib/trplib.rb",
|
31
|
+
"test/Demo_Client.crt",
|
32
|
+
"test/Demo_Client.key",
|
33
|
+
"test/helper.rb",
|
34
|
+
"test/test_trisulrp.rb",
|
35
|
+
"trisulrp.gemspec"
|
36
|
+
]
|
37
|
+
s.homepage = %q{http://github.com/vivekrajan/trisulrp}
|
38
|
+
s.licenses = ["MIT"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubygems_version = %q{1.3.7}
|
41
|
+
s.summary = %q{trisul trp}
|
42
|
+
s.test_files = [
|
43
|
+
"examples/strp.rb",
|
44
|
+
"test/helper.rb",
|
45
|
+
"test/test_trisulrp.rb"
|
46
|
+
]
|
47
|
+
|
48
|
+
if s.respond_to? :specification_version then
|
49
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
50
|
+
s.specification_version = 3
|
51
|
+
|
52
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_runtime_dependency(%q<ruby-protocol-buffers>, [">= 0.8.5"])
|
54
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
56
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
57
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
58
|
+
s.add_runtime_dependency(%q<ruby-protocol-buffers>, [">= 0.8.5"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<ruby-protocol-buffers>, [">= 0.8.5"])
|
61
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
64
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
65
|
+
s.add_dependency(%q<ruby-protocol-buffers>, [">= 0.8.5"])
|
66
|
+
end
|
67
|
+
else
|
68
|
+
s.add_dependency(%q<ruby-protocol-buffers>, [">= 0.8.5"])
|
69
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
70
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
71
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
72
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
73
|
+
s.add_dependency(%q<ruby-protocol-buffers>, [">= 0.8.5"])
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
metadata
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: trisulrp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 2
|
10
|
+
version: 1.2.2
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- vivek
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-12-31 00:00:00 +05:30
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: ruby-protocol-buffers
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 53
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 8
|
32
|
+
- 5
|
33
|
+
version: 0.8.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: shoulda
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: bundler
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 23
|
59
|
+
segments:
|
60
|
+
- 1
|
61
|
+
- 0
|
62
|
+
- 0
|
63
|
+
version: 1.0.0
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: jeweler
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 7
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 5
|
78
|
+
- 2
|
79
|
+
version: 1.5.2
|
80
|
+
type: :development
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rcov
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
94
|
+
type: :development
|
95
|
+
prerelease: false
|
96
|
+
version_requirements: *id005
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: ruby-protocol-buffers
|
99
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 53
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
- 8
|
108
|
+
- 5
|
109
|
+
version: 0.8.5
|
110
|
+
type: :runtime
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *id006
|
113
|
+
description: This gem deals about the trisul remote protocol
|
114
|
+
email: vivek_rajagopal@yahoo.com
|
115
|
+
executables: []
|
116
|
+
|
117
|
+
extensions: []
|
118
|
+
|
119
|
+
extra_rdoc_files:
|
120
|
+
- LICENSE.txt
|
121
|
+
- README.rdoc
|
122
|
+
files:
|
123
|
+
- .document
|
124
|
+
- Gemfile
|
125
|
+
- LICENSE.txt
|
126
|
+
- README.rdoc
|
127
|
+
- Rakefile
|
128
|
+
- VERSION
|
129
|
+
- examples/strp.rb
|
130
|
+
- lib/trisulrp.rb
|
131
|
+
- lib/trp.pb.rb
|
132
|
+
- lib/trp.proto
|
133
|
+
- lib/trplib.rb
|
134
|
+
- test/Demo_Client.crt
|
135
|
+
- test/Demo_Client.key
|
136
|
+
- test/helper.rb
|
137
|
+
- test/test_trisulrp.rb
|
138
|
+
- trisulrp.gemspec
|
139
|
+
has_rdoc: true
|
140
|
+
homepage: http://github.com/vivekrajan/trisulrp
|
141
|
+
licenses:
|
142
|
+
- MIT
|
143
|
+
post_install_message:
|
144
|
+
rdoc_options: []
|
145
|
+
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
+
none: false
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
hash: 3
|
163
|
+
segments:
|
164
|
+
- 0
|
165
|
+
version: "0"
|
166
|
+
requirements: []
|
167
|
+
|
168
|
+
rubyforge_project:
|
169
|
+
rubygems_version: 1.3.7
|
170
|
+
signing_key:
|
171
|
+
specification_version: 3
|
172
|
+
summary: trisul trp
|
173
|
+
test_files:
|
174
|
+
- examples/strp.rb
|
175
|
+
- test/helper.rb
|
176
|
+
- test/test_trisulrp.rb
|