vagrant-symfony 0.1.4 → 0.1.5
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.
@@ -1,4 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require 'log4r'
|
2
|
+
require 'shellwords'
|
2
3
|
|
3
4
|
module VagrantSymfony
|
4
5
|
module Action
|
@@ -26,6 +27,14 @@ module VagrantSymfony
|
|
26
27
|
env[:ui].info "Updating web directory and reloading config..."
|
27
28
|
vm.communicate.sudo "sed -i 's@root .*;@root #{folder};@g' #{file}"
|
28
29
|
vm.communicate.sudo "sed -i 's@rewrite \\(.*\\)/\\(.*\\)/$1\\(.*\\);@rewrite \\1/#{entry}/$1\\3;@g' #{file}"
|
30
|
+
vm.communicate.sudo "rm -rf /etc/nginx/fastcgi_env_params"
|
31
|
+
vm.communicate.sudo "touch /etc/nginx/fastcgi_env_params"
|
32
|
+
vm.config.symfony.environmentVariables.each do |key, value|
|
33
|
+
line = 'fastcgi_param %s %s;' % [key.to_s, value.to_s]
|
34
|
+
line = Shellwords.escape(line)
|
35
|
+
vm.communicate.sudo "echo #{line} >> /etc/nginx/fastcgi_env_params"
|
36
|
+
end
|
37
|
+
vm.communicate.sudo "grep -q fastcgi_env_params #{file} || sed -i 's@fastcgi_params;@fastcgi_params; include fastcgi_env_params;@' #{file}"
|
29
38
|
vm.communicate.sudo "service nginx reload"
|
30
39
|
end
|
31
40
|
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, :entry
|
4
|
+
attr_accessor :web, :cmd, :update_nginx, :nginx_hostfile, :root, :entry, :env
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
@web = UNSET_VALUE
|
@@ -10,6 +10,7 @@ module VagrantSymfony
|
|
10
10
|
@nginx_hostfile = UNSET_VALUE
|
11
11
|
@root = UNSET_VALUE
|
12
12
|
@entry = UNSET_VALUE
|
13
|
+
@env = UNSET_VALUE
|
13
14
|
end
|
14
15
|
|
15
16
|
def entryPoint
|
@@ -45,6 +46,11 @@ module VagrantSymfony
|
|
45
46
|
return "/etc/nginx/sites-enabled/default" if @nginx_hostfile == UNSET_VALUE
|
46
47
|
return @nginx_hostfile
|
47
48
|
end
|
49
|
+
|
50
|
+
def environmentVariables
|
51
|
+
return {} unless @env.is_a?(Hash)
|
52
|
+
return @env
|
53
|
+
end
|
48
54
|
end
|
49
55
|
end
|
50
56
|
end
|
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03
|
12
|
+
date: 2013-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -46,6 +46,8 @@ files:
|
|
46
46
|
- pkg/vagrant-symfony-0.1.1.gem
|
47
47
|
- pkg/vagrant-symfony-0.1.2.gem
|
48
48
|
- pkg/vagrant-symfony-0.1.3.gem
|
49
|
+
- pkg/vagrant-symfony-0.1.4.gem
|
50
|
+
- pkg/vagrant-symfony-0.1.5.gem
|
49
51
|
- Rakefile
|
50
52
|
- vagrant-symfony.gemspec
|
51
53
|
- .gitignore
|
@@ -64,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
66
|
version: '0'
|
65
67
|
segments:
|
66
68
|
- 0
|
67
|
-
hash: -
|
69
|
+
hash: -3089621678161695491
|
68
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
71
|
none: false
|
70
72
|
requirements:
|