stella 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +14 -10
- data/Rakefile +22 -36
- data/lib/daemonize.rb +56 -0
- data/lib/stella/adapter/ab.rb +49 -39
- data/lib/stella/adapter/base.rb +17 -8
- data/lib/stella/adapter/httperf.rb +24 -18
- data/lib/stella/adapter/pcap_watcher.rb +1 -1
- data/lib/stella/adapter/siege.rb +15 -12
- data/lib/stella/cli/localtest.rb +2 -3
- data/lib/stella/cli/sysinfo.rb +0 -1
- data/lib/stella/cli.rb +10 -55
- data/lib/stella/command/base.rb +0 -62
- data/lib/stella/command/localtest.rb +35 -36
- data/lib/stella/data/domain.rb +18 -11
- data/lib/stella/data/http.rb +23 -16
- data/lib/stella/logger.rb +29 -19
- data/lib/stella/response.rb +5 -2
- data/lib/stella/storable.rb +138 -52
- data/lib/stella/support.rb +107 -8
- data/lib/stella/sysinfo.rb +26 -16
- data/lib/stella/test/definition.rb +1 -1
- data/lib/stella/test/run/summary.rb +23 -13
- data/lib/stella/test/stats.rb +114 -0
- data/lib/stella/text/resource.rb +1 -1
- data/lib/stella.rb +29 -4
- data/lib/utils/mathutil.rb +0 -76
- data/lib/utils/stats.rb +88 -0
- data/lib/win32/Console/ANSI.rb +305 -305
- data/lib/win32/Console.rb +970 -970
- data/support/ruby-pcap-takuma-patch.txt +13 -13
- data/support/text/en.yaml +11 -8
- data/support/text/nl.yaml +7 -1
- data/{spec/show-agents_spec.rb → tests/01-util_test.rb} +0 -0
- data/tests/02-stella-util_test.rb +42 -0
- data/tests/10-stella_test.rb +104 -0
- data/tests/11-stella-storable_test.rb +68 -0
- data/tests/60-stella-command_test.rb +248 -0
- data/tests/80-stella-cli_test.rb +45 -0
- data/tests/spec-helper.rb +31 -0
- data/vendor/{frylock/README.textile → drydock/LICENSE.txt} +2 -52
- data/vendor/drydock/README.textile +57 -0
- data/vendor/{frylock → drydock}/bin/example +14 -14
- data/vendor/{frylock/frylock.gemspec → drydock/drydock.gemspec} +1 -1
- data/vendor/{frylock/lib/frylock → drydock/lib/drydock}/exceptions.rb +1 -1
- data/vendor/{frylock/lib/frylock.rb → drydock/lib/drydock.rb} +8 -8
- data/vendor/{frylock → drydock}/test/command_test.rb +0 -0
- metadata +34 -61
- data/lib/stella/test/base.rb +0 -38
- data/lib/stella/test/summary.rb +0 -82
- data/vendor/hitimes-0.4.0/HISTORY +0 -28
- data/vendor/hitimes-0.4.0/LICENSE.txt +0 -19
- data/vendor/hitimes-0.4.0/README +0 -80
- data/vendor/hitimes-0.4.0/Rakefile +0 -63
- data/vendor/hitimes-0.4.0/examples/benchmarks.rb +0 -86
- data/vendor/hitimes-0.4.0/examples/stats.rb +0 -29
- data/vendor/hitimes-0.4.0/ext/extconf.rb +0 -15
- data/vendor/hitimes-0.4.0/ext/hitimes_ext.c +0 -21
- data/vendor/hitimes-0.4.0/ext/hitimes_instant_clock_gettime.c +0 -20
- data/vendor/hitimes-0.4.0/ext/hitimes_instant_osx.c +0 -16
- data/vendor/hitimes-0.4.0/ext/hitimes_instant_windows.c +0 -27
- data/vendor/hitimes-0.4.0/ext/hitimes_interval.c +0 -340
- data/vendor/hitimes-0.4.0/ext/hitimes_interval.h +0 -73
- data/vendor/hitimes-0.4.0/ext/hitimes_stats.c +0 -242
- data/vendor/hitimes-0.4.0/ext/hitimes_stats.h +0 -30
- data/vendor/hitimes-0.4.0/ext/rbconfig-mingw.rb +0 -178
- data/vendor/hitimes-0.4.0/ext/rbconfig.rb +0 -178
- data/vendor/hitimes-0.4.0/gemspec.rb +0 -54
- data/vendor/hitimes-0.4.0/lib/hitimes/mutexed_stats.rb +0 -23
- data/vendor/hitimes-0.4.0/lib/hitimes/paths.rb +0 -54
- data/vendor/hitimes-0.4.0/lib/hitimes/stats.rb +0 -29
- data/vendor/hitimes-0.4.0/lib/hitimes/timer.rb +0 -223
- data/vendor/hitimes-0.4.0/lib/hitimes/version.rb +0 -42
- data/vendor/hitimes-0.4.0/lib/hitimes.rb +0 -24
- data/vendor/hitimes-0.4.0/spec/interval_spec.rb +0 -115
- data/vendor/hitimes-0.4.0/spec/mutex_stats_spec.rb +0 -34
- data/vendor/hitimes-0.4.0/spec/paths_spec.rb +0 -14
- data/vendor/hitimes-0.4.0/spec/spec_helper.rb +0 -6
- data/vendor/hitimes-0.4.0/spec/stats_spec.rb +0 -72
- data/vendor/hitimes-0.4.0/spec/timer_spec.rb +0 -105
- data/vendor/hitimes-0.4.0/spec/version_spec.rb +0 -27
- data/vendor/hitimes-0.4.0/tasks/announce.rake +0 -39
- data/vendor/hitimes-0.4.0/tasks/config.rb +0 -107
- data/vendor/hitimes-0.4.0/tasks/distribution.rake +0 -53
- data/vendor/hitimes-0.4.0/tasks/documentation.rake +0 -33
- data/vendor/hitimes-0.4.0/tasks/extension.rake +0 -64
- data/vendor/hitimes-0.4.0/tasks/rspec.rake +0 -31
- data/vendor/hitimes-0.4.0/tasks/rubyforge.rake +0 -52
- data/vendor/hitimes-0.4.0/tasks/utils.rb +0 -80
@@ -1,242 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2008 Jeremy Hinegardner
|
3
|
-
* All rights reserved. See LICENSE and/or COPYING for details.
|
4
|
-
*
|
5
|
-
* vim: shiftwidth=4
|
6
|
-
*/
|
7
|
-
|
8
|
-
#include "hitimes_stats.h"
|
9
|
-
|
10
|
-
/* classes defined here */
|
11
|
-
VALUE cH_Stats; /* Hitimes::Stats */
|
12
|
-
|
13
|
-
/**
|
14
|
-
* Allocator and Deallocator for Stats classes
|
15
|
-
*/
|
16
|
-
|
17
|
-
VALUE hitimes_stats_free(hitimes_stats_t* s)
|
18
|
-
{
|
19
|
-
xfree( s );
|
20
|
-
return Qnil;
|
21
|
-
}
|
22
|
-
|
23
|
-
VALUE hitimes_stats_alloc(VALUE klass)
|
24
|
-
{
|
25
|
-
VALUE obj;
|
26
|
-
hitimes_stats_t* s = xmalloc( sizeof( hitimes_stats_t ) );
|
27
|
-
|
28
|
-
s->min = 0.0;
|
29
|
-
s->max = 0.0;
|
30
|
-
s->count = 0;
|
31
|
-
s->sum = 0.0;
|
32
|
-
s->sumsq = 0.0;
|
33
|
-
|
34
|
-
obj = Data_Wrap_Struct(klass, NULL, hitimes_stats_free, s);
|
35
|
-
|
36
|
-
return obj;
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
|
-
/**
|
41
|
-
* call-seq:
|
42
|
-
* stat.update( val ) -> nil
|
43
|
-
*
|
44
|
-
* Update the running stats with the new value.
|
45
|
-
*/
|
46
|
-
VALUE hitimes_stats_update( VALUE self, VALUE v )
|
47
|
-
{
|
48
|
-
double new_v = NUM2DBL( v );
|
49
|
-
hitimes_stats_t *stats;
|
50
|
-
|
51
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
52
|
-
|
53
|
-
if ( 0 == stats->count ) {
|
54
|
-
stats->min = new_v;
|
55
|
-
stats->max = new_v;
|
56
|
-
} else {
|
57
|
-
stats->min = ( new_v < stats->min) ? ( new_v ) : ( stats->min );
|
58
|
-
stats->max = ( new_v > stats->max) ? ( new_v ) : ( stats->max );
|
59
|
-
}
|
60
|
-
|
61
|
-
stats->count += 1;
|
62
|
-
stats->sum += new_v;
|
63
|
-
stats->sumsq += ( new_v * new_v );
|
64
|
-
|
65
|
-
return Qnil;
|
66
|
-
}
|
67
|
-
|
68
|
-
/**
|
69
|
-
* call-seq:
|
70
|
-
* stat.mean -> Float
|
71
|
-
*
|
72
|
-
* Return the arithmetic mean of the values put into the Stats object. If no
|
73
|
-
* values have passed through the stats object then 0.0 is returned;
|
74
|
-
*/
|
75
|
-
VALUE hitimes_stats_mean( VALUE self )
|
76
|
-
{
|
77
|
-
hitimes_stats_t *stats;
|
78
|
-
double mean = 0.0;
|
79
|
-
|
80
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
81
|
-
|
82
|
-
if ( stats->count > 0 ) {
|
83
|
-
mean = stats->sum / stats->count ;
|
84
|
-
}
|
85
|
-
|
86
|
-
return rb_float_new( mean );
|
87
|
-
}
|
88
|
-
|
89
|
-
|
90
|
-
/**
|
91
|
-
* call-seq:
|
92
|
-
* stat.rate -> Float
|
93
|
-
*
|
94
|
-
* Return the count per seconds ( rate ) rate stat. If no values have passed
|
95
|
-
* through the stats object then 0.0 is returned.
|
96
|
-
*/
|
97
|
-
VALUE hitimes_stats_rate( VALUE self )
|
98
|
-
{
|
99
|
-
hitimes_stats_t *stats;
|
100
|
-
double rate = 0.0;
|
101
|
-
|
102
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
103
|
-
|
104
|
-
if ( stats->sum > 0.0 ) {
|
105
|
-
rate = stats->count / stats->sum;
|
106
|
-
}
|
107
|
-
|
108
|
-
return rb_float_new( rate );
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
/**
|
113
|
-
* call-seq:
|
114
|
-
* stat.max -> Float
|
115
|
-
*
|
116
|
-
* Return the maximum value that has passed through the Stats object
|
117
|
-
*/
|
118
|
-
VALUE hitimes_stats_max( VALUE self )
|
119
|
-
{
|
120
|
-
hitimes_stats_t *stats;
|
121
|
-
|
122
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
123
|
-
|
124
|
-
return rb_float_new( stats->max );
|
125
|
-
}
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
/**
|
130
|
-
* call-seq:
|
131
|
-
* stat.min -> Float
|
132
|
-
*
|
133
|
-
* Return the minimum value that has passed through the Stats object
|
134
|
-
*/
|
135
|
-
VALUE hitimes_stats_min( VALUE self )
|
136
|
-
{
|
137
|
-
hitimes_stats_t *stats;
|
138
|
-
|
139
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
140
|
-
|
141
|
-
return rb_float_new( stats->min );
|
142
|
-
}
|
143
|
-
|
144
|
-
|
145
|
-
/**
|
146
|
-
* call-seq:
|
147
|
-
* stat.count -> Integer
|
148
|
-
*
|
149
|
-
* Return the number of values that have passed through the Stats object.
|
150
|
-
*/
|
151
|
-
VALUE hitimes_stats_count( VALUE self )
|
152
|
-
{
|
153
|
-
hitimes_stats_t *stats;
|
154
|
-
|
155
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
156
|
-
|
157
|
-
return LONG2NUM( stats->count );
|
158
|
-
}
|
159
|
-
|
160
|
-
|
161
|
-
/**
|
162
|
-
* call-seq:
|
163
|
-
* stat.sum -> Float
|
164
|
-
*
|
165
|
-
* Return the sum of all the values that have passed through the Stats object.
|
166
|
-
*/
|
167
|
-
VALUE hitimes_stats_sum( VALUE self )
|
168
|
-
{
|
169
|
-
hitimes_stats_t *stats;
|
170
|
-
|
171
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
172
|
-
|
173
|
-
return rb_float_new( stats->sum );
|
174
|
-
}
|
175
|
-
|
176
|
-
|
177
|
-
/**
|
178
|
-
* call-seq:
|
179
|
-
* stat.stddev -> Float
|
180
|
-
*
|
181
|
-
* Return the standard deviation of all the values that have passed through the
|
182
|
-
* Stats object. The standard deviation has no meaning unless the count is > 1,
|
183
|
-
* therefore if the current _stat.count_ is < 1 then 0.0 will be returned;
|
184
|
-
*/
|
185
|
-
VALUE hitimes_stats_stddev ( VALUE self )
|
186
|
-
{
|
187
|
-
hitimes_stats_t *stats;
|
188
|
-
double stddev = 0.0;
|
189
|
-
|
190
|
-
Data_Get_Struct( self, hitimes_stats_t, stats );
|
191
|
-
if ( stats->count > 1 ) {
|
192
|
-
stddev = sqrt( ( stats->sumsq - ( stats->sum * stats->sum / stats->count ) ) / ( stats->count - 1 ) );
|
193
|
-
}
|
194
|
-
|
195
|
-
return rb_float_new( stddev );
|
196
|
-
}
|
197
|
-
|
198
|
-
|
199
|
-
/**
|
200
|
-
* Document-class: Hitimes::Stats
|
201
|
-
*
|
202
|
-
* The Stats class encapulsates capturing and reporting statistics. It is
|
203
|
-
* modeled after the RFuzz::Sampler class, but implemented in C. For general use
|
204
|
-
* you allocate a new Stats object, and then update it with new values. The
|
205
|
-
* Stats object will keep track of the _min_, _max_, _count_ and _sum_ and when
|
206
|
-
* you want you may also retrieve the _mean_ and _stddev_.
|
207
|
-
*
|
208
|
-
* this contrived example shows getting a list of all the files in a directory
|
209
|
-
* and running stats on file sizes.
|
210
|
-
*
|
211
|
-
* s = Hitimes::Stats.new
|
212
|
-
* dir = ARGV.shift || Dir.pwd
|
213
|
-
* Dir.entries( dir ).each do |entry|
|
214
|
-
* fs = File.stat( entry )
|
215
|
-
* if fs.file? then
|
216
|
-
* s.update( fs.size )
|
217
|
-
* end
|
218
|
-
* end
|
219
|
-
*
|
220
|
-
* %w[ count min max mean sum stddev rate ].each do |m|
|
221
|
-
* puts "#{m.rjust(6)} : #{s.send( m ) }"
|
222
|
-
* end
|
223
|
-
*/
|
224
|
-
void Init_hitimes_stats()
|
225
|
-
{
|
226
|
-
|
227
|
-
mH = rb_define_module("Hitimes");
|
228
|
-
|
229
|
-
cH_Stats = rb_define_class_under( mH, "Stats", rb_cObject ); /* in hitimes_stats.c */
|
230
|
-
rb_define_alloc_func( cH_Stats, hitimes_stats_alloc );
|
231
|
-
|
232
|
-
rb_define_method( cH_Stats, "update", hitimes_stats_update, 1 ); /* in hitimes_stats.c */
|
233
|
-
|
234
|
-
rb_define_method( cH_Stats, "count", hitimes_stats_count, 0 ); /* in hitimes_stats.c */
|
235
|
-
rb_define_method( cH_Stats, "max", hitimes_stats_max, 0 ); /* in hitimes_stats.c */
|
236
|
-
rb_define_method( cH_Stats, "mean", hitimes_stats_mean, 0 ); /* in hitimes_stats.c */
|
237
|
-
rb_define_method( cH_Stats, "min", hitimes_stats_min, 0 ); /* in hitimes_stats.c */
|
238
|
-
rb_define_method( cH_Stats, "rate", hitimes_stats_rate, 0 ); /* in hitimes_stats.c */
|
239
|
-
rb_define_method( cH_Stats, "sum", hitimes_stats_sum, 0 ); /* in hitimes_stats.c */
|
240
|
-
rb_define_method( cH_Stats, "stddev", hitimes_stats_stddev, 0 ); /* in hitimes_stats.c */
|
241
|
-
}
|
242
|
-
|
@@ -1,30 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2008 Jeremy Hinegardner
|
3
|
-
* All rights reserved. See LICENSE and/or COPYING for details.
|
4
|
-
*
|
5
|
-
* vim: shiftwidth=4
|
6
|
-
*/
|
7
|
-
|
8
|
-
#ifndef __HITIMES_STATS_H__
|
9
|
-
#define __HITIMES_STATS_H__
|
10
|
-
|
11
|
-
#include <ruby.h>
|
12
|
-
#include <math.h>
|
13
|
-
|
14
|
-
/* classes and modules defined elswhere */
|
15
|
-
extern VALUE mH; /* Hitimes */
|
16
|
-
extern VALUE eH_Error; /* Hitimes::Error */
|
17
|
-
extern VALUE cH_Stats; /* Hitimes::Stats */
|
18
|
-
|
19
|
-
|
20
|
-
typedef struct hitimes_stats {
|
21
|
-
double min;
|
22
|
-
double max;
|
23
|
-
double sum;
|
24
|
-
double sumsq;
|
25
|
-
long count;
|
26
|
-
} hitimes_stats_t;
|
27
|
-
|
28
|
-
#endif
|
29
|
-
|
30
|
-
|
@@ -1,178 +0,0 @@
|
|
1
|
-
|
2
|
-
# This file was created by mkconfig.rb when ruby was built. Any
|
3
|
-
# changes made to this file will be lost the next time ruby is built.
|
4
|
-
|
5
|
-
module Config
|
6
|
-
RUBY_VERSION == "1.8.6" or
|
7
|
-
raise "ruby lib version (1.8.6) doesn't match executable version (#{RUBY_VERSION})"
|
8
|
-
|
9
|
-
TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
|
10
|
-
DESTDIR = '' unless defined? DESTDIR
|
11
|
-
CONFIG = {}
|
12
|
-
CONFIG["DESTDIR"] = DESTDIR
|
13
|
-
CONFIG["INSTALL"] = '/opt/local/bin/ginstall -c'
|
14
|
-
CONFIG["prefix"] = (TOPDIR || DESTDIR + "#{ENV["HOME"]}/ruby-mingw32")
|
15
|
-
CONFIG["EXEEXT"] = ".exe"
|
16
|
-
CONFIG["ruby_install_name"] = "ruby"
|
17
|
-
CONFIG["RUBY_INSTALL_NAME"] = "ruby"
|
18
|
-
CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
|
19
|
-
CONFIG["SHELL"] = "/bin/sh"
|
20
|
-
CONFIG["PATH_SEPARATOR"] = ":"
|
21
|
-
CONFIG["PACKAGE_NAME"] = ""
|
22
|
-
CONFIG["PACKAGE_TARNAME"] = ""
|
23
|
-
CONFIG["PACKAGE_VERSION"] = ""
|
24
|
-
CONFIG["PACKAGE_STRING"] = ""
|
25
|
-
CONFIG["PACKAGE_BUGREPORT"] = ""
|
26
|
-
CONFIG["exec_prefix"] = "$(prefix)"
|
27
|
-
CONFIG["bindir"] = "$(exec_prefix)/bin"
|
28
|
-
CONFIG["sbindir"] = "$(exec_prefix)/sbin"
|
29
|
-
CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
|
30
|
-
CONFIG["datarootdir"] = "$(prefix)/share"
|
31
|
-
CONFIG["datadir"] = "$(datarootdir)"
|
32
|
-
CONFIG["sysconfdir"] = "$(prefix)/etc"
|
33
|
-
CONFIG["sharedstatedir"] = "$(prefix)/com"
|
34
|
-
CONFIG["localstatedir"] = "$(prefix)/var"
|
35
|
-
CONFIG["includedir"] = "$(prefix)/include"
|
36
|
-
CONFIG["oldincludedir"] = "/usr/include"
|
37
|
-
CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
|
38
|
-
CONFIG["infodir"] = "$(datarootdir)/info"
|
39
|
-
CONFIG["htmldir"] = "$(docdir)"
|
40
|
-
CONFIG["dvidir"] = "$(docdir)"
|
41
|
-
CONFIG["pdfdir"] = "$(docdir)"
|
42
|
-
CONFIG["psdir"] = "$(docdir)"
|
43
|
-
CONFIG["libdir"] = "$(exec_prefix)/lib"
|
44
|
-
CONFIG["localedir"] = "$(datarootdir)/locale"
|
45
|
-
CONFIG["mandir"] = "$(datarootdir)/man"
|
46
|
-
CONFIG["ECHO_C"] = ""
|
47
|
-
CONFIG["ECHO_N"] = "-n"
|
48
|
-
CONFIG["ECHO_T"] = ""
|
49
|
-
CONFIG["LIBS"] = "-lwsock32 "
|
50
|
-
CONFIG["build_alias"] = "i686-darwin9.2.2"
|
51
|
-
CONFIG["host_alias"] = "i386-mingw32"
|
52
|
-
CONFIG["target_alias"] = "i386-mingw32"
|
53
|
-
CONFIG["MAJOR"] = "1"
|
54
|
-
CONFIG["MINOR"] = "8"
|
55
|
-
CONFIG["TEENY"] = "6"
|
56
|
-
CONFIG["build"] = "i686-pc-darwin9.2.2"
|
57
|
-
CONFIG["build_cpu"] = "i686"
|
58
|
-
CONFIG["build_vendor"] = "pc"
|
59
|
-
CONFIG["build_os"] = "darwin9.2.2"
|
60
|
-
CONFIG["host"] = "i386-pc-mingw32"
|
61
|
-
CONFIG["host_cpu"] = "i386"
|
62
|
-
CONFIG["host_vendor"] = "pc"
|
63
|
-
CONFIG["host_os"] = "mingw32"
|
64
|
-
CONFIG["target"] = "i386-pc-mingw32"
|
65
|
-
CONFIG["target_cpu"] = "i386"
|
66
|
-
CONFIG["target_vendor"] = "pc"
|
67
|
-
CONFIG["target_os"] = "mingw32"
|
68
|
-
CONFIG["CC"] = "i386-mingw32-gcc"
|
69
|
-
CONFIG["CFLAGS"] = "-g -O2 "
|
70
|
-
CONFIG["LDFLAGS"] = "-L. "
|
71
|
-
CONFIG["CPPFLAGS"] = ""
|
72
|
-
CONFIG["OBJEXT"] = "o"
|
73
|
-
CONFIG["CPP"] = "i386-mingw32-gcc -E"
|
74
|
-
CONFIG["GREP"] = "/usr/bin/grep"
|
75
|
-
CONFIG["EGREP"] = "/usr/bin/grep -E"
|
76
|
-
CONFIG["GNU_LD"] = "yes"
|
77
|
-
CONFIG["CPPOUTFILE"] = "-o conftest.i"
|
78
|
-
CONFIG["OUTFLAG"] = "-o "
|
79
|
-
CONFIG["YACC"] = "bison -y"
|
80
|
-
CONFIG["YFLAGS"] = ""
|
81
|
-
CONFIG["RANLIB"] = "i386-mingw32-ranlib"
|
82
|
-
CONFIG["AR"] = "i386-mingw32-ar"
|
83
|
-
CONFIG["AS"] = "i386-mingw32-as"
|
84
|
-
CONFIG["ASFLAGS"] = ""
|
85
|
-
CONFIG["NM"] = "i386-mingw32-nm"
|
86
|
-
CONFIG["WINDRES"] = "i386-mingw32-windres"
|
87
|
-
CONFIG["DLLWRAP"] = "i386-mingw32-dllwrap"
|
88
|
-
CONFIG["OBJDUMP"] = "i386-mingw32-objdump"
|
89
|
-
CONFIG["LN_S"] = "ln -s"
|
90
|
-
CONFIG["SET_MAKE"] = ""
|
91
|
-
CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
|
92
|
-
CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
|
93
|
-
CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
|
94
|
-
CONFIG["RM"] = "rm -f"
|
95
|
-
CONFIG["CP"] = "cp"
|
96
|
-
CONFIG["MAKEDIRS"] = "mkdir -p"
|
97
|
-
CONFIG["ALLOCA"] = ""
|
98
|
-
CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
|
99
|
-
CONFIG["ARCH_FLAG"] = ""
|
100
|
-
CONFIG["STATIC"] = ""
|
101
|
-
CONFIG["CCDLFLAGS"] = ""
|
102
|
-
CONFIG["LDSHARED"] = "i386-mingw32-gcc -shared -s"
|
103
|
-
CONFIG["DLEXT"] = "so"
|
104
|
-
CONFIG["DLEXT2"] = "dll"
|
105
|
-
CONFIG["LIBEXT"] = "a"
|
106
|
-
CONFIG["LINK_SO"] = ""
|
107
|
-
CONFIG["LIBPATHFLAG"] = " -L\"%s\""
|
108
|
-
CONFIG["RPATHFLAG"] = ""
|
109
|
-
CONFIG["LIBPATHENV"] = ""
|
110
|
-
CONFIG["TRY_LINK"] = ""
|
111
|
-
CONFIG["STRIP"] = "strip"
|
112
|
-
CONFIG["EXTSTATIC"] = ""
|
113
|
-
CONFIG["setup"] = "Setup"
|
114
|
-
CONFIG["MINIRUBY"] = "ruby -I#{ENV['HOME']}/pkgs/ruby-1.8.6-p114 -rfake"
|
115
|
-
CONFIG["PREP"] = "fake.rb"
|
116
|
-
CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
|
117
|
-
CONFIG["EXTOUT"] = ".ext"
|
118
|
-
CONFIG["ARCHFILE"] = ""
|
119
|
-
CONFIG["RDOCTARGET"] = ""
|
120
|
-
CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
|
121
|
-
CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000"
|
122
|
-
CONFIG["LIBRUBY_LDSHARED"] = "i386-mingw32-gcc -shared -s"
|
123
|
-
CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
|
124
|
-
CONFIG["rubyw_install_name"] = "rubyw"
|
125
|
-
CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
|
126
|
-
CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
|
127
|
-
CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
|
128
|
-
CONFIG["LIBRUBY_ALIASES"] = ""
|
129
|
-
CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
|
130
|
-
CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
|
131
|
-
CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
|
132
|
-
CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
|
133
|
-
CONFIG["SOLIBS"] = "$(LIBS)"
|
134
|
-
CONFIG["DLDLIBS"] = ""
|
135
|
-
CONFIG["ENABLE_SHARED"] = "yes"
|
136
|
-
CONFIG["MAINLIBS"] = ""
|
137
|
-
CONFIG["COMMON_LIBS"] = "m"
|
138
|
-
CONFIG["COMMON_MACROS"] = ""
|
139
|
-
CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
|
140
|
-
CONFIG["EXPORT_PREFIX"] = ""
|
141
|
-
CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
|
142
|
-
CONFIG["arch"] = "i386-mingw32"
|
143
|
-
CONFIG["sitearch"] = "i386-msvcrt"
|
144
|
-
CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
|
145
|
-
CONFIG["configure_args"] = " '--host=i386-mingw32' '--target=i386-mingw32' '--build=i686-darwin9.2.2' '--prefix=#{ENV['HOME']}/ruby-mingw32' 'build_alias=i686-darwin9.2.2' 'host_alias=i386-mingw32' 'target_alias=i386-mingw32'"
|
146
|
-
CONFIG["NROFF"] = "/usr/bin/nroff"
|
147
|
-
CONFIG["MANTYPE"] = "doc"
|
148
|
-
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
|
149
|
-
CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
|
150
|
-
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
151
|
-
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
152
|
-
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
153
|
-
CONFIG["topdir"] = File.dirname(__FILE__)
|
154
|
-
MAKEFILE_CONFIG = {}
|
155
|
-
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
156
|
-
def Config::expand(val, config = CONFIG)
|
157
|
-
val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
|
158
|
-
if !(v = $1 || $2)
|
159
|
-
'$'
|
160
|
-
elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
|
161
|
-
pat, sub = $1, $2
|
162
|
-
config[v] = false
|
163
|
-
Config::expand(key, config)
|
164
|
-
config[v] = key
|
165
|
-
key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
|
166
|
-
key
|
167
|
-
else
|
168
|
-
var
|
169
|
-
end
|
170
|
-
end
|
171
|
-
val
|
172
|
-
end
|
173
|
-
CONFIG.each_value do |val|
|
174
|
-
Config::expand(val)
|
175
|
-
end
|
176
|
-
end
|
177
|
-
RbConfig = Config # compatibility for ruby-1.9
|
178
|
-
CROSS_COMPILING = nil unless defined? CROSS_COMPILING
|
@@ -1,178 +0,0 @@
|
|
1
|
-
|
2
|
-
# This file was created by mkconfig.rb when ruby was built. Any
|
3
|
-
# changes made to this file will be lost the next time ruby is built.
|
4
|
-
|
5
|
-
module Config
|
6
|
-
RUBY_VERSION == "1.8.6" or
|
7
|
-
raise "ruby lib version (1.8.6) doesn't match executable version (#{RUBY_VERSION})"
|
8
|
-
|
9
|
-
TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
|
10
|
-
DESTDIR = '' unless defined? DESTDIR
|
11
|
-
CONFIG = {}
|
12
|
-
CONFIG["DESTDIR"] = DESTDIR
|
13
|
-
CONFIG["INSTALL"] = '/opt/local/bin/ginstall -c'
|
14
|
-
CONFIG["prefix"] = (TOPDIR || DESTDIR + "#{ENV["HOME"]}/ruby-mingw32")
|
15
|
-
CONFIG["EXEEXT"] = ".exe"
|
16
|
-
CONFIG["ruby_install_name"] = "ruby"
|
17
|
-
CONFIG["RUBY_INSTALL_NAME"] = "ruby"
|
18
|
-
CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
|
19
|
-
CONFIG["SHELL"] = "/bin/sh"
|
20
|
-
CONFIG["PATH_SEPARATOR"] = ":"
|
21
|
-
CONFIG["PACKAGE_NAME"] = ""
|
22
|
-
CONFIG["PACKAGE_TARNAME"] = ""
|
23
|
-
CONFIG["PACKAGE_VERSION"] = ""
|
24
|
-
CONFIG["PACKAGE_STRING"] = ""
|
25
|
-
CONFIG["PACKAGE_BUGREPORT"] = ""
|
26
|
-
CONFIG["exec_prefix"] = "$(prefix)"
|
27
|
-
CONFIG["bindir"] = "$(exec_prefix)/bin"
|
28
|
-
CONFIG["sbindir"] = "$(exec_prefix)/sbin"
|
29
|
-
CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
|
30
|
-
CONFIG["datarootdir"] = "$(prefix)/share"
|
31
|
-
CONFIG["datadir"] = "$(datarootdir)"
|
32
|
-
CONFIG["sysconfdir"] = "$(prefix)/etc"
|
33
|
-
CONFIG["sharedstatedir"] = "$(prefix)/com"
|
34
|
-
CONFIG["localstatedir"] = "$(prefix)/var"
|
35
|
-
CONFIG["includedir"] = "$(prefix)/include"
|
36
|
-
CONFIG["oldincludedir"] = "/usr/include"
|
37
|
-
CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
|
38
|
-
CONFIG["infodir"] = "$(datarootdir)/info"
|
39
|
-
CONFIG["htmldir"] = "$(docdir)"
|
40
|
-
CONFIG["dvidir"] = "$(docdir)"
|
41
|
-
CONFIG["pdfdir"] = "$(docdir)"
|
42
|
-
CONFIG["psdir"] = "$(docdir)"
|
43
|
-
CONFIG["libdir"] = "$(exec_prefix)/lib"
|
44
|
-
CONFIG["localedir"] = "$(datarootdir)/locale"
|
45
|
-
CONFIG["mandir"] = "$(datarootdir)/man"
|
46
|
-
CONFIG["ECHO_C"] = ""
|
47
|
-
CONFIG["ECHO_N"] = "-n"
|
48
|
-
CONFIG["ECHO_T"] = ""
|
49
|
-
CONFIG["LIBS"] = "-lwsock32 "
|
50
|
-
CONFIG["build_alias"] = "i686-darwin9.2.2"
|
51
|
-
CONFIG["host_alias"] = "i386-mingw32"
|
52
|
-
CONFIG["target_alias"] = "i386-mingw32"
|
53
|
-
CONFIG["MAJOR"] = "1"
|
54
|
-
CONFIG["MINOR"] = "8"
|
55
|
-
CONFIG["TEENY"] = "6"
|
56
|
-
CONFIG["build"] = "i686-pc-darwin9.2.2"
|
57
|
-
CONFIG["build_cpu"] = "i686"
|
58
|
-
CONFIG["build_vendor"] = "pc"
|
59
|
-
CONFIG["build_os"] = "darwin9.2.2"
|
60
|
-
CONFIG["host"] = "i386-pc-mingw32"
|
61
|
-
CONFIG["host_cpu"] = "i386"
|
62
|
-
CONFIG["host_vendor"] = "pc"
|
63
|
-
CONFIG["host_os"] = "mingw32"
|
64
|
-
CONFIG["target"] = "i386-pc-mingw32"
|
65
|
-
CONFIG["target_cpu"] = "i386"
|
66
|
-
CONFIG["target_vendor"] = "pc"
|
67
|
-
CONFIG["target_os"] = "mingw32"
|
68
|
-
CONFIG["CC"] = "i386-mingw32-gcc"
|
69
|
-
CONFIG["CFLAGS"] = "-g -O2 "
|
70
|
-
CONFIG["LDFLAGS"] = "-L. "
|
71
|
-
CONFIG["CPPFLAGS"] = ""
|
72
|
-
CONFIG["OBJEXT"] = "o"
|
73
|
-
CONFIG["CPP"] = "i386-mingw32-gcc -E"
|
74
|
-
CONFIG["GREP"] = "/usr/bin/grep"
|
75
|
-
CONFIG["EGREP"] = "/usr/bin/grep -E"
|
76
|
-
CONFIG["GNU_LD"] = "yes"
|
77
|
-
CONFIG["CPPOUTFILE"] = "-o conftest.i"
|
78
|
-
CONFIG["OUTFLAG"] = "-o "
|
79
|
-
CONFIG["YACC"] = "bison -y"
|
80
|
-
CONFIG["YFLAGS"] = ""
|
81
|
-
CONFIG["RANLIB"] = "i386-mingw32-ranlib"
|
82
|
-
CONFIG["AR"] = "i386-mingw32-ar"
|
83
|
-
CONFIG["AS"] = "i386-mingw32-as"
|
84
|
-
CONFIG["ASFLAGS"] = ""
|
85
|
-
CONFIG["NM"] = "i386-mingw32-nm"
|
86
|
-
CONFIG["WINDRES"] = "i386-mingw32-windres"
|
87
|
-
CONFIG["DLLWRAP"] = "i386-mingw32-dllwrap"
|
88
|
-
CONFIG["OBJDUMP"] = "i386-mingw32-objdump"
|
89
|
-
CONFIG["LN_S"] = "ln -s"
|
90
|
-
CONFIG["SET_MAKE"] = ""
|
91
|
-
CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
|
92
|
-
CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
|
93
|
-
CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
|
94
|
-
CONFIG["RM"] = "rm -f"
|
95
|
-
CONFIG["CP"] = "cp"
|
96
|
-
CONFIG["MAKEDIRS"] = "mkdir -p"
|
97
|
-
CONFIG["ALLOCA"] = ""
|
98
|
-
CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
|
99
|
-
CONFIG["ARCH_FLAG"] = ""
|
100
|
-
CONFIG["STATIC"] = ""
|
101
|
-
CONFIG["CCDLFLAGS"] = ""
|
102
|
-
CONFIG["LDSHARED"] = "i386-mingw32-gcc -shared -s"
|
103
|
-
CONFIG["DLEXT"] = "so"
|
104
|
-
CONFIG["DLEXT2"] = "dll"
|
105
|
-
CONFIG["LIBEXT"] = "a"
|
106
|
-
CONFIG["LINK_SO"] = ""
|
107
|
-
CONFIG["LIBPATHFLAG"] = " -L\"%s\""
|
108
|
-
CONFIG["RPATHFLAG"] = ""
|
109
|
-
CONFIG["LIBPATHENV"] = ""
|
110
|
-
CONFIG["TRY_LINK"] = ""
|
111
|
-
CONFIG["STRIP"] = "strip"
|
112
|
-
CONFIG["EXTSTATIC"] = ""
|
113
|
-
CONFIG["setup"] = "Setup"
|
114
|
-
CONFIG["MINIRUBY"] = "ruby -I#{ENV['HOME']}/pkgs/ruby-1.8.6-p114 -rfake"
|
115
|
-
CONFIG["PREP"] = "fake.rb"
|
116
|
-
CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
|
117
|
-
CONFIG["EXTOUT"] = ".ext"
|
118
|
-
CONFIG["ARCHFILE"] = ""
|
119
|
-
CONFIG["RDOCTARGET"] = ""
|
120
|
-
CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
|
121
|
-
CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000"
|
122
|
-
CONFIG["LIBRUBY_LDSHARED"] = "i386-mingw32-gcc -shared -s"
|
123
|
-
CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
|
124
|
-
CONFIG["rubyw_install_name"] = "rubyw"
|
125
|
-
CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
|
126
|
-
CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
|
127
|
-
CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
|
128
|
-
CONFIG["LIBRUBY_ALIASES"] = ""
|
129
|
-
CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
|
130
|
-
CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
|
131
|
-
CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
|
132
|
-
CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
|
133
|
-
CONFIG["SOLIBS"] = "$(LIBS)"
|
134
|
-
CONFIG["DLDLIBS"] = ""
|
135
|
-
CONFIG["ENABLE_SHARED"] = "yes"
|
136
|
-
CONFIG["MAINLIBS"] = ""
|
137
|
-
CONFIG["COMMON_LIBS"] = "m"
|
138
|
-
CONFIG["COMMON_MACROS"] = ""
|
139
|
-
CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
|
140
|
-
CONFIG["EXPORT_PREFIX"] = ""
|
141
|
-
CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
|
142
|
-
CONFIG["arch"] = "i386-mingw32"
|
143
|
-
CONFIG["sitearch"] = "i386-msvcrt"
|
144
|
-
CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
|
145
|
-
CONFIG["configure_args"] = " '--host=i386-mingw32' '--target=i386-mingw32' '--build=i686-darwin9.2.2' '--prefix=#{ENV['HOME']}/ruby-mingw32' 'build_alias=i686-darwin9.2.2' 'host_alias=i386-mingw32' 'target_alias=i386-mingw32'"
|
146
|
-
CONFIG["NROFF"] = "/usr/bin/nroff"
|
147
|
-
CONFIG["MANTYPE"] = "doc"
|
148
|
-
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
|
149
|
-
CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
|
150
|
-
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
151
|
-
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
152
|
-
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
153
|
-
CONFIG["topdir"] = File.dirname(__FILE__)
|
154
|
-
MAKEFILE_CONFIG = {}
|
155
|
-
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
156
|
-
def Config::expand(val, config = CONFIG)
|
157
|
-
val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
|
158
|
-
if !(v = $1 || $2)
|
159
|
-
'$'
|
160
|
-
elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
|
161
|
-
pat, sub = $1, $2
|
162
|
-
config[v] = false
|
163
|
-
Config::expand(key, config)
|
164
|
-
config[v] = key
|
165
|
-
key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
|
166
|
-
key
|
167
|
-
else
|
168
|
-
var
|
169
|
-
end
|
170
|
-
end
|
171
|
-
val
|
172
|
-
end
|
173
|
-
CONFIG.each_value do |val|
|
174
|
-
Config::expand(val)
|
175
|
-
end
|
176
|
-
end
|
177
|
-
RbConfig = Config # compatibility for ruby-1.9
|
178
|
-
CROSS_COMPILING = nil unless defined? CROSS_COMPILING
|
@@ -1,54 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'hitimes/version'
|
3
|
-
require 'tasks/config'
|
4
|
-
|
5
|
-
Hitimes::GEM_SPEC = Gem::Specification.new do |spec|
|
6
|
-
proj = Configuration.for('project')
|
7
|
-
spec.name = proj.name
|
8
|
-
spec.version = Hitimes::VERSION
|
9
|
-
|
10
|
-
spec.author = proj.author
|
11
|
-
spec.email = proj.email
|
12
|
-
spec.homepage = proj.homepage
|
13
|
-
spec.summary = proj.summary
|
14
|
-
spec.description = proj.description
|
15
|
-
spec.platform = Gem::Platform::RUBY
|
16
|
-
|
17
|
-
|
18
|
-
pkg = Configuration.for('packaging')
|
19
|
-
spec.files = pkg.files.all
|
20
|
-
spec.executables = pkg.files.bin.collect { |b| File.basename(b) }
|
21
|
-
|
22
|
-
# add dependencies here
|
23
|
-
spec.add_dependency("rake", ">= 0.8.1")
|
24
|
-
spec.add_dependency("configuration", ">= 0.0.5")
|
25
|
-
|
26
|
-
if ext_conf = Configuration.for_if_exist?("extension") then
|
27
|
-
spec.extensions << ext_conf.configs
|
28
|
-
spec.require_paths << 'ext'
|
29
|
-
spec.extensions.flatten!
|
30
|
-
end
|
31
|
-
|
32
|
-
if rdoc = Configuration.for_if_exist?('rdoc') then
|
33
|
-
spec.has_rdoc = true
|
34
|
-
spec.extra_rdoc_files = pkg.files.rdoc
|
35
|
-
spec.rdoc_options = rdoc.options + [ "--main" , rdoc.main_page ]
|
36
|
-
else
|
37
|
-
spec.has_rdoc = false
|
38
|
-
end
|
39
|
-
|
40
|
-
if test = Configuration.for_if_exist?('testing') then
|
41
|
-
spec.test_files = test.files
|
42
|
-
end
|
43
|
-
|
44
|
-
if rf = Configuration.for_if_exist?('rubyforge') then
|
45
|
-
spec.rubyforge_project = rf.project
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
Hitimes::GEM_SPEC_WIN = Hitimes::GEM_SPEC.clone
|
50
|
-
Hitimes::GEM_SPEC_WIN.platform = ::Gem::Platform.new( "i386-mswin32_60" )
|
51
|
-
Hitimes::GEM_SPEC_WIN.extensions = []
|
52
|
-
Hitimes::GEM_SPEC_WIN.files += ["lib/hitimes_ext.so"]
|
53
|
-
|
54
|
-
Hitimes::SPECS = [ Hitimes::GEM_SPEC, Hitimes::GEM_SPEC_WIN ]
|