capistrano-faster-rails 1.0.6 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a67fe5ab9dcc9acb798d1e449b81df83c7ad4e6e4744c599e0a3bd0e79a93811
4
- data.tar.gz: e2ff3d4c0b955cad9561875730ce978b148b7358568c679c3038d689e970e4b7
3
+ metadata.gz: b4ed2a6d1f21699399e6a65cc8493a4d56e16672235bd22d8b72c49d21aa2740
4
+ data.tar.gz: fbd80c284fa8602a2da858e0a1a56044a7baa37e324588420cd9c7b79e717f6b
5
5
  SHA512:
6
- metadata.gz: b816598adb6ae57bf6fe03623fcf0c306082ec824b70dfaf4481babc3a5148952fbf73c6fd5df107ea3a153688a3cfb19f31b5dc163abc9d6e0398a47e8187b5
7
- data.tar.gz: f431b64d05428772e3ef2d0ded4c364860c953c713a21ec31ab20632f01bc03f7cf42fd81c5b972b053d883ec56cb8bc9030d4c75c683bc7b9512ac866cff678
6
+ metadata.gz: 1e4bccf8693e0545413f6b1219d2fbb8dbca7bdee435326a6eac57cac7370b68320279f9c83fecfb3fc4e945bf89ca5cfcfe80026fad23444cf7e2bfed9264f1
7
+ data.tar.gz: 4ada2ad4a76d535a8856d28a9a9e72bb66303bac813f928dc77a648554890fe874e2eead9e9523f49893d5107374c3f008845ab62c143cc43f2ef7bbd002c7ff
data/README.md CHANGED
@@ -2,17 +2,19 @@
2
2
 
3
3
  ## What does this gem do?
4
4
 
5
- 1. Execute copy `linked_files` and `linked_dirs` with one command on deployed servers.
5
+ 1. Set `conditionally_migrate` to true to skip `rails db:migrate` if migration files not changed.
6
+
7
+ 2. Execute copy `linked_files` and `linked_dirs` with one command on deployed servers.
6
8
 
7
9
  Capistrano runs each command separately on their own SSH session and it takes too long to deploy an application, copy `linked_files` and `linked_dirs` on deployed servers with one command will speedup deploying process.
8
10
 
9
- 2. Skip `bundle install` if Gemfile isn't changed.
11
+ 3. Skip `bundle install` if Gemfile isn't changed.
10
12
 
11
- `bundle install` takes few or dozens of seconds, most of the time your project's Gemfile will not be changed, and you don't have to execute `bundle install` if your Gemfile isn't changed.
13
+ `bundle install` takes a few seconds even if Gemfile isn't changed, there is no need to execute `bundle install` if it isn't changed.
12
14
 
13
- 3. Skip `rake assets:precompile` and `yarn:install` if asset files not chagned.
15
+ 4. Skip `rake assets:precompile` and `yarn:install` if asset files aren't chagned.
14
16
 
15
- `rake assets:precompile` and `yarn:install` is really slow if your Rails project has plenty of assets to precompile, even if they are not changed. You don't have to execute them if your asset files not chagned.
17
+ `rake assets:precompile` and `yarn:install` is really slow if your Rails project has plenty of assets to precompile, even if they are not changed. There is no need to execute these commands if asset files not chagned.
16
18
 
17
19
 
18
20
  ## Installation
@@ -41,7 +43,7 @@ use `set :asset_files` in config/deploy.rb to set your project assets files, `as
41
43
 
42
44
  use `set :bundle_files` in config/deploy.rb to set your project ruby Gemfile files, `bundle_files` default to `"Gemfile Gemfile.lock .ruby-version"`
43
45
 
44
- Causion:
46
+ ## Note
45
47
 
46
48
  `asset_files` and `bundle_files` are both space separated string, not array!
47
49
 
@@ -4,14 +4,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "capistrano-faster-rails"
7
- spec.version = "1.0.6"
7
+ spec.version = "1.1.0"
8
8
  spec.authors = ["lifuzhong"]
9
9
  spec.email = ["lifuzho@126.com"]
10
10
 
11
11
  spec.summary = %q{Speedup deploy Ruby On Rails project when using capistrano}
12
12
  spec.description = %q{
13
13
  Make your Ruby On Rails project deploying with Capistrano even faster.
14
- It skips unnecessary steps(`bundle install`, `rake assets:precompile`, `yarn:install`) intelligently.
14
+ It skips unnecessary steps(`rails db:migrate`, `bundle install`, `rake assets:precompile`, `yarn:install`) intelligently.
15
15
  }
16
16
  spec.homepage = "https://github.com/ifool/capistrano-faster-rails"
17
17
  spec.license = 'MIT'
@@ -38,6 +38,6 @@ Gem::Specification.new do |spec|
38
38
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
39
39
  spec.require_paths = ["lib"]
40
40
 
41
- spec.add_development_dependency "bundler", "~> 1.17"
42
- spec.add_development_dependency "rake", "~> 10.0"
41
+ spec.add_development_dependency "bundler", "~> 2.2.10"
42
+ spec.add_development_dependency "rake", "~> 12.3.3"
43
43
  end
@@ -1,3 +1,5 @@
1
+ set :conditionally_migrate, true
2
+
1
3
  namespace :deploy do
2
4
  namespace :symlink do
3
5
  Rake::Task["deploy:symlink:linked_files"].clear_actions
@@ -35,7 +37,8 @@ namespace :deploy do
35
37
  log "[deploy:assets:precompile] Checking assets changes"
36
38
  asset_files = fetch(:asset_files, "vendor/assets app/assets config/initializers/assets.rb")
37
39
  asset_changed = within(repo_path) {
38
- previous_revision, current_revision = fetch(:previous_revision), fetch(:current_revision)
40
+ previous_revision = fetch(:previous_revision) rescue ''
41
+ current_revision = fetch(:current_revision)
39
42
  previous_revision.to_s.empty? ||
40
43
  !capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{asset_files}").empty?
41
44
  }
@@ -61,13 +64,14 @@ namespace :bundler do
61
64
  log "[bundler:install] Checking Gemfile and Gemfile.lock changes"
62
65
  bundle_files = fetch(:bundle_files, "Gemfile Gemfile.lock .ruby-version")
63
66
  gemfile_changed = within(repo_path) {
64
- previous_revision, current_revision = fetch(:previous_revision), fetch(:current_revision)
67
+ previous_revision = fetch(:previous_revision) rescue ''
68
+ current_revision = fetch(:current_revision)
65
69
  previous_revision.to_s.empty? ||
66
70
  !capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{bundle_files}").empty?
67
71
  }
68
72
 
69
73
  within(release_path) {
70
- with fetch(:bundle_env_variables) do
74
+ with(fetch(:bundle_env_variables) || {}) do
71
75
  options = []
72
76
  options << "--gemfile #{fetch(:bundle_gemfile)}" if fetch(:bundle_gemfile)
73
77
  options << "--path #{fetch(:bundle_path)}" if fetch(:bundle_path)
@@ -100,7 +104,8 @@ if yarn_install_task
100
104
  log "[yarn:install] Checking package.json and yarn.lock changes"
101
105
  asset_files = fetch(:asset_files, "package.json yarn.lock")
102
106
  asset_changed = within(repo_path) {
103
- previous_revision, current_revision = fetch(:previous_revision), fetch(:current_revision)
107
+ previous_revision = fetch(:previous_revision) rescue ''
108
+ current_revision = fetch(:current_revision)
104
109
  previous_revision.to_s.empty? ||
105
110
  !capture("cd #{repo_path} && git diff --name-only #{previous_revision} #{current_revision} -- #{asset_files}").empty?
106
111
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-faster-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - lifuzhong
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-19 00:00:00.000000000 Z
11
+ date: 2021-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,31 +16,31 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: 2.2.10
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: 2.2.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 12.3.3
41
41
  description: "\n Make your Ruby On Rails project deploying with Capistrano even
42
- faster.\n It skips unnecessary steps(`bundle install`, `rake assets:precompile`,
43
- `yarn:install`) intelligently.\n "
42
+ faster.\n It skips unnecessary steps(`rails db:migrate`, `bundle install`, `rake
43
+ assets:precompile`, `yarn:install`) intelligently.\n "
44
44
  email:
45
45
  - lifuzho@126.com
46
46
  executables: []
@@ -65,7 +65,7 @@ metadata:
65
65
  homepage_uri: https://github.com/ifool/capistrano-faster-rails
66
66
  source_code_uri: https://github.com/ifool/capistrano-faster-rails
67
67
  changelog_uri: https://github.com/ifool/capistrano-faster-rails
68
- post_install_message:
68
+ post_install_message:
69
69
  rdoc_options: []
70
70
  require_paths:
71
71
  - lib
@@ -80,8 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.0.3
84
- signing_key:
83
+ rubygems_version: 3.2.3
84
+ signing_key:
85
85
  specification_version: 4
86
86
  summary: Speedup deploy Ruby On Rails project when using capistrano
87
87
  test_files: []