Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Repository files and Gem build #536

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ruby-gemset

This file was deleted.

2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason I suppose, although I was thinking that having this locked the version to a very specific version only in development. Since we intend to support this library for at least Ruby 2.6-3.2, I figured it'd be better to unlock the development version. Not strongly opinonated though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-added the file so the Ruby version is pinned in dev

3.1.6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Secure Headers ![Build + Test](https://github.com/github/secure_headers/workflows/Build%20+%20Test/badge.svg?branch=main)

**main branch represents 6.x line**. See the [upgrading to 4.x doc](docs/upgrading-to-4-0.md), [upgrading to 5.x doc](docs/upgrading-to-5-0.md), or [upgrading to 6.x doc](docs/upgrading-to-6-0.md) for instructions on how to upgrade. Bug fixes should go in the 5.x branch for now.
**main branch represents 7.x line**. See the [upgrading to 4.x doc](docs/upgrading-to-4-0.md), [upgrading to 5.x doc](docs/upgrading-to-5-0.md), [upgrading to 6.x doc](docs/upgrading-to-6-0.md) or [upgrading to 7.x doc](docs/upgrading-to-7-0.md) for instructions on how to upgrade. Bug fixes should go in the `6.x` branch for now.

The gem will automatically apply several headers that are related to security. This includes:
- Content Security Policy (CSP) - Helps detect/prevent XSS, mixed-content, and other classes of attack. [CSP 2 Specification](https://www.w3.org/TR/CSP2/)
Expand Down
16 changes: 13 additions & 3 deletions secure_headers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ Gem::Specification.new do |gem|
including content-security-policy, x-frame-options,
strict-transport-security, etc.'
gem.homepage = "https://github.com/github/secure_headers"
gem.metadata = {
"bug_tracker_uri" => "https://github.com/github/secure_headers/issues",
"changelog_uri" => "https://github.com/github/secure_headers/blob/master/CHANGELOG.md",
"documentation_uri" => "https://rubydoc.info/gems/secure_headers",
"homepage_uri" => gem.homepage,
"source_code_uri" => "https://github.com/github/secure_headers",
"rubygems_mfa_required" => "true",
}
gem.license = "MIT"
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})

gem.files = Dir["bin/**/*", "lib/**/*", "README.md", "CHANGELOG.md", "LICENSE", "Gemfile", "secure_headers.gemspec"]
gem.require_paths = ["lib"]

gem.extra_rdoc_files = Dir["README.md", "CHANGELOG.md", "LICENSE"]

gem.add_development_dependency "rake"
end