capistrano-forkcms 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0adbc416fef6b18cf432dfa74924a7e36711eb52
4
- data.tar.gz: 724dba6b24dfa9d04dd29bf665559103966881b3
3
+ metadata.gz: c7d10d03ae8938d1dd1a20ebd66c571fccfa1243
4
+ data.tar.gz: abcce021846282cf0488c407b1dd091e9cca9e21
5
5
  SHA512:
6
- metadata.gz: 294dc28ba5f80776698813de6918fca12d6ac2d84e6bafe7576c486909a8667c14cc89856dc1386e42ea7a33b3344d518f4595ffe7af200437085c5fd5d49b21
7
- data.tar.gz: 43c71454a43298214d5b04effcd07ac4e30d0a9aa0617cc2c2374ee2306f69a1a501540c993471b68b2285a99608d50a59c268793dc5ee137b07da1111e2d130
6
+ metadata.gz: e0e3f61c2e8ab875930efc25ceeecd25ce30a1a3bd1b6a13076ebca4eb4d159507b3941de72ef7278478030f150a4c50d690a8572834e08cdfee036d7fc43d20
7
+ data.tar.gz: 23ee1c1b6f7cd2bb43f3095d08f171d0afee184f58d089f6e195a392c6c45f684a76e13c13e2cf85f4bbec0adacdd8a522ea8c2664f7aae01258baf997367610
data/.gitignore CHANGED
@@ -7,4 +7,6 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- *.gem
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.3
5
- before_install: gem install bundler -v 1.13.7
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.14.6
data/Gemfile CHANGED
@@ -1,8 +1,13 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+ source "https://rubygems.org"
2
3
 
3
4
  # Specify your gem's dependencies in capistrano-forkcms.gemspec
4
- gemspec
5
-
6
5
  gem 'capistrano', '~> 3.1'
7
6
  gem 'capistrano-composer', '~> 0.0.6'
8
7
  gem 'capistrano-cachetool', '~> 1.0.0'
8
+
9
+ group :development do
10
+ gem 'rake', '~> 12.0'
11
+ gem 'rspec', '~> 3.0'
12
+ end
13
+
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Tijs Verkoyen
3
+ Copyright (c) Tijs Verkoyen
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/Rakefile CHANGED
@@ -1,6 +1,9 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler'
2
+ require 'bundler/gem_tasks'
3
+ require 'rspec/core/rake_task'
3
4
 
4
- RSpec::Core::RakeTask.new(:spec)
5
+ RSpec::Core::RakeTask.new(:test) do |spec|
6
+ spec.pattern = "spec/**/*_spec.rb"
7
+ end
5
8
 
6
- task :default => :spec
9
+ task :default => :test
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  end
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.13"
22
+ spec.add_development_dependency "bundler", "~> 1.14"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
25
 
@@ -1,13 +1,14 @@
1
- require "capistrano/composer"
2
- require "capistrano/cachetool"
1
+ require 'rake'
2
+ require 'capistrano/composer'
3
+ require 'capistrano/cachetool'
3
4
 
4
5
  namespace :load do
5
6
  task :defaults do
6
7
  set :php_bin_path, -> {
7
8
  php_bin_path = fetch(:php_bin_custom_path)
8
- php_bin_path ||= "php"
9
+ php_bin_path ||= 'php'
9
10
  }
10
11
 
11
- load "capistrano/forkcms/defaults.rb"
12
+ load 'capistrano/forkcms/defaults.rb'
12
13
  end
13
14
  end
@@ -1,27 +1,26 @@
1
1
  # Set some Capistrano defaults
2
2
  set :linked_files, []
3
- set :linked_files, -> { ["app/config/parameters.yml"] }
3
+ set :linked_files, %w(app/config/parameters.yml)
4
4
  set :linked_dirs, []
5
- set :linked_dirs, -> { ["app/logs", "app/sessions", "src/Frontend/Files"] }
6
-
5
+ set :linked_dirs, %w(app/logs app/sessions src/Frontend/Files)
7
6
 
8
7
  # Run required tasks after the stage
9
8
  Capistrano::DSL.stages.each do |stage|
10
- after stage, "forkcms:configure:composer"
11
- after stage, "forkcms:configure:cachetool"
9
+ after stage, 'forkcms:configure:composer'
10
+ after stage, 'forkcms:configure:cachetool'
12
11
  end
13
12
 
14
13
 
15
14
  # Make sure the composer executable is installed
16
15
  namespace :deploy do
17
- after :starting, "composer:install_executable"
18
- after :starting, "cachetool:install_executable"
19
- after :publishing, "forkcms:symlink:document_root"
20
- after :publishing, "forkcms:opcache:reset"
16
+ after :starting, 'composer:install_executable'
17
+ after :starting, 'cachetool:install_executable'
18
+ after :publishing, 'forkcms:symlink:document_root'
19
+ after :publishing, 'forkcms:opcache:reset'
21
20
  end
22
21
 
23
22
 
24
23
  # Load the tasks
25
- load File.expand_path("../../tasks/configure.rake", __FILE__)
26
- load File.expand_path("../../tasks/opcache.rake", __FILE__)
27
- load File.expand_path("../../tasks/symlink.rake", __FILE__)
24
+ load File.expand_path('../../tasks/configure.rake', __FILE__)
25
+ load File.expand_path('../../tasks/opcache.rake', __FILE__)
26
+ load File.expand_path('../../tasks/symlink.rake', __FILE__)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Forkcms
3
- VERSION = "2.0.0"
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
@@ -32,12 +32,12 @@ namespace :forkcms do
32
32
  if test("[ -L #{fetch :document_root} ]") && capture("readlink -- #{fetch :document_root}") == "#{current_path}/"
33
33
  # all is well, the symlink is correct
34
34
  elsif test("[ -d #{fetch :document_root} ]") || test("[ -f #{fetch :document_root} ]")
35
- error "Document root #{fetch :document_root} already exists."
36
- error "To link it, issue the following command:"
35
+ error 'Document root #{fetch :document_root} already exists.'
36
+ error 'To link it, issue the following command:'
37
37
  error "ln -sf #{current_path}/ #{fetch :document_root}"
38
38
  else
39
- execute :mkdir, "-p", File.dirname(fetch(:document_root))
40
- execute :ln, "-sf", "#{current_path}/", fetch(:document_root)
39
+ execute :mkdir, '-p', File.dirname(fetch(:document_root))
40
+ execute :ln, '-sf', "#{current_path}/", fetch(:document_root)
41
41
  end
42
42
  end
43
43
  end
@@ -4,37 +4,39 @@ namespace :forkcms do
4
4
  Reset the opcache
5
5
  DESC
6
6
  task :reset do
7
- if fetch(:opcache_reset_strategy) === "file"
8
- invoke "forkcms:opcache:reset_with_file"
9
- elsif fetch(:opcache_reset_strategy) === "fcgi"
10
- invoke "forkcms:opcache:reset_with_fcgi"
7
+ if fetch(:opcache_reset_strategy) === 'file'
8
+ invoke 'forkcms:opcache:reset_with_file'
9
+ elsif fetch(:opcache_reset_strategy) === 'fcgi'
10
+ invoke 'forkcms:opcache:reset_with_fcgi'
11
+ elseif fetch(:opcache_reset_strategy) === 'none'
12
+ # do nothing
11
13
  else
12
- raise "Invalid value for :opcache_reset_strategy, possible values are: file, fcgi."
14
+ raise 'Invalid value for :opcache_reset_strategy, possible values are: file, fcgi, none.'
13
15
  end
14
16
  end
15
17
 
16
18
  task :reset_with_file do
17
19
  # make sure that we have all needed variables
18
- raise "opcache_reset_base_url not set" unless fetch(:opcache_reset_base_url)
20
+ raise 'opcache_reset_base_url not set' unless fetch(:opcache_reset_base_url)
19
21
 
20
22
  on roles(:web) do
21
23
  stream = StringIO.new("<?php clearstatcache(true); if (function_exists('opcache_reset')) { opcache_reset(); }")
22
24
  upload! stream, "#{current_path}/php-opcache-reset.php"
23
- execute :curl, "-L --fail --silent --show-error", "#{fetch :opcache_reset_base_url}/php-opcache-reset.php"
25
+ execute :curl, '-L --fail --silent --show-error', "#{fetch :opcache_reset_base_url}/php-opcache-reset.php"
24
26
  execute :rm, "#{current_path}/php-opcache-reset.php"
25
27
  end
26
28
  end
27
29
 
28
30
  task :reset_with_fcgi do
29
31
  # make sure that we have all needed variables
30
- raise "opcache_reset_fcgi_connection_string not set" unless fetch(:opcache_reset_fcgi_connection_string)
32
+ raise 'opcache_reset_fcgi_connection_string not set' unless fetch(:opcache_reset_fcgi_connection_string)
31
33
 
32
- invoke "cachetool:run", "opcache:reset", "--fcgi=#{fetch :opcache_reset_fcgi_connection_string}"
34
+ invoke 'cachetool:run', 'opcache:reset', "--fcgi=#{fetch :opcache_reset_fcgi_connection_string}"
33
35
 
34
36
  # reenable our command, see https://github.com/capistrano/capistrano/issues/1686 for more information
35
- Rake::Task["cachetool:run"].reenable
37
+ Rake::Task['cachetool:run'].reenable
36
38
 
37
- invoke "cachetool:run", "stat:clear", "--fcgi=#{fetch :opcache_reset_fcgi_connection_string}"
39
+ invoke 'cachetool:run', 'stat:clear', "--fcgi=#{fetch :opcache_reset_fcgi_connection_string}"
38
40
  end
39
41
  end
40
42
  end
@@ -9,12 +9,12 @@ namespace :forkcms do
9
9
  if test("[ -L #{fetch :document_root} ]") && capture("readlink -- #{fetch :document_root}") == "#{current_path}/"
10
10
  # all is well, the symlink is correct
11
11
  elsif test("[ -d #{fetch :document_root} ]") || test("[ -f #{fetch :document_root} ]")
12
- error "Document root #{fetch :document_root} already exists."
13
- error "To link it, issue the following command:"
12
+ error 'Document root #{fetch :document_root} already exists.'
13
+ error 'To link it, issue the following command:'
14
14
  error "ln -sf #{current_path}/ #{fetch :document_root}"
15
15
  else
16
- execute :mkdir, "-p", File.dirname(fetch(:document_root))
17
- execute :ln, "-sf", "#{current_path}/", fetch(:document_root)
16
+ execute :mkdir, '-p', File.dirname(fetch(:document_root))
17
+ execute :ln, '-sf', "#{current_path}/", fetch(:document_root)
18
18
  end
19
19
  end
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-forkcms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tijs Verkoyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-17 00:00:00.000000000 Z
11
+ date: 2017-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '1.14'
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.13'
26
+ version: '1.14'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ files:
106
106
  - ".rspec"
107
107
  - ".travis.yml"
108
108
  - Gemfile
109
- - LICENSE.txt
109
+ - LICENSE.md
110
110
  - README.md
111
111
  - Rakefile
112
112
  - capistrano-forkcms.gemspec