right_support 2.7.0 → 2.8.0
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/Gemfile +1 -1
- data/Gemfile.lock +23 -21
- data/Rakefile +6 -1
- data/VERSION +1 -1
- data/lib/right_support/net/request_balancer.rb +2 -2
- data/lib/right_support/stats/activity.rb +103 -44
- data/lib/right_support/stats/exceptions.rb +54 -17
- data/lib/right_support/stats/helpers.rb +108 -125
- data/right_support.gemspec +8 -12
- data/spec/stats/activity_spec.rb +234 -122
- data/spec/stats/exceptions_spec.rb +172 -66
- data/spec/stats/helpers_spec.rb +57 -0
- metadata +25 -25
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2009-
|
1
|
+
# Copyright (c) 2009-2013 RightScale Inc
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
@@ -44,22 +44,18 @@ module RightSupport
|
|
44
44
|
# Convert 0 value to nil
|
45
45
|
# This is in support of displaying "none" rather than 0
|
46
46
|
#
|
47
|
-
#
|
48
|
-
# value(Integer|Float):: Value to be converted
|
47
|
+
# @param value [Integer, Float] Value to be converted
|
49
48
|
#
|
50
|
-
#
|
51
|
-
# (Integer|Float|nil):: nil if value is 0, otherwise the original value
|
49
|
+
# @return [Integer, Float, NilClass] nil if value is 0, otherwise the original value
|
52
50
|
def self.nil_if_zero(value)
|
53
51
|
value == 0 ? nil : value
|
54
52
|
end
|
55
53
|
|
56
54
|
# Convert values hash into percentages
|
57
55
|
#
|
58
|
-
#
|
59
|
-
# values(Hash):: Values to be converted whose sum is the total for calculating percentages
|
56
|
+
# @param values [Hash] Values to be converted whose sum is the total for calculating percentages
|
60
57
|
#
|
61
|
-
#
|
62
|
-
# (Hash):: Converted values with keys "total" and "percent" with latter being a hash with values as percentages
|
58
|
+
# @return [Hash] Converted values with keys "total" and "percent" with latter being a hash with values as percentages
|
63
59
|
def self.percentage(values)
|
64
60
|
total = 0
|
65
61
|
values.each_value { |v| total += v }
|
@@ -70,11 +66,9 @@ module RightSupport
|
|
70
66
|
|
71
67
|
# Convert elapsed time in seconds to displayable format
|
72
68
|
#
|
73
|
-
#
|
74
|
-
# time(Integer|Float):: Elapsed time
|
69
|
+
# @param time [Integer, Float] Elapsed time
|
75
70
|
#
|
76
|
-
#
|
77
|
-
# (String):: Display string
|
71
|
+
# @return [String] Display string
|
78
72
|
def self.elapsed(time)
|
79
73
|
time = time.to_i
|
80
74
|
if time <= MINUTE
|
@@ -100,11 +94,9 @@ module RightSupport
|
|
100
94
|
# string of that precision after applying rounding
|
101
95
|
# When precision is wide ranging, limit precision of the larger numbers
|
102
96
|
#
|
103
|
-
#
|
104
|
-
# value(Float|Array|Hash):: Value(s) to be converted
|
97
|
+
# @param value [Float, Array, Hash] Value(s) to be converted
|
105
98
|
#
|
106
|
-
#
|
107
|
-
# (String|Array|Hash):: Value(s) converted to decimal digit string
|
99
|
+
# @return [String, Array, Hash] Value(s) converted to decimal digit string
|
108
100
|
def self.enough_precision(value)
|
109
101
|
scale = [1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0]
|
110
102
|
enough = lambda { |v| v = v.abs
|
@@ -133,60 +125,55 @@ module RightSupport
|
|
133
125
|
end
|
134
126
|
|
135
127
|
# Wrap string by breaking it into lines at the specified separators
|
128
|
+
# Convert all whitespace sequences to single space before wrapping
|
136
129
|
# Allow for presence of color encoding when measuring string length
|
137
130
|
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
# max_length(Integer|Array):: Maximum length of a line, or array containing
|
131
|
+
# @param string [String] String to be wrapped
|
132
|
+
# @param max_length [Integer, Array] Maximum length of a line, or array containing
|
141
133
|
# maximum length of first line followed by maximum for any subsequent line
|
142
134
|
# including indent
|
143
|
-
# indent
|
144
|
-
# separators
|
135
|
+
# @param indent [String] Indentation for each line after first
|
136
|
+
# @param separators [Regexp] Separators where string can wrap
|
145
137
|
#
|
146
|
-
#
|
147
|
-
# (String|Array):: Multi-line string
|
138
|
+
# @return [String, Array] Multi-line string
|
148
139
|
def self.wrap(string, max_length, indent, separators)
|
149
140
|
# Strip color encoding from string
|
150
|
-
strip = lambda { |
|
141
|
+
strip = lambda { |str| str.gsub(/\e\[[0-9]*m/, "") }
|
151
142
|
|
152
|
-
#
|
153
|
-
#
|
154
|
-
|
155
|
-
head, sep, tail = string.partition(separators)
|
156
|
-
if tail == ""
|
157
|
-
[[head, sep]]
|
158
|
-
else
|
159
|
-
[[head, sep]].concat(split.call(tail, separators))
|
160
|
-
end
|
161
|
-
end
|
143
|
+
# Convert all whitespace (especially \n) to space
|
144
|
+
# to provide a clean slate for wrapping
|
145
|
+
string = string.gsub(/\s+/, " ")
|
162
146
|
|
163
|
-
|
164
|
-
|
147
|
+
# Split string apart using separators one step at a time
|
148
|
+
# while building lines of the requested length
|
149
|
+
lines = []
|
150
|
+
line = ["", last_separator = ""]
|
165
151
|
limit = max_length.is_a?(Array) ? max_length[0] : max_length
|
166
152
|
length = 0
|
167
153
|
separators = /#{separators}/ if separators.is_a?(String)
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
line
|
154
|
+
while !string.empty? do
|
155
|
+
head, separator, tail = string.partition(separators)
|
156
|
+
if (length + strip.call(head).size + last_separator.size + separator.size) > limit
|
157
|
+
lines.push(line) unless line[0] == ""
|
158
|
+
line = [indent, last_separator = ""]
|
172
159
|
length = indent.size
|
173
160
|
limit = max_length.is_a?(Array) ? max_length[1] : max_length
|
174
161
|
end
|
175
|
-
line[0] += (
|
176
|
-
line[1] =
|
177
|
-
length += strip.call(
|
162
|
+
line[0] += (head = last_separator + head)
|
163
|
+
line[1] = last_separator = separator
|
164
|
+
length += strip.call(head).size
|
165
|
+
string = tail
|
178
166
|
end
|
179
|
-
|
180
|
-
|
167
|
+
lines.push(line)
|
168
|
+
lines[0..-2].inject("") { |a, (str, separator)| a + str + separator + "\n" } + lines[-1][0]
|
181
169
|
end
|
182
170
|
|
183
171
|
# Format time value in local time
|
184
172
|
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
# with_year(Boolean):: Whether to include year, defaults to false
|
173
|
+
# @param time [Integer] Time in seconds in Unix-epoch to be formatted
|
174
|
+
# @param with_year [Boolean] Whether to include year, defaults to false
|
188
175
|
#
|
189
|
-
#
|
176
|
+
# @return [String] Formatted time string
|
190
177
|
def self.time_at(time, with_year = false)
|
191
178
|
if with_year
|
192
179
|
Time.at(time).strftime("%a %b %d %H:%M:%S %Y")
|
@@ -198,42 +185,39 @@ module RightSupport
|
|
198
185
|
# Sort hash elements by key in ascending order into array of key/value pairs
|
199
186
|
# Sort keys numerically if possible, otherwise as is
|
200
187
|
#
|
201
|
-
#
|
202
|
-
# hash(Hash):: Data to be sorted
|
188
|
+
# @param hash [Hash] Data to be sorted
|
203
189
|
#
|
204
|
-
#
|
205
|
-
# (Array):: Key/value pairs from hash in key sorted order
|
190
|
+
# @return [Array] Key/value pairs from hash in key sorted order
|
206
191
|
def self.sort_key(hash)
|
207
192
|
hash.to_a.map { |k, v| [k =~ /^\d+$/ ? k.to_i : k, v] }.sort
|
208
193
|
end
|
209
194
|
|
210
195
|
# Sort hash elements by value in ascending order into array of key/value pairs
|
211
196
|
#
|
212
|
-
#
|
213
|
-
# hash(Hash):: Data to be sorted
|
197
|
+
# @param hash [Hash] Data to be sorted
|
214
198
|
#
|
215
|
-
#
|
216
|
-
# (Array):: Key/value pairs from hash in value sorted order
|
199
|
+
# @return [Array] Key/value pairs from hash in value sorted order
|
217
200
|
def self.sort_value(hash)
|
218
201
|
hash.to_a.sort { |a, b| a[1] <=> b[1] }
|
219
202
|
end
|
220
203
|
|
221
204
|
# Converts server statistics to a displayable format
|
222
205
|
#
|
223
|
-
#
|
224
|
-
# stats(Hash):: Statistics with generic keys "name", "identity", "hostname", "revision", "service uptime",
|
206
|
+
# @param stats [Hash] Statistics with generic keys "name", "identity", "hostname", "revision", "service uptime",
|
225
207
|
# "machine uptime", "memory KB", "stat time", "last reset time", "version", and "brokers" with
|
226
208
|
# "revision", "machine uptime", "memory KB", "version", and "brokers" being optional;
|
227
209
|
# any other keys ending with "stats" have an associated hash value that is displayed in sorted
|
228
210
|
# key order, unless "stats" is preceded by a non-blank, in which case that character is prepended
|
229
211
|
# to the key to drive the sort order
|
230
|
-
# options(Hash):: Formatting options
|
231
|
-
# :name_width(Integer):: Maximum characters in displayed stat name
|
232
|
-
# :sub_name_width(Integer):: Maximum characters in displayed sub-stat name
|
233
|
-
# :sub_stat_value_width(Integer):: Maximum characters in displayed sub-stat value line
|
234
212
|
#
|
235
|
-
#
|
236
|
-
#
|
213
|
+
# @option options [Integer] :name_width Maximum characters in displayed stat name
|
214
|
+
# @option options [Integer] :sub_name_width Maximum characters in displayed sub-stat name
|
215
|
+
# @option options [Integer] :sub_stat_value_width Maximum characters in displayed sub-stat value line
|
216
|
+
# @option options [Array<Hash>] :highlight Sub-statistics to highlight along with specific attributes to highlight,
|
217
|
+
# e.g., [{"exceptions" => "total"}, {"response time" => "> 1.0"}, {"health" => ["red", "yellow"]},
|
218
|
+
# {"non-deliveries" => [{"last" => "< 36000"}]}]
|
219
|
+
#
|
220
|
+
# @return [String] Display string
|
237
221
|
def self.stats_str(stats, options = {})
|
238
222
|
name_width = options[:name_width] || MAX_STAT_NAME_WIDTH
|
239
223
|
|
@@ -266,12 +250,10 @@ module RightSupport
|
|
266
250
|
|
267
251
|
# Converts service uptime stats to displayable format
|
268
252
|
#
|
269
|
-
#
|
270
|
-
# stats(Integer|Hash):: Service uptime in seconds if an Integer, otherwise a Hash containing
|
253
|
+
# @param stats [Integer, Hash] Service uptime in seconds if an Integer, otherwise a Hash containing
|
271
254
|
# "uptime", "total_uptime", "restarts", "graceful_exits", "crashes", and "last_crash_time" values
|
272
255
|
#
|
273
|
-
#
|
274
|
-
# (String):: Service uptime display
|
256
|
+
# @return [String] Service uptime display
|
275
257
|
def self.service_up_str(stats)
|
276
258
|
if stats.is_a?(Integer)
|
277
259
|
elapsed(stats)
|
@@ -290,9 +272,8 @@ module RightSupport
|
|
290
272
|
|
291
273
|
# Convert broker information to displayable format
|
292
274
|
#
|
293
|
-
#
|
294
|
-
#
|
295
|
-
# "brokers"(Array):: Stats for each broker in priority order as hash with keys
|
275
|
+
# @param brokers [Hash] Broker stats with keys
|
276
|
+
# "brokers" [Array] Stats for each broker in priority order as hash with keys
|
296
277
|
# "alias"(String):: Broker alias
|
297
278
|
# "identity"(String):: Broker identity
|
298
279
|
# "status"(Symbol):: Status of connection
|
@@ -301,19 +282,21 @@ module RightSupport
|
|
301
282
|
# "failure last"(Hash|nil):: Last connect failure information with key "elapsed", or nil if none
|
302
283
|
# "failures"(Integer|nil):: Number of failed attempts to connect to broker, or nil if none
|
303
284
|
# "retries"(Integer|nil):: Number of attempts to connect after failure, or nil if none
|
304
|
-
# "exceptions"
|
285
|
+
# "exceptions" [Hash, NilClass] Exceptions raised per category, or nil if none
|
305
286
|
# "total"(Integer):: Total exceptions for this category
|
306
287
|
# "recent"(Array):: Most recent as a hash of "count", "type", "message", "when", and "where"
|
307
|
-
# "heartbeat"
|
308
|
-
# "returns"
|
288
|
+
# "heartbeat" [Integer, NilClass] Number of seconds between AMQP heartbeats, or nil if heartbeat disabled
|
289
|
+
# "returns" [Hash, NilClass] Message return activity stats with keys "total", "percent", "last", and "rate"
|
309
290
|
# with percentage breakdown per request type, or nil if none
|
310
|
-
# options(Hash):: Formatting options
|
311
|
-
# :name_width(Integer):: Fixed width for left-justified name display
|
312
|
-
# :sub_name_width(Integer):: Maximum characters in displayed sub-stat name
|
313
|
-
# :sub_stat_value_width(Integer):: Maximum characters in displayed sub-stat value line
|
314
291
|
#
|
315
|
-
#
|
316
|
-
#
|
292
|
+
# @option options [Integer] :name_width Fixed width for left-justified name display
|
293
|
+
# @option options [Integer] :sub_name_width Maximum characters in displayed sub-stat name
|
294
|
+
# @option options [Integer] :sub_stat_value_width Maximum characters in displayed sub-stat value line
|
295
|
+
# @option options [Array<Hash>] :highlight Sub-statistics to highlight along with specific attributes to highlight,
|
296
|
+
# e.g., [{"exceptions" => "total"}, {"response time" => "> 1.0"}, {"health" => ["red", "yellow"]},
|
297
|
+
# {"non-deliveries" => [{"last" => "< 36000"}]}]
|
298
|
+
#
|
299
|
+
# @return [String] Broker display with one line per broker plus exceptions
|
317
300
|
def self.brokers_str(brokers, options = {})
|
318
301
|
name_width = options[:name_width] || MAX_STAT_NAME_WIDTH
|
319
302
|
sub_name_width = options[:sub_name_width] || MAX_SUB_STAT_NAME_WIDTH
|
@@ -373,16 +356,17 @@ module RightSupport
|
|
373
356
|
# Display any nil value, empty hash, or hash with a "total" value of 0 as "none"
|
374
357
|
# Display any floating point value or hash of values with at least two significant digits of precision
|
375
358
|
#
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
# options
|
380
|
-
#
|
381
|
-
#
|
382
|
-
#
|
359
|
+
# @param name [String] Display name for the stat
|
360
|
+
# @param value [Object] Value of this stat
|
361
|
+
#
|
362
|
+
# @option options [Integer] :name_width Fixed width for left-justified name display
|
363
|
+
# @option options [Integer] :sub_name_width Maximum characters in displayed sub-stat name
|
364
|
+
# @option options [Integer] :sub_stat_value_width Maximum characters in displayed sub-stat value line
|
365
|
+
# @option options [Array<Hash>] :highlight Sub-statistics to highlight along with specific attributes to highlight,
|
366
|
+
# e.g., [{"exceptions" => "total"}, {"response time" => "> 1.0"}, {"health" => ["red", "yellow"]},
|
367
|
+
# {"non-deliveries" => [{"last" => "< 36000"}]}]
|
383
368
|
#
|
384
|
-
#
|
385
|
-
# (String):: Single line display of stat
|
369
|
+
# @return [String] Single line display of stat
|
386
370
|
def self.sub_stats_str(name, value, options = {})
|
387
371
|
name_width = options[:name_width] || MAX_STAT_NAME_WIDTH
|
388
372
|
sub_name_width = options[:sub_name_width] || MAX_SUB_STAT_NAME_WIDTH
|
@@ -393,7 +377,8 @@ module RightSupport
|
|
393
377
|
sprintf("%-#{name_width}s#{SEPARATOR}", name) + value.to_a.sort.map do |attr|
|
394
378
|
k, v = attr
|
395
379
|
name = k =~ /percent$/ ? k[0..-9] : k
|
396
|
-
sprintf("%-#{sub_name_width}s#{SEPARATOR}", name) +
|
380
|
+
sprintf("%-#{sub_name_width}s#{SEPARATOR}", name) +
|
381
|
+
if v.is_a?(Numeric)
|
397
382
|
str = k =~ /age$/ ? elapsed(v) : enough_precision(v)
|
398
383
|
str += "/sec" if k =~ /rate$/
|
399
384
|
str += " sec" if k =~ /time$/
|
@@ -421,19 +406,17 @@ module RightSupport
|
|
421
406
|
|
422
407
|
# Convert activity information to displayable format
|
423
408
|
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
# "
|
427
|
-
# "
|
428
|
-
# "last"(Hash):: Information about last activity
|
409
|
+
# @param value [Hash, NilClass] Information about activity, or nil if the total is 0
|
410
|
+
# "total" [Integer] Total activity count
|
411
|
+
# "percent" [Hash] Percentage for each type of activity if tracking type, otherwise omitted
|
412
|
+
# "last" [Hash] Information about last activity
|
429
413
|
# "elapsed"(Integer):: Seconds since last activity started
|
430
414
|
# "type"(String):: Type of activity if tracking type, otherwise omitted
|
431
415
|
# "active"(Boolean):: Whether activity still active if tracking whether active, otherwise omitted
|
432
|
-
# "rate"
|
433
|
-
# "duration"
|
416
|
+
# "rate" [Float] Recent average rate if measuring rate, otherwise omitted
|
417
|
+
# "duration" [Float] Average duration of activity if tracking duration, otherwise omitted
|
434
418
|
#
|
435
|
-
#
|
436
|
-
# str(String):: Activity stats in displayable format without any line separators
|
419
|
+
# @return [String] Activity stats in displayable format without any line separators
|
437
420
|
def self.activity_str(value)
|
438
421
|
str = ""
|
439
422
|
str += enough_precision(sort_value(value["percent"]).reverse).map { |k, v| "#{k}: #{v}%" }.join(", ") +
|
@@ -452,15 +435,13 @@ module RightSupport
|
|
452
435
|
|
453
436
|
# Convert last activity information to displayable format
|
454
437
|
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
# "
|
458
|
-
# "
|
459
|
-
#
|
460
|
-
# single_item:: Whether this is to appear as a single item in a comma-separated list
|
438
|
+
# @param last [Hash] Information about last activity
|
439
|
+
# "elapsed" [Integer] Seconds since last activity started
|
440
|
+
# "type" [String] Type of activity if tracking type, otherwise omitted
|
441
|
+
# "active" [Boolean] Whether activity still active if tracking whether active, otherwise omitted
|
442
|
+
# @param single_item [Boolean] Whether this is to appear as a single item in a comma-separated list
|
461
443
|
# in which case there should be no ':' in the formatted string
|
462
444
|
#
|
463
|
-
# === Return
|
464
445
|
# str(String):: Last activity in displayable format without any line separators
|
465
446
|
def self.last_activity_str(last, single_item = false)
|
466
447
|
str = "#{elapsed(last['elapsed'])} ago"
|
@@ -477,25 +458,29 @@ module RightSupport
|
|
477
458
|
|
478
459
|
# Convert exception information to displayable format
|
479
460
|
#
|
480
|
-
#
|
481
|
-
# exceptions
|
482
|
-
# "
|
483
|
-
#
|
484
|
-
# indent(String):: Indentation for each line
|
485
|
-
# options(Hash):: Formatting options
|
486
|
-
# :sub_stat_value_width(Integer):: Maximum characters in displayed sub-stat value line
|
461
|
+
# @param exceptions [Hash] Exceptions raised per category
|
462
|
+
# "total" [Integer] Total exceptions for this category
|
463
|
+
# "recent" [Array<Hash>] Most recent as a hash of "count", "type", "message", "when", and "where"
|
464
|
+
# @param indent [String] Indentation for each line
|
487
465
|
#
|
488
|
-
#
|
489
|
-
#
|
466
|
+
# @option options [Integer] :sub_stat_value_width Maximum characters in displayed sub-stat value line
|
467
|
+
#
|
468
|
+
# @return [String] Exceptions in displayable format with line separators
|
490
469
|
def self.exceptions_str(exceptions, indent, options = {})
|
491
470
|
sub_stat_value_width = options[:sub_stat_value_width] || MAX_SUB_STAT_VALUE_WIDTH
|
492
471
|
indent2 = indent + (" " * 4)
|
472
|
+
max_length = [sub_stat_value_width, sub_stat_value_width + indent2.size]
|
473
|
+
separators = / |\/\/|\/|::|\.|-/
|
493
474
|
exceptions.to_a.sort.map do |k, v|
|
494
475
|
sprintf("%s total: %d, most recent:\n", k, v["total"]) + v["recent"].reverse.map do |e|
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
476
|
+
head = "(#{e["count"]}) #{time_at(e["when"])} #{e["type"]}: "
|
477
|
+
message = e["message"]
|
478
|
+
if (i = (/(:[0-9]+:in `[^']+')/ =~ message))
|
479
|
+
# Dropping anything after the first line of an embedded backtrace to reduce bulk
|
480
|
+
message = message[0..i-1] + $1 + "..."
|
481
|
+
end
|
482
|
+
tail = " IN #{e["where"]}" if e["where"]
|
483
|
+
indent + wrap("#{head}#{message}#{tail}", max_length, indent2, separators)
|
499
484
|
end.join("\n")
|
500
485
|
end.join("\n" + indent)
|
501
486
|
end
|
@@ -505,11 +490,9 @@ module RightSupport
|
|
505
490
|
# Display any floating point values with one decimal place precision
|
506
491
|
# Display any empty values as "none"
|
507
492
|
#
|
508
|
-
#
|
509
|
-
# hash(Hash):: Hash to be displayed
|
493
|
+
# @param hash [Hash] Hash to be displayed
|
510
494
|
#
|
511
|
-
#
|
512
|
-
# (String):: Single line hash display
|
495
|
+
# @return [String] Single line hash display
|
513
496
|
def self.hash_str(hash)
|
514
497
|
str = ""
|
515
498
|
sort_key(hash).map do |k, v|
|
data/right_support.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{right_support}
|
8
|
-
s.version = "2.
|
8
|
+
s.version = "2.8.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tony Spataro", "Sergey Sergyenko", "Ryan Williamson", "Lee Kirchhoff", "Alexey Karpik", "Scott Messier"]
|
12
|
-
s.date = %q{2013-
|
12
|
+
s.date = %q{2013-08-28}
|
13
13
|
s.description = %q{A toolkit of useful, reusable foundation code created by RightScale.}
|
14
14
|
s.email = %q{support@rightscale.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -143,41 +143,37 @@ Gem::Specification.new do |s|
|
|
143
143
|
s.summary = %q{Reusable foundation code.}
|
144
144
|
|
145
145
|
if s.respond_to? :specification_version then
|
146
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
147
146
|
s.specification_version = 3
|
148
147
|
|
149
148
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
150
149
|
s.add_development_dependency(%q<rake>, ["~> 0.9"])
|
151
150
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
151
|
+
s.add_development_dependency(%q<right_develop>, ["~> 1.0"])
|
152
152
|
s.add_development_dependency(%q<ruby-debug>, [">= 0.10"])
|
153
153
|
s.add_development_dependency(%q<ruby-debug19>, [">= 0.11.6"])
|
154
154
|
s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
|
155
|
-
s.add_development_dependency(%q<
|
156
|
-
s.add_development_dependency(%q<cucumber>, ["~> 1.0"])
|
157
|
-
s.add_development_dependency(%q<flexmock>, ["~> 0.8"])
|
155
|
+
s.add_development_dependency(%q<flexmock>, ["~> 1.0"])
|
158
156
|
s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
|
159
157
|
s.add_development_dependency(%q<nokogiri>, ["~> 1.5"])
|
160
158
|
else
|
161
159
|
s.add_dependency(%q<rake>, ["~> 0.9"])
|
162
160
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
161
|
+
s.add_dependency(%q<right_develop>, ["~> 1.0"])
|
163
162
|
s.add_dependency(%q<ruby-debug>, [">= 0.10"])
|
164
163
|
s.add_dependency(%q<ruby-debug19>, [">= 0.11.6"])
|
165
164
|
s.add_dependency(%q<rdoc>, [">= 2.4.2"])
|
166
|
-
s.add_dependency(%q<
|
167
|
-
s.add_dependency(%q<cucumber>, ["~> 1.0"])
|
168
|
-
s.add_dependency(%q<flexmock>, ["~> 0.8"])
|
165
|
+
s.add_dependency(%q<flexmock>, ["~> 1.0"])
|
169
166
|
s.add_dependency(%q<syntax>, ["~> 1.0.0"])
|
170
167
|
s.add_dependency(%q<nokogiri>, ["~> 1.5"])
|
171
168
|
end
|
172
169
|
else
|
173
170
|
s.add_dependency(%q<rake>, ["~> 0.9"])
|
174
171
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
172
|
+
s.add_dependency(%q<right_develop>, ["~> 1.0"])
|
175
173
|
s.add_dependency(%q<ruby-debug>, [">= 0.10"])
|
176
174
|
s.add_dependency(%q<ruby-debug19>, [">= 0.11.6"])
|
177
175
|
s.add_dependency(%q<rdoc>, [">= 2.4.2"])
|
178
|
-
s.add_dependency(%q<
|
179
|
-
s.add_dependency(%q<cucumber>, ["~> 1.0"])
|
180
|
-
s.add_dependency(%q<flexmock>, ["~> 0.8"])
|
176
|
+
s.add_dependency(%q<flexmock>, ["~> 1.0"])
|
181
177
|
s.add_dependency(%q<syntax>, ["~> 1.0.0"])
|
182
178
|
s.add_dependency(%q<nokogiri>, ["~> 1.5"])
|
183
179
|
end
|