bookingsync-rubocop 0.2.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9b35431b7b501627f614c0d3c367af4aa71c0118ac72dafe61eecb2f3f058704
4
+ data.tar.gz: 21bc558bf9be924dbd27089bb5cd96e4e8f9fd65388c4ae84e4dca82d835daf6
5
+ SHA512:
6
+ metadata.gz: f8edd64d08714a9b1e97f51d6edd83ac803ea64b6dcfcbec9120764c70fbe73a5d4a6a25adf256d32c6dc2f64e4ad0445a4087c86ac2b2f9b5bea100735c199c
7
+ data.tar.gz: 0f3f88c012a3f53987faff780ac73158fc4b504346226d32efcf10fea98db73d480438e04885c74067f9d5dfa07daf25054514ddace79a0dd9c3b774561e3ef0
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in bookingsync-rubocop.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.0"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Arkadiy Zabazhanov
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,57 @@
1
+ # Bookingsync::Rubocop
2
+
3
+ This gem is a collection of Rubocop configuration and (potentially) custom cops for BookingSync projects.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem "bookingsync-rubocop", require: false, group: :development
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ ## Usage
18
+
19
+ Add the following lines to `.rubocop.yml`:
20
+
21
+ ```yaml
22
+ inherit_gem:
23
+ bookingsync-rubocop:
24
+ - config/base.yml
25
+ - config/rails.yml
26
+ - config/rspec.yml
27
+ ```
28
+
29
+ Keep in mind that in order to use the last 2 configs file must contain:
30
+
31
+ ```yaml
32
+ require:
33
+ - rubocop-rails
34
+ - rubocop-rspec
35
+ ```
36
+
37
+ In order for your local config, gem configs and .rubocop.todo.yml to merge nicely use:
38
+
39
+ ```yaml
40
+ inherit_mode:
41
+ merge:
42
+ - Exclude
43
+ ```
44
+
45
+ ## Development
46
+
47
+ 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.
48
+
49
+ 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).
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bookingsync-rubocop.
54
+
55
+ ## License
56
+
57
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "bookingsync/rubocop"
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/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,27 @@
1
+ require_relative 'lib/bookingsync/rubocop/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "bookingsync-rubocop"
5
+ spec.version = Bookingsync::Rubocop::VERSION
6
+ spec.authors = ["Arkadiy Zabazhanov"]
7
+ spec.email = ["kinwizard@gmail.com"]
8
+
9
+ spec.summary = "Shared Rubocop configuration for Bookingsync projects"
10
+ spec.description = "Shared Rubocop configuration for Bookingsync projects"
11
+ spec.homepage = "https://github.com/BookingSync/bookingsync-rubocop"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
+
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = "https://github.com/BookingSync/bookingsync-rubocop"
17
+ spec.metadata["changelog_uri"] = "https://github.com/BookingSync/bookingsync-rubocop"
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('..', __FILE__)) 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
+ end
data/config/base.yml ADDED
@@ -0,0 +1,116 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ Exclude:
4
+ - "db/schema.rb"
5
+ - "db/data_schema.rb"
6
+ - "tmp/**/*"
7
+ - "log/**/*"
8
+
9
+ Layout/ArgumentAlignment:
10
+ EnforcedStyle: with_fixed_indentation
11
+
12
+ Layout/ArrayAlignment:
13
+ EnforcedStyle: with_fixed_indentation
14
+
15
+ Layout/CaseIndentation:
16
+ EnforcedStyle: end
17
+
18
+ Layout/EmptyLineBetweenDefs:
19
+ AllowAdjacentOneLineDefs: true
20
+
21
+ Layout/EndAlignment:
22
+ EnforcedStyleAlignWith: variable
23
+
24
+ Layout/FirstArgumentIndentation:
25
+ EnforcedStyle: consistent
26
+
27
+ Layout/FirstArrayElementIndentation:
28
+ EnforcedStyle: consistent
29
+
30
+ Layout/FirstHashElementIndentation:
31
+ EnforcedStyle: consistent
32
+
33
+ Layout/FirstHashElementLineBreak:
34
+ Enabled: true
35
+
36
+ Layout/LineEndStringConcatenationIndentation:
37
+ EnforcedStyle: indented
38
+
39
+ Layout/MultilineMethodCallIndentation:
40
+ EnforcedStyle: indented
41
+
42
+ Layout/MultilineOperationIndentation:
43
+ EnforcedStyle: indented
44
+
45
+ Layout/ParameterAlignment:
46
+ EnforcedStyle: with_fixed_indentation
47
+
48
+ Layout/SpaceBeforeBrackets:
49
+ Enabled: false
50
+
51
+ Lint/AmbiguousBlockAssociation:
52
+ Enabled: false
53
+
54
+ Lint/AmbiguousOperatorPrecedence:
55
+ Enabled: false
56
+
57
+ Lint/UnusedMethodArgument:
58
+ AllowUnusedKeywordArguments: true
59
+
60
+ Metrics/BlockLength:
61
+ Exclude:
62
+ - "spec/rails_helper.rb"
63
+ - "spec/**/*_spec.rb"
64
+ - "spec/factories/**/*.rb"
65
+ - "config/routes.rb"
66
+
67
+ Metrics/ClassLength:
68
+ CountAsOne:
69
+ - array
70
+ - hash
71
+ - heredoc
72
+
73
+ Metrics/MethodLength:
74
+ Enabled: false
75
+
76
+ Security/JSONLoad:
77
+ Exclude:
78
+ - "spec/**/*"
79
+
80
+ Style/Alias:
81
+ EnforcedStyle: prefer_alias_method
82
+
83
+ Style/ClassAndModuleChildren:
84
+ EnforcedStyle: compact
85
+ Exclude:
86
+ - "config/application.rb"
87
+
88
+ Style/CommandLiteral:
89
+ EnforcedStyle: percent_x
90
+
91
+ Style/Documentation:
92
+ Exclude:
93
+ - "db/migrate/**/*.rb"
94
+ - "db/data/**/*.rb"
95
+
96
+ Style/DoubleNegation:
97
+ Enabled: false
98
+
99
+ Style/RescueStandardError:
100
+ EnforcedStyle: implicit
101
+
102
+ Style/StringLiterals:
103
+ EnforcedStyle: double_quotes
104
+ ConsistentQuotesInMultiline: true
105
+
106
+ Style/StringLiteralsInInterpolation:
107
+ EnforcedStyle: double_quotes
108
+
109
+ Style/RaiseArgs:
110
+ EnforcedStyle: compact
111
+
112
+ Style/RegexpLiteral:
113
+ EnforcedStyle: percent_r
114
+
115
+ Style/YodaExpression:
116
+ Enabled: false
data/config/rails.yml ADDED
@@ -0,0 +1,15 @@
1
+ Rails/ActionOrder:
2
+ ExpectedOrder:
3
+ - index
4
+ - show
5
+ - new
6
+ - create
7
+ - edit
8
+ - update
9
+ - destroy
10
+
11
+ Rails/ThreeStateBooleanColumn:
12
+ Enabled: false
13
+
14
+ Rails/WhereExists:
15
+ EnforcedStyle: where
data/config/rspec.yml ADDED
@@ -0,0 +1,28 @@
1
+ RSpec:
2
+ Exclude:
3
+ - "spec/factories/**/*.rb"
4
+
5
+ RSpec/ExampleLength:
6
+ Max: 20
7
+ CountAsOne:
8
+ - array
9
+ - hash
10
+ - heredoc
11
+
12
+ RSpec/ExpectChange:
13
+ EnforcedStyle: block
14
+
15
+ RSpec/IndexedLet:
16
+ Enabled: false
17
+
18
+ RSpec/LetSetup:
19
+ Enabled: false
20
+
21
+ RSpec/MultipleExpectations:
22
+ Max: 20
23
+
24
+ RSpec/MultipleMemoizedHelpers:
25
+ Max: 20
26
+
27
+ RSpec/NestedGroups:
28
+ Max: 7
@@ -0,0 +1,5 @@
1
+ module Bookingsync
2
+ module Rubocop
3
+ VERSION = "0.2.1"
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ require "bookingsync/rubocop/version"
2
+
3
+ module Bookingsync
4
+ module Rubocop
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bookingsync-rubocop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
+ platform: ruby
6
+ authors:
7
+ - Arkadiy Zabazhanov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Shared Rubocop configuration for Bookingsync projects
14
+ email:
15
+ - kinwizard@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - Gemfile
21
+ - LICENSE.txt
22
+ - README.md
23
+ - Rakefile
24
+ - bin/console
25
+ - bin/setup
26
+ - bookingsync-rubocop.gemspec
27
+ - config/base.yml
28
+ - config/rails.yml
29
+ - config/rspec.yml
30
+ - lib/bookingsync/rubocop.rb
31
+ - lib/bookingsync/rubocop/version.rb
32
+ homepage: https://github.com/BookingSync/bookingsync-rubocop
33
+ licenses:
34
+ - MIT
35
+ metadata:
36
+ homepage_uri: https://github.com/BookingSync/bookingsync-rubocop
37
+ source_code_uri: https://github.com/BookingSync/bookingsync-rubocop
38
+ changelog_uri: https://github.com/BookingSync/bookingsync-rubocop
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.0
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubygems_version: 3.4.10
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: Shared Rubocop configuration for Bookingsync projects
58
+ test_files: []