capper 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/capper.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "capper"
5
- s.version = "0.4.0"
5
+ s.version = "0.5.0"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.licenses = ["MIT"]
8
8
  s.authors = ["Benedikt Böhm"]
data/lib/capper/base.rb CHANGED
@@ -50,9 +50,6 @@ Capper.load do
50
50
  _cset(:config_path) { "#{shared_path}/config" }
51
51
  set(:deploy_to) { "#{base_path}/#{application}" }
52
52
 
53
- # do not clobber asset timestamps by default
54
- _cset(:normalize_asset_timestamps, false)
55
-
56
53
  # set proper unicode locale, so gemspecs with unicode chars will not crash
57
54
  # bundler. see https://github.com/capistrano/capistrano/issues/70
58
55
  _cset(:default_environment, { 'LANG' => 'en_US.UTF-8' })
data/lib/capper/monit.rb CHANGED
@@ -5,8 +5,14 @@ Capper.load do
5
5
 
6
6
  namespace :monit do
7
7
  task :setup do
8
- str = fetch(:monit_configs, {}).join("\n\n")
9
- upload_template_string(str, monitrc, :mode => "0644")
8
+ configs = []
9
+
10
+ fetch(:monit_configs, {}).each do |name, body|
11
+ configs << "# #{name}\n#{body}"
12
+ end
13
+
14
+ upload_template_string(configs.join("\n\n"),
15
+ monitrc, :mode => "0644")
10
16
  end
11
17
 
12
18
  task :reload do
@@ -0,0 +1,14 @@
1
+ require File.dirname(__FILE__) + '/base' unless defined?(Capper)
2
+
3
+ require "capper/rails"
4
+
5
+ Capper.load do
6
+ namespace :sass do
7
+ desc "Updates the stylesheets generated by Sass"
8
+ task :update, :roles => :app do
9
+ run "cd #{release_path} && RAILS_ENV=#{rails_env} bundle exec rake --silent sass:update"
10
+ end
11
+ end
12
+
13
+ before "deploy:restart", "sass:update"
14
+ end
@@ -3,7 +3,7 @@ class Capper
3
3
  module Monit
4
4
 
5
5
  def monit_config(name, body)
6
- set(:monit_configs, fetch(:monit_configs, []) << "# #{name}\n#{body}")
6
+ set(:monit_configs, fetch(:monit_configs, {}).merge(name => body))
7
7
  end
8
8
 
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-08-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erubis
16
- requirement: &11917960 !ruby/object:Gem::Requirement
16
+ requirement: &9113720 !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: *11917960
24
+ version_requirements: *9113720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: capistrano
27
- requirement: &11917520 !ruby/object:Gem::Requirement
27
+ requirement: &9113280 !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: *11917520
35
+ version_requirements: *9113280
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: capistrano_colors
38
- requirement: &11917100 !ruby/object:Gem::Requirement
38
+ requirement: &9112860 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *11917100
46
+ version_requirements: *9112860
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &11916600 !ruby/object:Gem::Requirement
49
+ requirement: &9112360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 1.0.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *11916600
57
+ version_requirements: *9112360
58
58
  description: Capistrano is a collection of opinionated Capistrano recipes
59
59
  email:
60
60
  - bb@xnull.de
@@ -83,6 +83,7 @@ files:
83
83
  - lib/capper/multistage.rb
84
84
  - lib/capper/rails.rb
85
85
  - lib/capper/rvm.rb
86
+ - lib/capper/sass.rb
86
87
  - lib/capper/templates/unicorn.rb.erb
87
88
  - lib/capper/templates/unicorn.sh.erb
88
89
  - lib/capper/unicorn.rb