File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ gem "rubocop-sequel", require: false
18
18
gem "rubocop-shopify" , require : false
19
19
gem "rubocop-sorbet" , require : false
20
20
gem "rubocop-thread_safety" , require : false
21
- gem "safe_yaml"
22
21
gem "test-prof" , require : false
23
22
24
23
group :test do
Original file line number Diff line number Diff line change 77
77
rubocop-thread_safety (0.4.4 )
78
78
rubocop (>= 0.53.0 )
79
79
ruby-progressbar (1.11.0 )
80
- safe_yaml (1.0.5 )
81
80
test-prof (1.0.9 )
82
81
tzinfo (2.0.4 )
83
82
concurrent-ruby (~> 1.0 )
@@ -105,7 +104,6 @@ DEPENDENCIES
105
104
rubocop-shopify
106
105
rubocop-sorbet
107
106
rubocop-thread_safety
108
- safe_yaml
109
107
test-prof
110
108
111
109
BUNDLED WITH
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
- require "safe_yaml"
4
3
require "cc/engine/content_resolver"
5
4
6
- SafeYAML ::OPTIONS [ :default_mode ] = :safe
7
-
8
5
module CC
9
6
module Engine
10
7
class Issue < SimpleDelegator
@@ -71,7 +68,11 @@ def cop_definition
71
68
end
72
69
73
70
def cop_list
74
- @cop_list ||= YAML . load_file ( expand_config_path ( "cops.yml" ) )
71
+ @cop_list ||= yaml_safe_load ( expand_config_path ( "cops.yml" ) )
72
+ end
73
+
74
+ def yaml_safe_load ( path )
75
+ YAML . safe_load ( File . read ( path ) )
75
76
end
76
77
77
78
def expand_config_path ( path )
You can’t perform that action at this time.
0 commit comments