-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into substring-check
- Loading branch information
Showing
72 changed files
with
363 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Locale PO to JSON" | ||
|
||
on: | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
jobs: | ||
locale_po_to_json: | ||
if: github.repository_owner == 'ManageIQ' | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: manageiq/postgresql:13 | ||
env: | ||
POSTGRESQL_USER: root | ||
POSTGRESQL_PASSWORD: smartvm | ||
POSTGRESQL_DATABASE: vmdb_i18n | ||
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
PGHOST: localhost | ||
PGPASSWORD: smartvm | ||
RAILS_ENV: i18n | ||
SKIP_TEST_RESET: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up system | ||
run: bin/before_install | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.1" | ||
bundler-cache: true | ||
timeout-minutes: 30 | ||
- name: Prepare dependencies | ||
run: bin/setup | ||
- name: Install gettext for msgfmt --check support | ||
run: sudo apt-get install -y gettext | ||
- name: Run app:locale:po_to_json | ||
run: bundle exec rake app:locale:po_to_json | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
add-paths: | | ||
app/javascript/oldjs/locale | ||
commit-message: Update UI json translation files | ||
branch: update_ui_json_translation_files | ||
author: ManageIQ Bot <[email protected]> | ||
committer: ManageIQ Bot <[email protected]> | ||
delete-branch: true | ||
labels: internationalization | ||
push-to-fork: miq-bot/manageiq-ui-classic | ||
title: Update UI json translation files | ||
body: Update UI json translation files | ||
token: ${{ secrets.PR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
committer: ManageIQ Bot <[email protected]> | ||
delete-branch: true | ||
labels: dependencies | ||
assignees: jeffibm | ||
assignees: GilbertCherrie | ||
team-reviewers: ManageIQ/committers-ui | ||
push-to-fork: miq-bot/manageiq-ui-classic | ||
title: Update yarn.lock with latest dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,5 @@ def textual_group_list | |
end | ||
|
||
helper_method :textual_group_list | ||
has_custom_buttons | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Mixins | ||
module ImageValidationMixin | ||
private | ||
|
||
# @param file request parameter for a file | ||
# @param ext if present, the only extension supported (default: nil / accept all extensions) | ||
def valid_image_file?(file, type = nil) | ||
ext = file.original_filename.split(".").last.downcase | ||
return false if type && !Array.wrap(type).include?(ext) | ||
|
||
valid_magic_number = | ||
case ext | ||
when "ico" | ||
"\x00\x00\x01\x00".force_encoding("ASCII-8BIT") | ||
when "png" | ||
"\x89PNG\r\n\x1A\n".force_encoding("ASCII-8BIT") | ||
when "jpg" | ||
"\xff\xd8\xff".force_encoding("ASCII-8BIT") | ||
else | ||
return false | ||
end | ||
|
||
magic_number = File.open(file.tempfile.path, 'rb') do |f| | ||
f.readpartial(valid_magic_number.size) | ||
end | ||
|
||
magic_number == valid_magic_number | ||
rescue EOFError | ||
return false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.