capistrano-zeitwerk_check 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +134 -0
- data/.travis.yml +6 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +62 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/rubocop +27 -0
- data/bin/setup +8 -0
- data/capistrano-zeitwerk_check.gemspec +28 -0
- data/lib/capistrano/tasks/zeitwerk_check.rake +11 -0
- data/lib/capistrano/zeitwerk_check/tasks.rb +1 -0
- data/lib/capistrano/zeitwerk_check/version.rb +5 -0
- data/lib/capistrano/zeitwerk_check.rb +2 -0
- data/lib/capistrano-zeitwerk_check.rb +3 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8e95b38a5eb22cb7b0953a981b63fea144f92b7558fdd53e42fe52a555745360
|
4
|
+
data.tar.gz: 8043a459c0adcbd52c649b565b1c5212de36683d14430ca6d012fdb9b152bba8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f5edf0dd82bb52389adc41c4c1eb4775f4073262a1e0b553f529ecdf1b172ccbf7cab5e1a247155fd7325ffcfe29b0a2f5fedaa3eb6af3961d716b886416b84
|
7
|
+
data.tar.gz: 4aca2e4fa048b911e5a1365f6a8c9861e366d6e5eb68ba24ce533132f46b675fd10c070af6b3292ce2d2e8fc02ec1414ab74cdead3550871c7a3b45a1223c2d7
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- bin/*
|
4
|
+
- node_modules/**/*
|
5
|
+
NewCops: enable
|
6
|
+
TargetRubyVersion: 2.7.0
|
7
|
+
|
8
|
+
Layout/CaseIndentation:
|
9
|
+
EnforcedStyle: end
|
10
|
+
|
11
|
+
Layout/EndAlignment:
|
12
|
+
EnforcedStyleAlignWith: variable
|
13
|
+
|
14
|
+
Layout/LineLength:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Layout/EmptyLinesAroundAccessModifier:
|
18
|
+
EnforcedStyle: only_before
|
19
|
+
|
20
|
+
Layout/SpaceInLambdaLiteral:
|
21
|
+
EnforcedStyle: require_space
|
22
|
+
|
23
|
+
Layout/SpaceInsideBlockBraces:
|
24
|
+
SpaceBeforeBlockParameters: false
|
25
|
+
|
26
|
+
Layout/SpaceInsideHashLiteralBraces:
|
27
|
+
EnforcedStyle: no_space
|
28
|
+
|
29
|
+
Metrics/AbcSize:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Metrics/BlockLength:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Metrics/ClassLength:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Metrics/CyclomaticComplexity:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Metrics/MethodLength:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Metrics/ModuleLength:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Metrics/PerceivedComplexity:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Naming/HeredocDelimiterNaming:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Naming/MethodParameterName:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Naming/PredicateName:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Style/Alias:
|
60
|
+
EnforcedStyle: prefer_alias_method
|
61
|
+
|
62
|
+
Style/AsciiComments:
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
Style/BlockDelimiters:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Style/Documentation:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Style/EmptyCaseCondition:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Style/EmptyMethod:
|
75
|
+
EnforcedStyle: expanded
|
76
|
+
|
77
|
+
Style/FrozenStringLiteralComment:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
Style/HashAsLastArrayItem:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
Style/HashSyntax:
|
84
|
+
Exclude:
|
85
|
+
- Rakefile
|
86
|
+
- "**/*.rake"
|
87
|
+
|
88
|
+
Style/Lambda:
|
89
|
+
EnforcedStyle: literal
|
90
|
+
|
91
|
+
Style/IfUnlessModifier:
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Style/KeywordParametersOrder:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
Style/MultilineBlockChain:
|
98
|
+
Enabled: false
|
99
|
+
|
100
|
+
Style/NumericLiterals:
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Style/NumericPredicate:
|
104
|
+
Enabled: false
|
105
|
+
|
106
|
+
Style/PercentLiteralDelimiters:
|
107
|
+
PreferredDelimiters:
|
108
|
+
'%i': '()'
|
109
|
+
'%w': '()'
|
110
|
+
'%r': '()'
|
111
|
+
|
112
|
+
Style/SpecialGlobalVars:
|
113
|
+
Enabled: false
|
114
|
+
|
115
|
+
Style/StringLiterals:
|
116
|
+
EnforcedStyle: double_quotes
|
117
|
+
|
118
|
+
Style/StringLiteralsInInterpolation:
|
119
|
+
EnforcedStyle: double_quotes
|
120
|
+
|
121
|
+
Style/SymbolArray:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Style/TrailingCommaInArguments:
|
125
|
+
EnforcedStyleForMultiline: consistent_comma
|
126
|
+
|
127
|
+
Style/TrailingCommaInArrayLiteral:
|
128
|
+
EnforcedStyleForMultiline: consistent_comma
|
129
|
+
|
130
|
+
Style/TrailingCommaInHashLiteral:
|
131
|
+
EnforcedStyleForMultiline: consistent_comma
|
132
|
+
|
133
|
+
Style/ZeroLengthPredicate:
|
134
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano-zeitwerk_check (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.5.1)
|
11
|
+
json (2.7.1)
|
12
|
+
language_server-protocol (3.17.0.3)
|
13
|
+
parallel (1.24.0)
|
14
|
+
parser (3.3.0.5)
|
15
|
+
ast (~> 2.4.1)
|
16
|
+
racc
|
17
|
+
racc (1.7.3)
|
18
|
+
rainbow (3.1.1)
|
19
|
+
rake (12.3.3)
|
20
|
+
regexp_parser (2.9.0)
|
21
|
+
rexml (3.2.6)
|
22
|
+
rspec (3.13.0)
|
23
|
+
rspec-core (~> 3.13.0)
|
24
|
+
rspec-expectations (~> 3.13.0)
|
25
|
+
rspec-mocks (~> 3.13.0)
|
26
|
+
rspec-core (3.13.0)
|
27
|
+
rspec-support (~> 3.13.0)
|
28
|
+
rspec-expectations (3.13.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.13.0)
|
31
|
+
rspec-mocks (3.13.0)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.13.0)
|
34
|
+
rspec-support (3.13.0)
|
35
|
+
rubocop (1.60.2)
|
36
|
+
json (~> 2.3)
|
37
|
+
language_server-protocol (>= 3.17.0)
|
38
|
+
parallel (~> 1.10)
|
39
|
+
parser (>= 3.3.0.2)
|
40
|
+
rainbow (>= 2.2.2, < 4.0)
|
41
|
+
regexp_parser (>= 1.8, < 3.0)
|
42
|
+
rexml (>= 3.2.5, < 4.0)
|
43
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
44
|
+
ruby-progressbar (~> 1.7)
|
45
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
46
|
+
rubocop-ast (1.30.0)
|
47
|
+
parser (>= 3.2.1.0)
|
48
|
+
ruby-progressbar (1.13.0)
|
49
|
+
unicode-display_width (2.5.0)
|
50
|
+
|
51
|
+
PLATFORMS
|
52
|
+
arm64-darwin-21
|
53
|
+
ruby
|
54
|
+
|
55
|
+
DEPENDENCIES
|
56
|
+
capistrano-zeitwerk_check!
|
57
|
+
rake (~> 12.0)
|
58
|
+
rspec (~> 3.0)
|
59
|
+
rubocop (~> 1.60)
|
60
|
+
|
61
|
+
BUNDLED WITH
|
62
|
+
2.5.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 labocho
|
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,38 @@
|
|
1
|
+
# Capistrano::ZeitwerkCheck
|
2
|
+
|
3
|
+
This gem runs `bin/rails zeitwerk:check` before all Capistrano tasks, to avoids NameError on production.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'capistrano-zeitwerk_check', git: "https://github.com/socioart/capistrano-zeitwerk_check", tag: "v0.1.0"
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
in Capfile add following line.
|
20
|
+
|
21
|
+
|
22
|
+
require "capistrano/zeitwerk_check"
|
23
|
+
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
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.
|
28
|
+
|
29
|
+
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).
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/labocho/capistrano-zeitwerk_check.
|
34
|
+
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "capistrano/zeitwerk_check"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/rubocop
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
12
|
+
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
14
|
+
|
15
|
+
if File.file?(bundle_binstub)
|
16
|
+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
17
|
+
load(bundle_binstub)
|
18
|
+
else
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
require "rubygems"
|
25
|
+
require "bundler/setup"
|
26
|
+
|
27
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bin/setup
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative "lib/capistrano/zeitwerk_check/version"
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "capistrano-zeitwerk_check"
|
5
|
+
spec.version = Capistrano::ZeitwerkCheck::VERSION
|
6
|
+
spec.authors = ["labocho"]
|
7
|
+
spec.email = ["labocho@penguinlab.jp"]
|
8
|
+
|
9
|
+
spec.summary = "Run `bin/rails zeitwerk:check` before deployment"
|
10
|
+
spec.description = "Run `bin/rails zeitwerk:check` before deployment"
|
11
|
+
spec.homepage = "https://github.com/socioart/capistrano-zeitwerk_check"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
14
|
+
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
17
|
+
spec.metadata["changelog_uri"] = "https://github.com/socioart/capistrano-zeitwerk_check/blob/master/CHANGELOG.md"
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.executables = spec.files.grep(%r(^exe/)) {|f| File.basename(f) }
|
26
|
+
spec.require_paths = ["lib"]
|
27
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
28
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/zeitwerk_check.rake", __dir__)
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-zeitwerk_check
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- labocho
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-02-22 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Run `bin/rails zeitwerk:check` before deployment
|
14
|
+
email:
|
15
|
+
- labocho@penguinlab.jp
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".gitignore"
|
21
|
+
- ".rspec"
|
22
|
+
- ".rubocop.yml"
|
23
|
+
- ".travis.yml"
|
24
|
+
- CHANGELOG.md
|
25
|
+
- Gemfile
|
26
|
+
- Gemfile.lock
|
27
|
+
- LICENSE.txt
|
28
|
+
- README.md
|
29
|
+
- Rakefile
|
30
|
+
- bin/console
|
31
|
+
- bin/rubocop
|
32
|
+
- bin/setup
|
33
|
+
- capistrano-zeitwerk_check.gemspec
|
34
|
+
- lib/capistrano-zeitwerk_check.rb
|
35
|
+
- lib/capistrano/tasks/zeitwerk_check.rake
|
36
|
+
- lib/capistrano/zeitwerk_check.rb
|
37
|
+
- lib/capistrano/zeitwerk_check/tasks.rb
|
38
|
+
- lib/capistrano/zeitwerk_check/version.rb
|
39
|
+
homepage: https://github.com/socioart/capistrano-zeitwerk_check
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
metadata:
|
43
|
+
homepage_uri: https://github.com/socioart/capistrano-zeitwerk_check
|
44
|
+
source_code_uri: https://github.com/socioart/capistrano-zeitwerk_check
|
45
|
+
changelog_uri: https://github.com/socioart/capistrano-zeitwerk_check/blob/master/CHANGELOG.md
|
46
|
+
rubygems_mfa_required: 'true'
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 2.7.0
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubygems_version: 3.3.3
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Run `bin/rails zeitwerk:check` before deployment
|
66
|
+
test_files: []
|