1+ # encoding: utf-8
2+ #
3+ # Copyright 2016, Christoph Hartmann
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+ # author: Christoph Hartmann
18+ # author: Dominik Richter
19+ # author: Patrick Muench
20+
121require 'yaml'
222
323class Docker < Inspec . resource ( 1 )
@@ -26,7 +46,7 @@ def path
2646 params = parse_systemd_values ( cmd . stdout . chomp )
2747
2848 # return the value
29- params [ " FragmentPath" ]
49+ params [ ' FragmentPath' ]
3050 end
3151
3252 def socket
@@ -37,7 +57,7 @@ def socket
3757 params = parse_systemd_values ( cmd . stdout . chomp )
3858
3959 # return the value
40- params [ " FragmentPath" ]
60+ params [ ' FragmentPath' ]
4161 end
4262
4363 private
@@ -47,7 +67,7 @@ def parse_systemd_values(stdout)
4767 SimpleConfig . new (
4868 stdout ,
4969 assignment_re : /^\s *([^=]*?)\s *=\s *(.*?)\s *$/ ,
50- multiple_values : false ,
70+ multiple_values : false
5171 ) . params
5272 end
5373end
0 commit comments