capistrano-didi 0.4.18 → 0.5.1

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
  SHA1:
3
- metadata.gz: cf272c27f0657cdc8fb47718cca81b5238922641
4
- data.tar.gz: 28af6e1036af105046d8bcf2a8bef49b18a5caaf
3
+ metadata.gz: 9c85a330cab148fa1bd8682b4244daf71d01eb31
4
+ data.tar.gz: d58dbe11263dcd85f293f0d36016ac5e3bc1c852
5
5
  SHA512:
6
- metadata.gz: a58d43bc672e310f2178b76a300e4c6223348af157bf1110814e8a261196ebf765ce2e9ed25835a59e8cfcf7e0991019f81438aabbcab4aabc050931fa79aa3b
7
- data.tar.gz: 4a81a2d5eda63b2b5b8c1195329e611c179022ce4b2e182e60a6ae3aea16b7d004298e2ca7831eab0ba21d15c414e519f213b7561235a7e25b982a55cd4c9ff8
6
+ metadata.gz: eb7e23328a3633d000d2cc27fdccd23507d922fc56de3f65cb1ee1c1766797d08b3ed58eb82a1117c1f6c8cd39cf5c1cbd363361313ef71ca8eb755c38373704
7
+ data.tar.gz: 39ab474d9d36f8bd6b86f45efc5c25282f22f0fc31aa1ce6410e7620c198028c11c48c9ebb18cbcfe2cd3d078f4bd9b78ca583e733c807eb049194df9c105a0d
data/.document CHANGED
@@ -1,4 +1,4 @@
1
- lib/**/*.rb
1
+ lib/**/**/*.rake
2
2
  bin/*
3
3
  -
4
4
  features/**/*.feature
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ capistrano-didi
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.2.2
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.0 / 25 August 2016
2
+
3
+ * Add support for Drupal 8
4
+
1
5
  ## 0.4.16 / 30 January 2015
2
6
 
3
7
  * Fixed dependencies in Gemfile
data/Gemfile CHANGED
@@ -1,15 +1,7 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
2
  group :development do
9
- gem "railsless-deploy", "~> 1.0"
10
- gem "capistrano", "~> 2.12"
3
+ gem "capistrano", "~> 3.6.1"
11
4
  gem "shoulda", "~> 3.0"
12
5
  gem "bundler", "~> 1"
13
- gem "jeweler", "~> 1.6"
14
- #gem "rcov", ">= 0"
6
+ gem "jeweler", "~> 2"
15
7
  end
data/README.rdoc CHANGED
@@ -23,4 +23,4 @@ Didi is an collection of capistrano recipes that enables automated deployment an
23
23
 
24
24
  == Copyright
25
25
 
26
- Copyright (c) Koen Van Winckel. See LICENSE.txt for further details.
26
+ Copyright (c) Koen Van Winckel. See LICENSE.txt for further details.
data/Rakefile CHANGED
@@ -15,42 +15,24 @@ require 'jeweler'
15
15
  Jeweler::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "capistrano-didi"
18
- gem.homepage = "https://github.com/Crosscheck/didi"
18
+ gem.homepage = "https://bitbucket.org/ausybenelux/capistrano-didi"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{didi - drupal deployment script based on capistrano}
21
21
  gem.description = %Q{didi is a collection of recipes for capistrano that allow drupal to be deployed, tested and used in a CI environment}
22
- gem.email = "support@crosscheck.be"
23
- gem.authors = ["CrossCheck"]
24
- #gem.add_dependency "capistrano", "~> 2.12"
25
- #gem.add_dependency "railsless-deploy", "~> 1.0.2"
22
+ gem.email = "sysadmin@ausy.be"
23
+ gem.authors = ["Ausy Belgium"]
26
24
  gem.post_install_message = '=> "didify" and "didi" commands installed. Try them out!'
27
- # dependencies defined in Gemfile
28
25
  end
29
26
  Jeweler::RubygemsDotOrgTasks.new
30
27
 
31
- require 'rake/testtask'
32
- Rake::TestTask.new(:test) do |test|
33
- test.libs << 'lib' << 'test'
34
- test.pattern = 'test/**/test_*.rb'
35
- test.verbose = true
36
- end
37
-
38
- #require 'rcov/rcovtask'
39
- #Rcov::RcovTask.new do |test|
40
- # test.libs << 'test'
41
- # test.pattern = 'test/**/test_*.rb'
42
- # test.verbose = true
43
- # test.rcov_opts << '--exclude "gems/*"'
44
- #end
45
-
46
28
  task :default => :test
47
29
 
48
- require 'rake/rdoctask'
30
+ require 'rdoc/task'
49
31
  Rake::RDocTask.new do |rdoc|
50
32
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
33
 
52
34
  rdoc.rdoc_dir = 'rdoc'
53
35
  rdoc.title = "didi #{version}"
54
- rdoc.rdoc_files.include('README*')
36
+ # rdoc.rdoc_files.include('README*')
55
37
  rdoc.rdoc_files.include('lib/**/*.rb')
56
38
  end
data/Readme.md ADDED
@@ -0,0 +1,26 @@
1
+ # didi
2
+
3
+ Didi is an collection of capistrano recipes that enables automated deployment and continuous integration of drupal websites. Once you have configured different hosting environments you can use the "didi" command to interact with them.
4
+
5
+ ## What can didi do you for?
6
+
7
+ * update a hosting environment of your choice with the latest code
8
+ * perform drush commands for maintenance
9
+ * revert features via drush after code updates
10
+ * restore a remote database to your local development machine
11
+ * setup a drupal website from scratch on a new webserver
12
+ * run simpletests with Jenkins
13
+
14
+ ## Contributing to didi
15
+
16
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
17
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
18
+ * Fork the project
19
+ * Start a feature/bugfix branch
20
+ * Commit and push until you are happy with your contribution
21
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
22
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
23
+
24
+ ## Copyright
25
+
26
+ Copyright (c) Koen Van Winckel. See LICENSE.txt for further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.16
1
+ 0.5.1
@@ -2,66 +2,74 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: capistrano-didi 1.0.0 ruby lib
6
+
7
+ lib = File.expand_path('../lib', __FILE__)
8
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
9
 
6
10
  Gem::Specification.new do |s|
7
11
  s.name = "capistrano-didi"
8
- s.version = "0.4.18"
12
+ s.version = "0.5.1"
9
13
 
10
14
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
15
+ s.require_paths = ["lib"]
16
+ s.require_path = 'lib'
17
+
11
18
  s.authors = ["Ausy Belgium"]
12
- s.date = "2016-05-17"
19
+ s.date = "2016-08-25"
13
20
  s.description = "didi is a collection of recipes for capistrano that allow drupal to be deployed, tested and used in a CI environment"
14
- s.email = "support.team@one-agency.be"
15
- s.executables = ["didi", "didify"]
21
+ s.email = "sysadmin@ausy.be"
22
+
16
23
  s.extra_rdoc_files = [
24
+ "CHANGELOG.txt",
17
25
  "LICENSE.txt",
18
- "README.rdoc"
26
+ "README.rdoc",
27
+ "Readme.md"
19
28
  ]
20
29
  s.files = [
21
30
  ".document",
31
+ ".ruby-gemset",
32
+ ".ruby-version",
22
33
  "CHANGELOG.txt",
23
34
  "Gemfile",
24
- "Gemfile.lock",
25
35
  "LICENSE.txt",
26
36
  "README.rdoc",
27
37
  "Rakefile",
38
+ "Readme.md",
28
39
  "VERSION",
29
- "bin/didi",
30
- "bin/didify",
31
40
  "capistrano-didi.gemspec",
32
- "lib/didi/recipes/didi.rb",
41
+ "lib/capistrano-didi.rb",
42
+ "lib/capistrano/didi.rb",
43
+ "lib/capistrano/tasks/didi.rake",
33
44
  "test/helper.rb",
34
45
  "test/test_didi.rb"
35
46
  ]
36
- s.homepage = "https://github.com/Crosscheck/didi"
47
+
48
+ s.homepage = "https://bitbucket.org/ausybenelux/capistrano-didi"
37
49
  s.licenses = ["MIT"]
38
- s.post_install_message = "=> \"didify\" and \"didi\" commands installed. Try them out!"
39
- s.require_paths = ["lib"]
40
- s.rubygems_version = "2.0.14"
50
+ s.post_install_message = ""
51
+ s.rubygems_version = "2.4.8"
41
52
  s.summary = "didi - drupal deployment script based on capistrano"
42
53
 
43
54
  if s.respond_to? :specification_version then
44
55
  s.specification_version = 4
45
56
 
46
57
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_development_dependency(%q<railsless-deploy>, ["~> 1.0"])
48
- s.add_development_dependency(%q<capistrano>, ["~> 2.12"])
58
+ s.add_development_dependency(%q<capistrano>, ["~> 3.6"])
49
59
  s.add_development_dependency(%q<shoulda>, ["~> 3.0"])
50
60
  s.add_development_dependency(%q<bundler>, ["~> 1"])
51
- s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
61
+ s.add_development_dependency(%q<jeweler>, ["~> 2"])
52
62
  else
53
- s.add_dependency(%q<railsless-deploy>, ["~> 1.0"])
54
- s.add_dependency(%q<capistrano>, ["~> 2.12"])
63
+ s.add_dependency(%q<capistrano>, ["~> 3.6"])
55
64
  s.add_dependency(%q<shoulda>, ["~> 3.0"])
56
65
  s.add_dependency(%q<bundler>, ["~> 1"])
57
- s.add_dependency(%q<jeweler>, ["~> 1.6"])
66
+ s.add_dependency(%q<jeweler>, ["~> 2"])
58
67
  end
59
68
  else
60
- s.add_dependency(%q<railsless-deploy>, ["~> 1.0"])
61
- s.add_dependency(%q<capistrano>, ["~> 2.12"])
69
+ s.add_dependency(%q<capistrano>, ["~> 3.6"])
62
70
  s.add_dependency(%q<shoulda>, ["~> 3.0"])
63
71
  s.add_dependency(%q<bundler>, ["~> 1"])
64
- s.add_dependency(%q<jeweler>, ["~> 1.6"])
72
+ s.add_dependency(%q<jeweler>, ["~> 2"])
65
73
  end
66
74
  end
67
75
 
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/didi.rake', __FILE__)
@@ -0,0 +1,210 @@
1
+ # Load default values the capistrano 3.x way.
2
+ # See https://github.com/capistrano/capistrano/pull/605
3
+ namespace :load do
4
+ task :defaults do
5
+ set :composer_download_url, "https://getcomposer.org/installer"
6
+
7
+ set :install_composer, true
8
+ set :install_drush, true
9
+
10
+ set :drupal_path, 'docroot'
11
+
12
+ set :db_backup_path, "db_backups"
13
+
14
+ set :linked_files, fetch(:linked_files, []).push(
15
+ "#{fetch(:drupal_path)}/sites/default/files/settings.php"
16
+ )
17
+ set :linked_dirs, fetch(:linked_dirs, []).push(
18
+ "#{fetch(:drupal_path)}/sites/default/files"
19
+ )
20
+
21
+ if fetch(:install_drush)
22
+ set :drush, "#{shared_path}/vendor/bin/drush"
23
+ end
24
+ end
25
+ end
26
+
27
+ namespace :deploy do
28
+ desc 'Deploy your project and do an updatedb, feature revert, cache clear...'
29
+ task :drupal do
30
+ if fetch(:install_composer)
31
+ invoke "composer:install_executable"
32
+ end
33
+
34
+ if fetch(:install_drush)
35
+ invoke "drush:install"
36
+ end
37
+
38
+ invoke "drupal:update:updatedb"
39
+
40
+ invoke "drupal:config:import"
41
+
42
+ #invoke "drupal:features:import"
43
+
44
+ invoke "drupal:cache:clear"
45
+ end
46
+
47
+ namespace :check do
48
+ task :backup_directories do
49
+ on release_roles :all do
50
+ within deploy_path do
51
+ execute :mkdir, "-p", fetch(:db_backup_path)
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ # Specific Drupal tasks
59
+ namespace :drupal do
60
+
61
+ desc 'Run any drush command'
62
+ task :drush do
63
+ ask(:drush_command, "Drush command you want to run (eg. 'cache-rebuild'). Type 'help' to have a list of available command.")
64
+ on roles(:app) do
65
+ within release_path.join(fetch(:drupal_path)) do
66
+ execute :drush, fetch(:drush_command)
67
+ end
68
+ end
69
+ end
70
+
71
+ desc 'Show logs'
72
+ task :logs do
73
+ on roles(:app) do
74
+ within release_path.join(fetch(:drupal_path)) do
75
+ execute :drush, 'watchdog-show --tail'
76
+ end
77
+ end
78
+ end
79
+
80
+ desc 'Provides information about things that may be wrong in your Drupal installation, if any.'
81
+ task :requirements do
82
+ on roles(:app) do
83
+ within release_path.join(fetch(:drupal_path)) do
84
+ execute :drush, 'core-requirements'
85
+ end
86
+ end
87
+ end
88
+
89
+ desc 'Open an interactive shell on a Drupal site.'
90
+ task :cli do
91
+ on roles(:app) do
92
+ within release_path.join(fetch(:drupal_path)) do
93
+ execute :drush, 'core-cli'
94
+ end
95
+ end
96
+ end
97
+
98
+ namespace :features do
99
+ desc 'Revert feature'
100
+ task :import do
101
+ on roles(:app) do
102
+ within release_path.join(fetch(:drupal_path)) do
103
+ execute :drush, 'features-import-all -y'
104
+ end
105
+ end
106
+ end
107
+ end
108
+
109
+ namespace :config do
110
+ desc 'List any pending database updates.'
111
+ task :import do
112
+ on roles(:app) do
113
+ within release_path.join(fetch(:drupal_path)) do
114
+ execute :drush, 'config-import'
115
+ end
116
+ end
117
+ end
118
+ end
119
+
120
+ namespace :update do
121
+ desc 'List any pending database updates.'
122
+ task :updatedb_status do
123
+ on roles(:app) do
124
+ within release_path.join(fetch(:drupal_path)) do
125
+ execute :drush, 'updatedb-status'
126
+ end
127
+ end
128
+ end
129
+
130
+ desc 'Apply any database updates required (as with running update.php).'
131
+ task :updatedb do
132
+ on roles(:app) do
133
+ within release_path.join(fetch(:drupal_path)) do
134
+ execute :drush, 'updatedb'
135
+ end
136
+ end
137
+ end
138
+
139
+ desc 'Show a report of available minor updates to Drupal core and contrib projects.'
140
+ task :updatedb_status do
141
+ on roles(:app) do
142
+ within release_path.join(fetch(:drupal_path)) do
143
+ execute :drush, 'pm-refresh'
144
+ execute :drush, 'pm-updatestatus'
145
+ end
146
+ end
147
+ end
148
+ end
149
+
150
+ namespace :cache do
151
+ desc 'Clear all caches'
152
+ task :clear do
153
+ on roles(:app) do
154
+ within release_path.join(fetch(:drupal_path)) do
155
+ execute :drush, 'cache-rebuild'
156
+ end
157
+ end
158
+ end
159
+ end
160
+
161
+ namespace :site do
162
+ desc 'Execute site actions'
163
+
164
+ task :enable do
165
+ on roles(:app) do
166
+ within release_path.join(fetch(:drupal_path)) do
167
+ execute :drush, 'state-set system.maintenance_mode 0'
168
+ end
169
+ end
170
+ end
171
+
172
+ task :disable do
173
+ on roles(:app) do
174
+ within release_path.join(fetch(:drupal_path)) do
175
+ execute :drush, 'state-set system.maintenance_mode 1'
176
+ end
177
+ end
178
+ end
179
+
180
+ task :backup_db do
181
+ on roles(:app) do
182
+ within release_path.join(fetch(:drupal_path)) do
183
+ execute :drush, "sql-dump --result-file=#{db_backup_path}/backup_db.sql"
184
+ end
185
+ end
186
+ end
187
+
188
+ end
189
+ end
190
+
191
+ # Install drush
192
+ namespace :drush do
193
+ desc "Install Drush"
194
+ task :install do
195
+ on roles(:app) do
196
+ within shared_path do
197
+ execute :composer, 'require drush/drush:~8'
198
+ end
199
+ end
200
+ end
201
+ end
202
+
203
+ after "deploy:check:directories", "deploy:check:backup_directories"
204
+ after "deploy:finished", "deploy:drupal"
205
+
206
+ #before "deploy:starting", "drupal:site:backup_db"
207
+ #after "drupal:site:enable", "drupal:cache:clear"
208
+ #after "drupal:site:disable", "drupal:cache:clear"
209
+
210
+
File without changes
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-didi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ausy Belgium
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-17 00:00:00.000000000 Z
11
+ date: 2016-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: railsless-deploy
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: capistrano
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '2.12'
19
+ version: '3.6'
34
20
  type: :development
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '2.12'
26
+ version: '3.6'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: shoulda
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,44 +58,46 @@ dependencies:
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '1.6'
61
+ version: '2'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '1.6'
68
+ version: '2'
83
69
  description: didi is a collection of recipes for capistrano that allow drupal to be
84
70
  deployed, tested and used in a CI environment
85
- email: support.team@one-agency.be
86
- executables:
87
- - didi
88
- - didify
71
+ email: sysadmin@ausy.be
72
+ executables: []
89
73
  extensions: []
90
74
  extra_rdoc_files:
75
+ - CHANGELOG.txt
91
76
  - LICENSE.txt
92
77
  - README.rdoc
78
+ - Readme.md
93
79
  files:
94
80
  - ".document"
81
+ - ".ruby-gemset"
82
+ - ".ruby-version"
95
83
  - CHANGELOG.txt
96
84
  - Gemfile
97
- - Gemfile.lock
98
85
  - LICENSE.txt
99
86
  - README.rdoc
100
87
  - Rakefile
88
+ - Readme.md
101
89
  - VERSION
102
- - bin/didi
103
- - bin/didify
104
90
  - capistrano-didi.gemspec
105
- - lib/didi/recipes/didi.rb
91
+ - lib/capistrano-didi.rb
92
+ - lib/capistrano/didi.rb
93
+ - lib/capistrano/tasks/didi.rake
106
94
  - test/helper.rb
107
95
  - test/test_didi.rb
108
- homepage: https://github.com/Crosscheck/didi
96
+ homepage: https://bitbucket.org/ausybenelux/capistrano-didi
109
97
  licenses:
110
98
  - MIT
111
99
  metadata: {}
112
- post_install_message: => "didify" and "didi" commands installed. Try them out!
100
+ post_install_message: ''
113
101
  rdoc_options: []
114
102
  require_paths:
115
103
  - lib
data/Gemfile.lock DELETED
@@ -1,39 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- capistrano (2.12.0)
5
- highline
6
- net-scp (>= 1.0.0)
7
- net-sftp (>= 2.0.0)
8
- net-ssh (>= 2.0.14)
9
- net-ssh-gateway (>= 1.1.0)
10
- git (1.2.5)
11
- highline (1.6.12)
12
- jeweler (1.6.4)
13
- bundler (~> 1.0)
14
- git (>= 1.2.5)
15
- rake
16
- net-scp (1.0.4)
17
- net-ssh (>= 1.99.1)
18
- net-sftp (2.0.5)
19
- net-ssh (>= 2.0.9)
20
- net-ssh (2.3.0)
21
- net-ssh-gateway (1.1.0)
22
- net-ssh (>= 1.99.1)
23
- railsless-deploy (1.0.2)
24
- rake (0.9.2.2)
25
- shoulda (3.0.1)
26
- shoulda-context (~> 1.0.0)
27
- shoulda-matchers (~> 1.0.0)
28
- shoulda-context (1.0.0)
29
- shoulda-matchers (1.0.0)
30
-
31
- PLATFORMS
32
- ruby
33
-
34
- DEPENDENCIES
35
- bundler (>= 1)
36
- capistrano (>= 2.12)
37
- jeweler (>= 1.6)
38
- railsless-deploy (>= 1.0)
39
- shoulda (>= 3.0)
data/bin/didi DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'capistrano/cli'
4
- Capistrano::CLI.execute