Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (45 sloc) 1.432 kb
ad5a548 @metaskills [1.9] Added a few #encoding file hints. Add 1px.gif as a schema fixture ...
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 inclu...
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
f9a5d1e @luislavena Load additional rake tasks
luislavena authored
9 Dir["tasks/*.rake"].sort.each { |f| load f }
7120f62 @metaskills Final push for release.
metaskills authored
10
74f0121 @metaskills Initial checking.
metaskills authored
11 def test_libs
12 ['lib','test']
13 end
14
15 def test_files
3839fc8 @metaskills Woot! Passing a few basic tests that prove the structure and build are c...
metaskills authored
16 Dir.glob("test/**/*_test.rb").sort
74f0121 @metaskills Initial checking.
metaskills authored
17 end
18
7120f62 @metaskills Final push for release.
metaskills authored
19 def gemspec
20 @clean_gemspec ||= eval(File.read(File.expand_path('../tiny_tds.gemspec', __FILE__)))
21 end
22
8e03fcb @metaskills Get the Rakefile working and building extension by finding freetds inclu...
metaskills authored
23 Rake::TestTask.new do |t|
74f0121 @metaskills Initial checking.
metaskills authored
24 t.libs = test_libs
25 t.test_files = test_files
26 t.verbose = true
27 end
28
3c97350 @luislavena Use RubyGems' PackageTask to build the gem
luislavena authored
29 Gem::PackageTask.new(gemspec) do |pkg|
30 pkg.need_tar = false
31 pkg.need_zip = false
49acc0b @metaskills More prep for gem release.
metaskills authored
32 end
33
e335705 @metaskills Allow TINYTDS_SKIP_PORTS environment var to skip ports.
metaskills authored
34 task :compile => ["ports:freetds"] unless ENV['TINYTDS_SKIP_PORTS']
8f24f7f @luislavena Force freetds port dependency on compile
luislavena authored
35
49acc0b @metaskills More prep for gem release.
metaskills authored
36 Rake::ExtensionTask.new('tiny_tds', gemspec) do |ext|
37 ext.lib_dir = 'lib/tiny_tds'
4652e0e @metaskills Iconv is a dep only when compiling locally. However, left in the ability...
metaskills authored
38 ext.config_options << "--enable-iconv" unless ENV['TINYTDS_SKIP_PORTS']
a6137ee @metaskills Remove my old RVM stuff.
metaskills authored
39 # Automatically add build options to avoid need of manual input.
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 ext.cross_config_options << "--with-iconv-dir=#{$recipes[:libiconv].path}"
49 ext.cross_config_options << "--with-freetds-dir=#{$recipes[:freetds].path}"
50 end
74f0121 @metaskills Initial checking.
metaskills authored
51 end
52
53 task :build => [:clean, :compile]
54
3839fc8 @metaskills Woot! Passing a few basic tests that prove the structure and build are c...
metaskills authored
55 task :default => [:build, :test]
74f0121 @metaskills Initial checking.
metaskills authored
56
57
0ca6931 @metaskills A few RVM helpers.
metaskills authored
58
59
Something went wrong with that request. Please try again.