hubbado-style 1.5.1

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.
Files changed (7) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +36 -0
  3. data/LICENSE +21 -0
  4. data/README.md +114 -0
  5. data/default.yml +129 -0
  6. data/hubbado-style.gemspec +25 -0
  7. metadata +86 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7fce73af7b3fefe07c51128ac107739cd3f0aa238efd8546fee05c470ef0bddb
4
+ data.tar.gz: 6fcf8ba3195d54cdcab133a02a768bcf55e55fdf23dd67e6f292cdd54644d1e0
5
+ SHA512:
6
+ metadata.gz: 68362a17deb80c7cf67deb787f45b1fc6f57071a7280b9a5fc4bf0b8ce74e4271b82b902f5469ef8b0b1924cbeb21daacfb90810e267a104215bf0544619bc04
7
+ data.tar.gz: 5acd8173c2c8dc5be7ab7c0d9cea015f2860bc4d973872041355ef5fbd76dab6563e888720f0ffa186ae21a08f3c6d86ea14373e9bc7f8181ff270ee9f1851c3
data/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/).
6
+
7
+ # [1.5.0 - 2025-04-11]
8
+ ## Changed
9
+ - Style/IfUnlessModifier disabled
10
+ - Target ruby version 3.4
11
+
12
+ # [1.4.0 - 2023-04-17]
13
+ ## Added
14
+ - Disable Metrics/ParameterLists
15
+
16
+ # [1.3.0 - 2023-04-05]
17
+ ## Changed
18
+ - Added EnforcedShorthandSyntax: never to Style/HashSyntax
19
+ - Target ruby version 3.2
20
+
21
+ # [1.2.0 - 2023-01-24]
22
+ ## Changed
23
+ - Target ruby version 3.1
24
+
25
+ # [1.1.0 - 2020-03-16]
26
+ ## Changed
27
+ - Do not report on Metrics/AbcSize, Metrics/BlockLength,
28
+ Metrics/CyclomaticComplexity or Metrics/PerceivedComplexity
29
+
30
+ # [1.0.1 - 2021-04-10]
31
+ ## Fixed
32
+ - Don't scan the gems directory
33
+
34
+ # [1.0.0 - 2021-04-10]
35
+ ## Added
36
+ - Fix version of this gem, using our Rails monolith Rubocop configuration as a base
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Hubbado
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,114 @@
1
+ # hubbado-style
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/hubbado/style`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+
13
+ group :test, :development do
14
+ gem 'hubbado-style'
15
+ end
16
+ ```
17
+
18
+ Or, for a Ruby library, add this to your gemspec:
19
+
20
+ ```ruby
21
+ spec.add_development_dependency 'hubbado-style'
22
+ ```
23
+
24
+ And then execute:
25
+
26
+ $ bundle
27
+
28
+ Or install it yourself as:
29
+
30
+ $ gem install hubbado-style
31
+
32
+ ## Usage
33
+
34
+ Create a `.rubocop.yml` with the following directives:
35
+
36
+ ```yaml
37
+ inherit_gem:
38
+ hubbado-style:
39
+ - default.yml
40
+ ```
41
+
42
+ The inherited rubocop canfiguration can be overridden in the `.rubocop.yml` but this is discouraged.
43
+
44
+ Now, run:
45
+
46
+ ```bash
47
+ $ bundle exec rubocop
48
+ ```
49
+
50
+ You do not need to include rubocop directly in your application's dependencies. Hubbado-style will include a specific version of `rubocop` and `rubocop-rspec` that is shared across all projects.
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/hubbado/hubbado-style.
53
+
54
+ ## Styleguide
55
+
56
+ The Rubocop configuration should guide you most of the way, but there are somethings that we haven't been able to configure in Rubocop, which are detailed below.
57
+
58
+ ### Long lists of arguments
59
+
60
+ If a list of related arguments cannot fit on a single line, then each argument should be placed on it's own line.
61
+
62
+ Rationale: A mixture of related horizontal and vertical information is harder to scan.
63
+
64
+ ```ruby
65
+ # bad
66
+ some_method(
67
+ long_argument1: value1, long_argument2: value2, long_argument3: value3, long_argument4: value4,
68
+ long_argument5: value5
69
+ )
70
+
71
+ # good
72
+ some_method(
73
+ long_argument1: value1,
74
+ long_argument2: value2,
75
+ long_argument3: value3,
76
+ long_argument4: value4,
77
+ long_argument5: value5
78
+ )
79
+ ```
80
+
81
+ ### Multiline bracketed method calls
82
+
83
+ Do not place method arguments next to the opening bracket if all the arguments do not fit on one line.
84
+
85
+ Rationale: A mixture of related horizontal and vertical information is harder to scan.
86
+
87
+
88
+ ```ruby
89
+ # bad
90
+ some_method(arg1,
91
+ arg2, arg3, arg4)
92
+
93
+ #good
94
+ some_method(
95
+ arg1, arg2, arg3, arg4
96
+ )
97
+ ```
98
+
99
+ ### Methods calls without brackets
100
+
101
+ If the method call does not use brackets, different types of arguments can be placed one different lines. If the full set of related arguments does not fit on one line they should be placed one per line.
102
+
103
+ For example, in the following method calls the first method argument is the principle, and most important argument.
104
+
105
+ ```ruby
106
+ cell Somecell, model,
107
+ option_one: value_one, option_two: value_two, ...
108
+ ```
109
+
110
+ ```ruby
111
+ instance_double SomeObject,
112
+ property_one: some_value,
113
+ property_two: some_other_value
114
+ ```
data/default.yml ADDED
@@ -0,0 +1,129 @@
1
+ AllCops:
2
+ Include:
3
+ - '**/*.rb'
4
+ - Rakefile
5
+ - config.ru
6
+ Exclude:
7
+ - gems/**/*
8
+ - db/**
9
+ - config/**
10
+ - script/**
11
+ TargetRubyVersion: 3.4
12
+ NewCops: enable
13
+
14
+ Metrics/AbcSize:
15
+ Enabled: false
16
+
17
+ Metrics/BlockLength:
18
+ Enabled: false
19
+
20
+ Metrics/ClassLength:
21
+ Enabled: false
22
+
23
+ Metrics/CyclomaticComplexity:
24
+ Enabled: false
25
+
26
+ Metrics/MethodLength:
27
+ Enabled: false
28
+
29
+ Metrics/ParameterLists:
30
+ Enabled: false
31
+
32
+ Metrics/PerceivedComplexity:
33
+ Enabled: false
34
+
35
+ Naming/PredicateName:
36
+ ForbiddenPrefixes:
37
+ - is_
38
+
39
+ Style/AccessorGrouping:
40
+ Enabled: false
41
+
42
+ Style/BlockDelimiters:
43
+ EnforcedStyle: line_count_based
44
+ Exclude:
45
+ - 'spec/**/*'
46
+
47
+ Style/Documentation:
48
+ Enabled: false
49
+
50
+ Style/FrozenStringLiteralComment:
51
+ Enabled: false
52
+
53
+ Style/HashSyntax:
54
+ EnforcedShorthandSyntax: never
55
+
56
+ Style/IfUnlessModifier:
57
+ Enabled: false
58
+
59
+ Style/Lambda:
60
+ Enabled: false
61
+
62
+ Style/LambdaCall:
63
+ Enabled: false
64
+
65
+ Style/NestedParenthesizedCalls:
66
+ Enabled: false
67
+
68
+ # We don't consider .positive? etc to be that readable
69
+ Style/NumericPredicate:
70
+ Enabled: false
71
+
72
+ Style/StringLiterals:
73
+ Enabled: false
74
+
75
+ Layout/ArgumentAlignment:
76
+ EnforcedStyle: with_fixed_indentation
77
+
78
+ Layout/BlockEndNewline:
79
+ Enabled: false
80
+
81
+ Layout/CaseIndentation:
82
+ IndentOneStep: true
83
+
84
+ Layout/EmptyLineAfterGuardClause:
85
+ Enabled: false
86
+
87
+ Layout/MultilineBlockLayout:
88
+ Exclude:
89
+ - 'spec/**/*'
90
+
91
+ Layout/MultilineMethodCallIndentation:
92
+ EnforcedStyle: indented
93
+ IndentationWidth: 2
94
+
95
+ Layout/LineLength:
96
+ Max: 100
97
+
98
+ # Disabled so that we can write .to_not change { } in Rspec
99
+ Lint/AmbiguousBlockAssociation:
100
+ Exclude:
101
+ - 'spec/**/*'
102
+
103
+ Lint/UselessAccessModifier:
104
+ MethodCreatingMethods:
105
+ - delegate
106
+
107
+ Style/AsciiComments:
108
+ Enabled: false
109
+
110
+ Style/AndOr:
111
+ EnforcedStyle: conditionals
112
+
113
+ Style/ClassAndModuleChildren:
114
+ Enabled: false
115
+
116
+ Style/CollectionMethods:
117
+ Enabled: true
118
+
119
+ Style/DoubleNegation:
120
+ Enabled: false
121
+
122
+ Style/FormatString:
123
+ Enabled: false
124
+
125
+ Style/RegexpLiteral:
126
+ Enabled: false
127
+
128
+ Style/StringConcatenation:
129
+ Enabled: false
@@ -0,0 +1,25 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "hubbado-style"
3
+ s.version = "1.5.1"
4
+ s.summary = "Hubbado style guides and shared style configs."
5
+
6
+ s.authors = ["Hubbado Devs"]
7
+ s.email = ["devs@hubbado.com"]
8
+ s.homepage = "https://github.com/hubbado/hubbado-style"
9
+ s.license = "MIT"
10
+
11
+ s.require_paths = ["lib"]
12
+
13
+ s.files = Dir.glob(%w[
14
+ default.yml
15
+ *.gemspec
16
+ LICENSE*
17
+ README*
18
+ CHANGELOG*
19
+ ])
20
+
21
+ s.add_dependency "rubocop"
22
+
23
+ s.add_development_dependency "bundler"
24
+ s.add_development_dependency "rake"
25
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hubbado-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.1
5
+ platform: ruby
6
+ authors:
7
+ - Hubbado Devs
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: rubocop
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: bundler
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: rake
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ email:
55
+ - devs@hubbado.com
56
+ executables: []
57
+ extensions: []
58
+ extra_rdoc_files: []
59
+ files:
60
+ - CHANGELOG.md
61
+ - LICENSE
62
+ - README.md
63
+ - default.yml
64
+ - hubbado-style.gemspec
65
+ homepage: https://github.com/hubbado/hubbado-style
66
+ licenses:
67
+ - MIT
68
+ metadata: {}
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubygems_version: 3.6.7
84
+ specification_version: 4
85
+ summary: Hubbado style guides and shared style configs.
86
+ test_files: []