rf-stylez 0.7.1.pre → 0.8.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -3
- data/lib/rf/stylez.rb +0 -1
- data/lib/rf/stylez/version.rb +1 -1
- data/rf-stylez.gemspec +3 -2
- data/ruby/rubocop.yml +6 -3
- data/ruby/rubocop_lint.yml +4 -8
- metadata +23 -11
- data/lib/rubocop/cop/lint/no_env.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d7fe7a192e8f6cc538dcb35e5b307c2779027662f1778cbb2d4a704cfae8208
|
4
|
+
data.tar.gz: 446ad3e734885dee4cc268c7a84c29bf550a73d0d8dfb0c25eaa3f88f4fc1131
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1414a49976ea0767b32f0b0d9736fe7a47c25be298d10f769645266ea552fd31a23eeb1ae97c2a267f6582eb8bc40ff82155dc48dd368dad4579c3a3972afdf5
|
7
|
+
data.tar.gz: b32a246fc0ae8d2d7749c0d0b070ef52794a35de69c898cb0841231b48b8104bcdb7195df8d47ded1934303721cc045e75e74cbde286c8e9be48597054640a41
|
data/.circleci/config.yml
CHANGED
@@ -3,7 +3,7 @@ version: 2
|
|
3
3
|
jobs:
|
4
4
|
style_check:
|
5
5
|
docker:
|
6
|
-
- image:
|
6
|
+
- image: gcr.io/rf-public-images/circlemator:latest
|
7
7
|
steps:
|
8
8
|
- checkout
|
9
9
|
- run:
|
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
|
13
13
|
test:
|
14
14
|
docker:
|
15
|
-
- image: circleci/ruby:2.
|
15
|
+
- image: circleci/ruby:2.7.1
|
16
16
|
steps:
|
17
17
|
- checkout
|
18
18
|
- restore_cache:
|
@@ -44,7 +44,7 @@ jobs:
|
|
44
44
|
|
45
45
|
push_to_rubygems:
|
46
46
|
docker:
|
47
|
-
- image: circleci/ruby:2.
|
47
|
+
- image: circleci/ruby:2.7.1
|
48
48
|
steps:
|
49
49
|
- checkout
|
50
50
|
- run:
|
data/lib/rf/stylez.rb
CHANGED
data/lib/rf/stylez/version.rb
CHANGED
data/rf-stylez.gemspec
CHANGED
@@ -19,12 +19,13 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = ['rf-stylez']
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_runtime_dependency 'rubocop', '>= 0.
|
22
|
+
spec.add_runtime_dependency 'rubocop', '>= 0.81', '< 0.91'
|
23
23
|
spec.add_runtime_dependency 'rubocop-rails', '~> 2.5.0'
|
24
24
|
spec.add_runtime_dependency 'rubocop-rspec', '~> 1.39.0'
|
25
|
+
spec.add_runtime_dependency 'get_env', '~> 0.2.0'
|
25
26
|
spec.add_runtime_dependency 'semantic_versioning', '~> 0.2'
|
26
27
|
|
27
|
-
spec.add_development_dependency 'bundler', '~> 1
|
28
|
+
spec.add_development_dependency 'bundler', '~> 2.1'
|
28
29
|
spec.add_development_dependency 'rake', '~> 13.0'
|
29
30
|
spec.add_development_dependency 'rspec', '>= 3.4'
|
30
31
|
spec.add_development_dependency 'byebug'
|
data/ruby/rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.7
|
3
3
|
DisabledByDefault: true
|
4
4
|
Include:
|
5
5
|
- '**/*.rb'
|
@@ -19,6 +19,7 @@ inherit_from:
|
|
19
19
|
require:
|
20
20
|
- rf/stylez
|
21
21
|
- rubocop-rspec
|
22
|
+
- get_env/cops
|
22
23
|
|
23
24
|
# Custom cops
|
24
25
|
Lint/NoENV:
|
@@ -77,6 +78,8 @@ Layout/InitialIndentation:
|
|
77
78
|
Enabled: true
|
78
79
|
Layout/IndentationConsistency:
|
79
80
|
Enabled: true
|
81
|
+
Layout/IndentationStyle:
|
82
|
+
Enabled: true
|
80
83
|
Layout/FirstHashElementIndentation:
|
81
84
|
Enabled: true
|
82
85
|
Layout/LeadingCommentSpace:
|
@@ -97,8 +100,6 @@ Layout/SpaceBeforeComma:
|
|
97
100
|
Enabled: true
|
98
101
|
Layout/SpaceInsideParens:
|
99
102
|
Enabled: true
|
100
|
-
Layout/Tab:
|
101
|
-
Enabled: true
|
102
103
|
|
103
104
|
Naming/MethodName:
|
104
105
|
Enabled: true
|
@@ -111,6 +112,8 @@ Naming/ConstantName:
|
|
111
112
|
Naming/FileName:
|
112
113
|
Enabled: true
|
113
114
|
|
115
|
+
Style/EndBlock:
|
116
|
+
Enabled: true
|
114
117
|
Style/SpecialGlobalVars:
|
115
118
|
Enabled: true
|
116
119
|
Style/GlobalVars:
|
data/ruby/rubocop_lint.yml
CHANGED
@@ -16,6 +16,10 @@ Lint/AssignmentInCondition:
|
|
16
16
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
17
17
|
Enabled: true
|
18
18
|
|
19
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
20
|
+
Description: 'This cop checks for places where binary operator has identical operands.'
|
21
|
+
Enabled: true
|
22
|
+
|
19
23
|
Lint/CircularArgumentReference:
|
20
24
|
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
21
25
|
Enabled: true
|
@@ -52,10 +56,6 @@ Lint/EmptyInterpolation:
|
|
52
56
|
Description: 'Checks for empty string interpolation.'
|
53
57
|
Enabled: true
|
54
58
|
|
55
|
-
Lint/EndInMethod:
|
56
|
-
Description: 'END blocks should not be placed inside method definitions.'
|
57
|
-
Enabled: true
|
58
|
-
|
59
59
|
Lint/EnsureReturn:
|
60
60
|
Description: 'Do not use return in an ensure block.'
|
61
61
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
@@ -187,10 +187,6 @@ Lint/UselessAssignment:
|
|
187
187
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
188
188
|
Enabled: true
|
189
189
|
|
190
|
-
Lint/UselessComparison:
|
191
|
-
Description: 'Checks for comparison of something with itself.'
|
192
|
-
Enabled: true
|
193
|
-
|
194
190
|
Lint/UselessElseWithoutRescue:
|
195
191
|
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
196
192
|
Enabled: true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rf-stylez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emanuel Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.81'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '0.
|
22
|
+
version: '0.91'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.81'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '0.
|
32
|
+
version: '0.91'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rubocop-rails
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 1.39.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: get_env
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.2.0
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.2.0
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: semantic_versioning
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +92,14 @@ dependencies:
|
|
78
92
|
requirements:
|
79
93
|
- - "~>"
|
80
94
|
- !ruby/object:Gem::Version
|
81
|
-
version: '1
|
95
|
+
version: '2.1'
|
82
96
|
type: :development
|
83
97
|
prerelease: false
|
84
98
|
version_requirements: !ruby/object:Gem::Requirement
|
85
99
|
requirements:
|
86
100
|
- - "~>"
|
87
101
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1
|
102
|
+
version: '2.1'
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: rake
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,7 +179,6 @@ files:
|
|
165
179
|
- lib/rf/stylez/update_check.rb
|
166
180
|
- lib/rf/stylez/version.rb
|
167
181
|
- lib/rubocop/cop/lint/no_bang_state_machine_events.rb
|
168
|
-
- lib/rubocop/cop/lint/no_env.rb
|
169
182
|
- lib/rubocop/cop/lint/no_grape_api.rb
|
170
183
|
- lib/rubocop/cop/lint/no_http_party.rb
|
171
184
|
- lib/rubocop/cop/lint/no_json.rb
|
@@ -195,8 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
208
|
- !ruby/object:Gem::Version
|
196
209
|
version: 1.3.1
|
197
210
|
requirements: []
|
198
|
-
|
199
|
-
rubygems_version: 2.7.7
|
211
|
+
rubygems_version: 3.1.2
|
200
212
|
signing_key:
|
201
213
|
specification_version: 4
|
202
214
|
summary: Styles for Rainforest code
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module Cop
|
5
|
-
module Lint
|
6
|
-
# @example
|
7
|
-
# # bad
|
8
|
-
# ENV[]
|
9
|
-
#
|
10
|
-
# # bad
|
11
|
-
# ENV.fetch(..)
|
12
|
-
#
|
13
|
-
# # good
|
14
|
-
# GetEnv[]
|
15
|
-
#
|
16
|
-
# # good
|
17
|
-
# GetEnv.fetch(...)
|
18
|
-
class NoENV < Cop
|
19
|
-
MSG = 'Use `GetEnv` instead of `ENV`.'.freeze
|
20
|
-
|
21
|
-
def_node_matcher :is_ENV?, '(const nil? :ENV)'
|
22
|
-
|
23
|
-
def on_const(node)
|
24
|
-
return unless is_ENV?(node)
|
25
|
-
add_offense(node)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|