do_postgres 0.10.0-x86-mingw32 → 0.10.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/ChangeLog.markdown +22 -0
  2. data/LICENSE +1 -1
  3. data/README.markdown +106 -3
  4. data/Rakefile +56 -9
  5. data/ext/do_postgres/compat.h +55 -0
  6. data/ext/{do_postgres_ext/do_postgres_ext.c → do_postgres/do_postgres.c} +42 -49
  7. data/ext/{do_postgres_ext → do_postgres}/error.h +0 -0
  8. data/ext/{do_postgres_ext → do_postgres}/extconf.rb +4 -3
  9. data/ext/{do_postgres_ext → do_postgres}/pg_config.h +0 -0
  10. data/lib/do_postgres.rb +12 -16
  11. data/lib/do_postgres/1.8/do_postgres.so +0 -0
  12. data/lib/do_postgres/1.9/do_postgres.so +0 -0
  13. data/lib/do_postgres/version.rb +1 -1
  14. data/spec/command_spec.rb +2 -2
  15. data/spec/connection_spec.rb +22 -7
  16. data/spec/encoding_spec.rb +2 -1
  17. data/spec/reader_spec.rb +1 -1
  18. data/spec/result_spec.rb +12 -13
  19. data/spec/spec_helper.rb +27 -36
  20. data/spec/typecast/array_spec.rb +1 -1
  21. data/spec/typecast/bigdecimal_spec.rb +2 -2
  22. data/spec/typecast/boolean_spec.rb +2 -2
  23. data/spec/typecast/byte_array_spec.rb +1 -1
  24. data/spec/typecast/class_spec.rb +1 -1
  25. data/spec/typecast/date_spec.rb +2 -2
  26. data/spec/typecast/datetime_spec.rb +2 -2
  27. data/spec/typecast/float_spec.rb +2 -2
  28. data/spec/typecast/integer_spec.rb +1 -1
  29. data/spec/typecast/nil_spec.rb +3 -3
  30. data/spec/typecast/other_spec.rb +8 -0
  31. data/spec/typecast/range_spec.rb +1 -1
  32. data/spec/typecast/string_spec.rb +1 -1
  33. data/spec/typecast/time_spec.rb +1 -1
  34. data/tasks/compile.rake +81 -0
  35. data/tasks/release.rake +12 -71
  36. data/tasks/retrieve.rake +5 -9
  37. data/tasks/spec.rake +19 -15
  38. metadata +76 -39
  39. data/HISTORY.markdown +0 -12
  40. data/Manifest.txt +0 -34
  41. data/lib/do_postgres_ext.so +0 -0
  42. data/spec/lib/rspec_immediate_feedback_formatter.rb +0 -3
  43. data/tasks/gem.rake +0 -8
  44. data/tasks/install.rake +0 -15
  45. data/tasks/native.rake +0 -35
Binary file
@@ -1,3 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'data_objects', 'spec', 'lib', 'rspec_immediate_feedback_formatter'))
data/tasks/gem.rake DELETED
@@ -1,8 +0,0 @@
1
- require 'rubygems/package_task'
2
-
3
- GEM_SPEC = eval(File.read('do_postgres.gemspec'))
4
-
5
- gem_package = Gem::PackageTask.new(GEM_SPEC) do |pkg|
6
- pkg.need_tar = false
7
- pkg.need_zip = false
8
- end
data/tasks/install.rake DELETED
@@ -1,15 +0,0 @@
1
- def sudo_gem(cmd)
2
- sh "#{SUDO} #{RUBY} -S gem #{cmd}", :verbose => false
3
- end
4
-
5
- # Installation
6
-
7
- desc "Install #{GEM_SPEC.name} #{GEM_SPEC.version}"
8
- task :install => [ :package ] do
9
- sudo_gem "install pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version} --no-update-sources"
10
- end
11
-
12
- desc "Uninstall #{GEM_SPEC.name} #{GEM_SPEC.version}"
13
- task :uninstall => [ :clean ] do
14
- sudo_gem "uninstall #{GEM_SPEC.name} -v#{GEM_SPEC.version} -I -x"
15
- end
data/tasks/native.rake DELETED
@@ -1,35 +0,0 @@
1
- begin
2
- gem('rake-compiler')
3
- require 'rake/extensiontask'
4
-
5
- Rake::ExtensionTask.new('do_postgres_ext', GEM_SPEC) do |ext|
6
-
7
- postgres_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'pgsql'))
8
-
9
- # automatically add build options to avoid need of manual input
10
- if RUBY_PLATFORM =~ /mswin|mingw/ then
11
- ext.config_options << "--with-pgsql-server-include=#{postgres_lib}/include/server"
12
- ext.config_options << "--with-pgsql-client-include=#{postgres_lib}/include"
13
- ext.config_options << "--with-pgsql-win32-include=#{postgres_lib}/include/server/port/win32"
14
- ext.config_options << "--with-pgsql-client-lib=#{postgres_lib}/lib"
15
- else
16
- ext.cross_compile = true
17
- ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
18
- ext.cross_config_options << "--with-pgsql-server-include=#{postgres_lib}/include/server"
19
- ext.cross_config_options << "--with-pgsql-client-include=#{postgres_lib}/include"
20
- ext.cross_config_options << "--with-pgsql-win32-include=#{postgres_lib}/include/server/port/win32"
21
- ext.cross_config_options << "--with-pgsql-client-lib=#{postgres_lib}/lib"
22
- end
23
-
24
- end
25
- rescue LoadError
26
- warn "To cross-compile, install rake-compiler (gem install rake-compiler)"
27
-
28
- if (tasks_dir = ROOT.parent + 'tasks').directory?
29
- require tasks_dir + 'ext_helper'
30
- require tasks_dir + 'ext_helper_java'
31
-
32
- setup_c_extension("#{GEM_SPEC.name}_ext", GEM_SPEC)
33
- setup_java_extension("#{GEM_SPEC.name}_ext", GEM_SPEC)
34
- end
35
- end