-
-
Notifications
You must be signed in to change notification settings - Fork 156
/
mocha.gemspec
61 lines (52 loc) · 1.87 KB
/
mocha.gemspec
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
51
52
53
54
55
56
57
58
59
60
61
lib = File.expand_path('../lib/', __FILE__)
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
require 'mocha/version'
Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
s.name = 'mocha'
s.version = Mocha::VERSION
s.licenses = ['MIT', 'BSD-2-Clause']
s.required_ruby_version = '>= 1.8.7'
s.authors = ['James Mead']
s.description = 'Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.'
s.email = 'mocha-developer@googlegroups.com'
s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(docs|test)/}) }
end
s.files.delete('.circleci/config.yml')
s.files.delete('.gitignore')
s.homepage = 'https://mocha.jamesmead.org'
s.require_paths = ['lib']
s.summary = 'Mocking and stubbing library'
unless s.respond_to?(:add_development_dependency)
class << s
def add_development_dependency(*args)
add_dependency(*args)
end
end
end
if RUBY_VERSION < '1.9.3'
s.add_development_dependency 'rake', '~> 10.0'
elsif RUBY_VERSION < '2'
s.add_development_dependency 'rake', '~> 12.2.1'
elsif RUBY_VERSION < '2.2'
s.add_development_dependency 'rake', '~> 12.3.3'
else
s.add_development_dependency 'rake'
end
s.add_development_dependency('introspection', '~> 0.0.1')
# Avoid breaking change in psych v4 (https://bugs.ruby-lang.org/issues/17866)
if RUBY_VERSION >= '3.1.0'
s.add_development_dependency('psych', '< 4')
end
if RUBY_VERSION >= '2.2.0'
# No test libraries in standard library
s.add_development_dependency('minitest')
end
if RUBY_VERSION >= '2.2.0'
s.add_development_dependency('rubocop', '<= 0.58.2')
end
if ENV['MOCHA_GENERATE_DOCS']
s.add_development_dependency('redcarpet')
s.add_development_dependency('yard')
end
end