cmu-web-style 0.1.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
+ SHA256:
3
+ metadata.gz: 8fc4abf5e081ec8ff61d9ff4610d953345da435b1f718bd18fbc8a76dfbf4202
4
+ data.tar.gz: 573c7952ada09723cd2718e1074a3d69487218771d82ef49864c29cb5913d77d
5
+ SHA512:
6
+ metadata.gz: 6a3a4f9fecbc3bc478fbe94880b858e24c4146bdca9adc3041aae3f800737afa383c27d2653a79e625a1c72de72112cce4206b5d99a752a985cb8804a454f5b0
7
+ data.tar.gz: 86f15d931ec524e18cc5dc078ed86fa5dfbece5b6ac7c453ac0d1c0c69e9e378f40288bd76a344aaf3f73d105677d21c128fc4c948cfe3967a88a2c8c4493539
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Carnegie Mellon University
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # CMU Web Style
2
+
3
+ CMU Web Style is a gem of shared RuboCop and erb_lint settings for Rails
4
+ apps built with CMU Web: Rails' own style (rubocop-rails-omakase, which new
5
+ Rails apps start with), the files no app lints, and erb_lint settings that
6
+ work with it.
7
+
8
+ ## Use It
9
+
10
+ Add the gem to the app's Gemfile. It brings rubocop-rails-omakase and
11
+ erb_lint with it:
12
+
13
+ ```ruby
14
+ gem "cmu-web-style", require: false, group: :development
15
+ ```
16
+
17
+ Point the app's `.rubocop.yml` at the shared settings, then add the app's
18
+ own rules under them:
19
+
20
+ ```yaml
21
+ inherit_gem:
22
+ cmu-web-style: config/rubocop.yml
23
+ ```
24
+
25
+ And its `.erb_lint.yml`:
26
+
27
+ ```yaml
28
+ inherit_gem:
29
+ cmu-web-style: config/erb_lint.yml
30
+ ```
31
+
32
+ Check with `bin/rubocop` and `bundle exec erb_lint --lint-all`. The
33
+ Carnegie Mellon Web Kilt's template for new Rails apps sets all of this up.
34
+
35
+ ## Work on It
36
+
37
+ ```console
38
+ bundle install
39
+ bundle exec rake
40
+ ```
41
+
42
+ The tests load both files and check that RuboCop and erb_lint accept them.
43
+ Versions use semantic versioning as plain numbers (e.g., `0.1.0`), set in
44
+ `cmu-web-style.gemspec`; the release tag matches it.
@@ -0,0 +1,35 @@
1
+ # Shared erb_lint settings for CMU Web Rails apps.
2
+ # In the app's .erb_lint.yml:
3
+ #
4
+ # inherit_gem:
5
+ # cmu-web-style: config/erb_lint.yml
6
+ EnableDefaultLinters: true
7
+ exclude:
8
+ - "node_modules/**/*"
9
+ - "tmp/**/*"
10
+ - "vendor/**/*"
11
+ linters:
12
+ ErbSafety:
13
+ enabled: true
14
+ Rubocop:
15
+ enabled: true
16
+ rubocop_config:
17
+ inherit_from:
18
+ - .rubocop.yml
19
+ # Cops that misread Ruby cut into ERB tags
20
+ Layout/ArgumentAlignment:
21
+ Enabled: false
22
+ Layout/InitialIndentation:
23
+ Enabled: false
24
+ Layout/LineLength:
25
+ Enabled: false
26
+ Layout/TrailingEmptyLines:
27
+ Enabled: false
28
+ Layout/TrailingWhitespace:
29
+ Enabled: false
30
+ Lint/UselessAssignment:
31
+ Enabled: false
32
+ Naming/FileName:
33
+ Enabled: false
34
+ Style/FrozenStringLiteralComment:
35
+ Enabled: false
@@ -0,0 +1,17 @@
1
+ # Shared RuboCop settings for CMU Web Rails apps:
2
+ # Rails' own style (rubocop-rails-omakase), which new apps start with, and
3
+ # the files no app lints. In the app's .rubocop.yml:
4
+ #
5
+ # inherit_gem:
6
+ # cmu-web-style: config/rubocop.yml
7
+ inherit_gem:
8
+ rubocop-rails-omakase: rubocop.yml
9
+
10
+ AllCops:
11
+ Exclude:
12
+ - "bin/**/*"
13
+ - "db/schema.rb"
14
+ - "db/migrate/**/*"
15
+ - "node_modules/**/*"
16
+ - "tmp/**/*"
17
+ - "vendor/**/*"
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cmu-web-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - CMU Web
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: erb_lint
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0.9'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0.9'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rubocop-rails-omakase
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ description: Rails' own style (rubocop-rails-omakase) plus the files no app lints,
41
+ and erb_lint settings that work with it, for Rails apps built with CMU Web.
42
+ executables: []
43
+ extensions: []
44
+ extra_rdoc_files: []
45
+ files:
46
+ - LICENSE
47
+ - README.md
48
+ - config/erb_lint.yml
49
+ - config/rubocop.yml
50
+ homepage: https://github.com/cmu-web/cmu-web-style
51
+ licenses:
52
+ - BSD-3-Clause
53
+ metadata:
54
+ source_code_uri: https://github.com/cmu-web/cmu-web-style
55
+ bug_tracker_uri: https://github.com/cmu-web/cmu-web-style/issues
56
+ rubygems_mfa_required: 'true'
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '3.2'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubygems_version: 3.6.9
72
+ specification_version: 4
73
+ summary: Shared RuboCop and erb_lint settings for CMU Web Rails apps
74
+ test_files: []