boxen-linux 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/boxen.gemspec +1 -1
- data/lib/boxen/config.rb +10 -0
- data/lib/boxen/preflight/directories.rb +2 -3
- 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: 2b74877765fc766a33d467c76c66bece9afe9e15
|
|
4
|
+
data.tar.gz: d7e388fe435f59fc80e8b6f931a1c37c810f8de6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77fe3678f8744201f723edf907c03122ef8dd5c68fbd15706be628b8dcafa1bebc403efe742106264b72e59f0507506a05f6319b4afbdfa01ea74e017bb94447
|
|
7
|
+
data.tar.gz: 7a668d5354a5c332cdfff880acdb271198c5a4ed4062301b5d507fcce8355cc47a0d68844711ab05f3c4400e229ddce65c8c14dd676b476b6f5c2aac71512073
|
data/boxen.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |gem|
|
|
4
4
|
gem.name = "boxen-linux"
|
|
5
|
-
gem.version = "2.7.
|
|
5
|
+
gem.version = "2.7.4"
|
|
6
6
|
gem.authors = ["John Barnette", "Will Farrington", "David Goodlad", "Max Klein"]
|
|
7
7
|
gem.email = ["jbarnette@github.com", "wfarr@github.com", "dgoodlad@github.com", "mklein@jhu.edu"]
|
|
8
8
|
gem.description = "Manage Mac and Linux development boxes with love (and Puppet)."
|
data/lib/boxen/config.rb
CHANGED
|
@@ -300,6 +300,16 @@ module Boxen
|
|
|
300
300
|
def user
|
|
301
301
|
@user || ENV["USER"]
|
|
302
302
|
end
|
|
303
|
+
|
|
304
|
+
def group
|
|
305
|
+
if :osfamily =~ /Darwin/
|
|
306
|
+
@group || "staff"
|
|
307
|
+
elsif :osfamily =~ /Linux/
|
|
308
|
+
@group || ENV["USER"]
|
|
309
|
+
else
|
|
310
|
+
raise "unsupported OS"
|
|
311
|
+
end
|
|
312
|
+
end
|
|
303
313
|
|
|
304
314
|
attr_writer :user
|
|
305
315
|
|
|
@@ -2,15 +2,14 @@ require "boxen/preflight"
|
|
|
2
2
|
require "boxen/util"
|
|
3
3
|
|
|
4
4
|
class Boxen::Preflight::Directories < Boxen::Preflight
|
|
5
|
-
def ok?
|
|
6
5
|
homedir_directory_exists? &&
|
|
7
6
|
homedir_owner == config.user &&
|
|
8
|
-
homedir_group ==
|
|
7
|
+
homedir_group == config.group
|
|
9
8
|
end
|
|
10
9
|
|
|
11
10
|
def run
|
|
12
11
|
Boxen::Util.sudo("/bin/mkdir", "-p", config.homedir) &&
|
|
13
|
-
Boxen::Util.sudo("/
|
|
12
|
+
Boxen::Util.sudo("/bin/chown", "#{config.user}:#{config.group}", config.homedir)
|
|
14
13
|
end
|
|
15
14
|
|
|
16
15
|
private
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: boxen-linux
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.7.
|
|
4
|
+
version: 2.7.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Barnette
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2014-08-
|
|
14
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: ansi
|