Skip to content

Commit 3bdcc4f

Browse files
committed
print deprecation warning at runtime instead of during gem installation
1 parent 6632d62 commit 3bdcc4f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/secure_headers.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def secure_headers_options
3939
end
4040

4141
def ensure_security_headers options = {}
42+
if RUBY_VERSION == "1.8.7"
43+
warn "[DEPRECATION] secure_headers ruby 1.8.7 support will dropped in the next release"
44+
end
4245
self.secure_headers_options = options
4346
before_filter :prep_script_hash
4447
before_filter :set_hsts_header

secure_headers.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ Gem::Specification.new do |gem|
2020
gem.require_paths = ["lib"]
2121
gem.add_development_dependency "rake"
2222
gem.add_dependency "user_agent_parser"
23-
gem.post_install_message = "Heads up, secure_headers Ruby 1.8.7 support will go away in the next major release."
2423
end

0 commit comments

Comments
 (0)