-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
50 lines (42 loc) · 1.12 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require_relative 'lib/nuggets/version'
begin
require 'hen'
Hen.lay! {{
gem: {
name: %q{nuggets},
version: Nuggets::VERSION,
summary: %q{Extending Ruby.},
description: %q{Various extensions to Ruby classes.},
author: %q{Jens Wille},
email: %q{[email protected]},
license: %q{AGPL-3.0},
homepage: :blackwinter,
dependencies: %w[],
development_dependencies: [
#'amatch', # enumerable/agrep
'mime-types', # content_type
'open4', # ruby
#'ruby-filemagic' # content_type
],
required_ruby_version: '>= 1.9.3'
}
}}
rescue LoadError => err
warn "Please install the `hen' gem. (#{err})"
end
desc 'Run all specs in isolation'
task 'spec:isolated' do
ARGV.delete('spec:isolated')
ARGV.unshift('spec')
Dir['spec/*/**/*_spec.rb'].each { |spec|
ENV['SPEC'] = spec
system($0, *ARGV)
}
end
if RUBY_ENGINE == 'jruby'
task spec: :enable_objspace
task :enable_objspace do
k, v = 'JRUBY_OPTS', '-X+O'
ENV[k] ? ENV[k] += " #{v}" : ENV[k] = v
end
end