datarockets-style 0.2.0 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a419ac14c8ca4180f3f2e84d995a722129c04d3
4
- data.tar.gz: a86d9ed8fc71274bcbb72a8b2834575191aa7876
3
+ metadata.gz: 0dbec2a9995d6607b63dafed5a123bfdb8704e3a
4
+ data.tar.gz: 50bee07693998a77cf012e2cff94905095e111fc
5
5
  SHA512:
6
- metadata.gz: d14ee00d5a5936c01202602e715837df46a2ce514319fc16e59236fbd4332ef8988ac70bf1acfc2953669263d879e25983e1640322ba8ae42fda426c479fde83
7
- data.tar.gz: 9c9997bb55e5524e61929feb73933eaf99bfe9d525694cd0a2059f761f697e8922949ae312abb3aac891b26e4b91ec67e4ed638c3bdcbea919d89612e0b89023
6
+ metadata.gz: b6e5844c8bee41e0c621cf732808284d0f7596f1949c65396ef4dcbbccc830141209f3b1e8865d9e9b59b38ff5e2c36dd8dfe35f38cddfaad74a9f87101d9b33
7
+ data.tar.gz: '096a00c0585458c1fd3ca87f0b116db3b90588c368e3a4c86dc76f253932516c3b80dd8099f8e09dc810ee4dbc8b14c5b9a7c5e66f0b378245f1eec9174faef9'
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: New issue or feature request
3
+ about: Suggest a new feature or enhancement, ask a question, report bug, etc.
4
+ title: "Title goes here"
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is.
12
+
13
+ **Additional context.**
14
+ Add any other context or screenshots about the feature request here.
15
+
16
+ **Add label.**
17
+ Add label for easier navigation by issues and understanding your expectations.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: Update Dependencies
3
+ about: Updating dependencies issue
4
+ title: "Update *dependency* to *version*"
5
+ labels: dependencies
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ Link to the new release: *link*
11
+
12
+ To-Do list:
13
+
14
+ - [ ] update dependencies to the latest version
15
+ - [ ] investigate how it changes and affect our current styles and cops
16
+ - [ ] check the required ruby version
@@ -0,0 +1,10 @@
1
+ Before you submit a pull request, please make sure you have to follow:
2
+
3
+ - [ ] read and know items from the [Contributing Guide](CONTRIBUTING.md#pull-requests)
4
+ - [ ] add a description of the problem you're trying to solve (short summary from related issue)
5
+ - [ ] verified that cops are ordered by alphabet
6
+ - [ ] add a note to the style guide docs (if it needs)
7
+ - [ ] add a note to the changelog file
8
+ - [ ] the commit message contains the number of the related issue (if it presents)
9
+ and word `Fix` if this PR closes related issue
10
+ - [ ] squash all commits before submitting to review
data/CHANGELOG.md CHANGED
@@ -1,15 +1,30 @@
1
1
  # Change Log
2
2
 
3
- The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-format)
3
+ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-format).
4
4
 
5
5
  ## master (unreleased)
6
6
 
7
+ ## 0.3.0 (2019-08-02)
8
+
9
+ ### Changed
10
+
11
+ * Update rubocop to `0.74.0`. ([@r.dubrovsky][])
12
+ * Update rubocop-rspec to `1.34.1`. ([@r.dubrovsky][])
13
+ * Move shared rubocop config into `config` directory. ([@r.dubrovsky][])
14
+ * Allow writing empty methods in two lines. ([@v.kuzmik][])
15
+ * Disable `Style/FrozenStringLiteralComment` cop by default. ([@r.dubrovsky][])
16
+
17
+ ### Fixed
18
+
19
+ * [#4222](https://github.com/rubocop-hq/rubocop/issues/4222): Disable `Lint/AmbiguousBlockAssociation` for Rspec directory. ([@r.dubrovsky][])
20
+ * [#65](https://github.com/datarockets/datarockets-style/issues/65): Exclude `node_modules` from rubocop scope. ([@r.dubrovsky][])
21
+
7
22
  ## 0.2.0 (2019-07-17)
8
23
 
9
24
  ### Changed
10
25
 
11
26
  * Update rubocop to `0.73.0`. ([@r.dubrovsky][])
12
- * Use prefered variable name in rescued exceptions (cop: `Naming/RescuedExceptionsVariableName`) ([@ula][])
27
+ * Use prefered variable name in rescued exceptions (cop: `Naming/RescuedExceptionsVariableName`). ([@ula][])
13
28
  * Disable `RSpec/ImplicitSubject` cop for rspec files. ([@r.dubrovsky][])
14
29
 
15
30
  ## 0.1.0 (2019-06-27)
@@ -17,24 +32,25 @@ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-
17
32
  ### Added
18
33
 
19
34
  * Base config with community rules and some basic override rules. ([@r.dubrovsky][], [@aleks][])
20
- * Config is based on rubocop version 0.72.0 ([@r.dubrovsky][])
21
- * Enable `rubocop-spec` cops by default ([@r.dubrovsky][])
22
- * Enable `Bundler/DuplicatedGem` cop by default ([@r.dubrovsky][])
23
- * Enable `Bundler/OrderedGems` cop with allowing ordering by groups ([@r.dubrovsky][])
35
+ * Config is based on rubocop version 0.72.0. ([@r.dubrovsky][])
36
+ * Enable `rubocop-spec` cops by default. ([@r.dubrovsky][])
37
+ * Enable `Bundler/DuplicatedGem` cop by default. ([@r.dubrovsky][])
38
+ * Enable `Bundler/OrderedGems` cop with allowing ordering by groups. ([@r.dubrovsky][])
24
39
 
25
40
 
26
41
  ### Changed
27
42
 
28
- * Change the limit for size of line to 120 symbols ([@r.dubrovsky][])
29
- * Disable `Metrics/BlockLength` cop for rspec files ([@r.dubrovsky][])
30
- * Exclude rubocop checking for some config directories ([@r.dubrovsky][])
31
- * Enable prafering double quotes for string literals ([@r.dubrovsky][])
32
- * Do not add spaces beetwen hash literal braces (cop `Layout/SpaceInsideHashLiteralBraces`) ([@r.dubrovsky][])
33
- * Prefer normal style for `Layout/IndentationConsistency` cop for Rails apps too ([@r.dubrovsky][])
34
- * Change style to `variable` for `Layout/EndAlignment` cop ([@r.dubrovsky][])
35
- * Change style to `with_fixed_indentation` with indentation width 2 for `Layout/AlignParameter` cop ([@r.dubrovsky][])
36
- * Always ingone hash aligning for key word arguments (cop: `Layout/AlignHash`) ([@r.dubrovsky][])
43
+ * Change the limit for size of line to 120 symbols. ([@r.dubrovsky][])
44
+ * Disable `Metrics/BlockLength` cop for rspec files. ([@r.dubrovsky][])
45
+ * Exclude rubocop checking for some config directories. ([@r.dubrovsky][])
46
+ * Enable prafering double quotes for string literals. ([@r.dubrovsky][])
47
+ * Do not add spaces beetwen hash literal braces (cop `Layout/SpaceInsideHashLiteralBraces`). ([@r.dubrovsky][])
48
+ * Prefer normal style for `Layout/IndentationConsistency` cop for Rails apps too. ([@r.dubrovsky][])
49
+ * Change style to `variable` for `Layout/EndAlignment` cop. ([@r.dubrovsky][])
50
+ * Change style to `with_fixed_indentation` with indentation width 2 for `Layout/AlignParameter` cop. ([@r.dubrovsky][])
51
+ * Always ingone hash aligning for key word arguments. (cop: `Layout/AlignHash`) ([@r.dubrovsky][])
37
52
 
38
53
  [@r.dubrovsky]: https://github.com/roman-dubrovsky
39
54
  [@aleks]: https://github.com/AleksSenkou
40
55
  [@ula]: https://github.com/lazycoder9
56
+ [@v.kuzmik]: https://github.com/TheBlackArroVV/
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- datarockets-style (0.2.0)
5
- rubocop (~> 0.73.0)
6
- rubocop-rspec (~> 1.33)
4
+ datarockets-style (0.3.0)
5
+ rubocop (~> 0.74.0)
6
+ rubocop-rspec (~> 1.34)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -15,14 +15,14 @@ GEM
15
15
  ast (~> 2.4.0)
16
16
  rainbow (3.0.0)
17
17
  rake (10.5.0)
18
- rubocop (0.73.0)
18
+ rubocop (0.74.0)
19
19
  jaro_winkler (~> 1.5.1)
20
20
  parallel (~> 1.10)
21
21
  parser (>= 2.6)
22
22
  rainbow (>= 2.2.2, < 4.0)
23
23
  ruby-progressbar (~> 1.7)
24
24
  unicode-display_width (>= 1.4.0, < 1.7)
25
- rubocop-rspec (1.33.0)
25
+ rubocop-rspec (1.34.1)
26
26
  rubocop (>= 0.60.0)
27
27
  ruby-progressbar (1.10.1)
28
28
  unicode-display_width (1.6.0)
data/README.md CHANGED
@@ -33,7 +33,7 @@ Create a `.rubocop.yml` with the following directives:
33
33
  ```yaml
34
34
  inherit_gem:
35
35
  datarockets-style:
36
- - default.yml
36
+ - config/default.yml
37
37
  ```
38
38
 
39
39
  Now, run:
data/RELEASING.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # Releasing
2
2
 
3
3
  * Update `version.rb` file accordingly.
4
- * Update `CHANGELOG.md` file
5
- * Tag the release: `git tag vVERSION`
6
- * Push changes: `git push --tags`
7
- * Update the release notes on GitHub.com
8
- * Build and publish:
4
+ * Update `CHANGELOG.md` file.
5
+ * Update `Gemfile.lock` file via running `bundle install`.
6
+ * Build and publish (and verify that everything ok):
9
7
 
10
8
  ```bash
11
9
  bundle exec rake build
12
- gem push *todo*
10
+ gem push *built_file*
13
11
  ```
14
-
12
+ * Tag the release: `git tag vVERSION`.
13
+ * Push changes: `git push --tags`.
14
+ * Update the release notes on GitHub.com.
15
15
  * Announce the new release,
16
16
  making sure to say "thank you" to the contributors
17
17
  who helped shape this version!
data/STYLE_GUIDE.md CHANGED
@@ -72,33 +72,39 @@ do_something(foo: 1,
72
72
  The parameters on a multi-line method call or definition are aligning by an indentation level.
73
73
  <sup>[[link](#style-parameters-aligning)]</sup>
74
74
 
75
+ **Recommended:** write each parameter on the separate line.
76
+
75
77
  ```ruby
76
- # good
78
+ # bad
77
79
 
78
- def foo(bar,
79
- baz)
80
+ def foo(bar, baz,
81
+ kek, lol)
80
82
  123
81
83
  end
82
84
 
85
+ # bad
86
+
83
87
  def foo(
84
88
  bar,
85
- baz
86
- )
89
+ baz)
87
90
  123
88
91
  end
89
92
 
90
- # bad
93
+ # good
91
94
 
92
- def foo(bar,
93
- baz)
95
+ def foo(bar, baz,
96
+ kek, lol)
94
97
  123
95
98
  end
96
99
 
97
- # bad
100
+ # better
98
101
 
99
102
  def foo(
100
103
  bar,
101
- baz)
104
+ baz,
105
+ kek,
106
+ lol
107
+ )
102
108
  123
103
109
  end
104
110
  ```
@@ -240,6 +246,32 @@ rescue MyException => error
240
246
  # do something
241
247
  end
242
248
  ```
249
+
250
+
251
+ * <a name="style-empty-method"></a>
252
+ Write empty methods in an expanded way.
253
+ <sup>[[link](#style-empty-method)]</sup>
254
+
255
+ ```ruby
256
+ # bad
257
+ def foo(bar); end
258
+
259
+ def self.foo(bar); end
260
+
261
+ # good
262
+ def foo(bar)
263
+ end
264
+
265
+ def self.foo(bar)
266
+ end
267
+ ```
268
+
269
+ * <a name="style-magic-link"></a>
270
+ There are not any requried rules for `frozen_string_literal` magic url.
271
+ Set up [this cop](https://rubocop.readthedocs.io/en/latest/cops_style/#stylefrozenstringliteralcomment) depends on the project.
272
+ So set up it on the local rubocop config manually.
273
+ <sup>[[link](#style-magic-link)]</sup>
274
+
243
275
  ## Rspec
244
276
 
245
277
  * <a name="rspec-betterrspec"></a>
@@ -4,6 +4,7 @@ AllCops:
4
4
  - "bin/*"
5
5
  - "lib/tasks/**/*"
6
6
  - "config/**/*"
7
+ - "node_modules/**/*"
7
8
  - "vendor/**/*"
8
9
  - "app/views/**/*"
9
10
  - "config.ru"
@@ -34,6 +35,10 @@ Layout/SpaceInsideHashLiteralBraces:
34
35
  EnforcedStyle: no_space
35
36
  EnforcedStyleForEmptyBraces: no_space
36
37
 
38
+ Lint/AmbiguousBlockAssociation:
39
+ Exclude:
40
+ - "spec/**/*"
41
+
37
42
  Metrics/BlockLength:
38
43
  Exclude:
39
44
  - "spec/**/*"
@@ -47,5 +52,11 @@ Naming/RescuedExceptionsVariableName:
47
52
  RSpec/ImplicitSubject:
48
53
  Enabled: false
49
54
 
55
+ Style/EmptyMethod:
56
+ EnforcedStyle: expanded
57
+
58
+ Style/FrozenStringLiteralComment:
59
+ Enabled: false
60
+
50
61
  Style/StringLiterals:
51
62
  EnforcedStyle: double_quotes
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency "rubocop", "~> 0.73.0"
34
- spec.add_dependency "rubocop-rspec", "~> 1.33"
33
+ spec.add_dependency "rubocop", "~> 0.74.0"
34
+ spec.add_dependency "rubocop-rspec", "~> 1.34"
35
35
 
36
36
  spec.add_development_dependency "bundler", "~> 1.16"
37
37
  spec.add_development_dependency "rake", "~> 10.0"
@@ -1,5 +1,5 @@
1
1
  module Datarockets
2
2
  module Style
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datarockets-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Dubrovsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-17 00:00:00.000000000 Z
11
+ date: 2019-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.73.0
19
+ version: 0.74.0
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.73.0
26
+ version: 0.74.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.33'
33
+ version: '1.34'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.33'
40
+ version: '1.34'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -73,6 +73,9 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".github/ISSUE_TEMPLATE/new-issue.md"
77
+ - ".github/ISSUE_TEMPLATE/update-dependencies.md"
78
+ - ".github/PULL_REQUEST_TEMPLATE.md"
76
79
  - ".gitignore"
77
80
  - CHANGELOG.md
78
81
  - CODE_OF_CONDUCT.md
@@ -86,8 +89,8 @@ files:
86
89
  - STYLE_GUIDE.md
87
90
  - bin/console
88
91
  - bin/setup
92
+ - config/default.yml
89
93
  - datarockets-style.gemspec
90
- - default.yml
91
94
  - lib/datarockets/style.rb
92
95
  - lib/datarockets/style/version.rb
93
96
  homepage: https://github.com/datarockets/datarockets-style