uncruft 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uncruft/deprecation_handler.rb +9 -0
- data/lib/uncruft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aa0bb937027030b9fc259a8601f437cb95d9e271a8080e9a8c33203f2518d5b
|
4
|
+
data.tar.gz: 1cf593d52f8a5da26a0641ae8ed89a15e1ff5ee5b50ff2a6543a4d3ddda6b648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df1f2ccd8624867f6bba5b87b71021d69b04e1edcaa4be2714639f436da13fead46d15cee272a8b38c32fd88d4d385411a5c20379aa97e39106854eee5d5dd82
|
7
|
+
data.tar.gz: 171847958d0cd67979abcb650dd5d6545c2d4fb7e6bc923d2c75c95265a90b0ff3296d1d6e78e0c71887e4a866e48414383179629ad898b72324a32b699745c3
|
@@ -44,6 +44,10 @@ module Uncruft
|
|
44
44
|
message.gsub!(gem_home, '$GEM_PATH')
|
45
45
|
end
|
46
46
|
|
47
|
+
if message.include?(bin_dir)
|
48
|
+
message.gsub!(bin_dir, '$BIN_PATH')
|
49
|
+
end
|
50
|
+
|
47
51
|
if (absolute_path = absolute_path(message)).present?
|
48
52
|
message.gsub!(absolute_path, relative_path(absolute_path))
|
49
53
|
end
|
@@ -77,10 +81,15 @@ module Uncruft
|
|
77
81
|
Pathname.new(absolute_path)
|
78
82
|
.relative_path_from(Rails.root).to_s
|
79
83
|
.gsub(%r{\A(../)*vendor/cache}, '$GEM_PATH')
|
84
|
+
.gsub(%r{\A(vendor/bundle/ruby/\d\.\d\.\d/bin)}, '$BIN_PATH')
|
80
85
|
rescue ArgumentError # When `relative_path_from` cannot find a relative path.
|
81
86
|
absolute_path
|
82
87
|
end
|
83
88
|
|
89
|
+
def bin_dir
|
90
|
+
RbConfig::CONFIG['bindir']
|
91
|
+
end
|
92
|
+
|
84
93
|
def error_message(message, line_number)
|
85
94
|
<<~ERROR.strip
|
86
95
|
#{message}:#{line_number}
|
data/lib/uncruft/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uncruft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Griffith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-04-
|
12
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|