capistrano-contao 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/capistrano-contao.gemspec +1 -1
- data/lib/capistrano/ext/contao.rb +18 -25
- metadata +3 -3
data/capistrano-contao.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
14
|
gem.name = 'capistrano-contao'
|
15
15
|
gem.require_paths = ['lib']
|
16
|
-
gem.version = '0.0.
|
16
|
+
gem.version = '0.0.6'
|
17
17
|
|
18
18
|
# Runtime dependencies
|
19
19
|
gem.add_dependency 'rake'
|
@@ -45,32 +45,25 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
45
45
|
db_credentials = fetch :db_credentials
|
46
46
|
|
47
47
|
localconfig = File.read('config/examples/localconfig.php.erb')
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
config.
|
64
|
-
config.db_database = fetch :db_database_name
|
65
|
-
|
66
|
-
[:hostname, :port, :username, :password].each do |item|
|
67
|
-
if db_credentials[item].present?
|
68
|
-
config.send "db_#{item}=", db_credentials[item]
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
write ERB.new(localconfig).result(binding), localconfig_php_config_path
|
48
|
+
load 'config/initializers/contao.rb'
|
49
|
+
TechnoGate::Contao::Application.load_global_config!
|
50
|
+
|
51
|
+
config = TechnoGate::Contao::Application.config.dup
|
52
|
+
|
53
|
+
db_credentials_for_config = {
|
54
|
+
'host' => db_credentials[:hostname],
|
55
|
+
'port' => db_credentials[:port].present? ? db_credentials[:port] : nil,
|
56
|
+
'user' => db_credentials[:username],
|
57
|
+
'pass' => db_credentials[:password],
|
58
|
+
'database' => fetch(:db_database_name),
|
59
|
+
}
|
60
|
+
|
61
|
+
config.contao.global.send("#{fetch :db_server_app}=", ActiveSupport::OrderedOptions.new)
|
62
|
+
db_credentials_for_config.each do |k, v|
|
63
|
+
config.contao.global.send("#{fetch :db_server_app}").send("#{k}=", v)
|
73
64
|
end
|
65
|
+
|
66
|
+
write ERB.new(localconfig, nil, '-').result(binding), localconfig_php_config_path
|
74
67
|
end
|
75
68
|
|
76
69
|
desc '[internal] Link files from contao to inside public folder'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-contao
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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: 2012-07-
|
12
|
+
date: 2012-07-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
segments:
|
181
181
|
- 0
|
182
|
-
hash: -
|
182
|
+
hash: -3757429442387583918
|
183
183
|
requirements: []
|
184
184
|
rubyforge_project:
|
185
185
|
rubygems_version: 1.8.23
|