Skip to content

Commit

Permalink
Remove possibility to use postgres-pr
Browse files Browse the repository at this point in the history
It is no longer maintained and doesn't work with current PostgreSQL versions.
  • Loading branch information
larskanis committed Feb 6, 2018
1 parent e73cdd5 commit 5169177
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 38 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ source "https://rubygems.org"

# Specify your gem's dependencies in pg_ldap_sync.gemspec
gemspec

gem "pg", require: false
gem "postgres-pr", require: false
20 changes: 8 additions & 12 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,24 @@ It is meant to be started as a cron job.

== REQUIREMENTS:

* Ruby-1.8.7, Ruby-1.9.2, JRuby-1.2, Rubinius-1.2 or better
* Rubygems-1.3.5+
* Ruby-2.0+, JRuby-1.2, Rubinius-1.2 or better
* LDAP-v3 server
* PostgreSQL-server v8.1+
* PostgreSQL-server v9.0+

== INSTALL:

Install Ruby and rubygems:
Install Ruby:
* 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:
gem install pg-ldap-sync pg
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 pg-ldap-sync and required dependencies:
gem install pg-ldap-sync

=== Install from Git:
git clone https://github.com/larskanis/pg-ldap-sync.git
cd pg-ldap-sync
gem install hoe
rake install_gem
bundle
rake install

== USAGE:

Expand Down
24 changes: 1 addition & 23 deletions lib/pg_ldap_sync/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,7 @@
require 'yaml'
require 'logger'
require 'kwalify'

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'
require 'pg'

module PgLdapSync
class Application
Expand Down
1 change: 1 addition & 0 deletions pg-ldap-sync.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency "net-ldap", "~> 0.2"
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 "minitest", "~> 5.0"
spec.add_development_dependency "bundler", "~> 1.16"
Expand Down

0 comments on commit 5169177

Please sign in to comment.