Move from Hoe to Bundler

This adds a gemspec and a Gemfile to the repository.
This commit is contained in:
Lars Kanis 2018-02-06 21:56:53 +01:00
parent ffb2ea1323
commit 611abf1594
No known key found for this signature in database
GPG Key ID: 20362776599898C0
10 changed files with 84 additions and 47 deletions

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
/temp/
Gemfile.lock

7
Gemfile Normal file
View File

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

21
LICENSE.txt Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Lars Kanis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -85,27 +85,6 @@ commands are in the <tt>PATH</tt>. Then:
based on individual attributes in LDAP (expiration date etc.)
== LICENSE:
== License
(The MIT License)
Copyright (c) 2011 FIX
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

View File

@ -1,18 +1,11 @@
# -*- ruby -*-
require "bundler/gem_tasks"
require "rake/testtask"
require 'rubygems'
require 'hoe'
Hoe.spec 'pg-ldap-sync' do
developer('Lars Kanis', 'kanis@comcard.de')
extra_deps << ['net-ldap', '>= 0.2']
extra_deps << ['kwalify', '>= 0.7']
extra_dev_deps << ['ruby-ldapserver', '>= 0.3']
self.readme_file = 'README.rdoc'
spec_extras[:rdoc_options] = ['--main', readme_file, "--charset=UTF-8"]
self.extra_rdoc_files << self.readme_file
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/test_*.rb"]
end
# vim: syntax=ruby
task :gem => :build

View File

@ -1,6 +1,5 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'pg_ldap_sync/application'
require 'pg_ldap_sync'
PgLdapSync::Application.run(ARGV)

View File

@ -1,3 +1,2 @@
module PgLdapSync
VERSION = '0.1.1'
end
require "pg_ldap_sync/application"
require "pg_ldap_sync/version"

View File

@ -0,0 +1,3 @@
module PgLdapSync
VERSION = "0.2.0"
end

28
pg-ldap-sync.gemspec Normal file
View File

@ -0,0 +1,28 @@
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "pg_ldap_sync/version"
Gem::Specification.new do |spec|
spec.name = "pg-ldap-sync"
spec.version = PgLdapSync::VERSION
spec.authors = ["Lars Kanis"]
spec.email = ["lars@greiz-reinsdorf.de"]
spec.summary = %q{Use LDAP permissions in PostgreSQL}
spec.homepage = "https://github.com/larskanis/pg-ldap-sync"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_runtime_dependency "net-ldap", "~> 0.2"
spec.add_runtime_dependency "kwalify", "~> 0.7"
spec.add_development_dependency "ruby-ldapserver", "~> 0.3"
spec.add_development_dependency "minitest", "~> 5.0"
spec.add_development_dependency "bundler", "~> 1.16"
spec.add_development_dependency "rake", "~> 10.0"
end

View File

@ -1,12 +1,10 @@
#!/usr/bin/env ruby
require "test/unit"
require "minitest/autorun"
require "pg_ldap_sync/application"
require 'yaml'
require 'test/ldap_server'
require 'fileutils'
require_relative 'ldap_server'
class TestPgLdapSync < Test::Unit::TestCase
class TestPgLdapSync < Minitest::Test
def log_and_run( *cmd )
puts cmd.join(' ')
system( *cmd )