do_mysql 0.9.12-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,75 @@
1
+ begin
2
+ gem 'rubyforge', '~> 1.0.1'
3
+ require 'rubyforge'
4
+ rescue Exception
5
+ nil
6
+ end
7
+
8
+ if defined?(RubyForge) then
9
+ if defined?(GEM_SPEC) then
10
+ desc 'Package and upload to RubyForge'
11
+ task :release => [:package] do |t|
12
+ ver = ENV['VERSION'] or fail "Must supply VERSION (rake release VERSION=x.y.z)."
13
+
14
+ # compare versions to avoid mistakes
15
+ unless ver == GEM_SPEC.version.to_s then
16
+ fail "Version mismatch (supplied and specification versions differ)."
17
+ end
18
+
19
+ # no rubyforge project? no release for you!
20
+ if GEM_SPEC.rubyforge_project == 'TODO' or GEM_SPEC.rubyforge_project.nil? then
21
+ fail "Must define rubyforge_project in your gem specification."
22
+ end
23
+
24
+ # instantiate a RubyForge object
25
+ rf = RubyForge.new
26
+
27
+ # read project info and overview
28
+ notes = begin
29
+ r = File.read("README.rdoc")
30
+ r.split(/^(=+ .*)/)[1..4].join.strip
31
+ rescue
32
+ warn "Missing README.rdoc"
33
+ ''
34
+ end
35
+
36
+ # read changes
37
+ changes = begin
38
+ h = File.read("History.txt")
39
+ h.split(/^(==+ .*)/)[1..2].join.strip
40
+ rescue
41
+ warn "Missing History.txt"
42
+ ''
43
+ end
44
+
45
+ # build the configuration for the release
46
+ config = Hash.new
47
+ config["release_notes"] = notes
48
+ config["release_changes"] = changes
49
+ config["preformatted"] = true
50
+
51
+ # prepare configuration
52
+ rf.configure config
53
+
54
+ files = FileList["pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version}*.*"].to_a
55
+ fail "No files found for the release." if files.empty?
56
+
57
+ puts "Logging in RubyForge..."
58
+ rf.login
59
+
60
+ puts "Files to upload:"
61
+ files.each do |f|
62
+ puts " * #{f}"
63
+ end
64
+
65
+ puts "Releasing #{GEM_SPEC.name} version #{GEM_SPEC.version}..."
66
+ rf.add_release GEM_SPEC.rubyforge_project, GEM_SPEC.name, GEM_SPEC.version, *files
67
+ puts "Done."
68
+ end
69
+ #Rake::Task['release'].prerequisites.unshift('clean', 'cross', 'native')
70
+ else
71
+ warn "no GEM_SPEC is found or defined. 'release' task cannot work without it."
72
+ end
73
+ else
74
+ warn "rubyforge gem is required to generate releases, please install it (gem install rubyforge)."
75
+ end
@@ -0,0 +1,67 @@
1
+ begin
2
+ gem('rake-compiler')
3
+ require 'rake/clean'
4
+ require 'rake/extensioncompiler'
5
+
6
+ # download mysql library and headers
7
+ directory "vendor"
8
+
9
+ # only on Windows or cross platform compilation
10
+ def dlltool(dllname, deffile, libfile)
11
+ # define if we are using GCC or not
12
+ if Rake::ExtensionCompiler.mingw_gcc_executable then
13
+ dir = File.dirname(Rake::ExtensionCompiler.mingw_gcc_executable)
14
+ tool = case RUBY_PLATFORM
15
+ when /mingw/
16
+ File.join(dir, 'dlltool.exe')
17
+ when /linux|darwin/
18
+ File.join(dir, "#{Rake::ExtensionCompiler.mingw_host}-dlltool")
19
+ end
20
+ return "#{tool} --dllname #{dllname} --def #{deffile} --output-lib #{libfile}"
21
+ else
22
+ if RUBY_PLATFORM =~ /mswin/ then
23
+ tool = 'lib.exe'
24
+ else
25
+ fail "Unsupported platform for cross-compilation (please, contribute some patches)."
26
+ end
27
+ return "#{tool} /DEF:#{deffile} /OUT:#{libfile}"
28
+ end
29
+ end
30
+
31
+ file "vendor/mysql-noinstall-#{BINARY_VERSION}-win32.zip" => ['vendor'] do |t|
32
+ base_version = BINARY_VERSION.gsub(/\.[0-9]+$/, '')
33
+ url = "http://mysql.proserve.nl/Downloads/MySQL-#{base_version}/#{File.basename(t.name)}"
34
+ when_writing "downloading #{t.name}" do
35
+ cd File.dirname(t.name) do
36
+ sh "wget -c #{url} || curl -C - -O #{url}"
37
+ end
38
+ end
39
+ end
40
+
41
+ file "vendor/mysql-#{BINARY_VERSION}-win32/include/mysql.h" => ["vendor/mysql-noinstall-#{BINARY_VERSION}-win32.zip"] do |t|
42
+ full_file = File.expand_path(t.prerequisites.last)
43
+ when_writing "creating #{t.name}" do
44
+ cd "vendor" do
45
+ sh "unzip #{full_file} mysql-#{BINARY_VERSION}-win32/bin/** mysql-#{BINARY_VERSION}-win32/include/** mysql-#{BINARY_VERSION}-win32/lib/**"
46
+ end
47
+ # update file timestamp to avoid Rake perform this extraction again.
48
+ touch t.name
49
+ end
50
+ end
51
+
52
+ # clobber vendored packages
53
+ CLOBBER.include('vendor')
54
+
55
+ # vendor:mysql
56
+ task 'vendor:mysql' => ["vendor/mysql-#{BINARY_VERSION}-win32/include/mysql.h"]
57
+
58
+ # hook into cross compilation vendored mysql dependency
59
+ if RUBY_PLATFORM =~ /mingw|mswin/ then
60
+ Rake::Task['compile'].prerequisites.unshift 'vendor:mysql'
61
+ else
62
+ if Rake::Task.tasks.map {|t| t.name }.include? 'cross'
63
+ Rake::Task['cross'].prerequisites.unshift 'vendor:mysql'
64
+ end
65
+ end
66
+ rescue LoadError
67
+ end
data/tasks/spec.rake ADDED
@@ -0,0 +1,18 @@
1
+ # Specs
2
+ require 'spec/rake/spectask'
3
+
4
+ desc 'Run specifications'
5
+ Spec::Rake::SpecTask.new(:spec => [ :clean, :compile ]) do |t|
6
+ t.spec_opts << '--options' << ROOT + 'spec/spec.opts'
7
+ t.spec_files = Pathname.glob(ENV['FILES'] || 'spec/**/*_spec.rb').map { |f| f.to_s }
8
+
9
+ begin
10
+ # RCov is run by default, except on the JRuby platform
11
+ t.rcov = JRUBY ? false : (ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true)
12
+ t.rcov_opts << '--exclude' << 'spec'
13
+ t.rcov_opts << '--text-summary'
14
+ t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
15
+ rescue Exception
16
+ # rcov not installed
17
+ end
18
+ end
metadata ADDED
@@ -0,0 +1,130 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: do_mysql
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.12
5
+ platform: x86-mingw32
6
+ authors:
7
+ - Dirkjan Bussink
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-17 00:00:00 +02:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: addressable
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: extlib
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.12
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: data_objects
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.9.12
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rspec
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.2.0
54
+ version:
55
+ description: Implements the DataObjects API for MySQL
56
+ email: d.bussink@gmail.com
57
+ executables: []
58
+
59
+ extensions: []
60
+
61
+ extra_rdoc_files: []
62
+
63
+ files:
64
+ - lib/do_mysql/transaction.rb
65
+ - lib/do_mysql/version.rb
66
+ - lib/do_mysql.rb
67
+ - spec/command_spec.rb
68
+ - spec/connection_spec.rb
69
+ - spec/encoding_spec.rb
70
+ - spec/lib/rspec_immediate_feedback_formatter.rb
71
+ - spec/reader_spec.rb
72
+ - spec/result_spec.rb
73
+ - spec/spec_helper.rb
74
+ - spec/typecast/array_spec.rb
75
+ - spec/typecast/bigdecimal_spec.rb
76
+ - spec/typecast/boolean_spec.rb
77
+ - spec/typecast/byte_array_spec.rb
78
+ - spec/typecast/class_spec.rb
79
+ - spec/typecast/date_spec.rb
80
+ - spec/typecast/datetime_spec.rb
81
+ - spec/typecast/float_spec.rb
82
+ - spec/typecast/integer_spec.rb
83
+ - spec/typecast/nil_spec.rb
84
+ - spec/typecast/range_spec.rb
85
+ - spec/typecast/string_spec.rb
86
+ - spec/typecast/time_spec.rb
87
+ - tasks/gem.rake
88
+ - tasks/install.rake
89
+ - tasks/native.rake
90
+ - tasks/release.rake
91
+ - tasks/retrieve.rake
92
+ - tasks/spec.rake
93
+ - ext/do_mysql_ext/extconf.rb
94
+ - ext/do_mysql_ext/do_mysql_ext.c
95
+ - LICENSE
96
+ - Rakefile
97
+ - History.txt
98
+ - Manifest.txt
99
+ - README.txt
100
+ - lib/do_mysql_ext.so
101
+ has_rdoc: true
102
+ homepage: http://github.com/datamapper/do
103
+ licenses: []
104
+
105
+ post_install_message:
106
+ rdoc_options: []
107
+
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ~>
113
+ - !ruby/object:Gem::Version
114
+ version: 1.8.6
115
+ version:
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: "0"
121
+ version:
122
+ requirements: []
123
+
124
+ rubyforge_project: dorb
125
+ rubygems_version: 1.3.3
126
+ signing_key:
127
+ specification_version: 3
128
+ summary: DataObjects MySQL Driver
129
+ test_files: []
130
+