2021-10-18 16:40:01 +00:00
|
|
|
version = File.read(File.expand_path("../VERSION", __dir__)).strip
|
2016-08-22 14:08:23 +00:00
|
|
|
|
2011-05-23 08:07:54 +00:00
|
|
|
Gem::Specification.new do |s|
|
|
|
|
# general infos
|
|
|
|
s.name = "rack-protection"
|
2017-04-09 06:15:28 +00:00
|
|
|
s.version = version
|
2016-08-22 14:08:23 +00:00
|
|
|
s.description = "Protect against typical web attacks, works with all Rack apps, including Rails."
|
2018-06-21 12:26:40 +00:00
|
|
|
s.homepage = "http://sinatrarb.com/protection/"
|
2011-05-23 08:07:54 +00:00
|
|
|
s.summary = s.description
|
2013-10-21 09:34:40 +00:00
|
|
|
s.license = 'MIT'
|
2017-03-19 03:07:18 +00:00
|
|
|
s.authors = ["https://github.com/sinatra/sinatra/graphs/contributors"]
|
|
|
|
s.email = "sinatrarb@googlegroups.com"
|
|
|
|
s.files = Dir["lib/**/*.rb"] + [
|
2011-05-23 08:07:54 +00:00
|
|
|
"License",
|
|
|
|
"README.md",
|
|
|
|
"Rakefile",
|
2016-07-25 07:57:04 +00:00
|
|
|
"Gemfile",
|
2017-03-17 21:43:09 +00:00
|
|
|
"rack-protection.gemspec"
|
2011-05-23 08:07:54 +00:00
|
|
|
]
|
2018-06-23 11:50:20 +00:00
|
|
|
|
|
|
|
if s.respond_to?(:metadata)
|
|
|
|
s.metadata = {
|
|
|
|
'source_code_uri' => 'https://github.com/sinatra/sinatra/tree/master/rack-protection',
|
|
|
|
'homepage_uri' => 'http://sinatrarb.com/protection/',
|
|
|
|
'documentation_uri' => 'https://www.rubydoc.info/gems/rack-protection'
|
|
|
|
}
|
|
|
|
else
|
|
|
|
raise <<-EOF
|
|
|
|
RubyGems 2.0 or newer is required to protect against public gem pushes. You can update your rubygems version by running:
|
|
|
|
gem install rubygems-update
|
|
|
|
update_rubygems:
|
|
|
|
gem update --system
|
|
|
|
EOF
|
|
|
|
end
|
2011-05-23 08:07:54 +00:00
|
|
|
|
|
|
|
# dependencies
|
|
|
|
s.add_dependency "rack"
|
2022-07-25 14:12:27 +00:00
|
|
|
s.add_development_dependency "rack-test", "~> 2"
|
2022-02-05 12:09:10 +00:00
|
|
|
s.add_development_dependency "rspec", "~> 3"
|
2011-05-23 08:07:54 +00:00
|
|
|
end
|