File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,15 @@ def executable(exe_path: DEFAULT_DIR)
34
34
MESSAGE
35
35
end
36
36
else
37
- if Tailwindcss ::Upstream ::NATIVE_PLATFORMS . keys . none? { |p | Gem ::Platform . match ( Gem ::Platform . new ( p ) ) }
37
+ if Tailwindcss ::Upstream ::NATIVE_PLATFORMS . keys . none? { |p | Gem ::Platform . match_gem? ( Gem ::Platform . new ( p ) , nil ) }
38
38
raise UnsupportedPlatformException , <<~MESSAGE
39
39
tailwindcss-rails does not support the #{ platform } platform
40
40
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
41
41
MESSAGE
42
42
end
43
43
44
44
exe_file = Dir . glob ( File . expand_path ( File . join ( exe_path , "*" , "tailwindcss" ) ) ) . find do |f |
45
- Gem ::Platform . match ( Gem ::Platform . new ( File . basename ( File . dirname ( f ) ) ) )
45
+ Gem ::Platform . match_gem? ( Gem ::Platform . new ( File . basename ( File . dirname ( f ) ) ) , nil )
46
46
end
47
47
end
48
48
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def mock_exe_directory(platform)
7
7
FileUtils . mkdir ( File . join ( dir , platform ) )
8
8
path = File . join ( dir , platform , "tailwindcss" )
9
9
FileUtils . touch ( path )
10
- Gem ::Platform . stub ( :match , true ) do
10
+ Gem ::Platform . stub ( :match_gem? , true ) do
11
11
yield ( dir , path )
12
12
end
13
13
end
@@ -35,7 +35,7 @@ def mock_local_tailwindcss_install
35
35
end
36
36
37
37
test ".executable raises UnsupportedPlatformException when we're not on a supported platform" do
38
- Gem ::Platform . stub ( :match , false ) do # nothing is supported
38
+ Gem ::Platform . stub ( :match_gem? , false ) do # nothing is supported
39
39
assert_raises ( Tailwindcss ::Commands ::UnsupportedPlatformException ) do
40
40
Tailwindcss ::Commands . executable
41
41
end
@@ -66,7 +66,7 @@ def mock_local_tailwindcss_install
66
66
end
67
67
68
68
test ".executable returns the executable in TAILWINDCSS_INSTALL_DIR when we're not on a supported platform" do
69
- Gem ::Platform . stub ( :match , false ) do # nothing is supported
69
+ Gem ::Platform . stub ( :match_gem? , false ) do # nothing is supported
70
70
mock_local_tailwindcss_install do |local_install_dir , expected |
71
71
result = nil
72
72
begin
You can’t perform that action at this time.
0 commit comments