ms_deploy 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ Capistrano::Configuration.instance.load do
4
4
  #_cset :bundle_gemfile, "Gemfile"
5
5
  #_cset :bundle_dir, File.join(fetch(:shared_path), 'bundle')
6
6
  #_cset :bundle_roles, #{role_default} # e.g. [:app, :batch]
7
- _cset :bundle_cmd, "/home/deploy/.rbenv/shims/bundle"
7
+ #_cset :bundle_cmd, "/home/deploy/.rbenv/shims/bundle"
8
8
  _cset :bundle_without, [:development, :test, :deploy]
9
9
  # http://shapeshed.com/journal/using-rbenv-to-manage-rubies/
10
10
  # you can also apply a clever technique to allow you switch versions of ruby by pushing a new .rbenv-version file with capistrano. From version 1.1rc bundler allows you to specify a shebang for binstubs. To use this add the following to your capistrano recipe.
@@ -1,62 +1,65 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
 
3
- abort "You must run this using 'bundle exec ...'" unless ENV['BUNDLE_BIN_PATH'] || ENV['BUNDLE_GEMFILE']
4
- abort "You must set :user before using defaults" unless fetch(:user, nil)
5
- abort "You must set :repository before using defaults" unless fetch(:repository, nil)
6
- abort "You must set :branch before using defaults" unless fetch(:branch, nil)
7
- abort "You must set :deploy_to before using defaults" unless fetch(:deploy_to, nil)
8
-
9
- set :uptodate_scm, :git
10
- set :uptodate_branch, fetch(:branch)
11
- #:uptodate_scm_bynary ('git') - path to SCM binary
12
- #:uptodate_remote_repository ('origin') - remote repository
13
- #:uptodate_time (60) - time in seconds for checking remote repository
14
- #:uptodate_behaviour - (:confirm)
15
- # :confirm - show outdated message and ask to confirm the further execution
16
- # :abort - show outdated message and abort further execution
17
- require 'capistrano/uptodate'
18
-
19
- require 'capistrano_colors'
20
- capistrano_color_matchers = [
21
- { :match => /command finished/, :color => :hide, :prio => 10 },
22
- { :match => /executing command/, :color => :blue, :prio => 10, :attribute => :underscore },
23
- { :match => /^transaction: commit$/, :color => :magenta, :prio => 10, :attribute => :blink },
24
- { :match => /git/, :color => :white, :prio => 20, :attribute => :reverse },
25
- ]
26
- colorize( capistrano_color_matchers )
27
-
28
- #Dynamically skip Capistrano hooks example
29
- # before 'deploy:update_code', 'db:dump' unless fetch(:skip_dump, false)
30
- # $ cap staging deploy -S skip_dump=true
31
-
32
- set :keep_releases, 10
33
- set :use_sudo, false
34
-
35
- set :group, user
36
-
37
- set :protocol, :both
38
-
39
- set :scm, :git
40
- set :git_enable_submodules, true
3
+ _cset :keep_releases, 10
4
+ _cset :use_sudo, false
5
+
6
+ _cset :protocol, :both
7
+
8
+ _cset :scm, :git
9
+ _cset :git_enable_submodules, true
41
10
 
42
11
  # set deployment strategy
43
- set :deploy_via, :remote_cache
44
- set :copy_exclude, %w(.git .svn .DS_Store test doc .gitkeep)
45
- #set :repository_cache, "cached-copy" # defaults to :shared_path + 'cached-copy/'
12
+ _cset :deploy_via, :remote_cache
13
+ _cset :copy_exclude, %w(.git .svn .DS_Store test doc .gitkeep)
14
+ #_cset :repository_cache, "cached-copy" # defaults to :shared_path + 'cached-copy/'
46
15
 
47
16
  # :forward_agent allows us to avoid using and distributing a deploy key.
48
17
  # On problems run 'ssh-add' locally
49
18
  # In your /etc/ssh/ssh_config or ~/.ssh/config you need to have ForwardAgent enabled for this to work.
50
- set :ssh_options, {:port => fetch(:ssh_port, 22), :forward_agent => true, :paranoid => true}
19
+ _cset :ssh_options, {:port => fetch(:ssh_port, 22), :forward_agent => true, :paranoid => true}
51
20
 
52
21
  default_run_options[:pty] = true
53
22
 
23
+ task :test_and_prepare_cap_env do
24
+ abort "You must run this using 'bundle exec ...'" unless ENV['BUNDLE_BIN_PATH'] || ENV['BUNDLE_GEMFILE']
25
+ abort "You must set :user before using defaults" unless fetch(:user, nil)
26
+ abort "You must set :repository before using defaults" unless fetch(:repository, nil)
27
+ abort "You must set :branch before using defaults" unless fetch(:branch, nil)
28
+ abort "You must set :deploy_to before using defaults" unless fetch(:deploy_to, nil)
29
+
30
+ set :uptodate_branch, fetch(:branch)
31
+ set :uptodate_scm, :git
32
+ #:uptodate_scm_bynary ('git') - path to SCM binary
33
+ #:uptodate_remote_repository ('origin') - remote repository
34
+ #:uptodate_time (60) - time in seconds for checking remote repository
35
+ #:uptodate_behaviour - (:confirm)
36
+ # :confirm - show outdated message and ask to confirm the further execution
37
+ # :abort - show outdated message and abort further execution
38
+ require 'capistrano/uptodate'
39
+
40
+ require 'capistrano_colors'
41
+ capistrano_color_matchers = [
42
+ {:match => /command finished/, :color => :hide, :prio => 10},
43
+ {:match => /executing command/, :color => :blue, :prio => 10, :attribute => :underscore},
44
+ {:match => /^transaction: commit$/, :color => :magenta, :prio => 10, :attribute => :blink},
45
+ {:match => /git/, :color => :white, :prio => 20, :attribute => :reverse},
46
+ ]
47
+ colorize(capistrano_color_matchers)
48
+
49
+ #Dynamically skip Capistrano hooks example
50
+ # before 'deploy:update_code', 'db:dump' unless fetch(:skip_dump, false)
51
+ # $ cap staging deploy -S skip_dump=true
52
+
53
+ set :group, user
54
+ end
55
+
56
+ before 'deploy', 'test_and_prepare_cap_env'
54
57
  before 'deploy:setup', 'deploy:prepare:database';
55
58
  after 'deploy:update', 'deploy:cleanup'
56
59
 
57
60
  desc "Show currently deployed revision on server."
58
61
  task :revisions, :roles => :app do
59
- current, previous, latest = current_revision[0,7], previous_revision[0,7], real_revision[0,7]
62
+ current, previous, latest = current_revision[0, 7], previous_revision[0, 7], real_revision[0, 7]
60
63
  puts "\n" << "-"*63
61
64
  puts "===== Master Revision: \033[1;33m#{latest}\033[0m\n\n"
62
65
  puts "===== [ \033[1;36m#{application.capitalize} - #{stage.capitalize}\033[0m ]"
@@ -74,7 +77,7 @@ Capistrano::Configuration.instance.load do
74
77
  diff.gsub!(/^([a-f0-9]+) /, "\033[1;32m\\1\033[0m - ")
75
78
  diff = " " << diff.gsub("\n", "\n ") << "\n"
76
79
  # Indent commit messages nicely, max 80 chars per line, line has to end with space.
77
- diff = diff.split("\n").map{|l|l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m,"\n"<<" "*14<<"\\1")}.join("\n")
80
+ diff = diff.split("\n").map { |l| l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m, "\n"<<" "*14<<"\\1") }.join("\n")
78
81
  puts "=== Difference between #{base_label} revision and #{new_label} revision:\n\n"
79
82
  puts diff
80
83
  end
@@ -3,9 +3,9 @@ Capistrano::Configuration.instance.load do
3
3
  namespace :deploy do
4
4
  desc "build missing paperclip styles"
5
5
  task :build_missing_paperclip_styles, :roles => :app do
6
- run "cd #{release_path}; RAILS_ENV=production bundle exec rake paperclip:refresh:missing_styles"
6
+ run "cd #{release_path}; RAILS_ENV=#{rails_env} bundle exec rake paperclip:refresh:missing_styles"
7
7
  end
8
8
  end
9
9
 
10
- after("deploy:update_code", "deploy:build_missing_paperclip_styles")
10
+ #after("deploy:update_code", "deploy:build_missing_paperclip_styles")
11
11
  end
@@ -0,0 +1,32 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ namespace :passenger do
4
+ desc "Restart Application"
5
+ task :restart do
6
+ run "touch #{current_path}/tmp/restart.txt"
7
+ end
8
+ end
9
+
10
+ namespace :deploy do
11
+ #desc "Archive images from public tree"
12
+ #task :archive_images do
13
+ # run "tar -c public/system > images.tar"
14
+ #end
15
+ #
16
+ #desc "Install images into deployed public tree"
17
+ #task :install_images do
18
+ # # scp images to server
19
+ # # untar images into public/
20
+ #end
21
+
22
+ task :restart do
23
+ passenger.restart
24
+ end
25
+
26
+ task :start do
27
+ end
28
+
29
+ task :stop do
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module MsDeploy
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ms_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-12 00:00:00.000000000 Z
12
+ date: 2012-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gemcutter
16
- requirement: &86453860 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *86453860
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: capistrano
27
- requirement: &86453350 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 2.12.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *86453350
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.12.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: capistrano-ext
38
- requirement: &86453000 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: 1.2.1
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *86453000
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.1
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: capistrano_colors
49
- requirement: &86452770 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: 0.5.5
55
70
  type: :runtime
56
71
  prerelease: false
57
- version_requirements: *86452770
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.5.5
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: capistrano-unicorn
60
- requirement: &86452440 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: 0.1.6
66
86
  type: :runtime
67
87
  prerelease: false
68
- version_requirements: *86452440
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 0.1.6
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: capistrano-file_db
71
- requirement: &86452040 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ! '>='
@@ -76,10 +101,15 @@ dependencies:
76
101
  version: 0.1.0
77
102
  type: :runtime
78
103
  prerelease: false
79
- version_requirements: *86452040
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 0.1.0
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: capistrano-uptodate
82
- requirement: &86451560 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: 0.0.2
88
118
  type: :runtime
89
119
  prerelease: false
90
- version_requirements: *86451560
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 0.0.2
91
126
  - !ruby/object:Gem::Dependency
92
127
  name: rvm-capistrano
93
- requirement: &86451040 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,10 +133,15 @@ dependencies:
98
133
  version: 1.2.2
99
134
  type: :runtime
100
135
  prerelease: false
101
- version_requirements: *86451040
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: 1.2.2
102
142
  - !ruby/object:Gem::Dependency
103
143
  name: erubis
104
- requirement: &86450750 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
105
145
  none: false
106
146
  requirements:
107
147
  - - ! '>='
@@ -109,7 +149,12 @@ dependencies:
109
149
  version: '0'
110
150
  type: :runtime
111
151
  prerelease: false
112
- version_requirements: *86450750
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
113
158
  description: capistrano deployment task for my projects
114
159
  email:
115
160
  - michael.schiller@gmx.de
@@ -131,6 +176,7 @@ files:
131
176
  - lib/ms_deploy/recipes/monitoring.rb
132
177
  - lib/ms_deploy/recipes/nginx.rb
133
178
  - lib/ms_deploy/recipes/paperclip.rb
179
+ - lib/ms_deploy/recipes/passenger.rb
134
180
  - lib/ms_deploy/recipes/puma.rb
135
181
  - lib/ms_deploy/recipes/rbenv.rb
136
182
  - lib/ms_deploy/recipes/redis.rb
@@ -164,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
210
  version: '0'
165
211
  requirements: []
166
212
  rubyforge_project:
167
- rubygems_version: 1.8.11
213
+ rubygems_version: 1.8.24
168
214
  signing_key:
169
215
  specification_version: 3
170
216
  summary: capistrano deployment task for my projects