nxt_cop 1.0.9

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fcd50bfc83a3a855887af8c1320ad148c8fb4cfe99e309be3baf9946be60add5
4
+ data.tar.gz: d398ae0417669dda109924148d52e84c884f124276c2bff22f88ddd1d87b27c5
5
+ SHA512:
6
+ metadata.gz: d9fc1f21d9a03515961eee7e991f7f8de8a7bf09c6333364de5a9e3ca09490f97ca1fc23b8e7b968d31b8b8fad5f922214ae26250e8bd9a7279e48cefc1dd98e
7
+ data.tar.gz: a24a76aea16ed66696b12fb6f16482e7c0119b6ce0d09ed8bab9f629ace64285b1826d7ea3cfb56da2e7ff8b99cab1381943e16a6ad6de2d9c4d8e04c9e636ab
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ .DS_Store
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
@@ -0,0 +1 @@
1
+ inherit_from: default.yml
@@ -0,0 +1,41 @@
1
+ # v1.0.9 2020-10-15
2
+
3
+ ### Added
4
+ - `Layout/EmptyLinesAroundClassBody`
5
+ - `Layout/EmptyLinesAroundBlockBody`
6
+
7
+ # v1.0.8 2020-10-01
8
+
9
+ ### Removed
10
+ - Lint/MissingSuper
11
+
12
+ # v1.0.7 2020-09-29
13
+
14
+ Updated Rubocop Version
15
+
16
+ ### Added
17
+ - All new Cops
18
+ - Style/MutableConstant
19
+
20
+ # v1.0.6 2020-08-03
21
+
22
+ ### Added
23
+
24
+ - `Layout/SpaceBeforeBlockBraces`
25
+ - `Layout/SpaceInsideBlockBraces`
26
+
27
+ # v1.0.5 2020-07-27
28
+
29
+ ### Added
30
+
31
+ - `Layout/TrailingEmptyLines`
32
+
33
+ # v1.0.4 2020-07-23
34
+
35
+ ### Added
36
+
37
+ - Style/TrailingCommaInArguments`
38
+
39
+ ### Removed
40
+
41
+ - Gemfile.lock from .gitignore
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify dependencies in nxt_cop.gemspec
4
+ gemspec
@@ -0,0 +1,41 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ nxt_cop (1.0.9)
5
+ rubocop (= 0.92.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.1)
11
+ parallel (1.19.2)
12
+ parser (2.7.2.0)
13
+ ast (~> 2.4.1)
14
+ rainbow (3.0.0)
15
+ rake (13.0.1)
16
+ regexp_parser (1.8.2)
17
+ rexml (3.2.4)
18
+ rubocop (0.92.0)
19
+ parallel (~> 1.10)
20
+ parser (>= 2.7.1.5)
21
+ rainbow (>= 2.2.2, < 4.0)
22
+ regexp_parser (>= 1.7)
23
+ rexml
24
+ rubocop-ast (>= 0.5.0)
25
+ ruby-progressbar (~> 1.7)
26
+ unicode-display_width (>= 1.4.0, < 2.0)
27
+ rubocop-ast (0.8.0)
28
+ parser (>= 2.7.1.5)
29
+ ruby-progressbar (1.10.1)
30
+ unicode-display_width (1.7.0)
31
+
32
+ PLATFORMS
33
+ ruby
34
+
35
+ DEPENDENCIES
36
+ bundler (~> 2.1)
37
+ nxt_cop!
38
+ rake (~> 13.0)
39
+
40
+ BUNDLED WITH
41
+ 2.1.4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Perceptual Inc.
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.
@@ -0,0 +1,58 @@
1
+ # nxt_cop
2
+
3
+ Getsafe shared Rubocop Config.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ group :test, :development do
11
+ gem 'nxt_cop'
12
+ end
13
+ ```
14
+
15
+ Or, for a Ruby library, add this to your gemspec:
16
+
17
+ ```ruby
18
+ spec.add_development_dependency 'nxt_cop'
19
+ ```
20
+
21
+ And then run:
22
+
23
+ ```bash
24
+ $ bundle install
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ Create a `.rubocop.yml` with the following directives:
30
+
31
+ ```yaml
32
+ inherit_gem:
33
+ nxt_cop:
34
+ - default.yml
35
+ ```
36
+
37
+ Now, run:
38
+
39
+ ```bash
40
+ $ bundle exec rubocop
41
+ ```
42
+
43
+ You do not need to include rubocop directly in your application's dependencies. nxt_copt will include a specific version of `rubocop` that is shared across all projects.
44
+
45
+ It is also possible to override styles or add styles to your application.
46
+
47
+ **NOTE:** Don't configure `AllCops` as it will override many of the rules in this gem.
48
+
49
+ ```
50
+ inherit_gem:
51
+ nxt_cop:
52
+ - default.yml
53
+
54
+ Lint/Style:
55
+ Exclude:
56
+ - db/schema.rb
57
+ - db/migrate/*.rb
58
+ ```
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'dotenv'
5
+ require 'pry'
6
+
7
+ Dotenv.load('.env.development.local', '.env.development')
8
+
9
+ require 'nxt_cop'
10
+
11
+ NxtCop::Config.require_clients
12
+
13
+ Pry.start
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'guard' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("guard", "guard")
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env sh
2
+
3
+ GEM_VERSION=$(ruby -e '$LOAD_PATH << File.join(File.dirname(__FILE__), "lib"); require "nxt_cop/version"; print NxtCop::VERSION')
4
+
5
+ gem build nxt_cop.gemspec
6
+
7
+ if [ ! -d "pkg" ]; then
8
+ mkdir pkg
9
+ fi
10
+
11
+ mv nxt_cop-$GEM_VERSION.gem pkg/nxt_cop-$GEM_VERSION.gem
12
+
13
+ git tag -m "Release $GEM_VERSION" -a v$GEM_VERSION HEAD
14
+ git push origin --tags
15
+
16
+ gem push --key github --host https://rubygems.pkg.github.com/nxt-insurance pkg/nxt_cop-$GEM_VERSION.gem
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
@@ -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,102 @@
1
+ AllCops:
2
+ Exclude:
3
+ # generated files
4
+ - bin/guard
5
+ - bin/rspec
6
+ - bin/rubocop
7
+ - bin/setup
8
+ - config.ru
9
+ - db/schema.rb
10
+ - db/migrate/*
11
+ - vendor/**/*
12
+ - node_modules/**/*
13
+ TargetRubyVersion: 2.6
14
+ DisabledByDefault: true
15
+ Layout/DotPosition:
16
+ EnforcedStyle: trailing
17
+ Layout/EmptyLineAfterGuardClause:
18
+ Enabled: true
19
+ Layout/IndentationConsistency:
20
+ Enabled: true
21
+ Layout/IndentationStyle:
22
+ Enabled: true
23
+ Layout/MultilineMethodCallIndentation:
24
+ EnforcedStyle: indented_relative_to_receiver
25
+ Layout/SpaceBeforeBlockBraces:
26
+ Enabled: true
27
+ Layout/SpaceInsideBlockBraces:
28
+ Enabled: true
29
+ Layout/SpaceInsideHashLiteralBraces:
30
+ Enabled: true
31
+ Layout/TrailingEmptyLines:
32
+ Enabled: true
33
+ Layout/EmptyLinesAroundClassBody:
34
+ EnforcedStyle: no_empty_lines
35
+ Layout/EmptyLinesAroundBlockBody:
36
+ EnforcedStyle: no_empty_lines
37
+ Lint:
38
+ Enabled: true
39
+ Lint/AmbiguousBlockAssociation:
40
+ Exclude:
41
+ - spec/**/*
42
+ Lint/BinaryOperatorWithIdenticalOperands:
43
+ Enabled: true
44
+ Lint/ConstantDefinitionInBlock:
45
+ Enabled: true
46
+ Lint/DeprecatedOpenSSLConstant:
47
+ Enabled: true
48
+ Lint/DuplicateElsifCondition:
49
+ Enabled: true
50
+ Lint/DuplicateRequire:
51
+ Enabled: true
52
+ Lint/DuplicateRescueException:
53
+ Enabled: true
54
+ Lint/EmptyConditionalBody:
55
+ Enabled: true
56
+ Lint/EmptyFile:
57
+ Enabled: true
58
+ Lint/FloatComparison:
59
+ Enabled: true
60
+ Lint/IdentityComparison:
61
+ Enabled: true
62
+ Lint/Loop:
63
+ Enabled: false
64
+ Lint/MissingSuper:
65
+ Enabled: false
66
+ Lint/MixedRegexpCaptureTypes:
67
+ Enabled: true
68
+ Lint/OutOfRangeRegexpRef:
69
+ Enabled: true
70
+ Lint/RaiseException:
71
+ Enabled: true
72
+ Lint/SelfAssignment:
73
+ Enabled: true
74
+ Lint/StructNewOverride:
75
+ Enabled: true
76
+ Lint/TopLevelReturnWithArgument:
77
+ Enabled: true
78
+ Lint/TrailingCommaInAttributeDeclaration:
79
+ Enabled: true
80
+ Lint/UnreachableLoop:
81
+ Enabled: true
82
+ Lint/UselessMethodDefinition:
83
+ Enabled: true
84
+ Lint/UselessTimes:
85
+ Enabled: true
86
+ Style/MutableConstant:
87
+ Enabled: true
88
+ Style/StringLiterals:
89
+ Enabled: true
90
+ Style/SymbolArray:
91
+ Enabled: true
92
+ Style/TrailingCommaInHashLiteral:
93
+ Enabled: true
94
+ Style/TrailingCommaInArguments:
95
+ Enabled: true
96
+ Style/WordArray:
97
+ Enabled: true
98
+ Security:
99
+ Enabled: true
100
+ Style/Semicolon:
101
+ Exclude:
102
+ - spec/**/*
@@ -0,0 +1,3 @@
1
+ module NxtCop
2
+ VERSION = '1.0.9'.freeze
3
+ end
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'nxt_cop/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'nxt_cop'
8
+ spec.version = NxtCop::VERSION
9
+ spec.authors = ['Scott Livingstone']
10
+
11
+ spec.summary = 'Getsafe shared Rubocop.'
12
+ spec.homepage = 'https://github.com/nxt-insurance/nxt_cop'
13
+
14
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
15
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
16
+ if spec.respond_to?(:metadata)
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = 'https://github.com/nxt-insurance/nxt_cop'
21
+ spec.metadata['changelog_uri'] = 'https://github.com/nxt-insurance/nxt_cop/CHANGELOG.md'
22
+ else
23
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
24
+ 'public gem pushes.'
25
+ end
26
+
27
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
+ f.match(%r{^(test|spec|features)/})
29
+ end
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
33
+
34
+ spec.add_dependency 'rubocop', '0.92.0'
35
+ spec.add_development_dependency 'bundler', '~> 2.1'
36
+ spec.add_development_dependency 'rake', '~> 13.0'
37
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nxt_cop
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.9
5
+ platform: ruby
6
+ authors:
7
+ - Scott Livingstone
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-10-22 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: 0.92.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.92.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ description:
56
+ email:
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - ".gitignore"
62
+ - ".rubocop.yml"
63
+ - CHANGELOG.md
64
+ - Gemfile
65
+ - Gemfile.lock
66
+ - LICENSE
67
+ - README.md
68
+ - Rakefile
69
+ - bin/console
70
+ - bin/guard
71
+ - bin/release
72
+ - bin/rspec
73
+ - bin/setup
74
+ - default.yml
75
+ - lib/nxt_cop/version.rb
76
+ - nxt_cop.gemspec
77
+ homepage: https://github.com/nxt-insurance/nxt_cop
78
+ licenses: []
79
+ metadata:
80
+ allowed_push_host: https://rubygems.org
81
+ homepage_uri: https://github.com/nxt-insurance/nxt_cop
82
+ source_code_uri: https://github.com/nxt-insurance/nxt_cop
83
+ changelog_uri: https://github.com/nxt-insurance/nxt_cop/CHANGELOG.md
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubygems_version: 3.0.3
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Getsafe shared Rubocop.
103
+ test_files: []