capper 0.9.6 → 0.9.7

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.
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capper (0.9.2)
5
- capistrano
6
- capistrano_colors
4
+ capper (0.9.6)
5
+ capistrano (~> 2.9.0)
6
+ capistrano_colors (~> 0.5.5)
7
7
  erubis
8
8
 
9
9
  GEM
@@ -137,6 +137,20 @@ def run_locally(cmd)
137
137
  output_on_stdout
138
138
  end
139
139
 
140
+ # confirm if a conditoin is true (e.g. after 6pm)
141
+ def confirm_if(prompt="Continue? ")
142
+ if yield
143
+ yes = HighLine.new.agree(prompt) do |q|
144
+ q.overwrite = false
145
+ q.default = 'n'
146
+ end
147
+
148
+ unless yes
149
+ exit(-1)
150
+ end
151
+ end
152
+ end
153
+
140
154
  # =========================================================================
141
155
  # These are the tasks that are available to help with deploying web apps,
142
156
  # and specifically, Rails applications. You can have cap give you a summary
@@ -8,7 +8,6 @@ _cset(:asset_env, "RAILS_GROUPS=assets")
8
8
  set(:internal_shared_children, fetch(:internal_shared_children, []) | %w(assets))
9
9
 
10
10
  set(:internal_symlinks, fetch(:internal_symlinks, {}).merge({
11
- "assets" => "public/assets",
12
11
  "log" => "log",
13
12
  "pids" => "tmp/pids",
14
13
  "system" => "public/system",
@@ -68,6 +67,9 @@ namespace :rails do
68
67
  DESC
69
68
  task :precompile, :roles => [:web, :asset], :except => { :no_release => true } do
70
69
  if asset_pipeline
70
+ run("rm -rf #{latest_release}/public/assets && " +
71
+ "mkdir -p #{File.dirname(File.join(latest_release, "public/assets"))} && " +
72
+ "ln -s #{shared_path}/assets #{latest_release}/public/assets")
71
73
  run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile"
72
74
  end
73
75
  end
@@ -1,3 +1,3 @@
1
1
  module Capper
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capper
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.6
5
+ version: 0.9.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Benedikt B\xC3\xB6hm"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-06 00:00:00 +01:00
13
+ date: 2012-02-01 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency