capistrano-exfel 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/capistrano/exfel/version.rb +1 -1
- data/lib/capistrano/tasks/application.rake +2 -5
- data/lib/capistrano/tasks/database.rake +2 -2
- data/lib/capistrano/tasks/util.rake +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f057b3710c0708a8e73cc930a552a4d55d213c03
|
4
|
+
data.tar.gz: 319c23cf4d843db2ee45343b9cc23ffc06635ba0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5e7e3103fe2dba6b5bccc93baca2e3f21f302ef6afff067e560915f0fc39cfcd96e924131f65dcdf583dfa69767a19eb70adb3a03035a40d1425c4f4a345ba9
|
7
|
+
data.tar.gz: 3d758192be25dfd0f923216122bc0df70424fd936c793187e98fabcb36d944c9dc57a9e0116eb85bdac8e07d120ab8e8d199a36760e750d27e10ab480bb17009
|
data/README.md
CHANGED
@@ -36,13 +36,13 @@ namespace :application do
|
|
36
36
|
|
37
37
|
invoke :deploy
|
38
38
|
invoke 'app_home:correct_shared_permissions'
|
39
|
+
invoke 'app_home:clear_tmp_files'
|
39
40
|
invoke 'application:restart'
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
43
44
|
desc 'Restarts the application, including reloading server cache'
|
44
45
|
task :restart do
|
45
|
-
invoke 'app_home:clear_tmp_files'
|
46
46
|
# invoke 'app_home:restart'
|
47
47
|
invoke 'apache:restart'
|
48
48
|
invoke 'app_home:reload_server_cache'
|
@@ -103,10 +103,7 @@ namespace :load do
|
|
103
103
|
end
|
104
104
|
|
105
105
|
# Build default application URI
|
106
|
-
set :default_app_uri, ->
|
107
|
-
"#{fetch(:app_name)}" if get_rails_env_abbr.blank?
|
108
|
-
"#{get_rails_env_abbr}_#{fetch(:app_name)}" unless get_rails_env_abbr.blank?
|
109
|
-
end
|
106
|
+
set :default_app_uri, -> { get_rails_default_app_name }
|
110
107
|
|
111
108
|
set :app_name_uri, -> do
|
112
109
|
ask("Please specify the application URI (i.e. #{fetch(:default_app_uri)})", fetch(:default_app_uri))
|
@@ -48,8 +48,8 @@ namespace :database do
|
|
48
48
|
debug 'Create and configure database.yml file'
|
49
49
|
|
50
50
|
default_host = '127.0.0.1'
|
51
|
-
default_database =
|
52
|
-
default_username =
|
51
|
+
default_database = get_rails_default_db_name
|
52
|
+
default_username = get_rails_default_db_name
|
53
53
|
default_password = ''
|
54
54
|
|
55
55
|
set :db_orig_file_path, File.expand_path("../../recipes/config/#{fetch(:database_original_file_name)}", __FILE__)
|
@@ -10,6 +10,16 @@ def get_command_output(command)
|
|
10
10
|
capture("#{command}").strip
|
11
11
|
end
|
12
12
|
|
13
|
+
def get_rails_default_app_name
|
14
|
+
return "#{fetch(:app_name)}" if get_rails_env_abbr == 'prod'
|
15
|
+
"#{get_rails_env_abbr}_#{fetch(:app_name)}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_rails_default_db_name
|
19
|
+
return "#{fetch(:app_name)}" if get_rails_env_abbr == 'prod'
|
20
|
+
"#{fetch(:app_name)}_#{get_rails_env_abbr}"
|
21
|
+
end
|
22
|
+
|
13
23
|
def get_rails_env_abbr(rails_env_abbr = nil)
|
14
24
|
return rails_env_abbr unless rails_env_abbr.nil?
|
15
25
|
|
@@ -19,7 +29,7 @@ def get_rails_env_abbr(rails_env_abbr = nil)
|
|
19
29
|
when 'test'
|
20
30
|
'test'
|
21
31
|
else
|
22
|
-
''
|
32
|
+
'prod'
|
23
33
|
end
|
24
34
|
end
|
25
35
|
|