Remove possibility to use postgres-pr

It is no longer maintained and doesn't work with current PostgreSQL versions.
This commit is contained in:
Lars Kanis 2018-02-06 22:29:48 +01:00
parent e73cdd52a9
commit 5169177b97
No known key found for this signature in database
GPG Key ID: 20362776599898C0
4 changed files with 10 additions and 38 deletions

View File

@ -2,6 +2,3 @@ source "https://rubygems.org"
# Specify your gem's dependencies in pg_ldap_sync.gemspec # Specify your gem's dependencies in pg_ldap_sync.gemspec
gemspec gemspec
gem "pg", require: false
gem "postgres-pr", require: false

View File

@ -32,28 +32,24 @@ It is meant to be started as a cron job.
== REQUIREMENTS: == REQUIREMENTS:
* Ruby-1.8.7, Ruby-1.9.2, JRuby-1.2, Rubinius-1.2 or better * Ruby-2.0+, JRuby-1.2, Rubinius-1.2 or better
* Rubygems-1.3.5+
* LDAP-v3 server * LDAP-v3 server
* PostgreSQL-server v8.1+ * PostgreSQL-server v9.0+
== INSTALL: == INSTALL:
Install Ruby and rubygems: Install Ruby:
* on Windows: http://rubyinstaller.org * on Windows: http://rubyinstaller.org
* on Debian/Ubuntu: <tt>apt-get install ruby rubygems</tt> * on Debian/Ubuntu: <tt>apt-get install ruby libpq-dev</tt>
Install pg-ldap-sync and a database connector for PostgreSQL: Install pg-ldap-sync and required dependencies:
gem install pg-ldap-sync pg gem install pg-ldap-sync
You may also use the pure ruby postgres-connector which is less mature,
but doesn't need compilation:
gem install pg-ldap-sync postgres-pr
=== Install from Git: === Install from Git:
git clone https://github.com/larskanis/pg-ldap-sync.git git clone https://github.com/larskanis/pg-ldap-sync.git
cd pg-ldap-sync cd pg-ldap-sync
gem install hoe bundle
rake install_gem rake install
== USAGE: == USAGE:

View File

@ -6,29 +6,7 @@ require 'optparse'
require 'yaml' require 'yaml'
require 'logger' require 'logger'
require 'kwalify' require 'kwalify'
require 'pg'
begin
require 'pg'
rescue LoadError => e
begin
require 'postgres'
class PG
alias initialize_before_hash_change initialize
def initialize(*args)
arg = args.first
if args.length==1 && arg.kind_of?(Hash)
initialize_before_hash_change(arg[:host], arg[:port], nil, nil, arg[:dbname], arg[:user], arg[:password])
else
initialize_before_hash_change(*args)
end
end
end
rescue LoadError
raise e
end
end
require 'pg_ldap_sync'
module PgLdapSync module PgLdapSync
class Application class Application

View File

@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "net-ldap", "~> 0.2" spec.add_runtime_dependency "net-ldap", "~> 0.2"
spec.add_runtime_dependency "kwalify", "~> 0.7" spec.add_runtime_dependency "kwalify", "~> 0.7"
spec.add_runtime_dependency "pg", ">= 0.14", "< 2.0"
spec.add_development_dependency "ruby-ldapserver", "~> 0.3" spec.add_development_dependency "ruby-ldapserver", "~> 0.3"
spec.add_development_dependency "minitest", "~> 5.0" spec.add_development_dependency "minitest", "~> 5.0"
spec.add_development_dependency "bundler", "~> 1.16" spec.add_development_dependency "bundler", "~> 1.16"