wixgem 0.106.0 → 0.107.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/example.msi +0 -0
- data/example/example.msm +0 -0
- data/lib/service.rb +12 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4df5be0ad2b518b79605ff0df4352189113f98f04151cdaa67cd872a6bb9be6
|
4
|
+
data.tar.gz: 13415131c4b51d1587e536fe17aebf41e6195104ab375f219384b1582d5ca041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2425b542ace8a5b0260713b345f435d26c87c200a46a14023b17d02391909070da6b62263c1e01e16c9fe9ce187ce8299cd83c7a4ef0ba6794fd70002d11e4b
|
7
|
+
data.tar.gz: 6dd5953c029b3c504881f1b4b5f92ffb6b5e1fffa85e427c4dbe0d5814652bc813799882415409569cd777dd7a4401c5af565c8513629b8c5c41ed307f0db06c
|
data/example/example.msi
CHANGED
Binary file
|
data/example/example.msm
CHANGED
Binary file
|
data/lib/service.rb
CHANGED
@@ -36,13 +36,22 @@ class Service
|
|
36
36
|
service_control = @hash[:service_control] if(@hash.has_key?(:service))
|
37
37
|
|
38
38
|
if(service.key?(:logonasservice))
|
39
|
+
raise ':logonasservice requires an :account element' unless(service.key?(:account))
|
40
|
+
|
39
41
|
wix = REXML::XPath.match(xml_doc, "/Wix")[0]
|
40
42
|
wix.add_attribute('xmlns:Util', 'http://schemas.microsoft.com/wix/UtilExtension')
|
41
|
-
|
43
|
+
|
42
44
|
user_element = parent_element.add_element 'Util:User'
|
45
|
+
|
46
|
+
account = service[:account].gsub(/\\/, '/')
|
47
|
+
if(account.include?('/'))
|
48
|
+
words = account.split('/')
|
49
|
+
user_element.add_attribute('Domain', words[0])
|
50
|
+
|
51
|
+
account = words[1]
|
52
|
+
end
|
43
53
|
user_element.attributes['Id'] = "logon_as_service_#{SecureRandom.uuid.gsub(/-/,'')}"
|
44
|
-
user_element.add_attribute('
|
45
|
-
user_element.add_attribute('Name', service[:name])
|
54
|
+
user_element.add_attribute('Name', account)
|
46
55
|
user_element.add_attribute('LogonAsService', service[:logonasservice])
|
47
56
|
user_element.add_attribute('CreateUser', 'no')
|
48
57
|
user_element.add_attribute('UpdateIfExists', 'yes')
|