weblicate 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/weblicate +16 -7
- data/lib/weblicate/har.rb +2 -2
- metadata +3 -3
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ begin
|
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "weblicate"
|
8
|
-
gem.version = '0.0.
|
8
|
+
gem.version = '0.0.8'
|
9
9
|
gem.summary = %Q{Replicate a website}
|
10
10
|
gem.description = %Q{Replicate a website based on a HAR file}
|
11
11
|
gem.email = "mike@bailey.net.au"
|
data/bin/weblicate
CHANGED
@@ -23,15 +23,24 @@ File.open(vhosts_file, 'w') { |file| file.write(a.vhosts) }
|
|
23
23
|
File.open(hosts_file, 'w') { |file| file.write(a.hosts_file) }
|
24
24
|
File.open(dns_script, 'w') { |file| file.write(a.dns) }
|
25
25
|
|
26
|
-
puts
|
26
|
+
puts "\nNow run these commands\n"
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
rsync -avz #{files_dir}
|
28
|
+
if dest_domain
|
29
|
+
puts <<-EOF
|
30
|
+
rsync -avz #{files_dir} #{a.dest_domain}:/var/www/weblicate/
|
31
31
|
scp #{vhosts_file} #{a.dest_domain}:/etc/apache2/sites-enabled/
|
32
|
-
|
33
|
-
|
34
|
-
OPTIONAL - if you want access from the wider internet
|
32
|
+
ssh #{a.dest_domain} "sudo apache2ctl restart"
|
35
33
|
sh #{dns_script} # Create domains on Slicehost
|
34
|
+
EOF
|
36
35
|
|
36
|
+
else
|
37
|
+
puts <<-EOF
|
38
|
+
cp -r #{files_dir} /var/www/weblicate/
|
39
|
+
cp #{vhosts_file} /etc/apache2/sites-enabled/
|
40
|
+
apache2ctl restart
|
41
|
+
cat #{hosts_file} >> /etc/hosts # For access from workstation
|
37
42
|
EOF
|
43
|
+
|
44
|
+
end
|
45
|
+
puts
|
46
|
+
|
data/lib/weblicate/har.rb
CHANGED
@@ -70,8 +70,8 @@ class Har
|
|
70
70
|
<<-EOF
|
71
71
|
<VirtualHost *:80>
|
72
72
|
ServerName #{host}.#{@dest_domain}
|
73
|
-
DocumentRoot /var/www/weblicate/#{@name}/#{host}.#{@dest_domain}
|
74
|
-
<Directory /var/www/weblicate/#{@name}/#{host}.#{@dest_domain}>
|
73
|
+
DocumentRoot /var/www/weblicate/#{@name}-files/#{host}.#{@dest_domain}
|
74
|
+
<Directory /var/www/weblicate/#{@name}-files/#{host}.#{@dest_domain}>
|
75
75
|
Order allow,deny
|
76
76
|
Allow from all
|
77
77
|
</Directory>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weblicate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Bailey
|