Skip to content

Use bundler task for gem release #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
---
after_script:
- ruby -Ilib bin/rake travis:after -t
before_script:
- gem install hoe-travis --no-document
- gem install minitest -v '~> 5.0' --no-document
- ruby -Ilib bin/rake travis:before -t
- unset JRUBY_OPTS
language: ruby
sudo: false
notifications:
email:
- [email protected]
rvm:
- 1.9.3
- 2.0.0
Expand All @@ -22,4 +11,11 @@ rvm:
- jruby-9.0.5.0
- jruby-head
- rbx-2
script: ruby -Ilib bin/rake
before_install:
- gem install bundler --no-document
before_script:
- unset JRUBY_OPTS
script: ruby -Ilib exe/rake
notifications:
email:
- [email protected]
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gemspec
154 changes: 0 additions & 154 deletions Manifest.txt

This file was deleted.

83 changes: 15 additions & 68 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,77 +6,24 @@
# This file may be distributed under an MIT style license. See
# MIT-LICENSE for details.

require 'rbconfig'
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb'
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rdoc/task'

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

require 'hoe'

Hoe.plugin :git
Hoe.plugin :travis
Hoe.plugin :gemspec

hoe = Hoe.spec 'rake' do
developer 'Hiroshi SHIBATA', '[email protected]'
developer 'Eric Hodel', '[email protected]'
developer 'Jim Weirich', ''

require_ruby_version '>= 1.9.3'
require_rubygems_version '>= 1.3.2'

dependency 'minitest', '~> 5.0', :developer

license "MIT"

self.readme_file = 'README.rdoc'
self.history_file = 'History.rdoc'

self.extra_rdoc_files.concat FileList[
'MIT-LICENSE',
'doc/**/*.rdoc',
'*.rdoc',
]

self.local_rdoc_dir = 'html'
self.rsync_args = '-avz --delete'
rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/rake/'

self.clean_globs += [
'**/*.o',
'**/*.rbc',
'*.dot',
'TAGS',
'doc/example/main',
]
RDoc::Task.new do |doc|
doc.main = 'README.rdoc'
doc.title = 'Rake -- Ruby Make'
doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc]
doc.rdoc_dir = 'html'
end

hoe.testlib = :minitest
hoe.test_prelude = 'gem "minitest", "~> 5.0"'

# Use custom rdoc task due to existence of doc directory

Rake::Task['docs'].clear
Rake::Task['clobber_docs'].clear

begin
require 'rdoc/task'

RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
doc.main = hoe.readme_file
doc.title = 'Rake -- Ruby Make'

rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc]
rdoc_files.add hoe.extra_rdoc_files

doc.rdoc_files = rdoc_files

doc.rdoc_dir = 'html'
end
rescue LoadError
warn 'run `rake newb` to install rdoc'
end
task :default => :test
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ install:
- ruby --version
- gem update --system
- gem --version
- gem install hoe minitest --no-document
- gem install minitest --no-document
build_script:
- net user
- net localgroup
test_script:
- ruby -Ilib bin/rake
- ruby -Ilib exe/rake

environment:
matrix:
Expand Down
14 changes: 14 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "rake"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start
8 changes: 8 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
File renamed without changes.
Loading