File: rack-protection.gemspec

package info (click to toggle)
ruby-sinatra 4.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,940 kB
  • sloc: ruby: 17,702; sh: 25; makefile: 8
file content (45 lines) | stat: -rw-r--r-- 1,414 bytes parent folder | download | duplicates (3)
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
# frozen_string_literal: true

version = File.read(File.expand_path('../VERSION', __dir__)).strip

Gem::Specification.new do |s|
  # general infos
  s.name        = 'rack-protection'
  s.version     = version
  s.description = 'Protect against typical web attacks, works with all Rack apps, including Rails'
  s.homepage    = 'https://sinatrarb.com/protection/'
  s.summary     = "#{s.description}."
  s.license     = 'MIT'
  s.authors     = ['https://github.com/sinatra/sinatra/graphs/contributors']
  s.email       = 'sinatrarb@googlegroups.com'
  s.files       = Dir['lib/**/*.rb'] + [
    'License',
    'README.md',
    'Rakefile',
    'Gemfile',
    'rack-protection.gemspec'
  ]

  unless s.respond_to?(:metadata)
    raise <<-WARN
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
    WARN
  end

  s.metadata = {
    'source_code_uri' => 'https://github.com/sinatra/sinatra/tree/main/rack-protection',
    'homepage_uri' => 'http://sinatrarb.com/protection/',
    'documentation_uri' => 'https://www.rubydoc.info/gems/rack-protection',
    'rubygems_mfa_required' => 'true'
  }

  s.required_ruby_version = '>= 2.7.8'

  # dependencies
  s.add_dependency 'base64', '>= 0.1.0'
  s.add_dependency 'logger', '~> 1.5'
  s.add_dependency 'rack', '>= 3.0.0', '< 4'
end