salsify_rubocop 0.40.0 → 0.40.1

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
  SHA1:
3
- metadata.gz: 79745e0fa4948d0c8c0d8498da86625a41504805
4
- data.tar.gz: 977119e8effeec2719ef5e5011f2f493a09b045e
3
+ metadata.gz: f740776b4dd783805ab13489676b4d8aa6ffa1c0
4
+ data.tar.gz: aa84e48dffec1b909c2ecbda341558dac30cd638
5
5
  SHA512:
6
- metadata.gz: cb10a493f09c1987af22d4a65cdfbf869d316a6cc6864ddca7fe9f2b75a90b36ac8459a626b35f89a2c313b5192a9f5acb60d10c1c2d09d56be0c783495ba60d
7
- data.tar.gz: 8dfcfab6cbd6a4eb986dd6ff0f6ac4259f04b99c9978a642a67a70e8268226c368620390e9ce5309f302516525a881047d990592bc8754867c6420b94f0456f0
6
+ metadata.gz: 06fb43b8eae49f4e048c12a7c054e094c958882bf181e38d59d12e3f997acb11da40a9b9522b83a69f0a28a72427ea90acc43efe271e4fc5e071769bb7274505
7
+ data.tar.gz: 25c00c93bd7e7eed800b17ee161870d35e33c889959627095a1dc196469c188c41115ca5bb6ef207f7bdb58f1fa4310d55b05926e5681d5fb2fab4f94cf13f34
data/CHANGELOG.md CHANGED
@@ -1,4 +1,16 @@
1
1
  # salsify_rubocop
2
2
 
3
+ ## v0.40.1
4
+ - Changes to `rubocop_without_rspec` configuration:
5
+
6
+ Performance/RedundantMerge:
7
+ MaxKeyValuePairs: 1
8
+
9
+ Style/ModuleFunction:
10
+ Enabled: false
11
+
12
+ Style/RaiseArgs:
13
+ EnforcedStyle: compact
14
+
3
15
  ## v0.40.0
4
16
  - Initial version
data/README.md CHANGED
@@ -1,28 +1,98 @@
1
- # SalsifyRubocop
1
+ # salsify_rubocop
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/salsify_rubocop`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This gem provides shared configuration for RuboCop for Salsify applications
4
+ and gems.
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ [RuboCop](https://github.com/bbatsov/rubocop) is a static code analyzer that
7
+ can enforce style conventions as well as identify common problems.
6
8
 
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
10
12
 
11
13
  ```ruby
12
- gem 'salsify_rubocop'
14
+ group :development, :test do
15
+ gem 'salsify_rubocop', require: false
16
+ end
13
17
  ```
14
18
 
15
- And then execute:
19
+ Or to your gem's gemspec file:
16
20
 
17
- $ bundle
21
+ ```ruby
22
+ spec.add_development_dependency 'salsify_rubocop'
23
+ ```
24
+
25
+ If you created your gem using
26
+ [cookiecutter-salsify-gem](https://github.com/salsify/cookiecutter-salsify-gem)
27
+ then this dependency was added automatically.
28
+
29
+ Then execute:
30
+
31
+ $ bundle install
32
+
33
+ It's best to ensure that you're starting from the latest release, so execute:
34
+
35
+ $ bundle update salsify_rubocop
36
+
37
+ ## Configuration
38
+
39
+ To use one of the shared RuboCop configurations from this gem, you must define
40
+ a `.rubocop.yml` file at the top-level directory in your project:
41
+
42
+ ```yaml
43
+ inherit_gem:
44
+ salsify_rubocop: conf/rubocop_rails.yml
45
+ ```
18
46
 
19
- Or install it yourself as:
47
+ Further customization of RuboCop for your local project may also be added to
48
+ this file.
20
49
 
21
- $ gem install salsify_rubocop
50
+ ### Available Configurations
22
51
 
52
+ - **rubocop_rails**: For Rails projects, this inherits from **rubocop**.
53
+ - **rubocop**: Assumes RSpec is used and requires
54
+ [rubocop-rspec](https://github.com/nevir/rubocop-rspec). This configuration
55
+ is the default for gems. This inherits from **rubocop_without_rspec**.
56
+ - **rubocop_without_rspec**: Configuration without `rubocop-rspec`. This is
57
+ intended for gems that we may have forked and taken ownership of without
58
+ converting tests from a different framework.
59
+
23
60
  ## Usage
24
61
 
25
- TODO: Write usage instructions here
62
+ Run `rubocop` for an entire project:
63
+
64
+ $ bundle exec rubocop --format fu
65
+
66
+ See the `rubocop` command-line for additional options including auto-generating
67
+ configuration for existing offenses and auto-correction.
68
+
69
+ ### Overcommit
70
+
71
+ Consider using [overcommit](https://github.com/brigade/overcommit) to
72
+ automatically run `rubocop` on changed files before committing.
73
+
74
+ This is automatically added by
75
+ [cookiecutter-salsify-gem](https://github.com/salsify/cookiecutter-salsify-gem/blob/master/%7B%7Bcookiecutter.repo_name%7D%7D/.overcommit.yml).
76
+
77
+ ### CI
78
+
79
+ Consider running `rubocop` prior to running tests in CI for your project.
80
+
81
+ TODO: add more info here.
82
+
83
+ ## Versioning
84
+
85
+ This gem is versioned based on the MAJOR.MINOR version of `rubocop`. The first
86
+ release of the `salsify_rubocop` gem was v0.40.0.
87
+
88
+ The patch version for this gem does _not_ correspond to the patch version of
89
+ `rubocop`. The patch version for this gem will change any time that one of its
90
+ configurations is modified _or_ its dependency on `rubocop` is changed to require
91
+ a different patch version.
92
+
93
+ This gem also includes a dependency on `rubocop-rspec` that will be updated to
94
+ the latest compatible version each time that the MAJOR.MINOR version of `rubocop`
95
+ is updated.
26
96
 
27
97
  ## Development
28
98
 
@@ -12,6 +12,9 @@ AllCops:
12
12
  Lint/AmbiguousOperator:
13
13
  Enabled: false
14
14
 
15
+ Performance/RedundantMerge:
16
+ MaxKeyValuePairs: 1
17
+
15
18
  Style/Alias:
16
19
  EnforcedStyle: prefer_alias_method
17
20
 
@@ -54,6 +57,9 @@ Style/GuardClause:
54
57
  Style/Lambda:
55
58
  Enabled: false
56
59
 
60
+ Style/ModuleFunction:
61
+ Enabled: false
62
+
57
63
  Style/MultilineMethodCallIndentation:
58
64
  Enabled: false
59
65
 
@@ -66,6 +72,9 @@ Style/MultilineBlockLayout:
66
72
  Style/Proc:
67
73
  Enabled: false
68
74
 
75
+ Style/RaiseArgs:
76
+ EnforcedStyle: compact
77
+
69
78
  Style/RegexpLiteral:
70
79
  Enabled: false
71
80
 
@@ -1,3 +1,3 @@
1
1
  module SalsifyRubocop
2
- VERSION = '0.40.0'.freeze
2
+ VERSION = '0.40.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salsify_rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.40.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify, Inc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.4.8
128
+ rubygems_version: 2.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Shared shared RuboCop configuration