hitimes 1.0.3-x86-mswin32-60 → 1.2.2-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/.travis.yml +10 -0
  2. data/CONTRIBUTING.md +45 -0
  3. data/HISTORY.md +97 -0
  4. data/LICENSE +11 -8
  5. data/Manifest.txt +45 -0
  6. data/README.md +163 -0
  7. data/Rakefile +23 -62
  8. data/ext/hitimes/c/extconf.rb +24 -0
  9. data/ext/hitimes/{hitimes_ext.c → c/hitimes.c} +1 -1
  10. data/ext/hitimes/{hitimes_instant_clock_gettime.c → c/hitimes_instant_clock_gettime.c} +0 -0
  11. data/ext/hitimes/c/hitimes_instant_osx.c +45 -0
  12. data/ext/hitimes/{hitimes_instant_windows.c → c/hitimes_instant_windows.c} +0 -0
  13. data/ext/hitimes/{hitimes_interval.c → c/hitimes_interval.c} +15 -7
  14. data/ext/hitimes/{hitimes_interval.h → c/hitimes_interval.h} +5 -5
  15. data/ext/hitimes/{hitimes_stats.c → c/hitimes_stats.c} +0 -0
  16. data/ext/hitimes/{hitimes_stats.h → c/hitimes_stats.h} +0 -0
  17. data/ext/hitimes/java/src/hitimes/Hitimes.java +54 -0
  18. data/ext/hitimes/java/src/hitimes/HitimesInterval.java +181 -0
  19. data/ext/hitimes/java/src/hitimes/HitimesService.java +16 -0
  20. data/ext/hitimes/java/src/hitimes/HitimesStats.java +112 -0
  21. data/lib/hitimes.rb +18 -5
  22. data/lib/hitimes/1.9/hitimes.so +0 -0
  23. data/lib/hitimes/2.0/hitimes.so +0 -0
  24. data/lib/hitimes/2.1/hitimes.so +0 -0
  25. data/lib/hitimes/metric.rb +6 -0
  26. data/lib/hitimes/mutexed_stats.rb +5 -1
  27. data/lib/hitimes/stats.rb +5 -1
  28. data/lib/hitimes/timed_metric.rb +1 -2
  29. data/lib/hitimes/timed_value_metric.rb +0 -2
  30. data/lib/hitimes/value_metric.rb +2 -3
  31. data/lib/hitimes/version.rb +1 -50
  32. data/spec/hitimes_spec.rb +14 -0
  33. data/spec/interval_spec.rb +40 -37
  34. data/spec/metric_spec.rb +8 -10
  35. data/spec/mutex_stats_spec.rb +10 -8
  36. data/spec/paths_spec.rb +3 -5
  37. data/spec/spec_helper.rb +9 -4
  38. data/spec/stats_spec.rb +28 -30
  39. data/spec/timed_metric_spec.rb +44 -44
  40. data/spec/timed_value_metric_spec.rb +54 -55
  41. data/spec/value_metric_spec.rb +28 -30
  42. data/spec/version_spec.rb +4 -30
  43. data/tasks/default.rake +254 -0
  44. data/tasks/extension.rake +29 -73
  45. data/tasks/this.rb +200 -0
  46. metadata +173 -105
  47. data/HISTORY +0 -55
  48. data/README +0 -134
  49. data/ext/hitimes/extconf.rb +0 -21
  50. data/ext/hitimes/hitimes_instant_osx.c +0 -16
  51. data/gemspec.rb +0 -57
  52. data/lib/hitimes/1.8/hitimes_ext.so +0 -0
  53. data/lib/hitimes/1.9/hitimes_ext.so +0 -0
  54. data/tasks/announce.rake +0 -39
  55. data/tasks/config.rb +0 -108
  56. data/tasks/distribution.rake +0 -74
  57. data/tasks/documentation.rake +0 -32
  58. data/tasks/rspec.rake +0 -31
  59. data/tasks/rubyforge.rake +0 -55
  60. data/tasks/utils.rb +0 -80
@@ -1,6 +1,4 @@
1
- require File.expand_path( File.join( File.dirname( __FILE__ ), "spec_helper.rb" ) )
2
-
3
- require 'hitimes/value_metric'
1
+ require 'spec_helper'
4
2
 
5
3
  describe Hitimes::ValueMetric do
6
4
  before( :each ) do
@@ -9,100 +7,100 @@ describe Hitimes::ValueMetric do
9
7
  end
10
8
 
11
9
  it 'has a name' do
12
- @metric.name.should == "testing"
10
+ @metric.name.must_equal "testing"
13
11
  end
14
12
 
15
13
  it "has associated data from initialization" do
16
14
  m = Hitimes::ValueMetric.new( "more-data", 'foo' => 'bar', 'this' => 'that' )
17
- m.additional_data['foo'].should == 'bar'
18
- m.additional_data['this'].should == 'that'
15
+ m.additional_data['foo'].must_equal 'bar'
16
+ m.additional_data['this'].must_equal 'that'
19
17
 
20
18
  m = Hitimes::ValueMetric.new( "more-data", { 'foo' => 'bar', 'this' => 'that' } )
21
- m.additional_data['foo'].should == 'bar'
22
- m.additional_data['this'].should == 'that'
19
+ m.additional_data['foo'].must_equal 'bar'
20
+ m.additional_data['this'].must_equal 'that'
23
21
  end
24
22
 
25
23
  it "calculates the mean of the measurements" do
26
- @metric.mean.should == 4.5
24
+ @metric.mean.must_equal 4.5
27
25
  end
28
26
 
29
27
  it "calculates the stddev of the measurements" do
30
- @metric.stddev.should > 0.0
28
+ @metric.stddev.must_be :>, 0.0
31
29
  end
32
30
 
33
31
  it "returns 0.0 for stddev if there is no data" do
34
32
  m = Hitimes::ValueMetric.new('0-data')
35
- m.stddev.should == 0.0
33
+ m.stddev.must_equal 0.0
36
34
  end
37
35
 
38
36
  it "keeps track of the sum of data" do
39
- @metric.sum.should == 45.0
37
+ @metric.sum.must_equal 45.0
40
38
  end
41
39
 
42
40
  it "keeps track of the sum of squars of data" do
43
- @metric.sumsq.should == 285.0
41
+ @metric.sumsq.must_equal 285.0
44
42
  end
45
43
 
46
44
  it "retuns 0.0 for mean if there is no data" do
47
- Hitimes::ValueMetric.new('0-data').mean.should == 0.0
45
+ Hitimes::ValueMetric.new('0-data').mean.must_equal 0.0
48
46
  end
49
47
 
50
48
  it "keeps track of the min value" do
51
- @metric.min.should == 0
49
+ @metric.min.must_equal 0
52
50
  end
53
51
 
54
52
  it "keeps track of the max value" do
55
- @metric.max.should == 9
53
+ @metric.max.must_equal 9
56
54
  end
57
55
 
58
56
  it "keeps track of the first start time of all the measurements" do
59
57
  m = Hitimes::ValueMetric.new( "first-start-time" )
60
58
  f1 = Time.now.gmtime.to_f * 1_000_000
61
- 10.times{ |x| m.measure( x ) }
59
+ 10.times{ |x| m.measure( x ); sleep 0.1 }
62
60
  f2 = Time.now.gmtime.to_f * 1_000_000
63
- m.sampling_start_time.should > f1
64
- m.sampling_stop_time.should < f2
61
+ m.sampling_start_time.must_be :>=, f1
62
+ m.sampling_start_time.must_be :<, f2
65
63
  # distance from now to start time should be greater than the distance from
66
64
  # the start to the min start_time
67
- (f2 - m.sampling_start_time).should > ( m.sampling_start_time - f1 )
65
+ (f2 - m.sampling_start_time).must_be :>, ( m.sampling_start_time - f1 )
68
66
  end
69
67
 
70
68
  it "keeps track of the last stop time of all the intervals" do
71
69
  m = Hitimes::ValueMetric.new( "last-stop-time" )
72
70
  f1 = Time.now.gmtime.to_f * 1_000_000
73
- 10.times {|x| m.measure( x ) }
71
+ 10.times {|x| m.measure( x ); sleep 0.1 }
74
72
  f2 = Time.now.gmtime.to_f * 1_000_000
75
- m.sampling_stop_time.should > f1
76
- m.sampling_stop_time.should < f2
73
+ m.sampling_stop_time.must_be :>, f1
74
+ m.sampling_stop_time.must_be :<=, f2
77
75
  # distance from now to max stop time time should be less than the distance
78
76
  # from the start to the max stop time
79
- (f2 - m.sampling_stop_time).should < ( m.sampling_stop_time - f1 )
77
+ (f2 - m.sampling_stop_time).must_be :<, ( m.sampling_stop_time - f1 )
80
78
  end
81
79
 
82
80
  describe "#to_hash" do
83
81
 
84
82
  it "has name value" do
85
83
  h = @metric.to_hash
86
- h['name'].should == "testing"
84
+ h['name'].must_equal "testing"
87
85
  end
88
86
 
89
87
  it "has an empty has for additional_data" do
90
88
  h = @metric.to_hash
91
- h['additional_data'].should == Hash.new
92
- h['additional_data'].size.should == 0
89
+ h['additional_data'].must_equal Hash.new
90
+ h['additional_data'].size.must_equal 0
93
91
  end
94
92
 
95
93
  it "has the right sum" do
96
94
  h = @metric.to_hash
97
- h['sum'].should == 45
95
+ h['sum'].must_equal 45
98
96
  end
99
97
 
100
98
  fields = ::Hitimes::Stats::STATS.dup + %w[ name additional_data sampling_start_time sampling_stop_time ]
101
99
  fields = fields - [ 'rate' ]
102
100
  fields.each do |f|
103
- it "should have a value for #{f}" do
101
+ it "has a value for #{f}" do
104
102
  h = @metric.to_hash
105
- h[f].should_not be_nil
103
+ h[f].wont_be_nil
106
104
  end
107
105
  end
108
106
  end
@@ -1,33 +1,7 @@
1
- require File.expand_path( File.join( File.dirname( __FILE__ ), "spec_helper" ) )
1
+ require "spec_helper"
2
2
 
3
3
  describe "Hitimes::Version" do
4
- it "should have a major numbers that is >= 0" do
5
- Hitimes::Version::MAJOR.should >= 0
6
- end
7
-
8
- it "should have a minor number that is >= 0" do
9
- Hitimes::Version::MINOR.should >= 0
10
- end
11
-
12
- it "should have a tiny number that is >= 0" do
13
- Hitimes::Version::BUILD.should >= 0
14
- end
15
-
16
- it "should have an array representation" do
17
- Hitimes::Version.to_a.should have(3).items
18
- end
19
-
20
- it "should have a string representation" do
21
- Hitimes::Version.to_s.should match(/\d+\.\d+\.\d+/)
22
- end
23
-
24
- it "should have a hash representation" do
25
- [ :major, :minor, :build ].each do |k|
26
- Hitimes::Version.to_hash[k].should_not be_nil
27
- end
28
- end
29
-
30
- it "should be accessable as a constant" do
31
- Hitimes::VERSION.should match(/\d+\.\d+\.\d+/)
32
- end
4
+ it "should be accessable as a constant" do
5
+ Hitimes::VERSION.must_match(/\d+\.\d+\.\d+/)
6
+ end
33
7
  end
@@ -0,0 +1,254 @@
1
+ # vim: syntax=ruby
2
+ require 'rake/clean'
3
+ require 'digest'
4
+ #------------------------------------------------------------------------------
5
+ # If you want to Develop on this project just run 'rake develop' and you'll
6
+ # have all you need to get going. If you want to use bundler for development,
7
+ # then run 'rake develop:using_bundler'
8
+ #------------------------------------------------------------------------------
9
+ namespace :develop do
10
+
11
+ # Install all the development and runtime dependencies of this gem using the
12
+ # gemspec.
13
+ task :default do
14
+ require 'rubygems/dependency_installer'
15
+ installer = ::Gem::DependencyInstaller.new
16
+
17
+ puts "Installing gem depedencies needed for development"
18
+ This.platform_gemspec.dependencies.each do |dep|
19
+ if dep.matching_specs.empty? then
20
+ puts "Installing : #{dep}"
21
+ installer.install dep
22
+ else
23
+ puts "Skipping : #{dep} -> already installed #{dep.matching_specs.first.full_name}"
24
+ end
25
+ end
26
+ puts "\n\nNow run 'rake test'"
27
+ end
28
+
29
+ # Create a Gemfile that just references the gemspec
30
+ file 'Gemfile' => :gemspec do
31
+ File.open( "Gemfile", "w+" ) do |f|
32
+ f.puts "# DO NOT EDIT - This file is automatically generated"
33
+ f.puts "# Make changes to Manifest.txt and/or Rakefile and regenerate"
34
+ f.puts 'source "https://rubygems.org/"'
35
+ f.puts 'gemspec'
36
+ end
37
+ end
38
+
39
+ desc "Create a bundler Gemfile"
40
+ task :using_bundler => 'Gemfile' do
41
+ puts "Now you can 'bundle'"
42
+ end
43
+
44
+ end
45
+ desc "Boostrap development"
46
+ task :develop => "develop:default"
47
+
48
+ #------------------------------------------------------------------------------
49
+ # Minitest - standard TestTask
50
+ #------------------------------------------------------------------------------
51
+ begin
52
+ require 'rake/testtask'
53
+ Rake::TestTask.new( :test ) do |t|
54
+ t.ruby_opts = %w[ -w -rubygems ]
55
+ t.libs = %w[ lib spec test ]
56
+ t.pattern = "{test,spec}/**/{test_*,*_spec}.rb"
57
+ end
58
+
59
+ task :test_requirements
60
+ task :test => :test_requirements
61
+ task :default => :test
62
+ rescue LoadError
63
+ This.task_warning( 'test' )
64
+ end
65
+
66
+ #------------------------------------------------------------------------------
67
+ # RDoc - standard rdoc rake task, although we must make sure to use a more
68
+ # recent version of rdoc since it is the one that has 'tomdoc' markup
69
+ #------------------------------------------------------------------------------
70
+ begin
71
+ gem 'rdoc' # otherwise we get the wrong task from stdlib
72
+ require 'rdoc/task'
73
+ RDoc::Task.new do |t|
74
+ t.markup = 'tomdoc'
75
+ t.rdoc_dir = 'doc'
76
+ t.main = 'README.md'
77
+ t.title = "#{This.name} #{This.version}"
78
+ t.rdoc_files.include( FileList['*.{rdoc,md,txt}'], FileList['ext/**/*.c'],
79
+ FileList['lib/**/*.rb'] )
80
+ end
81
+ rescue StandardError, LoadError
82
+ This.task_warning( 'rdoc' )
83
+ end
84
+
85
+ #------------------------------------------------------------------------------
86
+ # Coverage - optional code coverage, rcov for 1.8 and simplecov for 1.9, so
87
+ # for the moment only rcov is listed.
88
+ #------------------------------------------------------------------------------
89
+ begin
90
+ require 'simplecov'
91
+ desc 'Run tests with code coverage'
92
+ task :coverage do
93
+ ENV['COVERAGE'] = 'true'
94
+ Rake::Task[:test].invoke
95
+ end
96
+ CLOBBER << FileList["coverage"] if File.directory?( "coverage" )
97
+ rescue LoadError
98
+ This.task_warning( 'simplecov' )
99
+ end
100
+
101
+ #------------------------------------------------------------------------------
102
+ # Manifest - We want an explicit list of thos files that are to be packaged in
103
+ # the gem. Most of this is from Hoe.
104
+ #------------------------------------------------------------------------------
105
+ namespace 'manifest' do
106
+ desc "Check the manifest"
107
+ task :check => :clean do
108
+ files = FileList["**/*", ".*"].exclude( This.exclude_from_manifest ).to_a.sort
109
+ files = files.select{ |f| File.file?( f ) }
110
+
111
+ tmp = "Manifest.tmp"
112
+ File.open( tmp, 'w' ) do |f|
113
+ f.puts files.join("\n")
114
+ end
115
+
116
+ begin
117
+ sh "diff -du Manifest.txt #{tmp}"
118
+ ensure
119
+ rm tmp
120
+ end
121
+ puts "Manifest looks good"
122
+ end
123
+
124
+ desc "Generate the manifest"
125
+ task :generate => :clean do
126
+ files = %x[ git ls-files ].split("\n").sort
127
+ files.reject! { |f| f =~ This.exclude_from_manifest }
128
+ File.open( "Manifest.txt", "w" ) do |f|
129
+ f.puts files.join("\n")
130
+ end
131
+ end
132
+ end
133
+
134
+ #------------------------------------------------------------------------------
135
+ # Fixme - look for fixmes and report them
136
+ #------------------------------------------------------------------------------
137
+ namespace :fixme do
138
+ task :default => 'manifest:check' do
139
+ This.manifest.each do |file|
140
+ next if file == __FILE__
141
+ next unless file =~ %r/(txt|rb|md|rdoc|css|html|xml|css)\Z/
142
+ puts "FIXME: Rename #{file}" if file =~ /fixme/i
143
+ IO.readlines( file ).each_with_index do |line, idx|
144
+ prefix = "FIXME: #{file}:#{idx+1}".ljust(42)
145
+ puts "#{prefix} => #{line.strip}" if line =~ /fixme/i
146
+ end
147
+ end
148
+ end
149
+
150
+ def fixme_project_root
151
+ This.project_path( '../fixme' )
152
+ end
153
+
154
+ def fixme_project_path( subtree )
155
+ fixme_project_root.join( subtree )
156
+ end
157
+
158
+ def local_fixme_files
159
+ This.manifest.select { |p| p =~ %r|^tasks/| }
160
+ end
161
+
162
+ def outdated_fixme_files
163
+ local_fixme_files.reject do |local|
164
+ upstream = fixme_project_path( local )
165
+ Digest::SHA256.file( local ) == Digest::SHA256.file( upstream )
166
+ end
167
+ end
168
+
169
+ def fixme_up_to_date?
170
+ outdated_fixme_files.empty?
171
+ end
172
+
173
+ desc "See if the fixme tools are outdated"
174
+ task :outdated => :release_check do
175
+ if fixme_up_to_date? then
176
+ puts "Fixme files are up to date."
177
+ else
178
+ outdated_fixme_files.each do |f|
179
+ puts "#{f} is outdated"
180
+ end
181
+ end
182
+ end
183
+
184
+ desc "Update outdated fixme files"
185
+ task :update => :release_check do
186
+ if fixme_up_to_date? then
187
+ puts "Fixme files are already up to date."
188
+ else
189
+ puts "Updating fixme files:"
190
+ outdated_fixme_files.each do |local|
191
+ upstream = fixme_project_path( local )
192
+ puts " * #{local}"
193
+ FileUtils.cp( upstream, local )
194
+ end
195
+ puts "Use your git commands as appropriate."
196
+ end
197
+ end
198
+ end
199
+ desc "Look for fixmes and report them"
200
+ task :fixme => "fixme:default"
201
+
202
+ #------------------------------------------------------------------------------
203
+ # Gem Specification
204
+ #------------------------------------------------------------------------------
205
+ # Really this is only here to support those who use bundler
206
+ desc "Build the #{This.name}.gemspec file"
207
+ task :gemspec do
208
+ File.open( This.gemspec_file, "wb+" ) do |f|
209
+ f.puts "# DO NOT EDIT - This file is automatically generated"
210
+ f.puts "# Make changes to Manifest.txt and/or Rakefile and regenerate"
211
+ f.write This.platform_gemspec.to_ruby
212
+ end
213
+ end
214
+
215
+ # .rbc files from ruby 2.0
216
+ CLOBBER << FileList["**/*.rbc"]
217
+
218
+ # The standard gem packaging task, everyone has it.
219
+ require 'rubygems/package_task'
220
+ ::Gem::PackageTask.new( This.platform_gemspec ) do
221
+ # nothing
222
+ end
223
+
224
+ #------------------------------------------------------------------------------
225
+ # Release - the steps we go through to do a final release, this is pulled from
226
+ # a compbination of mojombo's rakegem, hoe and hoe-git
227
+ #
228
+ # 1) make sure we are on the master branch
229
+ # 2) make sure there are no uncommitted items
230
+ # 3) check the manifest and make sure all looks good
231
+ # 4) build the gem
232
+ # 5) do an empty commit to have the commit message of the version
233
+ # 6) tag that commit as the version
234
+ # 7) push master
235
+ # 8) push the tag
236
+ # 7) pus the gem
237
+ #------------------------------------------------------------------------------
238
+ task :release_check do
239
+ unless `git branch` =~ /^\* master$/
240
+ abort "You must be on the master branch to release!"
241
+ end
242
+ unless `git status` =~ /^nothing to commit/m
243
+ abort "Nope, sorry, you have unfinished business"
244
+ end
245
+ end
246
+
247
+ desc "Create tag v#{This.version}, build and push #{This.platform_gemspec.full_name} to rubygems.org"
248
+ task :release => [ :release_check, 'manifest:check', :gem ] do
249
+ sh "git commit --allow-empty -a -m 'Release #{This.version}'"
250
+ sh "git tag -a -m 'v#{This.version}' v#{This.version}"
251
+ sh "git push origin master"
252
+ sh "git push origin v#{This.version}"
253
+ sh "gem push pkg/#{This.platform_gemspec.full_name}.gem"
254
+ end
@@ -1,82 +1,38 @@
1
- require 'tasks/config'
2
- require 'pathname'
1
+ # To be used if the gem has extensions.
2
+ # If this task set is inclueded then you will need to also have
3
+ #
4
+ # spec.add_development_dependency( 'rake-compiler', '~> 0.8.1' )
5
+ #
6
+ # in your top level rakefile
7
+ begin
8
+ require 'rake/extensiontask'
9
+ require 'rake/javaextensiontask'
3
10
 
4
- #-----------------------------------------------------------------------
5
- # Extensions
6
- #-----------------------------------------------------------------------
11
+ if RUBY_PLATFORM == "java" then
7
12
 
8
- if ext_config = Configuration.for_if_exist?('extension') then
9
- namespace :ext do
10
- desc "Build the extension(s)"
11
- task :build => :clean do
12
- Hitimes::GEM_SPEC.extensions.each do |extension|
13
- path = Pathname.new(extension)
14
- parts = path.split
15
- conf = parts.last
16
- Dir.chdir(path.dirname) do |d|
17
- ruby conf.to_s
18
- sh "make"
19
- end
20
- end
21
- end
22
-
23
- def build_win( version = "1.8.6" )
24
- ext_config = Configuration.for("extension")
25
- rbconfig = ext_config.cross_rbconfig["rbconfig-#{version}"]
26
- raise ArgumentError, "No cross compiler for version #{version}, we have #{ext_config.cross_rbconfig.keys.join(",")}" unless rbconfig
27
- ruby_exe = if version =~ /1\.8/ then
28
- "ruby"
29
- else
30
- "ruby1.9"
31
- end
32
- Hitimes::GEM_SPEC.extensions.each do |extension|
33
- path = Pathname.new(extension)
34
- parts = path.split
35
- conf = parts.last
36
- Dir.chdir(path.dirname) do |d|
37
- cp "#{rbconfig}", "rbconfig.rb"
38
- sh "#{ruby_exe} -I. extconf.rb"
39
- sh "make"
40
- end
41
- end
13
+ Rake::JavaExtensionTask.new( This.name) do |ext|
14
+ ext.ext_dir = File.join( 'ext', This.name, "java" )
15
+ ext.lib_dir = File.join( 'lib', This.name )
16
+ ext.gem_spec = This.java_gemspec
42
17
  end
43
18
 
44
- win_builds = []
45
- ext_config.cross_rbconfig.keys.each do |v|
46
- s = v.split("-").last
47
- desc "Build the extension for windows version #{s}"
48
- win_bname = "build_win-#{s}"
49
- win_builds << win_bname
50
- task win_bname => :clean do
51
- build_win( s )
52
- end
53
- end
19
+ else
54
20
 
55
- task :clean do
56
- ext_config.configs.each do |extension|
57
- path = Pathname.new(extension)
58
- parts = path.split
59
- conf = parts.last
60
- Dir.chdir(path.dirname) do |d|
61
- if File.exist?( "Makefile" ) then
62
- sh "make clean"
63
- end
64
- end
65
- end
66
- end
21
+ Rake::ExtensionTask.new( This.name ) do |ext|
22
+ ext.ext_dir = File.join( 'ext', This.name, "c" )
23
+ ext.lib_dir = File.join( 'lib', This.name )
24
+ ext.gem_spec = This.ruby_gemspec
67
25
 
68
- task :clobber do
69
- ext_config.configs.each do |extension|
70
- path = Pathname.new(extension)
71
- parts = path.split
72
- conf = parts.last
73
- Dir.chdir(path.dirname) do |d|
74
- if File.exist?( "Makefile" ) then
75
- sh "make distclean"
76
- end
77
- rm_f "rbconfig.rb"
78
- end
79
- end
26
+ ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
27
+ ext.cross_platform = 'i386-mswin32-60' # forces the Windows platform instead of the default one
28
+ # configure options only for cross compile
80
29
  end
81
30
  end
31
+
32
+ task :test_requirements => :compile
33
+ rescue LoadError
34
+ This.task_warning( 'extension' )
82
35
  end
36
+
37
+ CLOBBER << FileList["lib/**/*.{jar,so,bundle}"]
38
+ CLOBBER << FileList["lib/#{This.name}/{1.8,1.9,2.0,2.2}/"]