diff --git a/Gemfile.lock b/Gemfile.lock index 23ad67d..6e162ba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,45 +1,72 @@ GEM remote: https://rubygems.org/ specs: + activesupport (7.1.3.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) ast (2.4.2) - json (2.7.1) + base64 (0.2.0) + bigdecimal (3.1.8) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + drb (2.2.1) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) language_server-protocol (3.17.0.3) + minitest (5.22.3) + mutex_m (0.2.0) parallel (1.24.0) - parser (3.3.0.3) + parser (3.3.1.0) ast (~> 2.4.1) racc prettier_print (1.2.1) racc (1.7.3) rainbow (3.1.1) - regexp_parser (2.9.0) + regexp_parser (2.9.1) rexml (3.2.6) - rubocop (1.59.0) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-capybara (2.20.0) rubocop (~> 1.41) - rubocop-discourse (3.6.0) + rubocop-discourse (3.7.1) + activesupport (>= 6.1) rubocop (>= 1.59.0) + rubocop-capybara (>= 2.0.0) + rubocop-factory_bot (>= 2.0.0) rubocop-rspec (>= 2.25.0) rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-rspec (2.26.1) + rubocop-rspec (2.29.2) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.28.3) + rubocop (~> 1.40) ruby-progressbar (1.13.0) syntax_tree (6.2.0) prettier_print (>= 1.2.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) PLATFORMS diff --git a/plugin.rb b/plugin.rb index 897439f..d759a6c 100644 --- a/plugin.rb +++ b/plugin.rb @@ -11,10 +11,8 @@ enabled_site_setting :discourse_antivirus_enabled register_asset "stylesheets/reviewable-upload.scss" -PLUGIN_NAME ||= "DiscourseAntivirus" - -load File.expand_path("lib/discourse_antivirus/engine.rb", __dir__) -load File.expand_path("lib/validators/enable_discourse_antivirus_validator.rb", __dir__) +require_relative "lib/discourse_antivirus/engine" +require_relative "lib/validators/enable_discourse_antivirus_validator" add_admin_route "antivirus.title", "antivirus" diff --git a/spec/models/reviewable_upload_spec.rb b/spec/models/reviewable_upload_spec.rb index edec524..34f272f 100644 --- a/spec/models/reviewable_upload_spec.rb +++ b/spec/models/reviewable_upload_spec.rb @@ -3,8 +3,8 @@ require "rails_helper" describe ReviewableUpload do - fab!(:admin) { Fabricate(:admin) } - fab!(:upload) { Fabricate(:upload) } + fab!(:admin) + fab!(:upload) let(:reviewable) do ReviewableUpload .needs_review!( diff --git a/spec/plugin_spec.rb b/spec/plugin_spec.rb index cca8990..948582b 100644 --- a/spec/plugin_spec.rb +++ b/spec/plugin_spec.rb @@ -7,7 +7,7 @@ describe DiscourseAntivirus do before { SiteSetting.discourse_antivirus_enabled = true } - fab!(:user) { Fabricate(:user) } + fab!(:user) describe "regular files" do before { SiteSetting.authorized_extensions = "pdf" }