Skip to content

Commit afc4a85

Browse files
committed
add Gemfile and explicit ruby-oai.gemspec
1 parent 0444088 commit afc4a85

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "http://rubygems.org"
2+
3+
gemspec

Rakefile

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,21 @@
1-
RUBY_OAI_VERSION = '0.0.13'
21

32
require 'rubygems'
43
require 'rake'
4+
begin
5+
require 'bundler/setup'
6+
rescue LoadError
7+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
8+
end
9+
10+
Bundler::GemHelper.install_tasks
11+
512
require 'rake/testtask'
613
require 'rake/rdoctask'
7-
require 'rake/packagetask'
8-
require 'rake/gempackagetask'
914

1015
task :default => ["test"]
1116

1217
task :test => ["test:client", "test:provider"]
1318

14-
spec = Gem::Specification.new do |s|
15-
s.name = 'oai'
16-
s.version = RUBY_OAI_VERSION
17-
s.author = 'Ed Summers'
18-
s.email = '[email protected]'
19-
s.homepage = 'http://github.com/code4lib/ruby-oai'
20-
s.platform = Gem::Platform::RUBY
21-
s.summary = 'A ruby library for working with the Open Archive Initiative Protocol for Metadata Harvesting (OAI-PMH)'
22-
s.require_path = 'lib'
23-
s.autorequire = 'oai'
24-
s.bindir = 'bin'
25-
s.executables = 'oai'
26-
27-
s.add_dependency('builder', '>=2.0.0')
28-
29-
s.files = %w(README.md Rakefile) +
30-
Dir.glob("{bin,test,lib}/**/*") +
31-
Dir.glob("examples/**/*.rb")
32-
end
33-
34-
Rake::GemPackageTask.new(spec) do |pkg|
35-
pkg.need_zip = true
36-
pkg.need_tar = true
37-
pkg.gem_spec = spec
38-
end
39-
4019
namespace :test do
4120
Rake::TestTask.new('client') do |t|
4221
t.libs << ['lib', 'test/client']

ruby-oai.gemspec

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Gem::Specification.new do |s|
2+
s.name = 'oai'
3+
s.version = '0.0.13'
4+
s.author = 'Ed Summers'
5+
s.email = '[email protected]'
6+
s.homepage = 'http://github.com/code4lib/ruby-oai'
7+
s.platform = Gem::Platform::RUBY
8+
s.summary = 'A ruby library for working with the Open Archive Initiative Protocol for Metadata Harvesting (OAI-PMH)'
9+
s.require_path = 'lib'
10+
s.autorequire = 'oai'
11+
s.bindir = 'bin'
12+
s.executables = 'oai'
13+
14+
s.add_dependency('builder', '>=2.0.0')
15+
s.add_development_dependency('rake')
16+
17+
s.files = %w(README.md Rakefile) +
18+
Dir.glob("{bin,test,lib}/**/*") +
19+
Dir.glob("examples/**/*.rb")
20+
end

0 commit comments

Comments
 (0)