Skip to content

Commit 006fab5

Browse files
committed
Merge pull request #122 from ruby/bundler
Use bundler task for gem release
2 parents bd8dfea + 1aaeb6c commit 006fab5

File tree

11 files changed

+73
-268
lines changed

11 files changed

+73
-268
lines changed

.travis.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
---
2-
after_script:
3-
- ruby -Ilib bin/rake travis:after -t
4-
before_script:
5-
- gem install hoe-travis --no-document
6-
- gem install minitest -v '~> 5.0' --no-document
7-
- ruby -Ilib bin/rake travis:before -t
8-
- unset JRUBY_OPTS
91
language: ruby
102
sudo: false
11-
notifications:
12-
email:
13-
- drbrain@segment7.net
143
rvm:
154
- 1.9.3
165
- 2.0.0
@@ -22,4 +11,11 @@ rvm:
2211
- jruby-9.0.5.0
2312
- jruby-head
2413
- rbx-2
25-
script: ruby -Ilib bin/rake
14+
before_install:
15+
- gem install bundler --no-document
16+
before_script:
17+
- unset JRUBY_OPTS
18+
script: ruby -Ilib exe/rake
19+
notifications:
20+
email:
21+
- drbrain@segment7.net

Gemfile

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

Manifest.txt

Lines changed: 0 additions & 154 deletions
This file was deleted.

Rakefile

Lines changed: 15 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,77 +6,24 @@
66
# This file may be distributed under an MIT style license. See
77
# MIT-LICENSE for details.
88

9-
require 'rbconfig'
9+
lib = File.expand_path('../lib', __FILE__)
10+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1011

11-
system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb'
12+
require 'bundler/gem_tasks'
13+
require 'rake/testtask'
14+
require 'rdoc/task'
1215

13-
# Use our rake, not the installed rake from system
14-
if $".include? system_rake or $".grep(/rake\/name_space\.rb$/).empty? then
15-
exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV
16+
Rake::TestTask.new(:test) do |t|
17+
t.libs << "test"
18+
t.libs << "lib"
19+
t.test_files = FileList['test/**/test_*.rb']
1620
end
1721

18-
require 'hoe'
19-
20-
Hoe.plugin :git
21-
Hoe.plugin :travis
22-
Hoe.plugin :gemspec
23-
24-
hoe = Hoe.spec 'rake' do
25-
developer 'Hiroshi SHIBATA', 'hsbt@ruby-lang.org'
26-
developer 'Eric Hodel', 'drbrain@segment7.net'
27-
developer 'Jim Weirich', ''
28-
29-
require_ruby_version '>= 1.9.3'
30-
require_rubygems_version '>= 1.3.2'
31-
32-
dependency 'minitest', '~> 5.0', :developer
33-
34-
license "MIT"
35-
36-
self.readme_file = 'README.rdoc'
37-
self.history_file = 'History.rdoc'
38-
39-
self.extra_rdoc_files.concat FileList[
40-
'MIT-LICENSE',
41-
'doc/**/*.rdoc',
42-
'*.rdoc',
43-
]
44-
45-
self.local_rdoc_dir = 'html'
46-
self.rsync_args = '-avz --delete'
47-
rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/rake/'
48-
49-
self.clean_globs += [
50-
'**/*.o',
51-
'**/*.rbc',
52-
'*.dot',
53-
'TAGS',
54-
'doc/example/main',
55-
]
22+
RDoc::Task.new do |doc|
23+
doc.main = 'README.rdoc'
24+
doc.title = 'Rake -- Ruby Make'
25+
doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc]
26+
doc.rdoc_dir = 'html'
5627
end
5728

58-
hoe.testlib = :minitest
59-
hoe.test_prelude = 'gem "minitest", "~> 5.0"'
60-
61-
# Use custom rdoc task due to existence of doc directory
62-
63-
Rake::Task['docs'].clear
64-
Rake::Task['clobber_docs'].clear
65-
66-
begin
67-
require 'rdoc/task'
68-
69-
RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
70-
doc.main = hoe.readme_file
71-
doc.title = 'Rake -- Ruby Make'
72-
73-
rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc]
74-
rdoc_files.add hoe.extra_rdoc_files
75-
76-
doc.rdoc_files = rdoc_files
77-
78-
doc.rdoc_dir = 'html'
79-
end
80-
rescue LoadError
81-
warn 'run `rake newb` to install rdoc'
82-
end
29+
task :default => :test

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ install:
66
- ruby --version
77
- gem update --system
88
- gem --version
9-
- gem install hoe minitest --no-document
9+
- gem install minitest --no-document
1010
build_script:
1111
- net user
1212
- net localgroup
1313
test_script:
14-
- ruby -Ilib bin/rake
14+
- ruby -Ilib exe/rake
1515

1616
environment:
1717
matrix:

bin/console

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require "bundler/setup"
4+
require "rake"
5+
6+
# You can add fixtures and/or initialization code here to make experimenting
7+
# with your gem easier. You can also use a different console, if you like.
8+
9+
# (If you use this, don't forget to add pry to your Gemfile!)
10+
# require "pry"
11+
# Pry.start
12+
13+
require "irb"
14+
IRB.start

bin/setup

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
set -vx
5+
6+
bundle install
7+
8+
# Do any other automated setup that you need to do here
File renamed without changes.

0 commit comments

Comments
 (0)