gluez 0.2.1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,34 +0,0 @@
1
- # module Gluez
2
- # module Impl
3
- # class Mac
4
- # def self.steps(cfg, task, name, opts)
5
- #
6
- # setup = nil
7
- # steps = []
8
- #
9
- # case task
10
- #
11
- # when :group
12
- # steps << "$(/usr/bin/dscl . -list Groups | grep ^#{name}$ | wc -l) -eq 1"
13
- # steps << "$(/usr/bin/dscl . -create /Groups/#{name} PrimaryGroupID #{opts[:gid]})"
14
- #
15
- # when :user
16
- # steps << "$(/usr/bin/dscl . -list Users | grep ^#{name}$ | wc -l) -eq 1"
17
- # steps << "$(/usr/bin/dscl . -create /Users/#{name} UniqueID #{opts[:uid]} PrimaryGroupID #{opts[:gid]} UserShell #{opts[:shell, "/bin/bash"]} NFSHomeDir /Users/#{name})"
18
- #
19
- # steps << "-d /Users/#{name}"
20
- # steps << "mkdir /Users/#{name}"
21
- #
22
- # steps << "\"$(stat -L -f %Sg:%Su /Users/#{name})\" = \"#{name}:#{name}\""
23
- # steps << "chown #{name}:#{name} /Users/#{name}"
24
- #
25
- # else
26
- # raise "unsupported task: #{task}, name: #{name}, opts: #{opts.inspect}"
27
- # end
28
- #
29
- #
30
- # [name, setup, steps]
31
- # end
32
- # end
33
- # end
34
- # end
@@ -1,24 +0,0 @@
1
- module Gluez
2
- class OptionWrapper
3
- def initialize(options)
4
- @options = options
5
- end
6
-
7
- def key?(key)
8
- @options.key?(key)
9
- end
10
-
11
- def [](name, default=nil)
12
- value = @options[name]
13
- if value
14
- value
15
- else
16
- if default
17
- default
18
- else
19
- raise "missing option: #{name}"
20
- end
21
- end
22
- end
23
- end
24
- end