capistrano-faster-rails 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/capistrano-faster-rails.gemspec +1 -1
- data/lib/capistrano/tasks/faster-rails.rake +15 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c27bd41538284e866aa011daddf6707c004edf5b8737620353b3026b86c1ae8
|
4
|
+
data.tar.gz: 35050bfbade0d05279e32618b1467e4c866a98076cfeef86eb0348696d84bbd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9390ec415afd8d142a4fb1189cd2f9fafb42e1e0cd012c5a52ba70e4dbbeab6f9f060259d14961d864fd6c28be4e058a025589b96a4c863edef76139c356bece
|
7
|
+
data.tar.gz: 90f7405708d460444233799d763935740ba13254e81040c5402e1670cf6665e8f344e481d42484c3e04d48556a5c71887a183c3f2c49c1b60d3a6ee7acce5b8f
|
@@ -1,12 +1,3 @@
|
|
1
|
-
asset_change = proc {
|
2
|
-
asset_files = fetch(:asset_files, "vendor/assets app/assets config/initializers/assets.rb")
|
3
|
-
within(repo_path) {
|
4
|
-
previous_revision, current_revision = fetch(:previous_revision), fetch(:current_revision)
|
5
|
-
previous_revision.to_s.empty? ||
|
6
|
-
!capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{asset_files}").empty?
|
7
|
-
}
|
8
|
-
}
|
9
|
-
|
10
1
|
namespace :deploy do
|
11
2
|
namespace :symlink do
|
12
3
|
Rake::Task["deploy:symlink:linked_files"].clear_actions
|
@@ -42,7 +33,13 @@ namespace :deploy do
|
|
42
33
|
task :precompile do
|
43
34
|
on(release_roles(fetch(:assets_roles))) {
|
44
35
|
log "[deploy:assets:precompile] Checking assets changes"
|
45
|
-
|
36
|
+
asset_files = fetch(:asset_files, "vendor/assets app/assets config/initializers/assets.rb")
|
37
|
+
asset_changed = within(repo_path) {
|
38
|
+
previous_revision, current_revision = fetch(:previous_revision), fetch(:current_revision)
|
39
|
+
previous_revision.to_s.empty? ||
|
40
|
+
!capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{asset_files}").empty?
|
41
|
+
}
|
42
|
+
if asset_changed
|
46
43
|
within(release_path) do
|
47
44
|
with rails_env: fetch(:rails_env), rails_groups: fetch(:rails_assets_groups) do
|
48
45
|
execute :rake, "assets:precompile"
|
@@ -69,7 +66,7 @@ namespace :bundler do
|
|
69
66
|
!capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{bundle_files}").empty?
|
70
67
|
}
|
71
68
|
|
72
|
-
within
|
69
|
+
within(release_path) {
|
73
70
|
with fetch(:bundle_env_variables) do
|
74
71
|
options = []
|
75
72
|
options << "--gemfile #{fetch(:bundle_gemfile)}" if fetch(:bundle_gemfile)
|
@@ -101,7 +98,13 @@ if yarn_install_task
|
|
101
98
|
task :install do
|
102
99
|
on roles fetch(:yarn_roles) do
|
103
100
|
log "[yarn:install] Checking assets changes"
|
104
|
-
|
101
|
+
asset_files = fetch(:asset_files, "vendor/assets app/assets config/initializers/assets.rb")
|
102
|
+
asset_changed = within(repo_path) {
|
103
|
+
previous_revision, current_revision = fetch(:previous_revision), fetch(:current_revision)
|
104
|
+
previous_revision.to_s.empty? ||
|
105
|
+
!capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{asset_files}").empty?
|
106
|
+
}
|
107
|
+
if asset_changed
|
105
108
|
within fetch(:yarn_target_path, release_path) do
|
106
109
|
with fetch(:yarn_env_variables, {}) do
|
107
110
|
execute fetch(:yarn_bin), 'install', fetch(:yarn_flags)
|