zfletch-style 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 66c51cab6d138390f4f3769f91274476c4b0feeb17133b03e25e4e9b819fe165
4
+ data.tar.gz: a125f58d98256ac2a79bb3391c9f0c5da85cdb2665289e0413421ccd1114b7e9
5
+ SHA512:
6
+ metadata.gz: 1c4c5ef8012dbc21c852139b47955e54f60808557fc04f41e601a0af37370a05b3e44668e1e1464e5b3c130920bbe993eaada6c8ce7e014f52ce5a37321584b6
7
+ data.tar.gz: 87c4b0879865d2690fc4332bfa260ca200c444e802ffc146edf2c34b6a62286ab39e797285a5106c6380abe05e7b842fd9c7dd2639d9646bd86b431ccfcc4537
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'rake'
6
+ gem 'rubocop-rake', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,67 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ zfletch-style (0.1.0)
5
+ rubocop (~> 1.50)
6
+ rubocop-performance (~> 1.17)
7
+ rubocop-rails (~> 2.19)
8
+ rubocop-rake (~> 0.6)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activesupport (7.0.4.3)
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ i18n (>= 1.6, < 2)
16
+ minitest (>= 5.1)
17
+ tzinfo (~> 2.0)
18
+ ast (2.4.2)
19
+ concurrent-ruby (1.2.2)
20
+ i18n (1.12.0)
21
+ concurrent-ruby (~> 1.0)
22
+ json (2.6.3)
23
+ minitest (5.18.0)
24
+ parallel (1.22.1)
25
+ parser (3.2.2.0)
26
+ ast (~> 2.4.1)
27
+ rack (3.0.7)
28
+ rainbow (3.1.1)
29
+ rake (13.0.1)
30
+ regexp_parser (2.7.0)
31
+ rexml (3.2.5)
32
+ rubocop (1.50.1)
33
+ json (~> 2.3)
34
+ parallel (~> 1.10)
35
+ parser (>= 3.2.0.0)
36
+ rainbow (>= 2.2.2, < 4.0)
37
+ regexp_parser (>= 1.8, < 3.0)
38
+ rexml (>= 3.2.5, < 4.0)
39
+ rubocop-ast (>= 1.28.0, < 2.0)
40
+ ruby-progressbar (~> 1.7)
41
+ unicode-display_width (>= 2.4.0, < 3.0)
42
+ rubocop-ast (1.28.0)
43
+ parser (>= 3.2.1.0)
44
+ rubocop-performance (1.17.1)
45
+ rubocop (>= 1.7.0, < 2.0)
46
+ rubocop-ast (>= 0.4.0)
47
+ rubocop-rails (2.19.1)
48
+ activesupport (>= 4.2.0)
49
+ rack (>= 1.1)
50
+ rubocop (>= 1.33.0, < 2.0)
51
+ rubocop-rake (0.6.0)
52
+ rubocop (~> 1.0)
53
+ ruby-progressbar (1.13.0)
54
+ tzinfo (2.0.6)
55
+ concurrent-ruby (~> 1.0)
56
+ unicode-display_width (2.4.2)
57
+
58
+ PLATFORMS
59
+ ruby
60
+
61
+ DEPENDENCIES
62
+ rake
63
+ rubocop-rake
64
+ zfletch-style!
65
+
66
+ BUNDLED WITH
67
+ 2.4.12
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 The Gnar Company
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # zfletch-style
2
+
3
+ Shared style configurations.
4
+ Forked from the (now deprecated) [gnar-style](https://github.com/TheGnarCo/gnar-style).
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's `Gemfile`:
9
+
10
+ ```ruby
11
+ group :development, :test do
12
+ gem 'zfletch-style'
13
+ end
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ `bundle`
19
+
20
+ Or install it yourself as:
21
+
22
+ `gem install zfletch-style`
23
+
24
+ (See project at [rubygems.org](https://rubygems.org/gems/zfletch-style))
25
+
26
+ ## Usage
27
+
28
+ This Gem includes Rubocop, and it's not necessary to separately include Rubocop directly in your
29
+ application's dependencies.
30
+
31
+ ### Inheriting from the Gem
32
+
33
+ Create a `.rubocop.yml` with the following configuration:
34
+
35
+ ```yaml
36
+ inherit_gem:
37
+ zfletch-style:
38
+ # Choose from one of these three
39
+ - rubocop/rubocop.yml # if the pure Ruby style is all that's needed
40
+ - rubocop/rubocop_gem.yml # if the application is a Gem
41
+ - rubocop/rubocop_rails.yml # if the application is a Rails project
42
+ ```
43
+
44
+ To check your application against these style configurations:
45
+
46
+ ```bash
47
+ $ bundle exec rubocop
48
+ ```
49
+
50
+ ## Overriding Styles
51
+
52
+ Example:
53
+
54
+ ```yaml
55
+ # In your app's .rubocop.yml
56
+ inherit_gem:
57
+ zfletch-style:
58
+ - "rubocop/rubocop.yml"
59
+
60
+ Metrics/BlockLength:
61
+ Exclude:
62
+ - specific_file.rb
63
+ ```
64
+
65
+ Note that if you add in a local style exception in your own application after inheriting from
66
+ zfletch-style, that will completely override zfletch-style's defaults.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rubocop/rake_task'
3
+
4
+ RuboCop::RakeTask.new
5
+
6
+ task default: [:rubocop]
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'zfletch_style'
5
+
6
+ require 'irb'
7
+ IRB.start(__FILE__)
@@ -0,0 +1,3 @@
1
+ module ZfletchStyle
2
+ VERSION = '1.0.0'.freeze
3
+ end
@@ -0,0 +1,4 @@
1
+ require_relative 'zfletch_style/version'
2
+
3
+ module ZfletchStyle
4
+ end
@@ -0,0 +1,78 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 3.0
4
+
5
+ require: rubocop-performance
6
+
7
+ Layout/ArgumentAlignment:
8
+ EnforcedStyle: with_fixed_indentation
9
+
10
+ Layout/ParameterAlignment:
11
+ EnforcedStyle: with_fixed_indentation
12
+
13
+ Layout/FirstArrayElementIndentation:
14
+ EnforcedStyle: consistent
15
+
16
+ Layout/MultilineMethodCallIndentation:
17
+ EnforcedStyle: indented
18
+
19
+ Metrics/BlockLength:
20
+ Exclude:
21
+ - 'spec/**/*'
22
+
23
+ Layout/LineLength:
24
+ Max: 100
25
+ Severity: refactor
26
+
27
+ Metrics/MethodLength:
28
+ Max: 20
29
+
30
+ Metrics/ModuleLength:
31
+ Exclude:
32
+ - 'spec/**/*'
33
+
34
+ Metrics/ParameterLists:
35
+ CountKeywordArgs: false
36
+
37
+ Style/ConditionalAssignment:
38
+ EnforcedStyle: assign_inside_condition
39
+ IncludeTernaryExpressions: false
40
+
41
+ Style/Documentation:
42
+ Enabled: false
43
+
44
+ Style/DoubleNegation:
45
+ Enabled: false
46
+
47
+ Style/EmptyMethod:
48
+ EnforcedStyle: expanded
49
+
50
+ Style/FrozenStringLiteralComment:
51
+ Enabled: false
52
+
53
+ Style/GuardClause:
54
+ Enabled: false
55
+
56
+ Style/IfUnlessModifier:
57
+ Enabled: false
58
+
59
+ Style/ParenthesesAroundCondition:
60
+ Enabled: false
61
+
62
+ Style/AsciiComments:
63
+ Enabled: false
64
+
65
+ Style/StringLiterals:
66
+ EnforcedStyle: single_quotes
67
+
68
+ Style/SymbolArray:
69
+ EnforcedStyle: brackets
70
+
71
+ Style/TrailingCommaInArguments:
72
+ EnforcedStyleForMultiline: comma
73
+
74
+ Style/TrailingCommaInArrayLiteral:
75
+ EnforcedStyleForMultiline: comma
76
+
77
+ Style/TrailingCommaInHashLiteral:
78
+ EnforcedStyleForMultiline: comma
@@ -0,0 +1,16 @@
1
+ inherit_from: rubocop.yml
2
+
3
+ require: rubocop-rake
4
+
5
+ Layout/ExtraSpacing:
6
+ Exclude:
7
+ - '*.gemspec'
8
+
9
+ Layout/SpaceAroundOperators:
10
+ Exclude:
11
+ - '*.gemspec'
12
+
13
+ Metrics/BlockLength:
14
+ Exclude:
15
+ - '*.gemspec'
16
+ - 'spec/**/*'
@@ -0,0 +1,17 @@
1
+ inherit_from: rubocop.yml
2
+
3
+ require: rubocop-rails
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - db/schema.rb
8
+ - 'bin/**/*'
9
+ - 'node_modules/**/*'
10
+ - 'vendor/**/*'
11
+
12
+ Metrics/MethodLength:
13
+ Exclude:
14
+ - 'db/migrate/**/*'
15
+
16
+ Rails/NotNullColumn:
17
+ Enabled: false
@@ -0,0 +1,40 @@
1
+ require_relative 'lib/zfletch_style/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'zfletch-style'
5
+ spec.version = ZfletchStyle::VERSION
6
+ spec.licenses = ['MIT']
7
+ spec.authors = ['zfletch']
8
+ spec.email = ['zf.rubygems@gmail.com']
9
+
10
+ spec.summary = 'Custom style guide configurations'
11
+ spec.description = 'Style guide configurations for Ruby projects, Rails applications, and Gems'
12
+ spec.homepage = 'https://github.com/zfletch/zfletch-style'
13
+ spec.required_ruby_version = '>= 3.0'
14
+
15
+ spec.metadata['homepage_uri'] = spec.homepage
16
+ spec.metadata['source_code_uri'] = spec.homepage
17
+ spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
18
+ spec.metadata['rubygems_mfa_required'] = 'true'
19
+
20
+ spec.files = [
21
+ 'Gemfile',
22
+ 'Gemfile.lock',
23
+ 'LICENSE',
24
+ 'README.md',
25
+ 'Rakefile',
26
+ 'bin/console',
27
+ 'rubocop/rubocop.yml',
28
+ 'rubocop/rubocop_gem.yml',
29
+ 'rubocop/rubocop_rails.yml',
30
+ 'lib/zfletch_style.rb',
31
+ 'lib/zfletch_style/version.rb',
32
+ 'zfletch-style.gemspec',
33
+ ]
34
+ spec.require_paths = ['lib']
35
+
36
+ spec.add_dependency 'rubocop', '~> 1.50'
37
+ spec.add_dependency 'rubocop-performance', '~> 1.17'
38
+ spec.add_dependency 'rubocop-rails', '~> 2.19'
39
+ spec.add_dependency 'rubocop-rake', '~> 0.6'
40
+ end
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: zfletch-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - zfletch
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-04-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.50'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.50'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-performance
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.17'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.17'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.19'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.19'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.6'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.6'
69
+ description: Style guide configurations for Ruby projects, Rails applications, and
70
+ Gems
71
+ email:
72
+ - zf.rubygems@gmail.com
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - Gemfile
78
+ - Gemfile.lock
79
+ - LICENSE
80
+ - README.md
81
+ - Rakefile
82
+ - bin/console
83
+ - lib/zfletch_style.rb
84
+ - lib/zfletch_style/version.rb
85
+ - rubocop/rubocop.yml
86
+ - rubocop/rubocop_gem.yml
87
+ - rubocop/rubocop_rails.yml
88
+ - zfletch-style.gemspec
89
+ homepage: https://github.com/zfletch/zfletch-style
90
+ licenses:
91
+ - MIT
92
+ metadata:
93
+ homepage_uri: https://github.com/zfletch/zfletch-style
94
+ source_code_uri: https://github.com/zfletch/zfletch-style
95
+ changelog_uri: https://github.com/zfletch/zfletch-style/releases
96
+ rubygems_mfa_required: 'true'
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '3.0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubygems_version: 3.3.7
113
+ signing_key:
114
+ specification_version: 4
115
+ summary: Custom style guide configurations
116
+ test_files: []