cfa_grub2 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cfa/grub2/grub_cfg.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a60eb146945a4ae05b7e509bad70449658672833
|
4
|
+
data.tar.gz: 7e6156243b4226fa7d03854e438dabe9e8ed50f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee49030b6c3d2607d41a7bbed201f971485931e295acad5a15073bb26527a5c91270ebef2546e49f6a64635d3673f63e08b6596244b92c4375fcb92afac866ad
|
7
|
+
data.tar.gz: 0aaa5993b75ccbe6ea8fe77698abaefff2b923f2d238d399bf8508f944dbb04f0a3a7aceab6024cd6fbd32c088673fc3ce1ba19f11b09f9e9b879233ad2297ec
|
data/lib/cfa/grub2/grub_cfg.rb
CHANGED
@@ -12,13 +12,13 @@ module CFA
|
|
12
12
|
# @private only internal parser
|
13
13
|
class Parser
|
14
14
|
def self.parse(string)
|
15
|
-
submenu =
|
15
|
+
submenu = []
|
16
16
|
string.lines.each_with_object([]) do |line, result|
|
17
17
|
case line
|
18
18
|
when /menuentry\s+'/ then result << parse_entry(line, submenu)
|
19
|
-
when
|
19
|
+
when /^\s*}\s*\n/ then submenu.pop
|
20
20
|
when /submenu\s+'/
|
21
|
-
submenu
|
21
|
+
submenu.push(line[/\s*submenu\s+'([^']+)'.*/, 1])
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -34,9 +34,10 @@ module CFA
|
|
34
34
|
|
35
35
|
def self.parse_entry(line, submenu)
|
36
36
|
entry = line[/\s*menuentry\s+'([^']+)'.*/, 1]
|
37
|
+
submenu.push(entry)
|
37
38
|
{
|
38
39
|
title: entry,
|
39
|
-
path: submenu.
|
40
|
+
path: submenu.join(">")
|
40
41
|
}
|
41
42
|
end
|
42
43
|
private_class_method :parse_entry
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfa_grub2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cfa
|