2014-06-15 17:24:15 +00:00
require File . expand_path ( 'on_what' , File . dirname ( __FILE__ ) )
2013-11-26 20:53:45 +00:00
$: . push File . expand_path ( '../lib' , __FILE__ )
require 'docile/version'
2011-12-06 18:51:56 +00:00
Gem :: Specification . new do | s |
2013-11-26 20:53:45 +00:00
s . name = 'docile'
2011-12-06 18:51:56 +00:00
s . version = Docile :: VERSION
2014-06-15 19:14:37 +00:00
s . author = 'Marc Siegel'
s . email = 'marc@usainnov.com'
2014-06-11 23:16:55 +00:00
s . homepage = 'https://ms-ati.github.io/docile/'
2013-11-26 20:53:45 +00:00
s . summary = 'Docile keeps your Ruby DSLs tame and well-behaved'
s . description = 'Docile turns any Ruby object into a DSL. Especially useful with the Builder pattern.'
s . license = 'MIT'
2011-12-06 18:51:56 +00:00
2014-06-15 19:14:37 +00:00
# Files included in the gem
2011-12-06 18:51:56 +00:00
s . files = ` git ls-files ` . split ( " \n " )
s . test_files = ` git ls-files -- {test,spec,features}/* ` . split ( " \n " )
s . executables = ` git ls-files -- bin/* ` . split ( " \n " ) . map { | f | File . basename ( f ) }
2013-11-26 20:53:45 +00:00
s . require_paths = %w( lib )
2011-12-06 18:51:56 +00:00
2014-06-15 19:14:37 +00:00
# Specify oldest supported Ruby version
s . required_ruby_version = '>= 1.8.7'
2018-01-12 17:49:57 +00:00
# Run rspec tests from rake even on old Ruby versions
s . add_development_dependency 'rake' , '~> 10.5' if on_less_than_1_9_3? # Pin compatible rake on old rubies, see: https://github.com/travis-ci/travis.rb/issues/380
s . add_development_dependency 'rake' , '< 11.0' unless on_less_than_1_9_3? # See http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11
s . add_development_dependency 'rspec' , '~> 3.0'
2011-12-06 22:58:09 +00:00
2018-01-12 17:49:57 +00:00
# Run code coverage where possible - not on Rubinius
unless on_rubinius?
# Pin versions for Travis builds on 1.9
s . add_development_dependency 'json' , '< 2.0' if on_less_than_2_0?
2016-12-27 20:18:44 +00:00
2018-01-12 17:49:57 +00:00
# Pin versions for Travis builds on 1.8
s . add_development_dependency 'mime-types' , '~> 1.25.1' if on_1_8?
s . add_development_dependency 'rest-client' , '~> 1.6.8' if on_1_8?
end
2014-06-15 18:03:48 +00:00
2014-06-15 17:24:15 +00:00
# To limit needed compatibility with versions of dependencies, only configure
2018-01-12 17:49:57 +00:00
# yard doc generation when *not* on Travis, JRuby, Rubinius, or < 2.0
if ! on_travis? && ! on_jruby? && ! on_rubinius? && ! on_less_than_2_0?
2014-02-04 19:24:17 +00:00
# Github flavored markdown in YARD documentation
# http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
s . add_development_dependency 'yard'
2014-06-15 17:39:01 +00:00
s . add_development_dependency 'redcarpet'
2014-02-04 19:24:17 +00:00
s . add_development_dependency 'github-markup'
2014-02-04 18:54:06 +00:00
end
2011-12-06 18:51:56 +00:00
end