Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (44 sloc) 1.336 kB
ad5a548 @metaskills [1.9] Added a few #encoding file hints. Add 1px.gif as a schema fixtu…
metaskills authored
1 # encoding: UTF-8
74f0121 @metaskills Initial checking.
metaskills authored
2 require 'rake'
7120f62 @metaskills Final push for release.
metaskills authored
3 require "rake/clean"
4 require 'rbconfig'
8e03fcb @metaskills Get the Rakefile working and building extension by finding freetds in…
metaskills authored
5 require 'rake/testtask'
74f0121 @metaskills Initial checking.
metaskills authored
6 require 'rake/extensiontask'
3c97350 @luislavena Use RubyGems' PackageTask to build the gem
luislavena authored
7 require "rubygems/package_task"
74f0121 @metaskills Initial checking.
metaskills authored
8
39d268d @metaskills Note MiniPortile.
metaskills authored
9 # My notes for cross compile native Windows gem.
10 # gcla ; bundle install ; rake compile ; rake cross compile ; rake cross native gem
11
74f0121 @metaskills Initial checking.
metaskills authored
12 def test_libs
13 ['lib','test']
14 end
15
16 def test_files
3839fc8 @metaskills Woot! Passing a few basic tests that prove the structure and build ar…
metaskills authored
17 Dir.glob("test/**/*_test.rb").sort
74f0121 @metaskills Initial checking.
metaskills authored
18 end
19
7120f62 @metaskills Final push for release.
metaskills authored
20 def gemspec
21 @clean_gemspec ||= eval(File.read(File.expand_path('../tiny_tds.gemspec', __FILE__)))
22 end
23
8e03fcb @metaskills Get the Rakefile working and building extension by finding freetds in…
metaskills authored
24 Rake::TestTask.new do |t|
74f0121 @metaskills Initial checking.
metaskills authored
25 t.libs = test_libs
26 t.test_files = test_files
27 t.verbose = true
28 end
29
3c97350 @luislavena Use RubyGems' PackageTask to build the gem
luislavena authored
30 Gem::PackageTask.new(gemspec) do |pkg|
31 pkg.need_tar = false
32 pkg.need_zip = false
49acc0b @metaskills More prep for gem release.
metaskills authored
33 end
34
e335705 @metaskills Allow TINYTDS_SKIP_PORTS environment var to skip ports.
metaskills authored
35 task :compile => ["ports:freetds"] unless ENV['TINYTDS_SKIP_PORTS']
8f24f7f @luislavena Force freetds port dependency on compile
luislavena authored
36
49acc0b @metaskills More prep for gem release.
metaskills authored
37 Rake::ExtensionTask.new('tiny_tds', gemspec) do |ext|
38 ext.lib_dir = 'lib/tiny_tds'
4652e0e @metaskills Iconv is a dep only when compiling locally. However, left in the abil…
metaskills authored
39 ext.config_options << "--enable-iconv" unless ENV['TINYTDS_SKIP_PORTS']
ef163c5 @luislavena Make TinyTDS cross compile, enjoy
luislavena authored
40 if RUBY_PLATFORM =~ /mswin|mingw/ then
a6137ee @metaskills Remove my old RVM stuff.
metaskills authored
41 # Define target for extension (supporting fat binaries).
ef163c5 @luislavena Make TinyTDS cross compile, enjoy
luislavena authored
42 RUBY_VERSION =~ /(\d+\.\d+)/
43 ext.lib_dir = "lib/tiny_tds/#{$1}"
44 else
45 ext.cross_compile = true
46 ext.cross_platform = ['i386-mingw32']
47 ext.cross_config_options << "--disable-lookup"
48 end
74f0121 @metaskills Initial checking.
metaskills authored
49 end
50
51 task :build => [:clean, :compile]
52
3839fc8 @metaskills Woot! Passing a few basic tests that prove the structure and build ar…
metaskills authored
53 task :default => [:build, :test]
74f0121 @metaskills Initial checking.
metaskills authored
54
b9d6e06 @luislavena Defer loading ports tasks until extension is
luislavena authored
55 Dir["tasks/*.rake"].sort.each { |f| load f }
Something went wrong with that request. Please try again.