Skip to content

Commit

Permalink
Merge pull request #354 from zendesk/fzhang/silent-loofah-deprecation…
Browse files Browse the repository at this point in the history
…-warning into master

* fzhang/silent-loofah-deprecation-warning:
  Bump version to 4.38.3
  Format GitHub Action files
  Fix CI not running on primary branch
  Silent loofah deprecation warning
  • Loading branch information
Frederick888 committed Mar 16, 2023
2 parents ec48b49 + 1f98f6a commit be977dc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/actions.yml
Expand Up @@ -2,8 +2,10 @@ name: repo-checks

on:
pull_request:
push:
branches:
- master
- master
- main

jobs:
main:
Expand All @@ -13,26 +15,26 @@ jobs:
matrix:
ruby-version: [3.0.4, 2.7.5, 2.6.10]
steps:
- uses: zendesk/checkout@v3
- uses: zendesk/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Vendor Cache
id: vendor-cache
uses: zendesk/cache@v3
with:
path: vendor/cache
key: ${{ runner.os }}-vendor-ruby-${{ matrix.ruby-version }}-lock-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-vendor-ruby-${{ matrix.ruby-version }}-
${{ runner.os }}-vendor-
- name: before_script
run: |
bundle config set --local path 'vendor/cache'
bundle install --jobs=3 --retry=3
- name: build
run: |
bundle exec rake
- name: lint
run: |
bundle exec rubocop
- uses: zendesk/checkout@v3
- uses: zendesk/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Vendor Cache
id: vendor-cache
uses: zendesk/cache@v3
with:
path: vendor/cache
key: ${{ runner.os }}-vendor-ruby-${{ matrix.ruby-version }}-lock-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-vendor-ruby-${{ matrix.ruby-version }}-
${{ runner.os }}-vendor-
- name: before_script
run: |
bundle config set --local path 'vendor/cache'
bundle install --jobs=3 --retry=3
- name: build
run: |
bundle exec rake
- name: lint
run: |
bundle exec rubocop
3 changes: 2 additions & 1 deletion .github/workflows/ruby-gem-publication.yml
Expand Up @@ -2,7 +2,8 @@ name: Ruby Gem Publish

on:
push:
tags: v*
tags:
- v*

jobs:
call-workflow:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
zendesk_apps_support (4.38.2)
zendesk_apps_support (4.38.3)
erubis
i18n
image_size (~> 2.0.2)
Expand Down Expand Up @@ -100,4 +100,4 @@ DEPENDENCIES
zendesk_apps_support!

BUNDLED WITH
2.3.24
2.3.26
6 changes: 3 additions & 3 deletions lib/zendesk_apps_support/validations/svg.rb
Expand Up @@ -8,13 +8,13 @@ module Svg
PLACEHOLDER_SVG_MARKUP = File.read(File.expand_path('../../assets/default_app_logo.svg', __FILE__))

# whitelist elements and attributes used in Zendesk Garden assets
Loofah::HTML5::WhiteList::ALLOWED_ELEMENTS_WITH_LIBXML2.add 'symbol'
Loofah::HTML5::WhiteList::ACCEPTABLE_CSS_PROPERTIES.add 'position'
Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2.add 'symbol'
Loofah::HTML5::SafeList::ACCEPTABLE_CSS_PROPERTIES.add 'position'

# CRUFT: ignore a (very specific) style attribute which Loofah would otherwise scrub.
# This attribute is deprecated (https://www.w3.org/TR/filter-effects/#AccessBackgroundImage)
# but is included in many of the test apps used in fixtures for tests in ZAM, ZAT etc.
Loofah::HTML5::WhiteList::ACCEPTABLE_CSS_PROPERTIES.add 'enable-background'
Loofah::HTML5::SafeList::ACCEPTABLE_CSS_PROPERTIES.add 'enable-background'

@strip_declaration = Loofah::Scrubber.new do |node|
node.remove if node.name == 'xml' && node.children.empty?
Expand Down
2 changes: 1 addition & 1 deletion zendesk_apps_support.gemspec
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'zendesk_apps_support'
s.version = '4.38.2'
s.version = '4.38.3'
s.license = 'Apache License Version 2.0'
s.authors = ['James A. Rosen', 'Likun Liu', 'Sean Caffery', 'Daniel Ribeiro']
s.email = ['dev@zendesk.com']
Expand Down

0 comments on commit be977dc

Please sign in to comment.