capistrano-checks 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 +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +39 -0
- data/README.md +39 -0
- data/Rakefile +10 -0
- data/capistrano-checks.gemspec +29 -0
- data/lib/capistrano-checks.rb +5 -0
- data/lib/capistrano/checks.rb +1 -0
- data/lib/capistrano/checks/railtie.rb +5 -0
- data/lib/capistrano/checks/version.rb +3 -0
- data/lib/capistrano/tasks/checks.rake +16 -0
- data/lib/capistrano/tasks/rails.rake +13 -0
- metadata +111 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 26fda0e703bb88a9743cf6e0d07c9e192abdb8bb0449257d30465300013b6c50
|
4
|
+
data.tar.gz: a107d3cc03f0be7d2becc5ced9a628d081f17b86d178a92758a86ec078a8b2f1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 69738af617bc8f564ef11354a62bbeeded2559d90c5159dfa05c771a41be05e9644b5ffb6543b9ef337199d32d9f832c72589415ea7a801b921e597e40347cd1
|
7
|
+
data.tar.gz: 23eecbdaf8a8d3d3518d402c413be7dac02dd5aef1d6a29cf1739c8908e7ae5f1a3f26e911fbd296c5cf35553844b622e9a5a4ca7e3cbe1345b1e06fe036b83d
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano-checks (0.0.1)
|
5
|
+
capistrano (>= 3.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
airbrussh (1.3.0)
|
11
|
+
sshkit (>= 1.6.1, != 1.7.0)
|
12
|
+
capistrano (3.11.0)
|
13
|
+
airbrussh (>= 1.0.0)
|
14
|
+
i18n
|
15
|
+
rake (>= 10.0.0)
|
16
|
+
sshkit (>= 1.9.0)
|
17
|
+
concurrent-ruby (1.0.5)
|
18
|
+
i18n (1.0.1)
|
19
|
+
concurrent-ruby (~> 1.0)
|
20
|
+
minitest (5.11.3)
|
21
|
+
net-scp (1.2.1)
|
22
|
+
net-ssh (>= 2.6.5)
|
23
|
+
net-ssh (5.0.2)
|
24
|
+
rake (10.5.0)
|
25
|
+
sshkit (1.17.0)
|
26
|
+
net-scp (>= 1.1.2)
|
27
|
+
net-ssh (>= 2.8.0)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
ruby
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
bundler (~> 1.16)
|
34
|
+
capistrano-checks!
|
35
|
+
minitest (~> 5.0)
|
36
|
+
rake (~> 10.0)
|
37
|
+
|
38
|
+
BUNDLED WITH
|
39
|
+
1.16.2
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Capistrano Checks
|
2
|
+
|
3
|
+
This gem provides checks to ensure your Rails application will boot properly after deployment.
|
4
|
+
|
5
|
+
If you've ever run into the problem that your application is fine in development and CI, but fails when it hits a server, this Gem protects you by aborting the deployment if the Rails server cannot load.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
This gem must appear in both **development and production** groups so add one of these to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'capistrano-checks'
|
13
|
+
```
|
14
|
+
|
15
|
+
or
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
group :development, :production do
|
19
|
+
gem 'capistrano-checks'
|
20
|
+
end
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
$ bundle
|
27
|
+
```
|
28
|
+
|
29
|
+
You then need to add this to your `Capfile` preferably directly under `require "capistrano/bundler"`
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require "capistrano/checks"
|
33
|
+
```
|
34
|
+
|
35
|
+
Note that checks run directly after the `bundler:install` stage.
|
36
|
+
|
37
|
+
## Contributing
|
38
|
+
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/thalamusai/capistrano-checks.
|
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "capistrano/checks/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "capistrano-checks"
|
8
|
+
spec.version = CapistranoChecks::VERSION
|
9
|
+
spec.authors = ["Jeremy Walker"]
|
10
|
+
spec.email = ["jez.walker@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A gem for checking things are working when deploying via capistrano}
|
13
|
+
spec.homepage = "https://github.com/thalamusai/capistrano-checks"
|
14
|
+
|
15
|
+
# Specify which files should be added to the gem when it is released.
|
16
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
17
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
18
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency "capistrano", ">= 3.1"
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
29
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/checks.rake", __FILE__)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
namespace :checks do
|
2
|
+
# Capistrano task to run the checks:boot script on each server
|
3
|
+
task :boot do
|
4
|
+
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
5
|
+
info '[checks:boot] Check the rails app can boot'
|
6
|
+
|
7
|
+
within release_path do
|
8
|
+
with rails_env: fetch(:rails_env) do
|
9
|
+
execute :rake, "capistrano_checks:boot"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
after 'bundler:install', "checks:boot"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
namespace :capistrano_checks do
|
2
|
+
# A simple rake tasks that checks Rails loads with
|
3
|
+
# eager loading turned up in the same way as happens
|
4
|
+
# when the webserver or rails console is started
|
5
|
+
#
|
6
|
+
# This is run on each server but the :boot task below
|
7
|
+
|
8
|
+
desc "Tests the Rails environment loads with eager loading"
|
9
|
+
task boot: :environment do
|
10
|
+
Rails.application.eager_load!
|
11
|
+
puts "Successfully loaded Rails in #{Rails.env} mode at #{Time.now}"
|
12
|
+
end
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-checks
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeremy Walker
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.16'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.16'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- jez.walker@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- capistrano-checks.gemspec
|
82
|
+
- lib/capistrano-checks.rb
|
83
|
+
- lib/capistrano/checks.rb
|
84
|
+
- lib/capistrano/checks/railtie.rb
|
85
|
+
- lib/capistrano/checks/version.rb
|
86
|
+
- lib/capistrano/tasks/checks.rake
|
87
|
+
- lib/capistrano/tasks/rails.rake
|
88
|
+
homepage: https://github.com/thalamusai/capistrano-checks
|
89
|
+
licenses: []
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.7.7
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: A gem for checking things are working when deploying via capistrano
|
111
|
+
test_files: []
|