Commit Graph

13 Commits

Author SHA1 Message Date
David Rodríguez
4c6d894bc0 Bump RuboCop to 1.86.6
There were a few changes needed:

* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
  are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
  rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
  with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
  --exclude-limit 1400 --no-auto-gen-timestamp`.
2025-10-27 11:30:33 +01:00
Carlos Chitty
ecb303fef5 Correct Style/SlicingWithRange rubocop offenses 2025-03-26 11:16:24 -04:00
zanetagebka
a2a670c848 Fix cops StringConcatenation 2024-06-11 15:17:32 +10:00
Neal Chambers
1e4034534c Fix Layout/LineLength 2023-06-23 09:08:04 +09:00
Philipp Winkler
6291e3c587 Handle invalid referer for embedded page service 2022-07-11 22:07:00 +02:00
Matt-Yorkley
dfbd384c95 Refactor embedding to a Concern 2022-01-18 12:22:06 +00:00
Matt-Yorkley
4649698fc4 Remove #set_response_headers 2022-01-18 12:19:54 +00:00
Luis Ramos
e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Matt-Yorkley
7124c6bb73 Fix embedded response headers
Rails 4 adds an extra layer of "default" headers that override any that are missing (or deleted). This was breaking embedded shopfront responses.

Fixes:

  74) setting response headers for embedded shopfronts with embedded shopfronts enabled with a valid whitelist allows iframes on certain pages when enabled in configuration
      Failure/Error: expect(response.headers['X-Frame-Options']).to be_nil

        expected: nil
             got: "SAMEORIGIN"
      # ./spec/requests/embedded_shopfronts_headers_spec.rb:54:in `block (4 levels) in <top (required)>'

  75) setting response headers for embedded shopfronts with embedded shopfronts enabled with www prefix matches the URL structure in the header
      Failure/Error: expect(response.headers['X-Frame-Options']).to be_nil

        expected: nil
             got: "SAMEORIGIN"
      # ./spec/requests/embedded_shopfronts_headers_spec.rb:75:in `block (4 levels) in <top (required)>'
2020-02-27 20:53:09 +01:00
luisramos0
9404aacfb2 run rubocop --auto-correct 2019-11-10 18:42:43 +00:00
JASON KNOEPFLER
91a52ead58 Guard against malformed request referer 2019-09-14 09:13:44 -07:00
Matt-Yorkley
172fa168ea Change layout attribute to method with question mark 2018-06-21 15:19:40 +01:00
Matt-Yorkley
ff0e0d9f3d Move logic from ApplicationController to service and improve clarity 2018-06-20 01:28:35 +01:00