capistrano-laravel 1.2.2 → 1.2.3

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: be1d597cc6abfc6b738d62153c06bee94f0620545d6c18efa15cc69e12a3760d
4
- data.tar.gz: 4e5829c935cd02a3e1c80caf8639f99e8b18b02377feb40ee3fe560772a05e2b
3
+ metadata.gz: 4bdb25f03d77ada9b00d7c14bbb89fccd65986ceca47d1a0f0214e27a908ed81
4
+ data.tar.gz: c7bcb61ee56f32a8429a3aadb19f19f4cc844e48901d7de8ebbc0a6415654f85
5
5
  SHA512:
6
- metadata.gz: 2cf7f4e9c89cd033c8797a0f806db2575ca44bc23819dd5303bb51d2158676cfda71bb6066b22dc1dd3b1e72b870396c074c26f45f9785d680ed5f84e46a96ea
7
- data.tar.gz: 9e74c56a52e9da0c2ee6c46f22569c36cb9e65b2308a0b17ab20d87cfa64a91fa24ab62e6b0a600b28b8726f1eb391428f17ecec739b680c7f6454219d06de12
6
+ metadata.gz: f557a51f0b353124a6d3dce25714fbffb809a09d76134193d114578534ec40010be7d732b04678001f487c8408e1bf2c26aceaa796e9b7cec615a8ae0e061ad7
7
+ data.tar.gz: 174be52930ac5ec50b4cfbfbdbef3d28bc94d83bd934dc3f838b86c7ba8e39bbe12834abfc6720e405f0b3943341339fc9552b209c76b95edaad76e23e6d72fe
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.0
4
- - 2.3.3
5
- - 2.2.6
3
+ - 2.5
4
+ - 2.6
5
+ - 2.7
6
6
 
7
7
  script: bundle exec rake spec rubocop
8
8
  install: bundle install --jobs=1
@@ -0,0 +1,129 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+ ### Added
9
+
10
+ ### Changed
11
+
12
+ ### Deprecated
13
+
14
+ ### Removed
15
+
16
+ ### Fixed
17
+
18
+ ### Security
19
+
20
+ ## [1.2.3] - 2020-01-28
21
+ ### Changed
22
+ - Tested RVM versions to `2.5`, `2.6`, and `2.7`.
23
+ - Source files to reflect changes requested by rubocop.
24
+ - `laravel:upload_dotenv_file` to run before `deploy:updated` instead of
25
+ `composer:run` to avoid issues with rollback.
26
+
27
+ ### Removed
28
+ - `.rubocop.yml` in favor of just using defaults.
29
+
30
+ ## [1.2.2] - 2018-03-07
31
+ ### Added
32
+ - Rubocop to Travis-CI.
33
+
34
+ ### Changed
35
+ - Versions of ruby tested against in Travis-CI.
36
+ - Single quotes to double quotes.
37
+ - `artisan optimize` to not run if Laravel version is greater than or equal to 5.5.
38
+
39
+ ## [1.2.1] - 2017-02-24
40
+ ### Fixed
41
+ - `:laravel_upload_dotenv_file_on_deploy` symbol in `laravel:upload_dotenv_file` task.
42
+
43
+ ## [1.2.0] - 2017-02-22
44
+ ### Added
45
+ - `:laravel_upload_dotenv_file_on_deploy` boolean config value to enable/disable dotenv file upload on deploy.
46
+
47
+ ## [1.1.1] - 2017-01-29
48
+ ### Changed
49
+ - Logic for checking whether or not ACL checks are perfomed to be in-line with the task instead of in the runlist.
50
+ - `laravel:ensure_acl_paths_exist` to run before `deploy:updating` instead of after `deploy:starting`.
51
+ - `deploy:set_permissions:acl` to run before `deploy:updated` instead of after `deploy:updating`.
52
+
53
+ ## [1.1.0] - 2016-10-28
54
+ ### Changed
55
+ - Linked directories to be more specific instead of simply just `storage` folder.
56
+ - Runlist to separate out tasks related to `:laravel_set_acl_paths`.
57
+
58
+ ### Removed
59
+ - Config check against `:laravel_set_acl_paths` when merging values into `:file_permissions_paths` and `:file_permissions_users`.
60
+
61
+ ### Fixed
62
+ - Creation of linked dirs to run under `shared_path` instead of under `release_path`.
63
+
64
+ ## [1.0.1] - 2016-10-14
65
+ ### Fixed
66
+ - `artisan storage:link` to not run if Laravel version is less than or equal to 5.3.
67
+
68
+ ## [1.0.0] - 2016-10-12
69
+ ### Added
70
+ - Editorconfig file.
71
+ - Rspec configuration.
72
+ - Travis-CI configuration.
73
+ - Additional README contents to better explain how the plugin works and should be developed.
74
+ - Inline comments to tasks file for every configuration value and task.
75
+ - `laravel:storage_link` task for creating public storage link.
76
+
77
+ ### Changed
78
+ - Gitignore file to ignore more ruby-related files.
79
+ - MIT license to be up-to-date for 2016.
80
+ - Gemfile to use `Capistrano::Laravel::VERSION` instead of hardcoding it into the Gemfile.
81
+ - `laravel:configure_folders` to `laravel:resolve_linked_dirs` and `laravel:ensure_linked_dirs_exist`.
82
+ - `laravel:create_linked_acl_paths` to `laravel:resolve_acl_paths`.
83
+ - `laravel:optimize_config` to `laravel:config_cache`.
84
+ - `laravel:optimize_route` to `laravel:route_cache`.
85
+ - `laravel:optimize_release` to `laravel:optimize`.
86
+ - `laravel:migrate_db` to `laravel:migrate`.
87
+ - `laravel:rollback_db` to `laravel:migrate_rollback`.
88
+ - Runlist to reflect the refactored tasks.
89
+
90
+ ### Removed
91
+ - The empty class `capistrano/laravel/helpers`.
92
+
93
+ ### Fixed
94
+ - `laravel:artisan` task formatting so it can properly take inputs.
95
+
96
+ ## [0.0.4] - 2016-10-02
97
+ ### Changed
98
+ - `laravel:artisan` tasks to be ran more than once.
99
+
100
+ ## [0.0.3] - 2016-03-07
101
+ ### Added
102
+ - More documentation to the README.
103
+ - `Capistrano::Laravel::VERSION`.
104
+
105
+ ### Changed
106
+ - Merged tasks files (artisan, laravel, migrations) into a single file.
107
+ - Task loading logic to read just a single file.
108
+
109
+ ## [0.0.2] - 2013-11-12
110
+ ### Changed
111
+ - Default `:file_permissions_user` to `:laravel_server_user` from `:webserver_user`.
112
+
113
+ ## [0.0.1] - 2013-11-12
114
+ ### Added
115
+ - Basic Laravel tasks: `laravel:artisan`, `laravel:artisan optimize`, `laravel:artisan migrate`.
116
+
117
+ [Unreleased]: https://github.com/capistrano/laravel/compare/v1.2.3...HEAD
118
+ [1.2.3]: https://github.com/capistrano/laravel/compare/v1.2.2...v1.2.3
119
+ [1.2.2]: https://github.com/capistrano/laravel/compare/v1.2.1...v1.2.2
120
+ [1.2.1]: https://github.com/capistrano/laravel/compare/v1.2.0...v1.2.1
121
+ [1.2.0]: https://github.com/capistrano/laravel/compare/v1.1.1...v1.2.0
122
+ [1.1.1]: https://github.com/capistrano/laravel/compare/v1.1.0...v1.1.1
123
+ [1.1.0]: https://github.com/capistrano/laravel/compare/v1.0.1...v1.1.0
124
+ [1.0.1]: https://github.com/capistrano/laravel/compare/v1.0.0...v1.0.1
125
+ [1.0.0]: https://github.com/capistrano/laravel/compare/v0.0.4...v1.0.0
126
+ [0.0.4]: https://github.com/capistrano/laravel/compare/v0.0.3...v0.0.4
127
+ [0.0.3]: https://github.com/capistrano/laravel/compare/v0.0.2...v0.0.3
128
+ [0.0.2]: https://github.com/capistrano/laravel/compare/v0.0.1...v0.0.2
129
+ [0.0.1]: https://github.com/capistrano/laravel/releases/tag/v0.0.1
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in capistrano-laravel.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -4,7 +4,8 @@ Deploy Laravel applications with Capistrano v3.*
4
4
 
5
5
  ## Installation
6
6
 
7
- If managing your Capistrano deploy as a ruby project, add this line to your application's Gemfile:
7
+ If managing your Capistrano deploy as a ruby project, add this line to your
8
+ application's Gemfile:
8
9
 
9
10
  ```ruby
10
11
  gem 'capistrano', '~> 3.0.0'
@@ -25,7 +26,9 @@ gem install capistrano-laravel
25
26
 
26
27
  ## Setting up Capistrano
27
28
 
28
- After installing Capistrano, you can use it to initialize a skeleton configuration. To setup Capistrano, please follow the documentation provided on their website:
29
+ After installing Capistrano, you can use it to initialize a skeleton
30
+ configuration. To setup Capistrano, please follow the documentation
31
+ provided on their website:
29
32
 
30
33
  http://capistranorb.com/documentation/getting-started/preparing-your-application/
31
34
 
@@ -130,7 +133,8 @@ set :laravel_5_acl_paths, [
130
133
 
131
134
  ### Tasks
132
135
 
133
- The following tasks are added to your deploy automagically when adding capistrano/laravel to your deploy.
136
+ The following tasks are added to your deploy automagically when adding
137
+ capistrano/laravel to your deploy.
134
138
 
135
139
  ```ruby
136
140
  before 'deploy:starting', 'laravel:resolve_linked_dirs'
@@ -138,7 +142,7 @@ before 'deploy:starting', 'laravel:resolve_acl_paths'
138
142
  after 'deploy:starting', 'laravel:ensure_linked_dirs_exist'
139
143
  before 'deploy:updating', 'laravel:ensure_acl_paths_exist'
140
144
  before 'deploy:updated', 'deploy:set_permissions:acl'
141
- before 'composer:run', 'laravel:upload_dotenv_file'
145
+ before 'deploy:updated', 'laravel:upload_dotenv_file'
142
146
  after 'composer:run', 'laravel:storage_link'
143
147
  after 'composer:run', 'laravel:optimize'
144
148
  ```
@@ -186,9 +190,14 @@ invoke 'laravel:migrate_rollback'
186
190
 
187
191
  ## Development
188
192
 
189
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
193
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
194
+ `rake spec` to run the tests. You can also run `bin/console` for an interactive
195
+ prompt that will allow you to experiment.
190
196
 
191
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
197
+ To install this gem onto your local machine, run `bundle exec rake install`. To
198
+ release a new version, update the version number in `version.rb`, and then run
199
+ `bundle exec rake release`, which will create a git tag for the version, push
200
+ git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
192
201
 
193
202
  ## Contributing
194
203
 
data/Rakefile CHANGED
@@ -1,9 +1,11 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
1
+ # frozen_string_literal: true
4
2
 
5
- task default: [:spec, :rubocop]
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'rubocop/rake_task'
6
+
7
+ task default: %i[spec rubocop]
6
8
  RSpec::Core::RakeTask.new(:spec)
7
9
 
8
- desc "Run RuboCop checks"
10
+ desc 'Run RuboCop checks'
9
11
  RuboCop::RakeTask.new
@@ -1,14 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "capistrano/laravel"
3
+ # frozen_string_literal: true
4
+
5
+ require 'bundler/setup'
6
+ require 'capistrano/laravel'
5
7
 
6
8
  # You can add fixtures and/or initialization code here to make experimenting
7
9
  # with your gem easier. You can also use a different console, if you like.
8
10
 
9
11
  # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
12
+ # require 'pry'
11
13
  # Pry.start
12
14
 
13
- require "irb"
15
+ require 'irb'
14
16
  IRB.start
@@ -1,34 +1,35 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "capistrano/laravel/version"
5
+ require 'capistrano/laravel/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "capistrano-laravel"
8
+ spec.name = 'capistrano-laravel'
8
9
  spec.version = Capistrano::Laravel::VERSION
9
- spec.authors = ["Peter Mitchell", "Andrew Miller"]
10
- spec.email = ["peterjmit@gmail.com", "ikari7789@yahoo.com"]
10
+ spec.authors = ['Peter Mitchell', 'Andrew Miller']
11
+ spec.email = ['peterjmit@gmail.com', 'ikari7789@yahoo.com']
11
12
 
12
- spec.summary = "Laravel specific deployment options for Capistrano 3.x"
13
- spec.description = "Laravel deployment for Capistrano 3.x"
14
- spec.homepage = "https://github.com/capistrano/laravel"
15
- spec.license = "MIT"
13
+ spec.summary = 'Laravel specific deployment options for Capistrano 3.x'
14
+ spec.description = 'Laravel deployment for Capistrano 3.x'
15
+ spec.homepage = 'https://github.com/capistrano/laravel'
16
+ spec.license = 'MIT'
16
17
 
17
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
19
  f.match(%r{^(test|spec|features)/})
19
20
  end
20
- spec.bindir = "exe"
21
+ spec.bindir = 'exe'
21
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ["lib"]
23
+ spec.require_paths = ['lib']
23
24
 
24
- spec.required_ruby_version = ">= 2.2.0"
25
+ spec.required_ruby_version = '>= 2.3.0'
25
26
 
26
- spec.add_dependency "capistrano", ">= 3.0.0"
27
- spec.add_dependency "capistrano-composer", ">= 0.0.6"
28
- spec.add_dependency "capistrano-file-permissions", ">= 1.0.0"
27
+ spec.add_dependency 'capistrano', '>= 3.0.0'
28
+ spec.add_dependency 'capistrano-composer', '>= 0.0.6'
29
+ spec.add_dependency 'capistrano-file-permissions', '>= 1.0.0'
29
30
 
30
- spec.add_development_dependency "bundler"
31
- spec.add_development_dependency "rake", ">= 10.0.0"
32
- spec.add_development_dependency "rspec"
33
- spec.add_development_dependency "rubocop"
31
+ spec.add_development_dependency 'bundler'
32
+ spec.add_development_dependency 'rake', '>= 10.0.0'
33
+ spec.add_development_dependency 'rspec'
34
+ spec.add_development_dependency 'rubocop'
34
35
  end
@@ -1,5 +1,7 @@
1
- require "capistrano/composer"
2
- require "capistrano/file-permissions"
3
- require "capistrano/laravel/version"
1
+ # frozen_string_literal: true
4
2
 
5
- load File.expand_path("../tasks/laravel.rake", __FILE__)
3
+ require 'capistrano/composer'
4
+ require 'capistrano/file-permissions'
5
+ require 'capistrano/laravel/version'
6
+
7
+ load File.expand_path('tasks/laravel.rake', __dir__)
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Capistrano
2
4
  module Laravel
3
- VERSION = "1.2.2".freeze
5
+ VERSION = '1.2.3'
4
6
  end
5
7
  end
@@ -1,5 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # rubocop:disable Style/MixinUsage
1
4
  include Comparable
5
+ # rubocop:enable Style/MixinUsage
2
6
 
7
+ # rubocop:disable Metrics/BlockLength
3
8
  namespace :load do
4
9
  task :defaults do
5
10
  # Which roles to consider as laravel roles
@@ -11,7 +16,7 @@ namespace :load do
11
16
  # Which roles to use for running migrations
12
17
  set :laravel_migration_roles, :all
13
18
 
14
- # The artisan flags to include on artisan commands by default when running migrations
19
+ # The artisan flags to include on commands when running migrations
15
20
  set :laravel_migration_artisan_flags, "--force --env=#{fetch(:stage)}"
16
21
 
17
22
  # The version of laravel being deployed
@@ -21,10 +26,10 @@ namespace :load do
21
26
  set :laravel_upload_dotenv_file_on_deploy, true
22
27
 
23
28
  # Which dotenv file to transfer to the server
24
- set :laravel_dotenv_file, ".env"
29
+ set :laravel_dotenv_file, '.env'
25
30
 
26
31
  # The user that the server is running under (used for ACLs)
27
- set :laravel_server_user, "www-data"
32
+ set :laravel_server_user, 'www-data'
28
33
 
29
34
  # Ensure the dirs in :linked_dirs exist?
30
35
  set :laravel_ensure_linked_dirs_exist, true
@@ -34,21 +39,21 @@ namespace :load do
34
39
 
35
40
  # Linked directories for a standard Laravel 4 application
36
41
  set :laravel_4_linked_dirs, [
37
- "app/storage/public",
38
- "app/storage/cache",
39
- "app/storage/logs",
40
- "app/storage/meta",
41
- "app/storage/sessions",
42
- "app/storage/views"
42
+ 'app/storage/public',
43
+ 'app/storage/cache',
44
+ 'app/storage/logs',
45
+ 'app/storage/meta',
46
+ 'app/storage/sessions',
47
+ 'app/storage/views'
43
48
  ]
44
49
 
45
50
  # Linked directories for a standard Laravel 5 application
46
51
  set :laravel_5_linked_dirs, [
47
- "storage/app",
48
- "storage/framework/cache",
49
- "storage/framework/sessions",
50
- "storage/framework/views",
51
- "storage/logs"
52
+ 'storage/app',
53
+ 'storage/framework/cache',
54
+ 'storage/framework/sessions',
55
+ 'storage/framework/views',
56
+ 'storage/logs'
52
57
  ]
53
58
 
54
59
  # Ensure the paths in :file_permissions_paths exist?
@@ -59,32 +64,34 @@ namespace :load do
59
64
 
60
65
  # Paths that should have ACLs set for a standard Laravel 4 application
61
66
  set :laravel_4_acl_paths, [
62
- "app/storage",
63
- "app/storage/public",
64
- "app/storage/cache",
65
- "app/storage/logs",
66
- "app/storage/meta",
67
- "app/storage/sessions",
68
- "app/storage/views"
67
+ 'app/storage',
68
+ 'app/storage/public',
69
+ 'app/storage/cache',
70
+ 'app/storage/logs',
71
+ 'app/storage/meta',
72
+ 'app/storage/sessions',
73
+ 'app/storage/views'
69
74
  ]
70
75
 
71
76
  # Paths that should have ACLs set for a standard Laravel 5 application
72
77
  set :laravel_5_acl_paths, [
73
- "bootstrap/cache",
74
- "storage",
75
- "storage/app",
76
- "storage/app/public",
77
- "storage/framework",
78
- "storage/framework/cache",
79
- "storage/framework/sessions",
80
- "storage/framework/views",
81
- "storage/logs"
78
+ 'bootstrap/cache',
79
+ 'storage',
80
+ 'storage/app',
81
+ 'storage/app/public',
82
+ 'storage/framework',
83
+ 'storage/framework/cache',
84
+ 'storage/framework/sessions',
85
+ 'storage/framework/views',
86
+ 'storage/logs'
82
87
  ]
83
88
  end
84
89
  end
90
+ # rubocop:enable Metrics/BlockLength
85
91
 
92
+ # rubocop:disable Metrics/BlockLength
86
93
  namespace :laravel do
87
- desc "Determine which folders, if any, to use for linked directories."
94
+ desc 'Determine which folders, if any, to use for linked directories.'
88
95
  task :resolve_linked_dirs do
89
96
  laravel_version = fetch(:laravel_version)
90
97
 
@@ -99,9 +106,10 @@ namespace :laravel do
99
106
  end
100
107
  end
101
108
 
102
- desc "Determine which paths, if any, to have ACL permissions set."
109
+ desc 'Determine which paths, if any, to have ACL permissions set.'
103
110
  task :resolve_acl_paths do
104
111
  next unless fetch(:laravel_set_acl_paths)
112
+
105
113
  laravel_version = fetch(:laravel_version)
106
114
 
107
115
  # Use Laravel 5 ACL paths by default
@@ -110,37 +118,42 @@ namespace :laravel do
110
118
  # Laravel 4
111
119
  laravel_acl_paths = fetch(:laravel_4_acl_paths) if laravel_version < 5
112
120
 
113
- set :file_permissions_paths, fetch(:file_permissions_paths, []).push(*laravel_acl_paths).uniq
114
- set :file_permissions_users, fetch(:file_permissions_users, []).push(fetch(:laravel_server_user)).uniq
121
+ set :file_permissions_paths, fetch(:file_permissions_paths, [])
122
+ .push(*laravel_acl_paths)
123
+ .uniq
124
+ set :file_permissions_users, fetch(:file_permissions_users, [])
125
+ .push(fetch(:laravel_server_user))
126
+ .uniq
115
127
  end
116
128
 
117
- desc "Ensure that linked dirs exist."
129
+ desc 'Ensure that linked dirs exist.'
118
130
  task :ensure_linked_dirs_exist do
119
131
  next unless fetch(:laravel_ensure_linked_dirs_exist)
120
132
 
121
133
  on roles fetch(:laravel_roles) do
122
134
  fetch(:linked_dirs).each do |path|
123
135
  within shared_path do
124
- execute :mkdir, "-p", path
136
+ execute :mkdir, '-p', path
125
137
  end
126
138
  end
127
139
  end
128
140
  end
129
141
 
130
- desc "Ensure that ACL paths exist."
142
+ desc 'Ensure that ACL paths exist.'
131
143
  task :ensure_acl_paths_exist do
132
- next unless fetch(:laravel_set_acl_paths) && fetch(:laravel_ensure_acl_paths_exist)
144
+ next unless fetch(:laravel_set_acl_paths) &&
145
+ fetch(:laravel_ensure_acl_paths_exist)
133
146
 
134
147
  on roles fetch(:laravel_roles) do
135
148
  fetch(:file_permissions_paths).each do |path|
136
149
  within release_path do
137
- execute :mkdir, "-p", path
150
+ execute :mkdir, '-p', path
138
151
  end
139
152
  end
140
153
  end
141
154
  end
142
155
 
143
- desc "Upload dotenv file for release."
156
+ desc 'Upload dotenv file for release.'
144
157
  task :upload_dotenv_file do
145
158
  next unless fetch(:laravel_upload_dotenv_file_on_deploy)
146
159
 
@@ -151,7 +164,8 @@ namespace :laravel do
151
164
 
152
165
  run_locally do
153
166
  if dotenv_file.empty? || test("[ ! -e #{dotenv_file} ]")
154
- raise Capistrano::ValidationError, "Must prepare dotenv file [#{dotenv_file}] locally before deploy!"
167
+ raise Capistrano::ValidationError,
168
+ "Must prepare dotenv file [#{dotenv_file}] locally before deploy!"
155
169
  end
156
170
  end
157
171
 
@@ -160,46 +174,54 @@ namespace :laravel do
160
174
  end
161
175
  end
162
176
 
163
- desc "Execute a provided artisan command."
177
+ desc 'Execute a provided artisan command.'
164
178
  task :artisan, [:command_name] do |_t, args|
165
- ask(:cmd, "list") # Ask only runs if argument is not provided
179
+ ask(:cmd, 'list') # Ask only runs if argument is not provided
166
180
  command = args[:command_name] || fetch(:cmd)
167
181
 
168
182
  on roles fetch(:laravel_roles) do
169
183
  within release_path do
170
- execute :php, :artisan, command, *args.extras, fetch(:laravel_artisan_flags)
184
+ execute :php,
185
+ :artisan,
186
+ command,
187
+ *args.extras,
188
+ fetch(:laravel_artisan_flags)
171
189
  end
172
190
  end
173
191
 
174
192
  # Enable task artisan to be ran more than once
175
- Rake::Task["laravel:artisan"].reenable
193
+ Rake::Task['laravel:artisan'].reenable
176
194
  end
177
195
 
178
- desc "Create a cache file for faster configuration loading."
196
+ desc 'Create a cache file for faster configuration loading.'
179
197
  task :config_cache do
180
198
  next if fetch(:laravel_version) < 5
181
- Rake::Task["laravel:artisan"].invoke("config:cache")
199
+
200
+ Rake::Task['laravel:artisan'].invoke('config:cache')
182
201
  end
183
202
 
184
- desc "Create a route cache file for faster route registration."
203
+ desc 'Create a route cache file for faster route registration.'
185
204
  task :route_cache do
186
205
  next if fetch(:laravel_version) < 5
187
- Rake::Task["laravel:artisan"].invoke("route:cache")
206
+
207
+ Rake::Task['laravel:artisan'].invoke('route:cache')
188
208
  end
189
209
 
190
- desc "Optimize the framework for better performance."
210
+ desc 'Optimize the framework for better performance.'
191
211
  task :optimize do
192
212
  next if fetch(:laravel_version) >= 5.5
193
- Rake::Task["laravel:artisan"].invoke(:optimize, "--force")
213
+
214
+ Rake::Task['laravel:artisan'].invoke(:optimize, '--force')
194
215
  end
195
216
 
196
- desc "Create a symbolic link from \"public/storage\" to \"storage/app/public.\""
217
+ desc 'Create a symbolic link from "public/storage" to "storage/app/public."'
197
218
  task :storage_link do
198
219
  next if fetch(:laravel_version) < 5.3
199
- Rake::Task["laravel:artisan"].invoke("storage:link")
220
+
221
+ Rake::Task['laravel:artisan'].invoke('storage:link')
200
222
  end
201
223
 
202
- desc "Run the database migrations."
224
+ desc 'Run the database migrations.'
203
225
  task :migrate do
204
226
  laravel_roles = fetch(:laravel_roles)
205
227
  laravel_artisan_flags = fetch(:laravel_artisan_flags)
@@ -207,13 +229,13 @@ namespace :laravel do
207
229
  set(:laravel_roles, fetch(:laravel_migration_roles))
208
230
  set(:laravel_artisan_flags, fetch(:laravel_migration_artisan_flags))
209
231
 
210
- Rake::Task["laravel:artisan"].invoke(:migrate)
232
+ Rake::Task['laravel:artisan'].invoke(:migrate)
211
233
 
212
234
  set(:laravel_roles, laravel_roles)
213
235
  set(:laravel_artisan_flags, laravel_artisan_flags)
214
236
  end
215
237
 
216
- desc "Rollback the last database migration."
238
+ desc 'Rollback the last database migration.'
217
239
  task :migrate_rollback do
218
240
  laravel_roles = fetch(:laravel_roles)
219
241
  laravel_artisan_flags = fetch(:laravel_artisan_flags)
@@ -221,18 +243,19 @@ namespace :laravel do
221
243
  set(:laravel_roles, fetch(:laravel_migration_roles))
222
244
  set(:laravel_artisan_flags, fetch(:laravel_migration_artisan_flags))
223
245
 
224
- Rake::Task["laravel:artisan"].invoke("migrate:rollback")
246
+ Rake::Task['laravel:artisan'].invoke('migrate:rollback')
225
247
 
226
248
  set(:laravel_roles, laravel_roles)
227
249
  set(:laravel_artisan_flags, laravel_artisan_flags)
228
250
  end
229
251
 
230
- before "deploy:starting", "laravel:resolve_linked_dirs"
231
- before "deploy:starting", "laravel:resolve_acl_paths"
232
- after "deploy:starting", "laravel:ensure_linked_dirs_exist"
233
- after "deploy:updating", "laravel:ensure_acl_paths_exist"
234
- before "deploy:updated", "deploy:set_permissions:acl"
235
- before "composer:run", "laravel:upload_dotenv_file"
236
- after "composer:run", "laravel:storage_link"
237
- after "composer:run", "laravel:optimize"
252
+ before 'deploy:starting', 'laravel:resolve_linked_dirs'
253
+ before 'deploy:starting', 'laravel:resolve_acl_paths'
254
+ after 'deploy:starting', 'laravel:ensure_linked_dirs_exist'
255
+ after 'deploy:updating', 'laravel:ensure_acl_paths_exist'
256
+ before 'deploy:updated', 'deploy:set_permissions:acl'
257
+ before 'deploy:updated', 'laravel:upload_dotenv_file'
258
+ after 'composer:run', 'laravel:storage_link'
259
+ after 'composer:run', 'laravel:optimize'
238
260
  end
261
+ # rubocop:enable Metrics/BlockLength
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-laravel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mitchell
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-03-07 00:00:00.000000000 Z
12
+ date: 2020-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -120,8 +120,8 @@ files:
120
120
  - ".editorconfig"
121
121
  - ".gitignore"
122
122
  - ".rspec"
123
- - ".rubocop.yml"
124
123
  - ".travis.yml"
124
+ - CHANGELOG.md
125
125
  - Gemfile
126
126
  - LICENSE
127
127
  - README.md
@@ -145,15 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
- version: 2.2.0
148
+ version: 2.3.0
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.7.3
155
+ rubygems_version: 3.0.3
157
156
  signing_key:
158
157
  specification_version: 4
159
158
  summary: Laravel specific deployment options for Capistrano 3.x
@@ -1,53 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- DisplayStyleGuide: true
4
- TargetRubyVersion: 2.0
5
-
6
- Metrics/BlockLength:
7
- Exclude:
8
- - "spec/**/*"
9
- - "lib/**/*.rake"
10
- Style/BarePercentLiterals:
11
- EnforcedStyle: percent_q
12
- Style/ClassAndModuleChildren:
13
- Enabled: false
14
- Style/DoubleNegation:
15
- Enabled: false
16
- Style/SpaceAroundEqualsInParameterDefault:
17
- EnforcedStyle: no_space
18
- Style/StringLiterals:
19
- EnforcedStyle: double_quotes
20
- Style/TrivialAccessors:
21
- AllowPredicates: true
22
- Style/PercentLiteralDelimiters:
23
- Enabled: false
24
- Style/SingleLineBlockParams:
25
- Enabled: false
26
- Style/ModuleFunction:
27
- Enabled: false
28
-
29
- # Enable someday
30
- Style/Documentation:
31
- Enabled: false
32
-
33
- # Needs refactors
34
- Metrics/PerceivedComplexity:
35
- Enabled: false
36
- Metrics/CyclomaticComplexity:
37
- Enabled: false
38
- Metrics/MethodLength:
39
- Enabled: false
40
- Style/PredicateName:
41
- Enabled: false
42
- Metrics/LineLength:
43
- Enabled: false
44
- Metrics/AbcSize:
45
- Enabled: false
46
- Style/PerlBackrefs:
47
- Enabled: false
48
- Metrics/ClassLength:
49
- Enabled: false
50
- Metrics/ModuleLength:
51
- Enabled: false
52
- Style/AccessorMethodName:
53
- Enabled: false