uniq-deploy 0.0.1 → 1.0.0

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.
Files changed (2) hide show
  1. data/lib/uniq-deploy.rb +49 -45
  2. metadata +1 -1
@@ -1,50 +1,54 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- # ==============================================
4
- # universal web app UNIQ Systems deployment part
5
- # ==============================================
6
- require 'rvm/capistrano'
7
- require 'bundler/capistrano'
8
- require 'capistrano_colors'
9
- load "deploy/assets"
10
-
11
- # common variables
12
- {
13
- repository: "git@red:#{application}.git",
14
- domain: "#{application}@production-192",
15
- deploy_to: "/home/#{application}/app",
16
- rails_env: 'production',
17
- use_sudo: false,
18
- rvm_ruby_string: "#{ruby_version}@#{application}",
19
- scm: :git,
20
- git_shallow_clone: 1,
21
- keep_releases: 5,
22
- rvm_path: '/usr/local/rvm',
23
- rvm_bin_path: '/usr/local/rvm/bin'
24
- }.each { |key, value| set key, value }
25
-
26
- role :app, domain
27
- role :web, domain
28
- role :db, domain, :primary => true
29
-
30
- namespace :deploy do
31
- task :start do ; end
32
- task :stop do ; end
33
-
34
- task :restart, :roles => :app do
35
- run "touch #{current_path}/tmp/restart.txt"
36
- end
37
-
38
- task :symlink_shared, :roles => :app do
39
- run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
40
- end
3
+ Capistrano::Configuration.instance.load do
4
+
5
+ # ==============================================
6
+ # universal web app UNIQ Systems deployment part
7
+ # ==============================================
8
+ require 'rvm/capistrano'
9
+ require 'bundler/capistrano'
10
+ require 'capistrano_colors'
11
+ load "deploy/assets"
12
+
13
+ # common variables
14
+ {
15
+ repository: "git@red:#{application}.git",
16
+ domain: "#{application}@production-192",
17
+ deploy_to: "/home/#{application}/app",
18
+ rails_env: 'production',
19
+ use_sudo: false,
20
+ rvm_ruby_string: "#{ruby_version}@#{application}",
21
+ scm: :git,
22
+ git_shallow_clone: 1,
23
+ keep_releases: 5,
24
+ rvm_path: '/usr/local/rvm',
25
+ rvm_bin_path: '/usr/local/rvm/bin'
26
+ }.each { |key, value| set key, value }
41
27
 
42
- task :add_revision, :roles => :app do
43
- revision = %x{git ls-remote #{repository} #{branch}}
44
- run %Q{echo "#{revision}" #{release_path}/REVISION}
28
+ role :app, domain
29
+ role :web, domain
30
+ role :db, domain, :primary => true
31
+
32
+ namespace :deploy do
33
+ task :start do ; end
34
+ task :stop do ; end
35
+
36
+ task :restart, :roles => :app do
37
+ run "touch #{current_path}/tmp/restart.txt"
38
+ end
39
+
40
+ task :symlink_shared, :roles => :app do
41
+ run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
42
+ end
43
+
44
+ task :add_revision, :roles => :app do
45
+ revision = %x{git ls-remote #{repository} #{branch}}
46
+ run %Q{echo "#{revision}" #{release_path}/REVISION}
47
+ end
45
48
  end
46
- end
47
49
 
48
- after "bundle:install", "deploy:symlink_shared"
49
- after "bundle:install", "deploy:add_revision"
50
- after "deploy:update", "deploy:cleanup"
50
+ after "bundle:install", "deploy:symlink_shared"
51
+ after "bundle:install", "deploy:add_revision"
52
+ after "deploy:update", "deploy:cleanup"
53
+
54
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uniq-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: