blavoshost 0.2.0 → 0.2.1
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/VERSION +1 -1
- data/bin/blavoshost +12 -5
- data/blavoshost.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.1
|
data/bin/blavoshost
CHANGED
|
@@ -430,8 +430,9 @@ module Hipe
|
|
|
430
430
|
puts "if this wasn't a dry run, you could restart apache with:"
|
|
431
431
|
puts " #{@path.apachectl} graceful"
|
|
432
432
|
puts "and go to:"
|
|
433
|
-
puts " http://#{host}/
|
|
433
|
+
puts " http://#{host}.local/"
|
|
434
434
|
end
|
|
435
|
+
`open http://#{host}.local/`
|
|
435
436
|
'done.'
|
|
436
437
|
end
|
|
437
438
|
|
|
@@ -590,7 +591,7 @@ module Hipe
|
|
|
590
591
|
|
|
591
592
|
class ApacheConfProxy
|
|
592
593
|
include DryRunney
|
|
593
|
-
SitesEnabledRe = %r
|
|
594
|
+
SitesEnabledRe = %r|Include +([^\n]*sites-enabled/?)|m
|
|
594
595
|
# code for pasring the file itself left behind in bf91c
|
|
595
596
|
def initialize path
|
|
596
597
|
@path = path
|
|
@@ -604,8 +605,12 @@ module Hipe
|
|
|
604
605
|
# only one such entry in the file
|
|
605
606
|
def sites_enabled_path
|
|
606
607
|
arr = @contents.scan(SitesEnabledRe).map{|x| x[0]}
|
|
608
|
+
arr.flatten!
|
|
607
609
|
case arr.length
|
|
608
610
|
when 0:
|
|
611
|
+
raise arr.to_yaml
|
|
612
|
+
`sudo bash -c 'sudo echo "" >> /etc/apache2/httpd.conf'`
|
|
613
|
+
`sudo bash -c 'sudo echo "" >> /etc/apache2/httpd.conf'`
|
|
609
614
|
`sudo bash -c 'sudo echo "Include /private/etc/apache2/sites-enabled/*.conf" >> /etc/apache2/httpd.conf'`
|
|
610
615
|
`sudo bash -c 'sudo mkdir /private/etc/apache2/sites-enabled '`
|
|
611
616
|
return '/private/etc/apache2/sites-enabled/'
|
|
@@ -695,7 +700,9 @@ module Hipe
|
|
|
695
700
|
def make_stub_site host
|
|
696
701
|
@host = host
|
|
697
702
|
if (doc_root_exists?)
|
|
698
|
-
|
|
703
|
+
report << "#{host} directory exists"
|
|
704
|
+
return nil
|
|
705
|
+
# raise Fail.new("already exists: #{doc_root}")
|
|
699
706
|
end
|
|
700
707
|
report << "mkdir -m 755 #{doc_root}"
|
|
701
708
|
FileUtils.mkdir(doc_root,:mode=>0755, :verbose=>false,:noop=>dry_run?)
|
|
@@ -741,7 +748,7 @@ module Hipe
|
|
|
741
748
|
report.push "make backup: #{info.backed_up}"
|
|
742
749
|
File.open(@path,'a+') do |fh|
|
|
743
750
|
fh.seek(0,IO::SEEK_END)
|
|
744
|
-
fh.puts %{127.0.0.1 #{name}}
|
|
751
|
+
fh.puts %{127.0.0.1 #{name}.local}
|
|
745
752
|
info.hostname = name
|
|
746
753
|
info.ip = '127.0.0.1'
|
|
747
754
|
end unless dry_run?
|
|
@@ -801,7 +808,7 @@ module Hipe
|
|
|
801
808
|
HardCoded.vhost_stuff = Templatesimal[<<-END.gsub(/^ {6}/,'')
|
|
802
809
|
<VirtualHost *:80>
|
|
803
810
|
DocumentRoot "{{doc_root}}"
|
|
804
|
-
ServerName "{{host}}"
|
|
811
|
+
ServerName "{{host}}.local"
|
|
805
812
|
<Directory "{{doc_root}}">
|
|
806
813
|
AllowOverride All
|
|
807
814
|
Allow from All
|
data/blavoshost.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{blavoshost}
|
|
8
|
-
s.version = "0.2.
|
|
8
|
+
s.version = "0.2.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Jerrod Blavos"]
|
|
12
|
-
s.date = %q{2010-10-
|
|
12
|
+
s.date = %q{2010-10-26}
|
|
13
13
|
s.default_executable = %q{blavoshost}
|
|
14
14
|
s.description = %q{A tool to add local vhosts ot apache/OSX}
|
|
15
15
|
s.email = %q{jerrod@indierockmedia.com}
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: blavoshost
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.2.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jerrod Blavos
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-10-
|
|
18
|
+
date: 2010-10-26 00:00:00 -04:00
|
|
19
19
|
default_executable: blavoshost
|
|
20
20
|
dependencies: []
|
|
21
21
|
|