ms_deploy 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ Capistrano::Configuration.instance.load do
17
17
 
18
18
  namespace :bundler do
19
19
  task :install_gem do
20
- run "cd #{release_path} && gem install bundler --pre --no-ri --no-rdoc"
20
+ run "cd #{release_path} && gem install bundler --no-ri --no-rdoc"
21
21
  end
22
22
  end
23
23
 
@@ -1,15 +1,15 @@
1
1
  Capistrano::Configuration.instance.load do
2
-
2
+ # http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano/
3
3
  namespace :deploy do
4
4
  namespace :assets do
5
- desc "Compile assets"
6
- task :compile, :roles => :web do
7
- run "cd #{release_path}; RAILS_ENV=#{rails_env} #{rake} assets:precompile"
5
+ task :precompile, :roles => :web, :except => { :no_release => true } do
6
+ from = source.next_revision(current_revision)
7
+ if capture("cd #{latest_release} && #{source.local.log(from)} lib/assets/ vendor/assets/ app/assets/ | wc -l").to_i > 0
8
+ run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
9
+ else
10
+ logger.info "Skipping asset pre-compilation because there were no asset changes"
11
+ end
8
12
  end
9
-
10
- after 'deploy', 'deploy:assets:compile'
11
- after 'deploy:migrations', 'deploy:assets:compile'
12
-
13
13
  end
14
14
  end
15
15
  end
@@ -0,0 +1,26 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ set :puma_binary, fetch(:puma_binary, "bundle exec puma")
4
+ set :pumactl_binary, fetch(:pumactl_binary, "bundle exec pumactl")
5
+ set :puma_state, fetch(:puma_state, "tmp/puma_state")
6
+ set :puma_tcp_port, fetch(:puma_tcp_port, nil)
7
+ set :puma_tcp_port, fetch(:puma_control_tcp_port, 9292)
8
+ set :puma_control_tcp_port, fetch(:puma_control_tcp_port, puma_tcp_port.to_i + 1)
9
+ set :puma_thread_pool, '0:16'
10
+
11
+ namespace :deploy do
12
+ task :start, :roles => :app, :except => { :no_release => true } do
13
+ set :puma_socket, fetch(:puma_socket, "unix:///tmp/sockets/#{application}_#{rails_env}.sock")
14
+
15
+ tcp = puma_tcp_port.nil? ? '' : "-b tcp://127.0.0.1:#{puma_tcp_port}"
16
+ 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
17
+ end
18
+ task :stop, :roles => :app, :except => { :no_release => true } do
19
+ run "cd #{current_path} && RAILS_ENV=#{rails_env} #{pumactl_binary} -S #{puma_state} stop"
20
+ end
21
+ task :restart, :roles => :app, :except => { :no_release => true } do
22
+ run "cd #{current_path} && RAILS_ENV=#{rails_env} #{pumactl_binary} -S #{puma_state} restart"
23
+ end
24
+ end
25
+
26
+ end
@@ -28,6 +28,18 @@ server {
28
28
  # path for static files
29
29
  root <%= project_root %>/public;
30
30
 
31
+ ### Stop Image and Document Hijacking
32
+ #location ~* (\.jpg|\.png|\.css)$ {
33
+ # if ($http_referer !~ ^(http://mydomain.com) ) {
34
+ # return 405;
35
+ # }
36
+ #}
37
+
38
+ location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
39
+ expires max;
40
+ break;
41
+ }
42
+
31
43
  # Prefer to serve static files directly from nginx to avoid unnecessary
32
44
  # data copies from the application server.
33
45
  #
@@ -1,3 +1,3 @@
1
1
  module MsDeploy
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
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.0.10
4
+ version: 0.0.11
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-01-25 00:00:00.000000000 Z
12
+ date: 2012-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &77667400 !ruby/object:Gem::Requirement
16
+ requirement: &89146810 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *77667400
24
+ version_requirements: *89146810
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: capistrano-ext
27
- requirement: &77666540 !ruby/object:Gem::Requirement
27
+ requirement: &89146600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *77666540
35
+ version_requirements: *89146600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: erubis
38
- requirement: &77665970 !ruby/object:Gem::Requirement
38
+ requirement: &89146390 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *77665970
46
+ version_requirements: *89146390
47
47
  description: capistrano deployment task for my projects
48
48
  email:
49
49
  - michael.schiller@gmx.de
@@ -59,6 +59,7 @@ files:
59
59
  - lib/ms_deploy.rb
60
60
  - lib/ms_deploy/recipes/bundler.rb
61
61
  - lib/ms_deploy/recipes/deploy/assets.rb
62
+ - lib/ms_deploy/recipes/deploy/puma.rb
62
63
  - lib/ms_deploy/recipes/deploy/setup.rb
63
64
  - lib/ms_deploy/recipes/deploy/symlink.rb
64
65
  - lib/ms_deploy/recipes/deploy/unicorn.rb