From 3815ab4da047fb52be9c1c457e08d351c9065d5b Mon Sep 17 00:00:00 2001 From: Neil Matatall <448516+oreoshake@users.noreply.github.com> Date: Thu, 25 Jun 2020 17:05:42 -1000 Subject: [PATCH] Fix ruby 2.7 deprecation warnings with ** (#443) * Fix ruby 2.7 deprecation warnings with ** * dev in 2.6, test in 2.7 Co-authored-by: Neil Matatall --- .github/workflows/build.yml | 4 ++-- .ruby-version | 2 +- lib/secure_headers/view_helper.rb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfaecb7..dcd9cd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,5 @@ name: Build + Test -on: [pull_request, push] +on: [pull_request] jobs: build: @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.4', '2.5', '2.6' ] + ruby: [ '2.4', '2.5', '2.6', '2.7' ] steps: - uses: actions/checkout@v2 diff --git a/.ruby-version b/.ruby-version index 57cf282..338a5b5 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.5 +2.6.6 diff --git a/lib/secure_headers/view_helper.rb b/lib/secure_headers/view_helper.rb index 8934423..91eef4d 100644 --- a/lib/secure_headers/view_helper.rb +++ b/lib/secure_headers/view_helper.rb @@ -21,7 +21,7 @@ module SecureHeaders def nonced_stylesheet_link_tag(*args, &block) opts = extract_options(args).merge(nonce: _content_security_policy_nonce(:style)) - stylesheet_link_tag(*args, opts, &block) + stylesheet_link_tag(*args, **opts, &block) end # Public: create a script tag using the content security policy nonce. @@ -39,7 +39,7 @@ module SecureHeaders def nonced_javascript_include_tag(*args, &block) opts = extract_options(args).merge(nonce: _content_security_policy_nonce(:script)) - javascript_include_tag(*args, opts, &block) + javascript_include_tag(*args, **opts, &block) end # Public: create a script Webpacker pack tag using the content security policy nonce. @@ -49,7 +49,7 @@ module SecureHeaders def nonced_javascript_pack_tag(*args, &block) opts = extract_options(args).merge(nonce: _content_security_policy_nonce(:script)) - javascript_pack_tag(*args, opts, &block) + javascript_pack_tag(*args, **opts, &block) end # Public: create a stylesheet Webpacker link tag using the content security policy nonce. @@ -59,7 +59,7 @@ module SecureHeaders def nonced_stylesheet_pack_tag(*args, &block) opts = extract_options(args).merge(nonce: _content_security_policy_nonce(:style)) - stylesheet_pack_tag(*args, opts, &block) + stylesheet_pack_tag(*args, **opts, &block) end # Public: use the content security policy nonce for this request directly.