ruby-nuggets 0.8.7 → 0.8.8
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/README +1 -1
- data/lib/nuggets/util/cli.rb +11 -1
- data/lib/nuggets/util/i18n.rb +1 -1
- data/lib/nuggets/util/log_parser/apache.rb +106 -0
- data/lib/nuggets/util/log_parser/rails.rb +224 -0
- data/lib/nuggets/util/log_parser.rb +73 -0
- data/lib/nuggets/version.rb +1 -1
- metadata +165 -180
data/README
CHANGED
data/lib/nuggets/util/cli.rb
CHANGED
@@ -205,7 +205,7 @@ module Util
|
|
205
205
|
|
206
206
|
generic_opts(opts)
|
207
207
|
post_opts(opts)
|
208
|
-
}
|
208
|
+
}.extend(Util::CLI::OptionParserExtension)
|
209
209
|
end
|
210
210
|
|
211
211
|
def pre_opts(opts)
|
@@ -227,6 +227,16 @@ module Util
|
|
227
227
|
def post_opts(opts)
|
228
228
|
end
|
229
229
|
|
230
|
+
module OptionParserExtension
|
231
|
+
|
232
|
+
KEY_POOL = ('A'..'Z').to_a + ('a'..'z').to_a + ('0'..'9').to_a
|
233
|
+
|
234
|
+
def keys
|
235
|
+
{ :used => keys = top.short.keys, :free => KEY_POOL - keys }
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
230
240
|
end
|
231
241
|
|
232
242
|
end
|
data/lib/nuggets/util/i18n.rb
CHANGED
@@ -0,0 +1,106 @@
|
|
1
|
+
#--
|
2
|
+
###############################################################################
|
3
|
+
# #
|
4
|
+
# A component of ruby-nuggets, some extensions to the Ruby programming #
|
5
|
+
# language. #
|
6
|
+
# #
|
7
|
+
# Copyright (C) 2007-2012 Jens Wille #
|
8
|
+
# #
|
9
|
+
# Authors: #
|
10
|
+
# Jens Wille <jens.wille@uni-koeln.de> #
|
11
|
+
# #
|
12
|
+
# ruby-nuggets is free software; you can redistribute it and/or modify it #
|
13
|
+
# under the terms of the GNU Affero General Public License as published by #
|
14
|
+
# the Free Software Foundation; either version 3 of the License, or (at your #
|
15
|
+
# option) any later version. #
|
16
|
+
# #
|
17
|
+
# ruby-nuggets is distributed in the hope that it will be useful, but WITHOUT #
|
18
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License #
|
20
|
+
# for more details. #
|
21
|
+
# #
|
22
|
+
# You should have received a copy of the GNU Affero General Public License #
|
23
|
+
# along with ruby-nuggets. If not, see <http://www.gnu.org/licenses/>. #
|
24
|
+
# #
|
25
|
+
###############################################################################
|
26
|
+
#++
|
27
|
+
|
28
|
+
require 'nuggets/util/log_parser'
|
29
|
+
|
30
|
+
module Util
|
31
|
+
|
32
|
+
module LogParser
|
33
|
+
|
34
|
+
module Apache
|
35
|
+
|
36
|
+
extend self
|
37
|
+
|
38
|
+
DEFAULT_RE = %r{(.*?)}
|
39
|
+
|
40
|
+
DIRECTIVES = {
|
41
|
+
'h' => [:ip, %r{(\d+(?:\.\d+){3}|[\w.-]+)}],
|
42
|
+
'l' => [:auth, DEFAULT_RE],
|
43
|
+
'u' => [:username, DEFAULT_RE],
|
44
|
+
't' => [:datetime, %r{\[(.*?)\]}],
|
45
|
+
'r' => [:request, DEFAULT_RE],
|
46
|
+
'R' => [:request, %r{(.*?)(?:"|\z)}],
|
47
|
+
's' => [:status, %r{(\d+)}],
|
48
|
+
'b' => [:bytecount, %r{(-|\d+)}],
|
49
|
+
'v' => [:domain, DEFAULT_RE],
|
50
|
+
'i' => [nil, DEFAULT_RE],
|
51
|
+
}
|
52
|
+
|
53
|
+
DIRECTIVES_RE = %r{%.*?(?:\{(.*?)\})?([#{DIRECTIVES.keys.join}])([\s\\"]*)}
|
54
|
+
|
55
|
+
ORDER = []
|
56
|
+
|
57
|
+
class << self
|
58
|
+
|
59
|
+
def register(name, format)
|
60
|
+
base = const_set(name, Module.new)
|
61
|
+
|
62
|
+
re, items = parse_format(format)
|
63
|
+
base.const_set(:RE, re)
|
64
|
+
base.const_set(:ITEMS, items)
|
65
|
+
|
66
|
+
ORDER << base
|
67
|
+
LogParser.register(base, self)
|
68
|
+
end
|
69
|
+
|
70
|
+
def parse_format(format)
|
71
|
+
re, items = '\A', []
|
72
|
+
|
73
|
+
format.scan(DIRECTIVES_RE) { |h, c, e|
|
74
|
+
i, r = DIRECTIVES[c]
|
75
|
+
re << r.source << e.gsub(/\s/, '\\s')
|
76
|
+
items << i ||= h.downcase.tr('-', '_').to_sym
|
77
|
+
}
|
78
|
+
|
79
|
+
[Regexp.new(re), items]
|
80
|
+
end
|
81
|
+
|
82
|
+
def detect_type(line)
|
83
|
+
ORDER.find { |type| line =~ type::RE }
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
[ [:Combined, '%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"'],
|
89
|
+
[:Common, '%h %l %u %t "%r" %>s %b'],
|
90
|
+
[:Minimal, '%h %l %u %t "%R']
|
91
|
+
].each { |name, format| register(name, format) }
|
92
|
+
|
93
|
+
def parse_line(line, entry = {})
|
94
|
+
if md = self::RE.match(line)
|
95
|
+
self::ITEMS.each_with_index { |k, i| entry[k] = md[i + 1] }
|
96
|
+
yield if block_given?
|
97
|
+
end
|
98
|
+
|
99
|
+
entry
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
@@ -0,0 +1,224 @@
|
|
1
|
+
#--
|
2
|
+
###############################################################################
|
3
|
+
# #
|
4
|
+
# A component of ruby-nuggets, some extensions to the Ruby programming #
|
5
|
+
# language. #
|
6
|
+
# #
|
7
|
+
# Copyright (C) 2007-2012 Jens Wille #
|
8
|
+
# #
|
9
|
+
# Authors: #
|
10
|
+
# Jens Wille <jens.wille@uni-koeln.de> #
|
11
|
+
# #
|
12
|
+
# ruby-nuggets is free software; you can redistribute it and/or modify it #
|
13
|
+
# under the terms of the GNU Affero General Public License as published by #
|
14
|
+
# the Free Software Foundation; either version 3 of the License, or (at your #
|
15
|
+
# option) any later version. #
|
16
|
+
# #
|
17
|
+
# ruby-nuggets is distributed in the hope that it will be useful, but WITHOUT #
|
18
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License #
|
20
|
+
# for more details. #
|
21
|
+
# #
|
22
|
+
# You should have received a copy of the GNU Affero General Public License #
|
23
|
+
# along with ruby-nuggets. If not, see <http://www.gnu.org/licenses/>. #
|
24
|
+
# #
|
25
|
+
###############################################################################
|
26
|
+
#++
|
27
|
+
|
28
|
+
require 'nuggets/util/log_parser'
|
29
|
+
|
30
|
+
module Util
|
31
|
+
|
32
|
+
module LogParser
|
33
|
+
|
34
|
+
module Rails
|
35
|
+
|
36
|
+
LogParser.register(self)
|
37
|
+
|
38
|
+
# Log line prefix
|
39
|
+
PREFIX_RE = %r{
|
40
|
+
\A
|
41
|
+
(?:
|
42
|
+
\[
|
43
|
+
(\d+) # pid
|
44
|
+
:
|
45
|
+
(.*?) # host
|
46
|
+
\]
|
47
|
+
\s
|
48
|
+
)?
|
49
|
+
\s*
|
50
|
+
}x
|
51
|
+
|
52
|
+
# Log entry separator
|
53
|
+
SEPARATOR_RE = %r{
|
54
|
+
\s+\|\s+
|
55
|
+
}x
|
56
|
+
|
57
|
+
# Log line patterns
|
58
|
+
ITEMS = [
|
59
|
+
[:processing, {
|
60
|
+
:re => %r{
|
61
|
+
#{PREFIX_RE} # pid, host
|
62
|
+
Processing\s+
|
63
|
+
(\w+) # controller
|
64
|
+
\#
|
65
|
+
(\w+) # action
|
66
|
+
\s+
|
67
|
+
\(
|
68
|
+
for\s+
|
69
|
+
(.*?) # ip
|
70
|
+
\s+at\s+
|
71
|
+
(.*?) # datetime
|
72
|
+
\)
|
73
|
+
\s+
|
74
|
+
\[
|
75
|
+
(\w+) # request_method
|
76
|
+
\]
|
77
|
+
}xo,
|
78
|
+
:keys => [:controller, :action, :ip, :datetime, :request_method]
|
79
|
+
}],
|
80
|
+
[:session_id, {
|
81
|
+
:re => %r{
|
82
|
+
#{PREFIX_RE} # pid, host
|
83
|
+
Session\sID:\s+
|
84
|
+
(\S+) # sid
|
85
|
+
}xo,
|
86
|
+
:keys => [:sid]
|
87
|
+
}],
|
88
|
+
[:parameters, {
|
89
|
+
:re => %r{
|
90
|
+
#{PREFIX_RE} # pid, host
|
91
|
+
Parameters:\s+
|
92
|
+
(\{.*\}) # params
|
93
|
+
}xo, #}
|
94
|
+
:proc => lambda { |entry, md|
|
95
|
+
entry[:params_hash] = md[3].hash
|
96
|
+
entry[:params] = begin
|
97
|
+
eval("$SAFE = 3\n#{md[3].gsub(/#<.*?>/, '%q{\&}')}", nil, __FILE__, __LINE__) # !!!
|
98
|
+
rescue SyntaxError, SecurityError
|
99
|
+
{}
|
100
|
+
end
|
101
|
+
}
|
102
|
+
}],
|
103
|
+
[:client_info, {
|
104
|
+
:re => %r{
|
105
|
+
#{PREFIX_RE} # pid, host
|
106
|
+
Client\sinfo:\s+
|
107
|
+
UA\s+=\s+
|
108
|
+
(.*?) # user_agent
|
109
|
+
#{SEPARATOR_RE}
|
110
|
+
LANG\s+=\s+
|
111
|
+
(.*) # accept_language
|
112
|
+
}xo,
|
113
|
+
:keys => [:user_agent, :accept_language]
|
114
|
+
}],
|
115
|
+
[:referer, {
|
116
|
+
:re => %r{
|
117
|
+
#{PREFIX_RE} # pid, host
|
118
|
+
Referer:\s+
|
119
|
+
(.*) # referer
|
120
|
+
}xo,
|
121
|
+
:keys => [:referer]
|
122
|
+
}],
|
123
|
+
[:meta, {
|
124
|
+
:re => %r{
|
125
|
+
#{PREFIX_RE} # pid, host
|
126
|
+
Meta:\s+
|
127
|
+
User\s+=\s+
|
128
|
+
(.*?) # user_id
|
129
|
+
#{SEPARATOR_RE}
|
130
|
+
Institution\s+=\s+
|
131
|
+
(.*) # institution_id
|
132
|
+
}xo,
|
133
|
+
:keys => [:user_id, :institution_id]
|
134
|
+
}],
|
135
|
+
[:stats, {
|
136
|
+
:re => %r{
|
137
|
+
#{PREFIX_RE} # pid, host
|
138
|
+
Stats:\s+
|
139
|
+
(.*) # flags
|
140
|
+
}xo,
|
141
|
+
:proc => lambda { |entry, md|
|
142
|
+
entry[:flags] = md[3].split(SEPARATOR_RE)
|
143
|
+
}
|
144
|
+
}],
|
145
|
+
[:oauth, {
|
146
|
+
:re => %r{
|
147
|
+
#{PREFIX_RE} # pid, host
|
148
|
+
OAuth:\s+
|
149
|
+
Token\s+=\s+
|
150
|
+
(.*?)#(.*?) # token_type, token
|
151
|
+
#{SEPARATOR_RE}
|
152
|
+
User\s+=\s+
|
153
|
+
(.*?) # user_id
|
154
|
+
#{SEPARATOR_RE}
|
155
|
+
Client\s+=\s+
|
156
|
+
(.*) # client_id
|
157
|
+
}xo,
|
158
|
+
:keys => [:token_type, :token, :user_id, :client_id]
|
159
|
+
}],
|
160
|
+
[:benchmark, {
|
161
|
+
:re => %r{
|
162
|
+
#{PREFIX_RE} # pid, host
|
163
|
+
Completed\sin\s+
|
164
|
+
(\S+) # runtime
|
165
|
+
.*?
|
166
|
+
(?: #- OPTIONAL
|
167
|
+
#{SEPARATOR_RE}
|
168
|
+
Rendering:\s+
|
169
|
+
(\S+) # rendering_runtime
|
170
|
+
.*?
|
171
|
+
)?
|
172
|
+
(?: #- OPTIONAL
|
173
|
+
#{SEPARATOR_RE}
|
174
|
+
DB:\s+
|
175
|
+
(\S+) # db_runtime
|
176
|
+
.*?
|
177
|
+
)?
|
178
|
+
(?: #- OPTIONAL
|
179
|
+
#{SEPARATOR_RE}
|
180
|
+
Mem:\s+
|
181
|
+
\S+
|
182
|
+
.*?
|
183
|
+
)?
|
184
|
+
#{SEPARATOR_RE}
|
185
|
+
(.*?) # status
|
186
|
+
\s+
|
187
|
+
\[
|
188
|
+
(.*) # request_uri
|
189
|
+
\]
|
190
|
+
}xo,
|
191
|
+
:keys => [:runtime, :rendering_runtime, :db_runtime, :status, :request_uri]
|
192
|
+
}]
|
193
|
+
]
|
194
|
+
|
195
|
+
ITEMS.each { |_, item|
|
196
|
+
item[:proc] ||= lambda { |entry, md|
|
197
|
+
item[:keys].each_with_index { |k, i|
|
198
|
+
entry[k] = md[i + 3] # 1 = pid, 2 = host
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
def parse_line(line, entry = {})
|
204
|
+
ITEMS.each { |key, item|
|
205
|
+
if md = item[:re].match(line)
|
206
|
+
if key == :processing
|
207
|
+
yield if block_given?
|
208
|
+
entry[:pid], entry[:host] = md[1], md[2]
|
209
|
+
end
|
210
|
+
|
211
|
+
item[:proc][entry, md]
|
212
|
+
|
213
|
+
break
|
214
|
+
end
|
215
|
+
}
|
216
|
+
|
217
|
+
entry
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
#--
|
2
|
+
###############################################################################
|
3
|
+
# #
|
4
|
+
# A component of ruby-nuggets, some extensions to the Ruby programming #
|
5
|
+
# language. #
|
6
|
+
# #
|
7
|
+
# Copyright (C) 2007-2012 Jens Wille #
|
8
|
+
# #
|
9
|
+
# Authors: #
|
10
|
+
# Jens Wille <jens.wille@uni-koeln.de> #
|
11
|
+
# #
|
12
|
+
# ruby-nuggets is free software; you can redistribute it and/or modify it #
|
13
|
+
# under the terms of the GNU Affero General Public License as published by #
|
14
|
+
# the Free Software Foundation; either version 3 of the License, or (at your #
|
15
|
+
# option) any later version. #
|
16
|
+
# #
|
17
|
+
# ruby-nuggets is distributed in the hope that it will be useful, but WITHOUT #
|
18
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License #
|
20
|
+
# for more details. #
|
21
|
+
# #
|
22
|
+
# You should have received a copy of the GNU Affero General Public License #
|
23
|
+
# along with ruby-nuggets. If not, see <http://www.gnu.org/licenses/>. #
|
24
|
+
# #
|
25
|
+
###############################################################################
|
26
|
+
#++
|
27
|
+
|
28
|
+
require 'zlib'
|
29
|
+
|
30
|
+
module Util
|
31
|
+
|
32
|
+
module LogParser
|
33
|
+
|
34
|
+
extend self
|
35
|
+
|
36
|
+
GZ_EXT_RE = %r{\.gz\z}
|
37
|
+
|
38
|
+
def self.register(base, *modules)
|
39
|
+
base.send(:include, *modules << self)
|
40
|
+
base.extend(base)
|
41
|
+
end
|
42
|
+
|
43
|
+
def parse(input)
|
44
|
+
entry = {}
|
45
|
+
|
46
|
+
input.each { |line| parse_line(line, entry) {
|
47
|
+
unless entry.empty?
|
48
|
+
yield entry.dup
|
49
|
+
entry.clear
|
50
|
+
end
|
51
|
+
} }
|
52
|
+
|
53
|
+
yield entry unless entry.empty?
|
54
|
+
end
|
55
|
+
|
56
|
+
def parse_line(line, entry = {})
|
57
|
+
# Yield when entry complete. Preferrably return +entry+.
|
58
|
+
raise NotImplementedError, 'must be implemented by type'
|
59
|
+
end
|
60
|
+
|
61
|
+
def parse_file(file, &block)
|
62
|
+
block ||= (entries = []; lambda { |entry| entries << entry })
|
63
|
+
|
64
|
+
(file =~ GZ_EXT_RE ? Zlib::GzipReader : File).open(file) { |f|
|
65
|
+
block.arity == 1 ? parse(f, &block) : block[f, method(:parse)]
|
66
|
+
}
|
67
|
+
|
68
|
+
entries
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
data/lib/nuggets/version.rb
CHANGED
metadata
CHANGED
@@ -1,245 +1,230 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-nuggets
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.8
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
- 7
|
10
|
-
version: 0.8.7
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Jens Wille
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2012-04-27 00:00:00 Z
|
12
|
+
date: 2012-07-06 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: Some extensions to the Ruby programming language.
|
22
15
|
email: jens.wille@uni-koeln.de
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
18
|
+
extra_rdoc_files:
|
28
19
|
- README
|
29
20
|
- COPYING
|
30
21
|
- ChangeLog
|
31
|
-
files:
|
32
|
-
- lib/nuggets.rb
|
33
|
-
- lib/nuggets/
|
34
|
-
- lib/nuggets/
|
35
|
-
- lib/nuggets/
|
36
|
-
- lib/nuggets/
|
37
|
-
- lib/nuggets/
|
38
|
-
- lib/nuggets/
|
39
|
-
- lib/nuggets/
|
40
|
-
- lib/nuggets/
|
41
|
-
- lib/nuggets/
|
42
|
-
- lib/nuggets/
|
43
|
-
- lib/nuggets/
|
44
|
-
- lib/nuggets/
|
45
|
-
- lib/nuggets/
|
46
|
-
- lib/nuggets/
|
47
|
-
- lib/nuggets/
|
48
|
-
- lib/nuggets/
|
49
|
-
- lib/nuggets/
|
50
|
-
- lib/nuggets/env/user_encoding_mixin.rb
|
51
|
-
- lib/nuggets/net/success.rb
|
52
|
-
- lib/nuggets/object/silence_mixin.rb
|
22
|
+
files:
|
23
|
+
- lib/nuggets/tempfile/open.rb
|
24
|
+
- lib/nuggets/version.rb
|
25
|
+
- lib/nuggets/proc/bind.rb
|
26
|
+
- lib/nuggets/proc/bind_mixin.rb
|
27
|
+
- lib/nuggets/statistics.rb
|
28
|
+
- lib/nuggets/io/interact_mixin.rb
|
29
|
+
- lib/nuggets/io/null.rb
|
30
|
+
- lib/nuggets/io/null_mixin.rb
|
31
|
+
- lib/nuggets/io/redirect.rb
|
32
|
+
- lib/nuggets/io/redirect_mixin.rb
|
33
|
+
- lib/nuggets/io/interact.rb
|
34
|
+
- lib/nuggets/io/modes.rb
|
35
|
+
- lib/nuggets/io/agrep.rb
|
36
|
+
- lib/nuggets/object/silence.rb
|
37
|
+
- lib/nuggets/object/singleton_class_mixin.rb
|
38
|
+
- lib/nuggets/object/ghost_class.rb
|
39
|
+
- lib/nuggets/object/blank_mixin.rb
|
40
|
+
- lib/nuggets/object/metaclass.rb
|
53
41
|
- lib/nuggets/object/uniclass.rb
|
42
|
+
- lib/nuggets/object/msend_mixin.rb
|
54
43
|
- lib/nuggets/object/singleton_class.rb
|
55
|
-
- lib/nuggets/object/msend.rb
|
56
|
-
- lib/nuggets/object/virtual_class.rb
|
57
|
-
- lib/nuggets/object/ghost_class.rb
|
58
44
|
- lib/nuggets/object/boolean.rb
|
59
|
-
- lib/nuggets/object/blank.rb
|
60
45
|
- lib/nuggets/object/boolean_mixin.rb
|
61
|
-
- lib/nuggets/object/
|
62
|
-
- lib/nuggets/object/
|
63
|
-
- lib/nuggets/object/
|
46
|
+
- lib/nuggets/object/virtual_class.rb
|
47
|
+
- lib/nuggets/object/msend.rb
|
48
|
+
- lib/nuggets/object/blank.rb
|
64
49
|
- lib/nuggets/object/eigenclass.rb
|
65
|
-
- lib/nuggets/object/
|
66
|
-
- lib/nuggets/
|
67
|
-
- lib/nuggets/
|
68
|
-
- lib/nuggets/
|
69
|
-
- lib/nuggets/
|
50
|
+
- lib/nuggets/object/silence_mixin.rb
|
51
|
+
- lib/nuggets/range/quantile.rb
|
52
|
+
- lib/nuggets/range/quantile_mixin.rb
|
53
|
+
- lib/nuggets/string/nsub.rb
|
54
|
+
- lib/nuggets/string/wc_mixin.rb
|
55
|
+
- lib/nuggets/string/camelscore_mixin.rb
|
56
|
+
- lib/nuggets/string/capitalize_first.rb
|
57
|
+
- lib/nuggets/string/msub.rb
|
58
|
+
- lib/nuggets/string/evaluate.rb
|
59
|
+
- lib/nuggets/string/camelscore.rb
|
60
|
+
- lib/nuggets/string/case.rb
|
61
|
+
- lib/nuggets/string/wc.rb
|
62
|
+
- lib/nuggets/string/evaluate_mixin.rb
|
63
|
+
- lib/nuggets/string/sub_with_md.rb
|
64
|
+
- lib/nuggets/string/xor.rb
|
65
|
+
- lib/nuggets/string/word_wrap.rb
|
66
|
+
- lib/nuggets/string/xor_mixin.rb
|
67
|
+
- lib/nuggets/all_mixins.rb
|
68
|
+
- lib/nuggets/file/replace.rb
|
70
69
|
- lib/nuggets/file/replace_mixin.rb
|
71
70
|
- lib/nuggets/file/which_mixin.rb
|
72
|
-
- lib/nuggets/file/
|
71
|
+
- lib/nuggets/file/ext.rb
|
73
72
|
- lib/nuggets/file/ext_mixin.rb
|
74
|
-
- lib/nuggets/file/replace.rb
|
75
|
-
- lib/nuggets/file/sub_mixin.rb
|
76
73
|
- lib/nuggets/file/sub.rb
|
74
|
+
- lib/nuggets/file/which.rb
|
75
|
+
- lib/nuggets/file/sub_mixin.rb
|
76
|
+
- lib/nuggets/all.rb
|
77
|
+
- lib/nuggets/net/success.rb
|
78
|
+
- lib/nuggets/hash/deep_merge_mixin.rb
|
79
|
+
- lib/nuggets/hash/nest_mixin.rb
|
80
|
+
- lib/nuggets/hash/unroll_mixin.rb
|
81
|
+
- lib/nuggets/hash/in_order.rb
|
82
|
+
- lib/nuggets/hash/at.rb
|
83
|
+
- lib/nuggets/hash/insert.rb
|
84
|
+
- lib/nuggets/hash/unroll.rb
|
85
|
+
- lib/nuggets/hash/deep_merge.rb
|
86
|
+
- lib/nuggets/hash/nest.rb
|
87
|
+
- lib/nuggets/hash/only.rb
|
88
|
+
- lib/nuggets/statistics_mixins.rb
|
89
|
+
- lib/nuggets/uri/redirect.rb
|
90
|
+
- lib/nuggets/uri/redirect_mixin.rb
|
91
|
+
- lib/nuggets/uri/content_type.rb
|
92
|
+
- lib/nuggets/uri/exist_mixin.rb
|
93
|
+
- lib/nuggets/uri/exist.rb
|
94
|
+
- lib/nuggets/uri/content_type_mixin.rb
|
95
|
+
- lib/nuggets/env/user_home.rb
|
96
|
+
- lib/nuggets/env/user_encoding_mixin.rb
|
97
|
+
- lib/nuggets/env/user_encoding.rb
|
98
|
+
- lib/nuggets/env/user_home_mixin.rb
|
99
|
+
- lib/nuggets/env/set.rb
|
100
|
+
- lib/nuggets/env/set_mixin.rb
|
101
|
+
- lib/nuggets/numeric/between.rb
|
102
|
+
- lib/nuggets/numeric/signum.rb
|
103
|
+
- lib/nuggets/numeric/limit.rb
|
104
|
+
- lib/nuggets/numeric/to_multiple.rb
|
105
|
+
- lib/nuggets/numeric/duration.rb
|
106
|
+
- lib/nuggets/enumerable/minmax.rb
|
107
|
+
- lib/nuggets/enumerable/agrep.rb
|
108
|
+
- lib/nuggets/enumerable/all_any_extended.rb
|
109
|
+
- lib/nuggets/util/log_parser/rails.rb
|
110
|
+
- lib/nuggets/util/log_parser/apache.rb
|
111
|
+
- lib/nuggets/util/i18n.rb
|
112
|
+
- lib/nuggets/util/cli.rb
|
113
|
+
- lib/nuggets/util/log_parser.rb
|
114
|
+
- lib/nuggets/util/pluggable.rb
|
115
|
+
- lib/nuggets/util/added_methods/init.rb
|
116
|
+
- lib/nuggets/util/content_type.rb
|
117
|
+
- lib/nuggets/util/added_methods.rb
|
118
|
+
- lib/nuggets/util/ruby.rb
|
119
|
+
- lib/nuggets/util/dotted_decimal.rb
|
120
|
+
- lib/nuggets/util/ansicolor2css.rb
|
77
121
|
- lib/nuggets/integer/map_mixin.rb
|
78
|
-
- lib/nuggets/integer/to_binary_s.rb
|
79
|
-
- lib/nuggets/integer/length_mixin.rb
|
80
122
|
- lib/nuggets/integer/length.rb
|
123
|
+
- lib/nuggets/integer/to_binary_s.rb
|
81
124
|
- lib/nuggets/integer/map.rb
|
125
|
+
- lib/nuggets/integer/length_mixin.rb
|
82
126
|
- lib/nuggets/integer/factorial.rb
|
83
|
-
- lib/nuggets/
|
84
|
-
- lib/nuggets/string/word_wrap.rb
|
85
|
-
- lib/nuggets/string/capitalize_first.rb
|
86
|
-
- lib/nuggets/string/wc.rb
|
87
|
-
- lib/nuggets/string/evaluate.rb
|
88
|
-
- lib/nuggets/string/camelscore_mixin.rb
|
89
|
-
- lib/nuggets/string/msub.rb
|
90
|
-
- lib/nuggets/string/nsub.rb
|
91
|
-
- lib/nuggets/string/xor.rb
|
92
|
-
- lib/nuggets/string/camelscore.rb
|
93
|
-
- lib/nuggets/string/wc_mixin.rb
|
94
|
-
- lib/nuggets/string/case.rb
|
95
|
-
- lib/nuggets/string/xor_mixin.rb
|
96
|
-
- lib/nuggets/string/evaluate_mixin.rb
|
97
|
-
- lib/nuggets/string/sub_with_md.rb
|
98
|
-
- lib/nuggets/all.rb
|
99
|
-
- lib/nuggets/array/correlation.rb
|
100
|
-
- lib/nuggets/array/shuffle.rb
|
101
|
-
- lib/nuggets/array/regression_mixin.rb
|
102
|
-
- lib/nuggets/array/limit.rb
|
103
|
-
- lib/nuggets/array/runiq.rb
|
104
|
-
- lib/nuggets/array/variance.rb
|
105
|
-
- lib/nuggets/array/histogram.rb
|
127
|
+
- lib/nuggets/array/combination.rb
|
106
128
|
- lib/nuggets/array/standard_deviation_mixin.rb
|
129
|
+
- lib/nuggets/array/flatten_once.rb
|
130
|
+
- lib/nuggets/array/regression_mixin.rb
|
131
|
+
- lib/nuggets/array/mode.rb
|
132
|
+
- lib/nuggets/array/monotone.rb
|
107
133
|
- lib/nuggets/array/median.rb
|
134
|
+
- lib/nuggets/array/mean.rb
|
135
|
+
- lib/nuggets/array/shuffle.rb
|
136
|
+
- lib/nuggets/array/mode_mixin.rb
|
137
|
+
- lib/nuggets/array/limit_mixin.rb
|
138
|
+
- lib/nuggets/array/runiq_mixin.rb
|
139
|
+
- lib/nuggets/array/histogram.rb
|
108
140
|
- lib/nuggets/array/to_hash.rb
|
109
|
-
- lib/nuggets/array/
|
110
|
-
- lib/nuggets/array/
|
111
|
-
- lib/nuggets/array/
|
112
|
-
- lib/nuggets/array/
|
141
|
+
- lib/nuggets/array/median_mixin.rb
|
142
|
+
- lib/nuggets/array/in_order.rb
|
143
|
+
- lib/nuggets/array/correlation.rb
|
144
|
+
- lib/nuggets/array/correlation_mixin.rb
|
113
145
|
- lib/nuggets/array/rand.rb
|
146
|
+
- lib/nuggets/array/limit.rb
|
147
|
+
- lib/nuggets/array/variance_mixin.rb
|
114
148
|
- lib/nuggets/array/standard_deviation.rb
|
115
|
-
- lib/nuggets/array/correlation_mixin.rb
|
116
|
-
- lib/nuggets/array/only.rb
|
117
|
-
- lib/nuggets/array/mean_mixin.rb
|
118
149
|
- lib/nuggets/array/regression.rb
|
119
|
-
- lib/nuggets/array/
|
120
|
-
- lib/nuggets/array/limit_mixin.rb
|
121
|
-
- lib/nuggets/array/flatten_once.rb
|
122
|
-
- lib/nuggets/array/in_order.rb
|
123
|
-
- lib/nuggets/array/mean.rb
|
124
|
-
- lib/nuggets/array/median_mixin.rb
|
125
|
-
- lib/nuggets/array/histogram_mixin.rb
|
150
|
+
- lib/nuggets/array/only.rb
|
126
151
|
- lib/nuggets/array/format.rb
|
127
|
-
- lib/nuggets/array/
|
128
|
-
- lib/nuggets/
|
129
|
-
- lib/nuggets/
|
130
|
-
- lib/nuggets/
|
131
|
-
- lib/nuggets
|
132
|
-
- lib/nuggets/numeric/signum.rb
|
133
|
-
- lib/nuggets/all_mixins.rb
|
134
|
-
- lib/nuggets/util/ansicolor2css.rb
|
135
|
-
- lib/nuggets/util/content_type.rb
|
136
|
-
- lib/nuggets/util/dotted_decimal.rb
|
137
|
-
- lib/nuggets/util/ruby.rb
|
138
|
-
- lib/nuggets/util/added_methods.rb
|
139
|
-
- lib/nuggets/util/cli.rb
|
140
|
-
- lib/nuggets/util/i18n.rb
|
141
|
-
- lib/nuggets/util/added_methods/init.rb
|
142
|
-
- lib/nuggets/util/pluggable.rb
|
143
|
-
- lib/nuggets/proc/bind_mixin.rb
|
144
|
-
- lib/nuggets/proc/bind.rb
|
145
|
-
- lib/nuggets/statistics.rb
|
146
|
-
- lib/nuggets/io/redirect_mixin.rb
|
147
|
-
- lib/nuggets/io/modes.rb
|
148
|
-
- lib/nuggets/io/interact.rb
|
149
|
-
- lib/nuggets/io/redirect.rb
|
150
|
-
- lib/nuggets/io/null_mixin.rb
|
151
|
-
- lib/nuggets/io/null.rb
|
152
|
-
- lib/nuggets/io/agrep.rb
|
153
|
-
- lib/nuggets/io/interact_mixin.rb
|
154
|
-
- lib/nuggets/uri/content_type.rb
|
155
|
-
- lib/nuggets/uri/redirect_mixin.rb
|
156
|
-
- lib/nuggets/uri/redirect.rb
|
157
|
-
- lib/nuggets/uri/exist_mixin.rb
|
158
|
-
- lib/nuggets/uri/content_type_mixin.rb
|
159
|
-
- lib/nuggets/uri/exist.rb
|
160
|
-
- lib/nuggets/enumerable/all_any_extended.rb
|
161
|
-
- lib/nuggets/enumerable/minmax.rb
|
162
|
-
- lib/nuggets/enumerable/agrep.rb
|
163
|
-
- ChangeLog
|
152
|
+
- lib/nuggets/array/histogram_mixin.rb
|
153
|
+
- lib/nuggets/array/runiq.rb
|
154
|
+
- lib/nuggets/array/mean_mixin.rb
|
155
|
+
- lib/nuggets/array/variance.rb
|
156
|
+
- lib/nuggets.rb
|
164
157
|
- COPYING
|
165
|
-
-
|
158
|
+
- ChangeLog
|
166
159
|
- Rakefile
|
167
|
-
-
|
168
|
-
- spec/
|
169
|
-
- spec/nuggets/
|
170
|
-
- spec/nuggets/hash/deep_merge_spec.rb
|
171
|
-
- spec/nuggets/env/set_spec.rb
|
172
|
-
- spec/nuggets/env/user_home_spec.rb
|
173
|
-
- spec/nuggets/env/user_encoding_spec.rb
|
174
|
-
- spec/nuggets/object/silence_spec.rb
|
175
|
-
- spec/nuggets/object/singleton_class_spec.rb
|
176
|
-
- spec/nuggets/object/msend_spec.rb
|
160
|
+
- README
|
161
|
+
- spec/spec_helper.rb
|
162
|
+
- spec/nuggets/proc/bind_spec.rb
|
177
163
|
- spec/nuggets/object/blank_spec.rb
|
178
164
|
- spec/nuggets/object/boolean_spec.rb
|
165
|
+
- spec/nuggets/object/msend_spec.rb
|
166
|
+
- spec/nuggets/object/silence_spec.rb
|
167
|
+
- spec/nuggets/object/singleton_class_spec.rb
|
168
|
+
- spec/nuggets/range/quantile_spec.rb
|
169
|
+
- spec/nuggets/string/evaluate_spec.rb
|
170
|
+
- spec/nuggets/string/xor_spec.rb
|
171
|
+
- spec/nuggets/string/wc_spec.rb
|
172
|
+
- spec/nuggets/string/camelscore_spec.rb
|
173
|
+
- spec/nuggets/file/replace_spec.rb
|
179
174
|
- spec/nuggets/file/ext_spec.rb
|
180
175
|
- spec/nuggets/file/sub_spec.rb
|
181
|
-
- spec/nuggets/file/replace_spec.rb
|
182
176
|
- spec/nuggets/file/which_spec.rb
|
177
|
+
- spec/nuggets/hash/nest_spec.rb
|
178
|
+
- spec/nuggets/hash/deep_merge_spec.rb
|
179
|
+
- spec/nuggets/hash/unroll_spec.rb
|
180
|
+
- spec/nuggets/uri/exist_spec.rb
|
181
|
+
- spec/nuggets/uri/content_type_spec.rb
|
182
|
+
- spec/nuggets/env/user_home_spec.rb
|
183
|
+
- spec/nuggets/env/user_encoding_spec.rb
|
184
|
+
- spec/nuggets/env/set_spec.rb
|
183
185
|
- spec/nuggets/integer/map_spec.rb
|
184
186
|
- spec/nuggets/integer/length_spec.rb
|
185
|
-
- spec/nuggets/string/evaluate_spec.rb
|
186
|
-
- spec/nuggets/string/camelscore_spec.rb
|
187
|
-
- spec/nuggets/string/xor_spec.rb
|
188
|
-
- spec/nuggets/string/wc_spec.rb
|
189
187
|
- spec/nuggets/array/regression_spec.rb
|
188
|
+
- spec/nuggets/array/histogram_spec.rb
|
189
|
+
- spec/nuggets/array/standard_deviation_spec.rb
|
190
190
|
- spec/nuggets/array/limit_spec.rb
|
191
|
+
- spec/nuggets/array/runiq_spec.rb
|
191
192
|
- spec/nuggets/array/correlation_spec.rb
|
192
|
-
- spec/nuggets/array/standard_deviation_spec.rb
|
193
|
-
- spec/nuggets/array/mode_spec.rb
|
194
|
-
- spec/nuggets/array/histogram_spec.rb
|
195
|
-
- spec/nuggets/array/median_spec.rb
|
196
193
|
- spec/nuggets/array/mean_spec.rb
|
194
|
+
- spec/nuggets/array/median_spec.rb
|
195
|
+
- spec/nuggets/array/mode_spec.rb
|
197
196
|
- spec/nuggets/array/variance_spec.rb
|
198
|
-
- spec/nuggets/array/runiq_spec.rb
|
199
|
-
- spec/nuggets/proc/bind_spec.rb
|
200
|
-
- spec/nuggets/uri/content_type_spec.rb
|
201
|
-
- spec/nuggets/uri/exist_spec.rb
|
202
|
-
- spec/spec_helper.rb
|
203
197
|
- .rspec
|
204
198
|
homepage: http://prometheus.rubyforge.org/ruby-nuggets
|
205
199
|
licenses: []
|
206
|
-
|
207
200
|
post_install_message:
|
208
|
-
rdoc_options:
|
209
|
-
- --line-numbers
|
210
|
-
- --main
|
211
|
-
- README
|
212
|
-
- --all
|
201
|
+
rdoc_options:
|
213
202
|
- --charset
|
214
203
|
- UTF-8
|
204
|
+
- --line-numbers
|
205
|
+
- --all
|
215
206
|
- --title
|
216
|
-
- ruby-nuggets Application documentation (v0.8.
|
217
|
-
|
207
|
+
- ruby-nuggets Application documentation (v0.8.8)
|
208
|
+
- --main
|
209
|
+
- README
|
210
|
+
require_paths:
|
218
211
|
- lib
|
219
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
212
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
220
213
|
none: false
|
221
|
-
requirements:
|
222
|
-
- -
|
223
|
-
- !ruby/object:Gem::Version
|
224
|
-
|
225
|
-
|
226
|
-
- 0
|
227
|
-
version: "0"
|
228
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - ! '>='
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '0'
|
218
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
219
|
none: false
|
230
|
-
requirements:
|
231
|
-
- -
|
232
|
-
- !ruby/object:Gem::Version
|
233
|
-
|
234
|
-
segments:
|
235
|
-
- 0
|
236
|
-
version: "0"
|
220
|
+
requirements:
|
221
|
+
- - ! '>='
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
237
224
|
requirements: []
|
238
|
-
|
239
225
|
rubyforge_project: prometheus
|
240
|
-
rubygems_version: 1.8.
|
226
|
+
rubygems_version: 1.8.24
|
241
227
|
signing_key:
|
242
228
|
specification_version: 3
|
243
229
|
summary: Some extensions to the Ruby programming language.
|
244
230
|
test_files: []
|
245
|
-
|