boxen 0.5.2 → 0.6.0.pre.0
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.
- data/README.md +2 -2
- data/boxen.gemspec +1 -1
- data/lib/boxen/service.rb +3 -3
- data/script/release +2 -2
- data/script/sync-puppet +3 -1
- data/test/boxen_service_test.rb +5 -5
- metadata +12 -8
data/README.md
CHANGED
@@ -10,8 +10,8 @@ Manage Mac development boxes with love (and Puppet).
|
|
10
10
|
|
11
11
|
0. Suffix the Homebrew package's version, starting with `-boxen1`.
|
12
12
|
|
13
|
-
0. Run as a launchd service in the `
|
14
|
-
`
|
13
|
+
0. Run as a launchd service in the `dev` namespace, e.g.,
|
14
|
+
`dev.dnsmasq`.
|
15
15
|
|
16
16
|
0. Store config, data, and log files in
|
17
17
|
`$BOXEN_HOME/{config,data,log}. This will normally require
|
data/boxen.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "boxen"
|
5
|
-
gem.version = "0.
|
5
|
+
gem.version = "0.6.0.pre.0"
|
6
6
|
gem.authors = ["John Barnette", "Will Farrington"]
|
7
7
|
gem.email = ["jbarnette@github.com", "wfarr@github.com"]
|
8
8
|
gem.description = "Manage Mac development boxes with love (and Puppet)."
|
data/lib/boxen/service.rb
CHANGED
@@ -30,7 +30,7 @@ module Boxen
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def location
|
33
|
-
"#{self.class.location}/
|
33
|
+
"#{self.class.location}/dev.#{name}.plist"
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.location
|
@@ -38,11 +38,11 @@ module Boxen
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.files
|
41
|
-
Dir["#{location}/
|
41
|
+
Dir["#{location}/dev.*.plist"]
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.human_name(service)
|
45
|
-
service.match(/
|
45
|
+
service.match(/dev\.(.+)\.plist$/)[1]
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/script/release
CHANGED
@@ -14,7 +14,7 @@ gem build -q boxen.gemspec
|
|
14
14
|
|
15
15
|
# Make sure we're on the master branch.
|
16
16
|
|
17
|
-
(git branch | grep '* master') || {
|
17
|
+
(git branch | grep -q '* master') || {
|
18
18
|
echo "Only release from the master branch."
|
19
19
|
exit 1
|
20
20
|
}
|
@@ -27,7 +27,7 @@ tag=v`ls boxen-*.gem | sed 's/^boxen-\(.*\)\.gem$/\1/'`
|
|
27
27
|
|
28
28
|
git fetch -t origin
|
29
29
|
|
30
|
-
(git tag -l | grep "$tag") && {
|
30
|
+
(git tag -l | grep -q "$tag") && {
|
31
31
|
echo "Whoops, there's already a '${tag}' tag."
|
32
32
|
exit 1
|
33
33
|
}
|
data/script/sync-puppet
CHANGED
@@ -36,7 +36,9 @@ FileUtils.mkdir_p "puppet"
|
|
36
36
|
api.organization_repositories("boxen").each do |repo|
|
37
37
|
next unless /^puppet-/ =~ repo.name
|
38
38
|
|
39
|
-
|
39
|
+
dest = "puppet/" + repo.name[7..-1]
|
40
|
+
|
41
|
+
unless File.directory? dest
|
40
42
|
system "git", "clone", repo.clone_url, dest
|
41
43
|
end
|
42
44
|
end
|
data/test/boxen_service_test.rb
CHANGED
@@ -3,9 +3,9 @@ require "boxen/service"
|
|
3
3
|
|
4
4
|
class BoxenServiceTest < Boxen::Test
|
5
5
|
def test_list
|
6
|
-
Dir.expects(:[]).with("/Library/LaunchDaemons/
|
7
|
-
"/Library/LaunchDaemons/
|
8
|
-
"/Library/LaunchDaemons/
|
6
|
+
Dir.expects(:[]).with("/Library/LaunchDaemons/dev.*.plist").returns([
|
7
|
+
"/Library/LaunchDaemons/dev.test.plist",
|
8
|
+
"/Library/LaunchDaemons/dev.other.plist"
|
9
9
|
])
|
10
10
|
|
11
11
|
services = Boxen::Service.list
|
@@ -15,14 +15,14 @@ class BoxenServiceTest < Boxen::Test
|
|
15
15
|
def test_enable
|
16
16
|
service = Boxen::Service.new('blip')
|
17
17
|
Boxen::Util.expects(:sudo).with('/bin/launchctl', 'load', '-w',
|
18
|
-
'/Library/LaunchDaemons/
|
18
|
+
'/Library/LaunchDaemons/dev.blip.plist')
|
19
19
|
service.enable
|
20
20
|
end
|
21
21
|
|
22
22
|
def test_disable
|
23
23
|
service = Boxen::Service.new('thing')
|
24
24
|
Boxen::Util.expects(:sudo).with('/bin/launchctl', 'unload', '-w',
|
25
|
-
'/Library/LaunchDaemons/
|
25
|
+
'/Library/LaunchDaemons/dev.thing.plist')
|
26
26
|
service.disable
|
27
27
|
end
|
28
28
|
|
metadata
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: true
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
|
7
|
+
- 6
|
8
|
+
- 0
|
9
|
+
- pre
|
10
|
+
- 0
|
11
|
+
version: 0.6.0.pre.0
|
10
12
|
platform: ruby
|
11
13
|
authors:
|
12
14
|
- John Barnette
|
@@ -15,7 +17,7 @@ autorequire:
|
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
19
|
|
18
|
-
date:
|
20
|
+
date: 2013-01-17 00:00:00 -08:00
|
19
21
|
default_executable:
|
20
22
|
dependencies:
|
21
23
|
- !ruby/object:Gem::Dependency
|
@@ -222,11 +224,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
222
224
|
version: "0"
|
223
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
226
|
requirements:
|
225
|
-
- - "
|
227
|
+
- - ">"
|
226
228
|
- !ruby/object:Gem::Version
|
227
229
|
segments:
|
228
|
-
-
|
229
|
-
|
230
|
+
- 1
|
231
|
+
- 3
|
232
|
+
- 1
|
233
|
+
version: 1.3.1
|
230
234
|
requirements: []
|
231
235
|
|
232
236
|
rubyforge_project:
|