-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
640 additions
and
640 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
gem 'rails' | ||
gem "rails" | ||
|
||
gemspec path: './vite_ruby' | ||
gemspec path: './vite_rails' | ||
gemspec path: './vite_plugin_legacy' | ||
gemspec path: "./vite_ruby" | ||
gemspec path: "./vite_rails" | ||
gemspec path: "./vite_plugin_legacy" | ||
|
||
group :development, :test do | ||
gem 'benchmark-ips' | ||
gem 'rubocop' | ||
gem 'rubocop-minitest' | ||
gem 'rubocop-performance' | ||
gem 'standard', require: false | ||
gem "benchmark-ips" | ||
gem "rubocop" | ||
gem "rubocop-minitest" | ||
gem "rubocop-performance" | ||
gem "standard", require: false | ||
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
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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'test_helper' | ||
require "test_helper" | ||
|
||
class CompatibilityCheckTest < ViteRuby::Test | ||
delegate :verify_plugin_version, :raise_unless_satisfied, :compatible_plugin?, to: 'ViteRuby::CompatibilityCheck' | ||
delegate :verify_plugin_version, :raise_unless_satisfied, :compatible_plugin?, to: "ViteRuby::CompatibilityCheck" | ||
|
||
def test_verify_plugin_version | ||
refresh_config(skip_compatibility_check: true) | ||
assert_raises(ArgumentError) { refresh_config(skip_compatibility_check: false) } | ||
end | ||
|
||
def test_compatible_plugin | ||
refute compatible_plugin?('^3.1.0', '^3.0.1') | ||
refute compatible_plugin?('^4.1.0', '^3.0') | ||
refute compatible_plugin?('4.1.0', '^3.0') | ||
refute compatible_plugin?("^3.1.0", "^3.0.1") | ||
refute compatible_plugin?("^4.1.0", "^3.0") | ||
refute compatible_plugin?("4.1.0", "^3.0") | ||
|
||
assert compatible_plugin?('3.0.5', '^3.0.1') | ||
assert compatible_plugin?('^3.0.9', '^3.0.1') | ||
assert compatible_plugin?('3.1.0', '^3.0') | ||
assert compatible_plugin?('^3.1.0', '^3.0') | ||
assert compatible_plugin?(nil, '^3.0') | ||
assert compatible_plugin?("3.0.5", "^3.0.1") | ||
assert compatible_plugin?("^3.0.9", "^3.0.1") | ||
assert compatible_plugin?("3.1.0", "^3.0") | ||
assert compatible_plugin?("^3.1.0", "^3.0") | ||
assert compatible_plugin?(nil, "^3.0") | ||
assert compatible_plugin?(nil, nil) | ||
end | ||
|
||
def test_raise_unless_satisfied | ||
assert_raises(ArgumentError) { raise_unless_satisfied('^4.1.0', '^3.0') } | ||
raise_unless_satisfied('3.1.0', '^3.0') | ||
raise_unless_satisfied(nil, '^3.0') | ||
assert_raises(ArgumentError) { raise_unless_satisfied("^4.1.0", "^3.0") } | ||
raise_unless_satisfied("3.1.0", "^3.0") | ||
raise_unless_satisfied(nil, "^3.0") | ||
end | ||
end |
Oops, something went wrong.