matkoniecz-ruby-style 0.1.1 → 1.2
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 +5 -5
- data/.rubocop.yml +1 -1
- data/Gemfile +3 -1
- data/README.md +7 -3
- data/matkoniecz-ruby-style.gemspec +3 -7
- data/reinstall.sh +11 -0
- data/standard_rubocop_config.yml +69 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8803a9d48fdb21b96b0ec4eff2deb80f66e9c82cc8ecc4980ac8e8a2d8568cb3
|
4
|
+
data.tar.gz: 5dfc3393eae46e70b270f8421bd25820b534ee6f64aafefb47c5d40fb2d35ec9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2714bf26a2c1f5e56c62c67ef24bf37d504cebc93a5932e1bb761f6138df9b5f6e6430aa2d104b992060c6e3ddc1e7baa7acda1c807f0e9751aee02068a6b6a
|
7
|
+
data.tar.gz: 430fcd1090652289e7f93bfbc5d336321c1ea57c0113e3823e588d72fb97e36a1b22d2aab56e0f0a0a3b043b4001a74715e7a0df41f53f5f292c1e80c608fd4f
|
data/.rubocop.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
inherit_from:
|
1
|
+
inherit_from: standard_rubocop_config.yml
|
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source "https://rubygems.org"
|
2
4
|
|
3
|
-
git_source(:github) {|repo_name| "https://github.com/matkoniecz/matkoniecz-ruby-style" }
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/matkoniecz/matkoniecz-ruby-style" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in matkoniecz-ruby-style.gemspec
|
6
8
|
gemspec
|
data/README.md
CHANGED
@@ -30,15 +30,19 @@ inherit_gem:
|
|
30
30
|
- standard_rubocop_config.yml
|
31
31
|
```
|
32
32
|
|
33
|
+
You do not need to include rubocop directly in your application's dependencies. This gem includes a specific version of `rubocop` and `rubocop-rspec` that is shared across all projects.
|
34
|
+
|
33
35
|
## How to release new gem version
|
34
36
|
|
35
37
|
```
|
36
|
-
rm
|
37
|
-
gem build
|
38
|
-
gem install --user-install
|
38
|
+
rm ./*.gem
|
39
|
+
gem build ./*.gemspec
|
40
|
+
gem install --user-install ./*.gem
|
39
41
|
gem push *.gem
|
40
42
|
```
|
41
43
|
|
44
|
+
Code to install new version locally is also in `reinstall.sh` file.
|
45
|
+
|
42
46
|
## Contributing
|
43
47
|
|
44
48
|
Bug reports and pull requests are welcome on GitHub at https://github.com/matkoniecz/matkoniecz-ruby-style.
|
@@ -1,10 +1,6 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require "matkoniecz/ruby/style/version"
|
4
|
-
|
5
1
|
Gem::Specification.new do |spec|
|
6
2
|
spec.name = "matkoniecz-ruby-style"
|
7
|
-
spec.version =
|
3
|
+
spec.version = 1.2
|
8
4
|
spec.authors = ["Mateusz Konieczny"]
|
9
5
|
spec.email = ["matkoniecz@gmail.com"]
|
10
6
|
|
@@ -14,12 +10,12 @@ Gem::Specification.new do |spec|
|
|
14
10
|
|
15
11
|
# Specify which files should be added to the gem when it is released.
|
16
12
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
17
|
-
spec.files = Dir.chdir(File.expand_path(
|
13
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
18
14
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
15
|
end
|
20
16
|
spec.bindir = "exe"
|
21
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
18
|
spec.require_paths = ["lib"]
|
23
|
-
spec.add_dependency "rubocop", "~> 0.
|
19
|
+
spec.add_dependency "rubocop", "~> 0.73"
|
24
20
|
spec.add_dependency "rubocop-rspec", "~> 1.29.1"
|
25
21
|
end
|
data/reinstall.sh
ADDED
data/standard_rubocop_config.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require: rubocop-rspec
|
2
2
|
|
3
3
|
AllCops:
|
4
|
-
TargetRubyVersion: 2.
|
4
|
+
TargetRubyVersion: 2.5
|
5
5
|
|
6
6
|
# not preferred as this rule makes harder to move/add/remove items
|
7
7
|
Style/TrailingCommaInArrayLiteral:
|
@@ -44,6 +44,74 @@ Lint/UnusedBlockArgument:
|
|
44
44
|
Style/SpecialGlobalVars:
|
45
45
|
Enabled: false
|
46
46
|
|
47
|
+
# there is no benefit from ugly code of collapsed form
|
48
|
+
Style/EmptyMethod:
|
49
|
+
EnforcedStyle: expanded
|
50
|
+
|
51
|
+
# unconvinced that it is useful
|
52
|
+
Style/RaiseArgs:
|
53
|
+
Enabled: false
|
54
|
+
|
55
|
+
# adds useless line without benefit outweighting readability loss
|
56
|
+
Style/FrozenStringLiteralComment:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
# Ruby-specific syntax has no benefits whatsover over slashes
|
60
|
+
# if there is one let me know
|
61
|
+
Style/RegexpLiteral:
|
62
|
+
EnforcedStyle: slashes
|
63
|
+
|
64
|
+
# Standard array is much better and less overcomplicated
|
65
|
+
Style/SymbolArray:
|
66
|
+
EnforcedStyle: brackets
|
67
|
+
|
68
|
+
# Neither is much better, consistency is much more important
|
69
|
+
# for example see:
|
70
|
+
# group = ["#{fish[0]}", "#{fish[0]} filet", "filet z #{fish[1]}"]
|
71
|
+
# vs
|
72
|
+
# group = [(fish[0]).to_s, "#{fish[0]} filet", "filet z #{fish[1]}"]
|
73
|
+
Style/UnneededInterpolation:
|
74
|
+
Enabled: false
|
75
|
+
|
76
|
+
# local style optimization is better than global consistency
|
77
|
+
Style/StringLiteralsInInterpolation:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
# this rubyism is not more readable
|
81
|
+
Style/NumericPredicate:
|
82
|
+
Enabled: false
|
83
|
+
|
84
|
+
# disabled due to bug reported as https://github.com/rubocop-hq/rubocop/issues/6630
|
85
|
+
Style/CommentAnnotation:
|
86
|
+
Enabled: false
|
87
|
+
|
88
|
+
# this blank lines are neither helpful nor useful
|
89
|
+
Layout/EmptyLineAfterGuardClause:
|
90
|
+
Enabled: false
|
91
|
+
|
92
|
+
# not convinced that removing get_ is useful use of my time
|
93
|
+
Naming/AccessorMethodName:
|
94
|
+
Enabled: false
|
95
|
+
|
96
|
+
Naming/UncommunicativeMethodParamName:
|
97
|
+
AllowedNames:
|
98
|
+
- bb # standard shortening of "bounding box"
|
99
|
+
- r # standard shortening of "radius"
|
100
|
+
- mb # standard for megabytes
|
101
|
+
- x # typically perfectly fine for position to a plane
|
102
|
+
- "y" # typically perfectly fine for position to a plane
|
103
|
+
|
104
|
+
# avoding jumboXXLplus lines is a good idea, but
|
105
|
+
# there is no reason to stick to 80 characters
|
106
|
+
# a bit longer lines seems fine to me
|
107
|
+
Metrics/LineLength:
|
108
|
+
Max: 88
|
109
|
+
|
110
|
+
# benefits from adding ? to the method names are outweighted
|
111
|
+
# by increased costs of context switch between languages
|
112
|
+
Naming/PredicateName:
|
113
|
+
Enabled: false
|
114
|
+
|
47
115
|
# Uncomment following rules to allow using tabs:
|
48
116
|
#Layout/Tab:
|
49
117
|
# Enabled: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matkoniecz-ruby-style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Konieczny
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.73'
|
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: 0.
|
26
|
+
version: '0.73'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- README.md
|
53
53
|
- Rakefile
|
54
54
|
- matkoniecz-ruby-style.gemspec
|
55
|
+
- reinstall.sh
|
55
56
|
- standard_rubocop_config.yml
|
56
57
|
homepage: https://github.com/matkoniecz/matkoniecz-ruby-style
|
57
58
|
licenses:
|
@@ -72,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
73
|
- !ruby/object:Gem::Version
|
73
74
|
version: '0'
|
74
75
|
requirements: []
|
75
|
-
|
76
|
-
rubygems_version: 2.6.14.1
|
76
|
+
rubygems_version: 3.0.4
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: shared style config for Ruby
|