capistrano-forkcms 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3318d335c4f055d87e7fd6a0211ce0b0c995442d
4
+ data.tar.gz: 827d06b0ffbd892cc57559a9c06c8ca7135133f2
5
+ SHA512:
6
+ metadata.gz: 9e5eed958554b121bedc91beb491ea3ad4ed0fa1abacb25da318110fa9f81e1d8f5f72cb47a671dbe610e2e592d345bc6cfa6d577626f882b9995c931676e407
7
+ data.tar.gz: f19d32a20f0dc3da17bc1f25a270e5cec654981ebc578acb0545c9ffc2ad75b24e5be7862f8260c57db07436ea2ae01909b290b567ac649d73c1201ffd146641
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ before_install: gem install bundler -v 1.13.7
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-forkcms.gemspec
4
+ gemspec
5
+
6
+ gem 'capistrano', '~> 3.1'
7
+ gem 'capistrano-composer', '~> 0.0.6'
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Tijs Verkoyen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Capistrano::Forkcms
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano/forkcms`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'capistrano-forkcms'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install capistrano-forkcms
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ 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.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capistrano-forkcms.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/forkcms/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-forkcms"
8
+ spec.version = Capistrano::Forkcms::VERSION
9
+ spec.authors = ["Tijs Verkoyen"]
10
+ spec.email = ["capistrano-forcms@verkoyen.eu"]
11
+
12
+ spec.summary = %q{Fork CMS specific Capistrano tasks}
13
+ spec.description = %q{Capistrano ForkCMS - Easy deployment of ForkCMS 5+ apps with Ruby over SSH}
14
+ spec.homepage = "https://github.com/tijsverkoyen/capistrano-fork"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.13"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec", "~> 3.0"
25
+
26
+ spec.add_dependency "capistrano", "~> 3.1"
27
+ spec.add_dependency "capistrano-composer", "~> 0.0.6"
28
+ end
File without changes
@@ -0,0 +1,12 @@
1
+ require "capistrano/composer"
2
+
3
+ namespace :load do
4
+ task :defaults do
5
+ set :php_bin_path, -> {
6
+ php_bin_path = fetch(:php_bin_custom_path)
7
+ php_bin_path ||= "php"
8
+ }
9
+
10
+ load "capistrano/forkcms/defaults.rb"
11
+ end
12
+ end
@@ -0,0 +1,22 @@
1
+ # Set some Capistrano defaults
2
+ set :linked_files, []
3
+ set :linked_files, -> { ["app/config/parameters.yml"] }
4
+ set :linked_dirs, []
5
+ set :linked_dirs, -> { ["app/logs", "app/sessions", "src/Frontend/Files"] }
6
+
7
+
8
+ # Run required tasks after the stage
9
+ Capistrano::DSL.stages.each do |stage|
10
+ after stage, "forkcms:configure:composer"
11
+ end
12
+
13
+
14
+ # Make sure the composer executable is installed
15
+ namespace :deploy do
16
+ after :starting, "composer:install_executable"
17
+ after :publishing, "forkcms:symlink:document_root"
18
+ end
19
+
20
+
21
+ # Load the tasks
22
+ load File.expand_path("../../tasks/forkcms.rake", __FILE__)
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module Forkcms
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ namespace :forkcms do
2
+ namespace :configure do
3
+ desc <<-DESC
4
+ Configures composer
5
+ It make sure the command is mapped correctly and the correct flags are used.
6
+ DESC
7
+ task :composer do
8
+ # Set the correct composer flags
9
+ set :composer_install_flags, '--no-dev --no-interaction --quiet --optimize-autoloader --no-scripts'
10
+
11
+ # Set the correct bin
12
+ SSHKit.config.command_map[:composer] = "#{fetch :php_bin_path} #{fetch :deploy_to}/shared/composer.phar"
13
+ end
14
+ end
15
+
16
+ namespace :symlink do
17
+ desc <<-DESC
18
+ Links the document root to the current folder
19
+ The document root is the folder that the webserver will serve, it should link to the current path.
20
+ DESC
21
+ task :document_root do
22
+ on roles(:web) do
23
+ if test("[ -L #{fetch :document_root} ]") && capture("readlink -- #{fetch :document_root}") == "#{current_path}/"
24
+ # all is well, the symlink is correct
25
+ elsif test("[ -d #{fetch :document_root} ]") || test("[ -f #{fetch :document_root} ]")
26
+ error "Document root #{fetch :document_root} already exists."
27
+ error "To link it, issue the following command:"
28
+ error "ln -sf #{current_path}/ #{fetch :document_root}"
29
+ else
30
+ execute :mkdir, "-p", File.dirname(fetch(:document_root))
31
+ execute :ln, "-sf", "#{current_path}/", fetch(:document_root)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-forkcms
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tijs Verkoyen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: capistrano
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: capistrano-composer
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.0.6
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.0.6
83
+ description: Capistrano ForkCMS - Easy deployment of ForkCMS 5+ apps with Ruby over
84
+ SSH
85
+ email:
86
+ - capistrano-forcms@verkoyen.eu
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".travis.yml"
94
+ - Gemfile
95
+ - LICENSE.txt
96
+ - README.md
97
+ - Rakefile
98
+ - capistrano-forkcms.gemspec
99
+ - lib/capistrano-forkcms.rb
100
+ - lib/capistrano/forkcms.rb
101
+ - lib/capistrano/forkcms/defaults.rb
102
+ - lib/capistrano/forkcms/version.rb
103
+ - lib/capistrano/tasks/forkcms.rake
104
+ homepage: https://github.com/tijsverkoyen/capistrano-fork
105
+ licenses:
106
+ - MIT
107
+ metadata: {}
108
+ post_install_message:
109
+ rdoc_options: []
110
+ require_paths:
111
+ - lib
112
+ required_ruby_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 2.6.11
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: Fork CMS specific Capistrano tasks
128
+ test_files: []