File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,7 @@ def create
34
34
35
35
opts = [ defaults_extra_file ]
36
36
%w[ basedir datadir user ] . each do |opt |
37
- # rubocop:disable Security/Eval
38
- val = eval ( opt )
39
- # rubocop:enable Security/Eval
37
+ val = eval ( opt ) # rubocop:disable Security/Eval
40
38
opts << "--#{ opt } =#{ val } " unless val . nil?
41
39
end
42
40
@@ -57,9 +55,7 @@ def create
57
55
end
58
56
59
57
def destroy
60
- # rubocop:disable Lint/UselessAssignment
61
- name = @resource [ :name ]
62
- # rubocop:enable Lint/UselessAssignment
58
+ name = @resource [ :name ] # rubocop:disable Lint/UselessAssignment
63
59
raise ArgumentError , 'ERROR: Resource can not be removed'
64
60
end
65
61
Original file line number Diff line number Diff line change @@ -18,11 +18,9 @@ def self.instances
18
18
def self . prefetch ( resources )
19
19
plugins = instances
20
20
resources . keys . each do |plugin |
21
- # rubocop:disable Lint/AssignmentInCondition
22
- if provider = plugins . find { |pl | pl . name == plugin }
21
+ if provider = plugins . find { |pl | pl . name == plugin } # rubocop:disable Lint/AssignmentInCondition
23
22
resources [ plugin ] . provider = provider
24
23
end
25
- # rubocop:enable Lint/AssignmentInCondition
26
24
end
27
25
end
28
26
Original file line number Diff line number Diff line change 4
4
context "on an unsupported OS" do
5
5
let ( :facts ) do
6
6
{
7
- :osfamily => 'UNSUPPORTED' ,
7
+ :osfamily => 'UNSUPPORTED' ,
8
8
:operatingsystem => 'UNSUPPORTED'
9
9
}
10
- end
11
-
10
+ end
12
11
it 'should gracefully fail' do
13
12
is_expected . to compile . and_raise_error ( /Unsupported platform:/ )
14
13
end
You can’t perform that action at this time.
0 commit comments