searchgov_style 0.1.16 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.default.yml +157 -0
  3. data/LICENSE.md +31 -0
  4. data/README.md +77 -0
  5. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b46410de7e4320bbcbd3010176c0c3968a5626466b78640a5be7a5bfc3c5ade3
4
- data.tar.gz: 3206e2f6d28be7b597da9bff6187986a18a3eac57267cdb1b22c77dbbf517db0
3
+ metadata.gz: b0c997be5507b22317f796308dbf415e0aa2dcaab578d82f8de5d7b897814b66
4
+ data.tar.gz: 27b70f590fb1efaacfce4173d8bc4e54fff658786fff69ea7b671d9fc568ce78
5
5
  SHA512:
6
- metadata.gz: be93759dfac89f92bf99e4782f295048b99df0575d59c038fca012b564cd38705f0554a0adfcf3777c731bdc4b54ceaeb690a0208e6ee24b2c99ed9c49a23cd4
7
- data.tar.gz: db45295ee771899acb30347d8d42abfe730e6ea9e7025b592fe8dc512e42b21c36b0fde4f9ceac1fb0edee14aebdd50c8e27ce0d4eb21927b8c62351aedb6466
6
+ metadata.gz: 9039caf1780f00279b5e30d8a9082685f69a9123d3aa8c798f55f362add2c4ab2a75ab7fab0fdd08f51016a82489bd02b0b53fa35dd05b7d9f130ee791c4cdcd
7
+ data.tar.gz: 81e9903cc9b32e7b03d4f37568f2099d48703082654c949962038ff33ca6f225a4c859305834e161d16324edee61da025ba18d51bec33a017b48624ea66735dc
data/.default.yml ADDED
@@ -0,0 +1,157 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-rake
5
+ - rubocop-rspec
6
+
7
+ AllCops:
8
+ NewCops: enable
9
+ Exclude:
10
+ - 'bin/**/*'
11
+ - 'config/**/*'
12
+ - 'config.ru'
13
+ - 'db/**/*'
14
+ - 'vendor/**/*'
15
+
16
+ #### Bundler ####
17
+
18
+ Bundler/OrderedGems:
19
+ Enabled: false
20
+
21
+ #### Layout ####
22
+
23
+ Layout/DotPosition:
24
+ EnforcedStyle: trailing
25
+
26
+ Layout/ExtraSpacing:
27
+ AllowForAlignment: true
28
+
29
+ # We are disabling this cop to prevent analysis from tripping on the many pre-existing
30
+ # offenses in our repos. Devs can rely on themselves and each other to maintain
31
+ # sane line lengths going forward, and fix offending lines as needed.
32
+ Layout/LineLength:
33
+ Enabled: false
34
+
35
+ Layout/MultilineMethodCallIndentation:
36
+ EnforcedStyle: indented
37
+
38
+ #### Lint ####
39
+ Lint/AmbiguousBlockAssociation:
40
+ Exclude:
41
+ # https://github.com/rubocop/rubocop/issues/4222#issuecomment-290655562
42
+ - 'spec/**/*'
43
+
44
+ #### Metrics ####
45
+
46
+ Metrics/BlockLength:
47
+ CountComments: false # count full line comments?
48
+ Max: 25
49
+ IgnoredMethods:
50
+ # By default, exclude the `#refine` method, as it tends to have larger
51
+ # associated blocks.
52
+ - refine
53
+ Exclude:
54
+ # Specs by nature tend to have lengthy, nested blocks
55
+ - '*.gemspec'
56
+ - 'spec/**/*'
57
+
58
+ Metrics/MethodLength:
59
+ CountAsOne:
60
+ - array
61
+ - hash
62
+ - heredoc
63
+
64
+ #### Performance ####
65
+
66
+ Performance/TimesMap:
67
+ # Disabling. Using `Array.new` with a block is marginally more performant, but
68
+ # `n.times.map` is much more readable. The former can be used when n is large.
69
+ # https://stackoverflow.com/questions/41518896/why-does-rubocop-suggest-replacing-times-map-with-array-new
70
+ Enabled: false
71
+
72
+ #### Rails ####
73
+
74
+ Rails/SkipsModelValidations:
75
+ # We are leaving this cop enabled as a warning.
76
+ # Failures can be approved as needed during code review.
77
+ Enabled: true
78
+
79
+ #### RSpec ####
80
+
81
+ # See also the list of RSpec statements that we exempt from the block
82
+ # length cop, under Metrics/BlockLength above
83
+
84
+ RSpec/DescribeClass:
85
+ Exclude:
86
+ - 'spec/lib/tasks/**/*'
87
+
88
+ RSpec/DescribedClass:
89
+ SkipBlocks: true
90
+
91
+ RSpec/ExampleLength:
92
+ Enabled: false
93
+
94
+ RSpec/ExpectChange:
95
+ EnforcedStyle: block
96
+
97
+ RSpec/ImplicitSubject:
98
+ EnforcedStyle: single_statement_only
99
+
100
+ RSpec/MessageChain:
101
+ Enabled: false
102
+
103
+ RSpec/MultipleExpectations:
104
+ Enabled: false
105
+
106
+ RSpec/NestedGroups:
107
+ Enabled: false
108
+
109
+ #### Style ####
110
+
111
+ Style/Documentation:
112
+ Enabled: false
113
+
114
+ Style/IfUnlessModifier:
115
+ Enabled: false
116
+
117
+ Style/MethodCallWithArgsParentheses:
118
+ Description: 'Use parentheses for method calls with arguments.'
119
+ Enabled: true
120
+ IgnoredMethods:
121
+ # Ignore Ruby keyword methods:
122
+ # https://rubystyle.guide/#methods-that-have-keyword-status-in-ruby
123
+ - require
124
+ - yield
125
+ # https://rubystyle.guide/#exceptions
126
+ - raise
127
+ # Ignore logging methods, as they are considered part of an internal DSL
128
+ # https://rubystyle.guide/#methods-that-are-part-of-an-internal-dsl
129
+ - debug
130
+ - info
131
+ - warn
132
+ - error
133
+ - fatal
134
+ # Ignore Rails DSL methods
135
+ - has_many
136
+ - has_one
137
+ - order
138
+ - redirect_to
139
+ - render
140
+ - reset_callbacks
141
+ - set_callback
142
+ - skip_callback
143
+ Exclude:
144
+ - 'spec/**/*'
145
+ - 'Gemfile'
146
+ - 'db/**/*'
147
+ - '*.gemspec'
148
+
149
+ Style/MixinUsage:
150
+ Exclude:
151
+ - bin/*
152
+
153
+ Style/RescueStandardError:
154
+ Enabled: false
155
+
156
+ Style/SymbolArray:
157
+ MinSize: 4
data/LICENSE.md ADDED
@@ -0,0 +1,31 @@
1
+ As a work of the United States government, this project is in the
2
+ public domain within the United States.
3
+
4
+ Additionally, we waive copyright and related rights in the work
5
+ worldwide through the CC0 1.0 Universal public domain dedication.
6
+
7
+ ## CC0 1.0 Universal summary
8
+
9
+ This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
10
+
11
+ ### No copyright
12
+
13
+ The person who associated a work with this deed has dedicated the work to
14
+ the public domain by waiving all rights to the work worldwide
15
+ under copyright law, including all related and neighboring rights, to the
16
+ extent allowed by law.
17
+
18
+ You can copy, modify, distribute and perform the work, even for commercial
19
+ purposes, all without asking permission.
20
+
21
+ ### Other information
22
+
23
+ In no way are the patent or trademark rights of any person affected by CC0,
24
+ nor are the rights that other persons may have in the work or in how the
25
+ work is used, such as publicity or privacy rights.
26
+
27
+ Unless expressly stated otherwise, the person who associated a work with
28
+ this deed makes no warranties about the work, and disclaims liability for
29
+ all uses of the work, to the fullest extent permitted by applicable law.
30
+ When using or citing the work, you should not imply endorsement by the
31
+ author or the affirmer.
data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # searchgov_style
2
+
3
+ Shared [Rubocop](https://rubocop.org/) configuration for Search.gov repositories
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ group :test, :development do
11
+ gem 'searchgov_style'
12
+ end
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install searchgov_style
22
+
23
+ ## Usage
24
+
25
+ In the root directory of the repo using this gem, create a `.rubocop.yml` with the following directives:
26
+
27
+ ```yaml
28
+ inherit_gem:
29
+ searchgov_style:
30
+ - .default.yml
31
+ ```
32
+
33
+ Now, run:
34
+
35
+ ```bash
36
+ $ bundle exec rubocop
37
+ ```
38
+
39
+ You do not need to include rubocop directly in your application's dependencies. searchgov_style will include specific versions of `rubocop` and related gems (such as `rubocop-rspec`) that are shared across all projects.
40
+
41
+ Refer to the [Rubocop documentation](https://docs.rubocop.org/) for Rubocop usage instructions.
42
+
43
+ ## Development
44
+
45
+ Install the development gems:
46
+
47
+ $ bundle
48
+
49
+ Run Rubocop on the gem repository itself:
50
+
51
+ $ rubocop
52
+
53
+ ### Upgrading Rubocop
54
+
55
+ To upgrade the version of Rubocop used by this gem, perform the
56
+ following steps to ensure [compatibility with CodeClimate](https://docs.codeclimate.com/docs/rubocop#using-rubocops-newer-versions):
57
+
58
+ 1. Verify that the new version is supported by CodeClimate:
59
+ [list of Rubocop channels for CodeClimate](https://github.com/codeclimate/codeclimate-rubocop/branches/all?utf8=%E2%9C%93&query=channel%2Frubocop)
60
+ 1. Verify that the new version is listed as a channel for the Rubocop engine for the CodeClimate CLI:
61
+ [CodeClimate Engines](https://github.com/codeclimate/codeclimate/blob/master/config/engines.yml)
62
+ 1. Bump the version of Rubocop in the [gemspec](searchgov-style.gemspec)
63
+ 1. Bump the Rubocop channel in [.codeclimate.yml](.codeclimate.yml)
64
+
65
+ Verify your configuration and compatibility locally using the [CodeClimate CLI](https://github.com/codeclimate/codeclimate):
66
+
67
+ $ bundle update
68
+ $ codeclimate validate-config
69
+ $ codeclimate analyze lib/ -e rubocop
70
+
71
+ ## Contributing
72
+
73
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/searchgov_style.
74
+
75
+ ## License
76
+
77
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchgov_style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - MothOnMars
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,7 +114,10 @@ email:
114
114
  executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
- files: []
117
+ files:
118
+ - ".default.yml"
119
+ - LICENSE.md
120
+ - README.md
118
121
  homepage: https://github.com/GSA/searchgov_style
119
122
  licenses:
120
123
  - MIT
@@ -137,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
140
  - !ruby/object:Gem::Version
138
141
  version: '0'
139
142
  requirements: []
140
- rubygems_version: 3.0.3
143
+ rubygems_version: 3.3.15
141
144
  signing_key:
142
145
  specification_version: 4
143
146
  summary: Shared Rubocop configuration for Search.gov repositories