umts-custom-cops 0.3.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fbb1c2d13025ac5c23b36646f630f2571a66c8b6ba71f6683100d501ab6ca05
4
- data.tar.gz: 77b825c0656260d685a9cd10bddd88d87a704c4f474fb33ec1edd8492b6cdf29
3
+ metadata.gz: 3fd3babbd34390821e6966e35cc99538218c43bceb35b5dc4dc888711d811d38
4
+ data.tar.gz: 439c6e906a47df2bacb02ac0f4023c96409ffa0534feb8da3e23a588ad54a678
5
5
  SHA512:
6
- metadata.gz: 90031daef0f9f0caa15e40ff450a3ef997134bca280620448985b00b111e00d16f0f5bd5e379d050984920feac5a8b93d57e17ddef133f75b7c9712dce67e4d8
7
- data.tar.gz: 9e5e4e9658d45bb5566fa14592c8dd6c3c8e54d51987a7b857cefae8270e3d25c6f089ef1309db407d9b4acda8e33a9f4c8ea62bba347ead35c1f9b1fafbfe97
6
+ metadata.gz: 6924bc7f455be47fe691f52418bce0550b2de075e4b8c95e6b0a2090b8d214db36f9923a4d47240f935111bb01869f6f37ebd61016163421a0fb02ed272afa51
7
+ data.tar.gz: c91ae1f325772c354ab34c9fcea65b13705265e62f38444824bc5156843fe01ad9056f0fb5db0655e23ec57eae760ec6433065a98dbe5750d5b5355b7c6dc1d0
data/.rubocop.yml CHANGED
@@ -1,4 +1,9 @@
1
- Metrics/LineLength:
1
+ AllCops:
2
+ NewCops: enable
3
+ SuggestExtensions: false
4
+ TargetRubyVersion: 2.5
5
+
6
+ Layout/LineLength:
2
7
  Max: 100
3
8
 
4
9
  Metrics/BlockLength:
data/.travis.yml CHANGED
@@ -1,16 +1,21 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.10
4
- - 2.3.8
5
- - 2.4.5
6
- - 2.5.3
7
- - 2.6.1
3
+ - 2.5.8
4
+ - 2.6.5
5
+ - 2.7.2
6
+ - 3.0.0
8
7
  env: CODECLIMATE_REPO_TOKEN=c356c22cc5b342d3cba9a1fb9d71b63b52de9b9daa1f54c07f959f90da05c8ff
9
- before_install: gem install bundler -v "$(cat .bundler.version)"
10
- script:
8
+ before_install:
9
+ - gem update --system
10
+ - gem install bundler
11
+ before_script:
12
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13
+ - chmod +x ./cc-test-reporter
14
+ - ./cc-test-reporter before-build
15
+ script:
11
16
  - bundle exec rake
12
- after_success:
13
- - bundle exec codeclimate-test-reporter
17
+ after_script:
18
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
14
19
  notifications:
15
20
  email:
16
21
  on_success: change
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in custom-cops.gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 David Faulkenberry
3
+ Copyright (c) 2020 UMass Transit Services
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -3,8 +3,6 @@
3
3
  Custom Rubocops, currently all related to RSpec, used for UMass Transit's
4
4
  internal Rails development purposes.
5
5
 
6
- Primary contributor is @dfaulken.
7
-
8
6
  A lot of the ideas for this came from some reading of the rubocop source
9
7
  code, so thanks to the RuboCop team for making it public.
10
8
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
  require 'rubocop/rake_task'
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'umts-custom-cops'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'umts-custom-cops/version'
2
4
 
3
5
  require 'umts-custom-cops/be_matcher_for_non_duplicable_types'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubocop'
2
4
 
3
5
  module RuboCop
@@ -7,14 +9,14 @@ module RuboCop
7
9
  #
8
10
  # See the specs for examples.
9
11
  class BeMatcherForNonDuplicableTypes < Cop
10
- MSG = 'Prefer `be` matcher to `eq` or `eql` for non-duplicable types.'.freeze
12
+ MSG = 'Prefer `be` matcher to `eq` or `eql` for non-duplicable types.'
11
13
 
12
14
  def_node_matcher :eq_on_non_duplicable_type?, <<-PATTERN
13
15
  (send
14
16
  _expectation {:to :not_to}
15
17
  (send
16
18
  _context {:eq :eql}
17
- {true false nil int}
19
+ {true false nil}
18
20
  )
19
21
  )
20
22
  PATTERN
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubocop'
2
4
 
3
5
  module RuboCop
@@ -6,7 +8,7 @@ module RuboCop
6
8
  # See the specs for examples.
7
9
  class PredicateMethodMatcher < Cop
8
10
  MESSAGE =
9
- 'Prefer predicate matcher over checking the return value of a predicate method.'.freeze
11
+ 'Prefer predicate matcher over checking the return value of a predicate method.'
10
12
 
11
13
  def_node_matcher :generic_equality_expectation, <<-PATTERN
12
14
  (send
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module UmtsCustomCops
2
- VERSION = '0.3.2'.freeze
4
+ VERSION = '1.0.0'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'umts-custom-cops/version'
@@ -15,20 +17,22 @@ Gem::Specification.new do |spec|
15
17
 
16
18
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
19
  # delete this section to allow pushing this gem to any host.
18
- if spec.respond_to?(:metadata)
19
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
- else fail 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
21
- end
20
+ raise <<~MSG unless spec.respond_to?(:metadata)
21
+ RubyGems 2.0 or newer is required to protect against public gem pushes.
22
+ MSG
23
+
24
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
22
25
 
23
26
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
24
27
  spec.require_paths = ['lib']
25
28
 
26
- spec.add_dependency 'rspec', '~> 3.0'
27
- spec.add_dependency 'rubocop', '0.65.0'
29
+ spec.required_ruby_version = '>= 2.5.0'
30
+
31
+ spec.add_dependency 'rubocop', '~> 1.10'
28
32
 
29
- spec.add_development_dependency 'bundler', File.open('.bundler.version').read.strip
30
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
33
+ spec.add_development_dependency 'bundler', '~> 2.1', '>= 2.1.4'
31
34
  spec.add_development_dependency 'pry-byebug'
32
- spec.add_development_dependency 'rake', '~> 10.0'
35
+ spec.add_development_dependency 'rake', '~> 13.0'
36
+ spec.add_development_dependency 'rspec', '~> 3.0'
33
37
  spec.add_development_dependency 'simplecov'
34
38
  end
metadata CHANGED
@@ -1,99 +1,91 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umts-custom-cops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - UMass Transit Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-18 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec
14
+ name: rubocop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: '1.10'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rubocop
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: 0.65.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
39
- - !ruby/object:Gem::Version
40
- version: 0.65.0
26
+ version: '1.10'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 1.17.3
33
+ version: '2.1'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.1.4
48
37
  type: :development
49
38
  prerelease: false
50
39
  version_requirements: !ruby/object:Gem::Requirement
51
40
  requirements:
52
41
  - - "~>"
53
42
  - !ruby/object:Gem::Version
54
- version: 1.17.3
43
+ version: '2.1'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.1.4
55
47
  - !ruby/object:Gem::Dependency
56
- name: codeclimate-test-reporter
48
+ name: pry-byebug
57
49
  requirement: !ruby/object:Gem::Requirement
58
50
  requirements:
59
- - - "~>"
51
+ - - ">="
60
52
  - !ruby/object:Gem::Version
61
- version: '1.0'
53
+ version: '0'
62
54
  type: :development
63
55
  prerelease: false
64
56
  version_requirements: !ruby/object:Gem::Requirement
65
57
  requirements:
66
- - - "~>"
58
+ - - ">="
67
59
  - !ruby/object:Gem::Version
68
- version: '1.0'
60
+ version: '0'
69
61
  - !ruby/object:Gem::Dependency
70
- name: pry-byebug
62
+ name: rake
71
63
  requirement: !ruby/object:Gem::Requirement
72
64
  requirements:
73
- - - ">="
65
+ - - "~>"
74
66
  - !ruby/object:Gem::Version
75
- version: '0'
67
+ version: '13.0'
76
68
  type: :development
77
69
  prerelease: false
78
70
  version_requirements: !ruby/object:Gem::Requirement
79
71
  requirements:
80
- - - ">="
72
+ - - "~>"
81
73
  - !ruby/object:Gem::Version
82
- version: '0'
74
+ version: '13.0'
83
75
  - !ruby/object:Gem::Dependency
84
- name: rake
76
+ name: rspec
85
77
  requirement: !ruby/object:Gem::Requirement
86
78
  requirements:
87
79
  - - "~>"
88
80
  - !ruby/object:Gem::Version
89
- version: '10.0'
81
+ version: '3.0'
90
82
  type: :development
91
83
  prerelease: false
92
84
  version_requirements: !ruby/object:Gem::Requirement
93
85
  requirements:
94
86
  - - "~>"
95
87
  - !ruby/object:Gem::Version
96
- version: '10.0'
88
+ version: '3.0'
97
89
  - !ruby/object:Gem::Dependency
98
90
  name: simplecov
99
91
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +107,6 @@ executables: []
115
107
  extensions: []
116
108
  extra_rdoc_files: []
117
109
  files:
118
- - ".bundler.version"
119
110
  - ".gitignore"
120
111
  - ".gitmodules"
121
112
  - ".rspec"
@@ -145,15 +136,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
136
  requirements:
146
137
  - - ">="
147
138
  - !ruby/object:Gem::Version
148
- version: '0'
139
+ version: 2.5.0
149
140
  required_rubygems_version: !ruby/object:Gem::Requirement
150
141
  requirements:
151
142
  - - ">="
152
143
  - !ruby/object:Gem::Version
153
144
  version: '0'
154
145
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.7.8
146
+ rubygems_version: 3.0.1
157
147
  signing_key:
158
148
  specification_version: 4
159
149
  summary: Custom Rails-specific Rubocop cops for our internal development purposes
data/.bundler.version DELETED
@@ -1 +0,0 @@
1
- ~> 1.17.3