caploy 0.2.5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,193 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caploy
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.2.5
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Schiller
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2014-10-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: gemcutter
16
- type: :runtime
17
15
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
16
  requirements:
27
- - - ! '>='
17
+ - - '>='
28
18
  - !ruby/object:Gem::Version
29
19
  version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: capistrano
32
20
  type: :runtime
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: 2.13.5
39
21
  prerelease: false
40
22
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: 2.13.5
46
- - !ruby/object:Gem::Dependency
47
- name: capistrano-ext
48
- type: :runtime
49
- requirement: !ruby/object:Gem::Requirement
50
- none: false
51
23
  requirements:
52
- - - ! '>='
24
+ - - '>='
53
25
  - !ruby/object:Gem::Version
54
- version: 1.2.1
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: 1.2.1
26
+ version: '0'
62
27
  - !ruby/object:Gem::Dependency
63
- name: capistrano_colors
64
- type: :runtime
28
+ name: capistrano-rails
65
29
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ! '>='
69
- - !ruby/object:Gem::Version
70
- version: 0.5.5
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
30
  requirements:
75
- - - ! '>='
31
+ - - '='
76
32
  - !ruby/object:Gem::Version
77
- version: 0.5.5
78
- - !ruby/object:Gem::Dependency
79
- name: capistrano-file_db
33
+ version: 1.1.1
80
34
  type: :runtime
81
- requirement: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ! '>='
85
- - !ruby/object:Gem::Version
86
- version: 0.1.0
87
35
  prerelease: false
88
36
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
37
  requirements:
91
- - - ! '>='
38
+ - - '='
92
39
  - !ruby/object:Gem::Version
93
- version: 0.1.0
40
+ version: 1.1.1
94
41
  - !ruby/object:Gem::Dependency
95
- name: capistrano-uptodate
96
- type: :runtime
42
+ name: capistrano-bundler
97
43
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: 0.0.2
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
44
  requirements:
107
- - - ! '>='
45
+ - - '='
108
46
  - !ruby/object:Gem::Version
109
- version: 0.0.2
110
- - !ruby/object:Gem::Dependency
111
- name: capistrano-multiconfig
47
+ version: 1.1.3
112
48
  type: :runtime
113
- requirement: !ruby/object:Gem::Requirement
114
- none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: 0.0.4
119
49
  prerelease: false
120
50
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
51
  requirements:
123
- - - ! '>='
52
+ - - '='
124
53
  - !ruby/object:Gem::Version
125
- version: 0.0.4
54
+ version: 1.1.3
126
55
  - !ruby/object:Gem::Dependency
127
- name: capistrano-patch
128
- type: :runtime
56
+ name: capistrano-rbenv
129
57
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
58
  requirements:
132
- - - ! '>='
59
+ - - '='
133
60
  - !ruby/object:Gem::Version
134
- version: 0.0.2
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: 0.0.2
142
- - !ruby/object:Gem::Dependency
143
- name: capistrano-calendar
61
+ version: 2.0.2
144
62
  type: :runtime
145
- requirement: !ruby/object:Gem::Requirement
146
- none: false
147
- requirements:
148
- - - ! '>='
149
- - !ruby/object:Gem::Version
150
- version: 0.1.2
151
63
  prerelease: false
152
64
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
65
  requirements:
155
- - - ! '>='
66
+ - - '='
156
67
  - !ruby/object:Gem::Version
157
- version: 0.1.2
68
+ version: 2.0.2
158
69
  - !ruby/object:Gem::Dependency
159
- name: rvm-capistrano
160
- type: :runtime
70
+ name: capistrano3-unicorn
161
71
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
- requirements:
164
- - - ! '>='
165
- - !ruby/object:Gem::Version
166
- version: 1.2.7
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
72
  requirements:
171
- - - ! '>='
73
+ - - '='
172
74
  - !ruby/object:Gem::Version
173
- version: 1.2.7
174
- - !ruby/object:Gem::Dependency
175
- name: erubis
75
+ version: 0.2.1
176
76
  type: :runtime
177
- requirement: !ruby/object:Gem::Requirement
178
- none: false
179
- requirements:
180
- - - ! '>='
181
- - !ruby/object:Gem::Version
182
- version: '0'
183
77
  prerelease: false
184
78
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
79
  requirements:
187
- - - ! '>='
80
+ - - '='
188
81
  - !ruby/object:Gem::Version
189
- version: '0'
190
- description: capistrano deployment tasks
82
+ version: 0.2.1
83
+ description: capistrano deployment helpling
191
84
  email:
192
85
  - michael.schiller@gmx.de
193
86
  executables: []
@@ -200,30 +93,19 @@ files:
200
93
  - Rakefile
201
94
  - caploy.gemspec
202
95
  - lib/caploy.rb
203
- - lib/caploy/recipes/airbrake.rb
96
+ - lib/caploy/railtie.rb
204
97
  - lib/caploy/recipes/assets.rb
205
- - lib/caploy/recipes/bundler.rb
206
98
  - lib/caploy/recipes/database.rb
207
- - lib/caploy/recipes/defaults.rb
99
+ - lib/caploy/recipes/deploy.rb
208
100
  - lib/caploy/recipes/info.rb
209
101
  - lib/caploy/recipes/memcache.rb
210
- - lib/caploy/recipes/monitoring.rb
211
102
  - lib/caploy/recipes/nginx.rb
212
103
  - lib/caploy/recipes/paperclip.rb
213
- - lib/caploy/recipes/passenger.rb
214
- - lib/caploy/recipes/puma.rb
215
- - lib/caploy/recipes/rbenv.rb
216
- - lib/caploy/recipes/redis.rb
217
- - lib/caploy/recipes/rvm.rb
218
104
  - lib/caploy/recipes/seeding.rb
219
105
  - lib/caploy/recipes/setup.rb
220
- - lib/caploy/recipes/symlink.rb
106
+ - lib/caploy/recipes/taillog.rb
221
107
  - lib/caploy/recipes/unicorn.rb
222
- - lib/caploy/recipes/unicorn_bluepill.rb
223
- - lib/caploy/recipes/whenever.rb
224
108
  - lib/caploy/render.rb
225
- - lib/caploy/templates/bluepill/init.erb
226
- - lib/caploy/templates/bluepill/unicorn_config.rb.erb
227
109
  - lib/caploy/templates/nginx/vhost.erb
228
110
  - lib/caploy/templates/unicorn/unicorn.rb.erb
229
111
  - lib/caploy/version.rb
@@ -233,27 +115,26 @@ files:
233
115
  homepage: https://github.com/mschiller/caploy
234
116
  licenses:
235
117
  - MIT
118
+ metadata: {}
236
119
  post_install_message:
237
120
  rdoc_options: []
238
121
  require_paths:
239
122
  - lib
240
123
  required_ruby_version: !ruby/object:Gem::Requirement
241
- none: false
242
124
  requirements:
243
- - - ! '>='
125
+ - - '>='
244
126
  - !ruby/object:Gem::Version
245
127
  version: '0'
246
128
  required_rubygems_version: !ruby/object:Gem::Requirement
247
- none: false
248
129
  requirements:
249
- - - ! '>='
130
+ - - '>='
250
131
  - !ruby/object:Gem::Version
251
132
  version: '0'
252
133
  requirements: []
253
134
  rubyforge_project:
254
- rubygems_version: 1.8.23
135
+ rubygems_version: 2.0.14
255
136
  signing_key:
256
- specification_version: 3
137
+ specification_version: 4
257
138
  summary: capistrano deployment tasks for different projects
258
139
  test_files: []
259
140
  has_rdoc:
@@ -1,4 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- require './config/boot'
3
- require 'airbrake/capistrano'
4
- end
@@ -1,25 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- # defaults
4
- #_cset :bundle_gemfile, "Gemfile"
5
- #_cset :bundle_dir, File.join(fetch(:shared_path), 'bundle')
6
- #_cset :bundle_roles, #{role_default} # e.g. [:app, :batch]
7
- #_cset :rake, "bundle --gemfile Gemfile.server exec rake"
8
- _cset :bundle_cmd, "bundle"
9
- _cset :bundle_without, [:development, :test, :deploy]
10
-
11
- # http://shapeshed.com/journal/using-rbenv-to-manage-rubies/
12
- # 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.
13
- _cset :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
14
- _cset :rake, 'bundle exec rake'
15
-
16
- require 'bundler/capistrano'
17
-
18
- namespace :bundler do
19
- task :install_gem do
20
- run "cd #{release_path} && gem install bundler --no-ri --no-rdoc"
21
- end
22
- end
23
-
24
- #before "bundle:install", "bundler:install_gem"
25
- end
@@ -1,132 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- require File.expand_path("#{File.dirname(__FILE__)}/../../util")
4
-
5
- set :keep_releases, 10
6
- set :use_sudo, false
7
-
8
- set :nginx_protocol, :both
9
-
10
- set :scm, :git
11
- set :git_enable_submodules, false
12
-
13
- # set deployment strategy
14
- set :deploy_via, :remote_cache
15
- set :copy_exclude, %w(.git .svn .DS_Store test doc .gitkeep)
16
- #_cset :repository_cache, "cached-copy" # defaults to :shared_path + 'cached-copy/'
17
-
18
- # :forward_agent allows us to avoid using and distributing a deploy key.
19
- # On problems run 'ssh-add' locally
20
- # In your /etc/ssh/ssh_config or ~/.ssh/config you need to have ForwardAgent enabled for this to work.
21
- set :ssh_options, {:port => fetch(:ssh_port, 22), :forward_agent => true, :paranoid => true}
22
-
23
- default_run_options[:pty] = true
24
-
25
- # if you want to remove the dump file after loading
26
- set :db_local_clean, true
27
-
28
- namespace :deploy do
29
- desc "deploy always with migrations"
30
- task :default do
31
- deploy.migrations
32
- end
33
-
34
- namespace :cache do
35
- desc "Flush cache"
36
- task :clear, :roles => :cache do
37
- run "cd #{current_path} && #{rake} cache:clear RAILS_ENV=#{rails_env}"
38
- end
39
- end
40
-
41
- task :set_branch_info_file, :roles => :app do
42
- run "cd #{release_path} && echo \"#{branch}\" > CURRENT_BRANCH"
43
- end
44
-
45
- task :set_staging_release_test_info_file, :roles => :app do
46
- run "cd #{release_path} && echo \"#{branch}\" > RELEASE_TEST" if branch == 'master' and ENV['RELEASE_TEST']
47
- end
48
-
49
- desc "build missing paperclip styles"
50
- task :build_missing_paperclip_styles, :roles => :app do
51
- run "cd #{current_path}; RAILS_ENV=#{rails_env} #{rake} paperclip:refresh:missing_styles"
52
- end
53
-
54
- desc 'Show deployed revision'
55
- task :revision, :roles => :app do
56
- run "cat #{current_path}/REVISION"
57
- end
58
-
59
- after 'deploy:finalize_update', 'deploy:set_branch_info_file'
60
- end
61
-
62
- task :test_and_prepare_cap_env do
63
- abort "You must set :user before using defaults" unless fetch(:user, nil)
64
- abort "You must set :repository before using defaults" unless fetch(:repository, nil)
65
- abort "You must set :branch before using defaults" unless fetch(:branch, nil)
66
- abort "You must set :deploy_to before using defaults" unless fetch(:deploy_to, nil)
67
-
68
- set :uptodate_branch, fetch(:branch)
69
- set :uptodate_scm, :git
70
- #:uptodate_scm_bynary ('git') - path to SCM binary
71
- #:uptodate_remote_repository ('origin') - remote repository
72
- #:uptodate_time (60) - time in seconds for checking remote repository
73
- #:uptodate_behaviour - (:confirm)
74
- # :confirm - show outdated message and ask to confirm the further execution
75
- # :abort - show outdated message and abort further execution
76
- require 'capistrano/uptodate'
77
-
78
- require 'capistrano_colors'
79
- capistrano_color_matchers = [
80
- {:match => /command finished/, :color => :hide, :prio => 10},
81
- {:match => /executing command/, :color => :blue, :prio => 10, :attribute => :underscore},
82
- {:match => /^transaction: commit$/, :color => :magenta, :prio => 10, :attribute => :blink},
83
- {:match => /git/, :color => :white, :prio => 20, :attribute => :reverse},
84
- ]
85
- colorize(capistrano_color_matchers)
86
-
87
- #Dynamically skip Capistrano hooks example
88
- # before 'deploy:update_code', 'db:dump' unless fetch(:skip_dump, false)
89
- # $ cap staging deploy -S skip_dump=true
90
- end
91
-
92
- before 'deploy', 'test_and_prepare_cap_env'
93
- before 'deploy:migrations', 'test_and_prepare_cap_env'
94
- after 'deploy:update', 'deploy:cleanup'
95
-
96
- desc "Show currently deployed revision on server."
97
- task :revisions, :roles => :app do
98
- current, previous, latest = current_revision[0, 7], previous_revision[0, 7], real_revision[0, 7]
99
- puts "\n" << "-"*63
100
- puts "===== Master Revision: \033[1;33m#{latest}\033[0m\n\n"
101
- puts "===== [ \033[1;36m#{application.capitalize} - #{stage.to_s.capitalize}\033[0m ]"
102
- puts "=== Deployed Revision: \033[1;32m#{current}\033[0m"
103
- puts "=== Previous Revision: \033[1;32m#{previous}\033[0m\n\n"
104
-
105
- # If deployed and master are the same, show the difference between the last 2 deployments.
106
- base_label, new_label, base_rev, new_rev = latest != current ? \
107
- ["deployed", "master", current, latest] : \
108
- ["previous", "deployed", previous, current]
109
-
110
- # Fetch the difference between master and deployed revisions.
111
- log_cmd = "#{source.log(previous, latest).gsub(/^git/, 'git --no-pager')} --oneline"
112
- cfg = File.join(shared_path, strategy.configuration[:repository_cache] || "cached-copy")
113
-
114
- diff = ''
115
- run %Q{cd "#{cfg}" && #{log_cmd}} do |channel, stream, data|
116
- diff = data
117
- end
118
-
119
- # Show difference between master and deployed revisions.
120
- if diff != ""
121
- # Colorize refs
122
- diff.gsub!(/^([a-f0-9]+) /, "\033[1;32m\\1\033[0m - ")
123
- diff = " " << diff.gsub("\n", "\n ") << "\n"
124
- # Indent commit messages nicely, max 80 chars per line, line has to end with space.
125
- diff = diff.split("\n").map { |l| l.scan(/.{1,80}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m, "\n"<<" "*14<<"\\1") }.join("\n")
126
- puts "=== Difference between #{base_label} revision and #{new_label} revision:\n\n"
127
- puts diff
128
- end
129
- end
130
- after "deploy", "revisions"
131
- after "deploy:migrations", "revisions"
132
- end
@@ -1,12 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- desc "tail production log files"
4
- task :tail_logs, :roles => :app do
5
- run "tail -f #{shared_path}/log/*.log" do |channel, stream, data|
6
- trap("INT") { puts 'Interupted'; exit 0; }
7
- puts # for an extra line break before the host name
8
- puts "#{channel[:host]}: #{data}"
9
- break if stream == :err
10
- end
11
- end
12
- end
@@ -1,32 +0,0 @@
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,25 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- _cset :puma_binary, "bundle exec puma"
4
- _cset :pumactl_binary, "bundle exec pumactl"
5
- _cset :puma_state, "tmp/puma_state"
6
- _cset :puma_tcp_port, 9292
7
- _cset :puma_control_tcp_port, puma_tcp_port.to_i + 1
8
- _cset :puma_thread_pool, '0:16'
9
-
10
- namespace :deploy do
11
- task :start, :roles => :app, :except => { :no_release => true } do
12
- set :puma_socket, fetch(:puma_socket, "unix:///tmp/sockets/#{application}_#{rails_env}.sock")
13
-
14
- tcp = puma_tcp_port.nil? ? '' : "-b tcp://127.0.0.1:#{puma_tcp_port}"
15
- run "cd #{current_path} && RAILS_ENV=#{rails_env} #{puma_binary} -t #{puma_thread_pool} -S #{puma_state} --control tcp://127.0.0.1:#{puma_control_tcp_port} -b #{puma_socket} #{tcp}" # --control-token xxx
16
- end
17
- task :stop, :roles => :app, :except => { :no_release => true } do
18
- run "cd #{current_path} && RAILS_ENV=#{rails_env} #{pumactl_binary} -S #{puma_state} stop"
19
- end
20
- task :restart, :roles => :app, :except => { :no_release => true } do
21
- run "cd #{current_path} && RAILS_ENV=#{rails_env} #{pumactl_binary} -S #{puma_state} restart"
22
- end
23
- end
24
-
25
- end
@@ -1,7 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- abort "You must set :user before using defaults" unless fetch(:user)
3
-
4
- set :default_environment, {
5
- 'PATH' => "/home/#{fetch(:user)}/.rbenv/shims:/home/#{fetch(:user)}/.rbenv/bin:$PATH"
6
- }
7
- end
@@ -1,41 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- namespace :redis do
4
-
5
- desc "Install redis"
6
- task :install do
7
- ["#{sudo} rm -r /tmp/redis",
8
- "#{sudo} rm /usr/local/bin/redis-*",
9
- "git clone git://github.com/antirez/redis.git /tmp/redis",
10
- "cd /tmp/redis && git pull",
11
- "cd /tmp/redis && git checkout v2.0.4-stable",
12
- "cd /tmp/redis && make clean",
13
- "cd /tmp/redis && make",
14
- "cd /tmp/redis && #{sudo} make install",
15
- "#{sudo} cp /tmp/redis/redis.conf /etc/",
16
- "#{sudo} sed -i 's/daemonize no/daemonize yes/' /etc/redis.conf",
17
- "#{sudo} sed -i 's/# bind 127.0.0.1/bind 127.0.0.1/' /etc/redis.conf"
18
- ].each {|cmd| run cmd}
19
- end
20
-
21
- desc "Start the Redis server"
22
- task :start do
23
- run "redis-server /etc/redis.conf"
24
- end
25
-
26
- desc "Stop the Redis server"
27
- task :stop do
28
- run 'echo "SHUTDOWN" | nc localhost 6379'
29
- #sudo 'kill `cat /var/run/redis.pid`'
30
- end
31
-
32
- desc "Restart the Redis server"
33
- task :restart do
34
- redis.stop
35
- sleep(1)
36
- redis.start
37
- end
38
-
39
- end
40
-
41
- end
@@ -1,8 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- abort "You must set :ruby_version before using defaults" unless fetch(:ruby_version)
3
-
4
- #$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
5
- require "rvm/capistrano"
6
- set :rvm_ruby_string, fetch(:ruby_version)
7
- set :rvm_type, :user
8
- end
@@ -1,24 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- namespace :deploy do
4
- desc <<-DESC
5
- Symlink shared directories and files.
6
- DESC
7
- task :symlink_dependencies, :roles => :app, :except => {:no_release => true} do
8
- shared_directories_to_link = fetch(:shared_directories_to_link, [])
9
- directories_to_create = fetch(:directories_to_create, [])
10
- files_to_delete = fetch(:files_to_delete, [])
11
- files_to_link = fetch(:files_to_link, {})
12
- chmods_to_set = fetch(:chmods_to_set, [])
13
-
14
- directories_to_create.each { |directory| run "mkdir -p #{directory}" }
15
- shared_directories_to_link.each { |source, target| run "ln -s #{source} #{target}" }
16
- files_to_delete.each { |file| run "rm #{file}" }
17
- files_to_link.each { |source, target| run "ln -s #{source} #{target}"}
18
- chmods_to_set.each { |target, chmod| run "chmod #{chmod} #{target}" }
19
- end
20
- end
21
-
22
- after 'deploy:finalize_update', 'deploy:symlink_dependencies'
23
-
24
- end