capper 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -3
- data/lib/capper/base.rb +14 -0
- data/lib/capper/rails.rb +3 -1
- data/lib/capper/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/capper/base.rb
CHANGED
@@ -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
|
data/lib/capper/rails.rb
CHANGED
@@ -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
|
data/lib/capper/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: capper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
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
|
13
|
+
date: 2012-02-01 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|