vagrant-symfony 0.1.1 → 0.1.2
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.
@@ -20,10 +20,12 @@ module VagrantSymfony
|
|
20
20
|
folder = root + '/' + folder
|
21
21
|
end
|
22
22
|
file = vm.config.symfony.nginxHostfile
|
23
|
+
entry = vm.config.symfony.entryPoint
|
23
24
|
communicator = vm.communicate
|
24
25
|
if communicator.ready?
|
25
26
|
env[:ui].info "Updating web directory and reloading config..."
|
26
27
|
vm.communicate.sudo "sed -i 's@root .*;@root #{folder};@g' #{file}"
|
28
|
+
vm.communicate.sudo "sed -i 's@rewrite \\(.*\\)/\\(.*\\)/$1\\(.*\\);@rewrite \\1/#{entry}/$1\\3@g' #{file}"
|
27
29
|
vm.communicate.sudo "service nginx reload"
|
28
30
|
end
|
29
31
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module VagrantSymfony
|
2
2
|
module Config
|
3
3
|
class Config < Vagrant.plugin('2', :config)
|
4
|
-
attr_accessor :web, :cmd, :update_nginx, :nginx_hostfile, :root
|
4
|
+
attr_accessor :web, :cmd, :update_nginx, :nginx_hostfile, :root, :entry
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
@web = UNSET_VALUE
|
@@ -9,6 +9,14 @@ module VagrantSymfony
|
|
9
9
|
@update_nginx = UNSET_VALUE
|
10
10
|
@nginx_hostfile = UNSET_VALUE
|
11
11
|
@root = UNSET_VALUE
|
12
|
+
@entry = UNSET_VALUE
|
13
|
+
end
|
14
|
+
|
15
|
+
def entryPoint
|
16
|
+
return "app.php" if @entry == UNSET_VALUE
|
17
|
+
return @entry[1..-1] if @entry[0] == '/'
|
18
|
+
return @entry[2..-1] if @entry[0] == '.' && @entry[1] == '/'
|
19
|
+
return @entry
|
12
20
|
end
|
13
21
|
|
14
22
|
def rootFolder
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-symfony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -62,7 +62,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
segments:
|
64
64
|
- 0
|
65
|
-
hash:
|
65
|
+
hash: -1726123092078165124
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
none: false
|
68
68
|
requirements:
|