diff --git a/.rubocop.yml b/.rubocop.yml index 81fc37dbd84c..6ff8c123f65a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,12 +1,9 @@ -require: rubocop-performance +plugins: + - rubocop-performance AllCops: - TargetRubyVersion: 3.1 - Exclude: - - '**/bin/**/*' - - '**/db/**/*' - - '**/script/setup' - - '**/vendor/**/*' + NewCops: enable + SuggestExtensions: false Lint/AssignmentInCondition: Enabled: false @@ -32,3 +29,6 @@ Style/TrailingCommaInArrayLiteral: Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: consistent_comma + +Layout/EndOfLine: + EnforcedStyle: native \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 79d31d62097b..3f52b892c5dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,6 +56,7 @@ GEM ffi (1.17.2-arm-linux-gnu) ffi (1.17.2-arm-linux-musl) ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x64-mingw-ucrt) ffi (1.17.2-x86-linux-gnu) ffi (1.17.2-x86-linux-musl) ffi (1.17.2-x86_64-darwin) @@ -276,6 +277,8 @@ GEM racc (~> 1.4) nokogiri (1.19.4-arm64-darwin) racc (~> 1.4) + nokogiri (1.19.4-x64-mingw-ucrt) + racc (~> 1.4) nokogiri (1.19.4-x86_64-darwin) racc (~> 1.4) nokogiri (1.19.4-x86_64-linux-gnu) @@ -358,6 +361,7 @@ PLATFORMS arm-linux-musl arm64-darwin ruby + x64-mingw-ucrt x86-linux x86-linux-gnu x86-linux-musl diff --git a/collections/vlc-media-player/index.md b/collections/vlc-media-player/index.md new file mode 100644 index 000000000000..130138879ca4 --- /dev/null +++ b/collections/vlc-media-player/index.md @@ -0,0 +1,17 @@ +--- +items: + - videolan/vlc + - mpv-player/mpv + - jellyfin/jellyfin + - HandBrake/HandBrake + - obsproject/obs-studio + - xbmc/xbmc + - iina/iina + - mpc-hc/mpc-hc + - celerity/bino +display_name: VLC Media Player +created_by: VideoLAN +--- +# Video Players and Tools + +Stream, play, and transcode digital media with these powerful video applications. diff --git a/test/collections_test.rb b/test/collections_test.rb index 657c832f40b5..42c2dc8d53f0 100644 --- a/test/collections_test.rb +++ b/test/collections_test.rb @@ -1,4 +1,4 @@ -require_relative "./collections_test_helper" +require_relative "collections_test_helper" describe "collections" do collections.each do |collection| @@ -34,7 +34,7 @@ it "has valid number of items" do items = items_for_collection(collection) - assert (1...MAX_COLLECTION_ITEMS_LENGTH + 1).cover?(items.length), + assert (1...(MAX_COLLECTION_ITEMS_LENGTH + 1)).cover?(items.length), "must have no more than #{MAX_COLLECTION_ITEMS_LENGTH} items " \ "(currently #{items.length})" end @@ -82,7 +82,7 @@ assert metadata.key?(key), "expected to have '#{key}' defined for collection" metadata_value = metadata[key].is_a?(Array) ? metadata[key] : [metadata[key]] assert !metadata_value.empty? && - metadata_value.all? { |value| value&.strip&.size&.positive? }, + metadata_value.all? { |value| !value.to_s.strip.empty? }, "expected to have a value for '#{key}'" end end diff --git a/test/collections_test_helper.rb b/test/collections_test_helper.rb index 1355c312a110..e514c82d4f39 100644 --- a/test/collections_test_helper.rb +++ b/test/collections_test_helper.rb @@ -1,4 +1,4 @@ -require_relative "./test_helper" +require_relative "test_helper" require "fileutils" VALID_COLLECTION_METADATA_KEYS = %w[collection created_by display_name image items].freeze @@ -16,7 +16,7 @@ def invalid_collection_message(collection) "'#{collection}' must be between 1-#{MAX_COLLECTION_SLUG_LENGTH} characters, " \ - "start with a letter or number, and may include hyphens" + "start with a letter or number, and may include hyphens" end def valid_collection?(raw_collection) @@ -34,7 +34,7 @@ def collections_dir end def collection_dirs - collection_directories = dirs_to_test.split(" ").map do |file| + collection_directories = dirs_to_test.split.map do |file| directory = file.split("/")[1] [collections_dir, directory].join("/") end @@ -134,7 +134,7 @@ def prefetch_all_collection_items! def collect_all_collection_items all_items = collections.flat_map { |c| items_for_collection(c) || [] } - repos = all_items.select { |item| item.match?(USERNAME_AND_REPO_REGEX) }.uniq + repos = all_items.grep(USERNAME_AND_REPO_REGEX).uniq users = all_items .select { |item| item.match?(USERNAME_REGEX) && !item.match?(USERNAME_AND_REPO_REGEX) } .uniq diff --git a/test/topics_test.rb b/test/topics_test.rb index fd7ea440e960..86cd793e6c15 100644 --- a/test/topics_test.rb +++ b/test/topics_test.rb @@ -1,4 +1,4 @@ -require_relative "./topics_test_helper" +require_relative "topics_test_helper" describe "topics" do # Used by the Topics Page Style Guide test @@ -279,7 +279,7 @@ REQUIRED_TOPIC_METADATA_KEYS.each do |key| assert metadata.key?(key), "expected to have '#{key}' defined for topic" - assert metadata[key]&.strip&.size&.positive?, + assert !metadata[key].to_s.strip.empty?, "expected to have a value for '#{key}'" end end diff --git a/test/topics_test_helper.rb b/test/topics_test_helper.rb index fc03528a16be..ba434685d77b 100644 --- a/test/topics_test_helper.rb +++ b/test/topics_test_helper.rb @@ -1,4 +1,4 @@ -require_relative "./test_helper" +require_relative "test_helper" VALID_TOPIC_METADATA_KEYS = %w[aliases created_by display_name github_url logo related released short_description topic url wikipedia_url].freeze @@ -42,7 +42,7 @@ def topics_dir end def topic_dirs - topic_directories = dirs_to_test.split(" ").map do |file| + topic_directories = dirs_to_test.split.map do |file| directory = file.split("/")[1] [topics_dir, directory].join("/") end diff --git a/topics/vlc-media-player/index.md b/topics/vlc-media-player/index.md new file mode 100644 index 000000000000..aaecd3a1e0b2 --- /dev/null +++ b/topics/vlc-media-player/index.md @@ -0,0 +1,9 @@ +--- +aliases: vlc-player, videolan, vlc +display_name: VLC +short_description: Vlc is a free and open-source cross-platform multimedia player. +topic: vlc-media-player +logo: vlc-media-player.png +wikipedia_url: https://en.wikipedia.org/wiki/VLC_media_player +--- +VLC Media Player is a portable, free and open-source, cross-platform media player software and streaming media server. diff --git a/topics/vlc-media-player/vlc-media-player.png b/topics/vlc-media-player/vlc-media-player.png new file mode 100644 index 000000000000..7622340cdfaa Binary files /dev/null and b/topics/vlc-media-player/vlc-media-player.png differ