rubocop-template 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0517d2c995e6cf36bb982adaf315fffae979137a
4
+ data.tar.gz: 4b87f8024f360f8e4750594d86805fb44fcc5a6f
5
+ SHA512:
6
+ metadata.gz: c3436a8bea7dbadf3c1b58d7b779cd8379f06e2ef5be68d61b6f7bfc6146689c282fc2180c0418c42fd7610c669e0035b1df718d6750c42e65eceb18f8c56e99
7
+ data.tar.gz: 46ee62e3894b9f5a1cf548b37cf6d9cbde36fd71a0c305b782b7168a31216b6984ea06c2b8606a83825083699fe65ff81736e8d9bdb5d11bdb0c30f9dfdb3f17
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ .bundle
2
+ .DS_Store
3
+ .rspec_status
4
+ .yardo
5
+ _yardoc
6
+
7
+ /coverage/
8
+ /doc/
9
+ /Gemfile.lock
10
+ /pkg/
11
+ /spec/reports/
12
+ /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,3 @@
1
+ inherit_from:
2
+ - default.yml
3
+ - .rubocop_todo.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,14 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2017-08-08 14:12:24 +0300 using RuboCop version 0.49.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
11
+ # SupportedStyles: strict, flexible
12
+ Rails/TimeZone:
13
+ Exclude:
14
+ - 'rubocop-template.gemspec'
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify dependencies in rubocop-template.gemspec
6
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Perceptual Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Rubocop Template
2
+
3
+ My `.rubocop.yml` template as a separated ruby gem.
4
+
5
+ ## Thanks
6
+
7
+ This gem was inspired by [percy-style](https://github.com/percy/percy-style). Check it out, and read an article: [Share RuboCop rules across all of your repos](https://blog.percy.io/share-rubocop-rules-across-all-of-your-repos-f3281fbd71f8).
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ group :development do
15
+ gem 'rubocop-template'
16
+ end
17
+ ```
18
+
19
+ Or, for a Ruby library, add this to your gemspec:
20
+
21
+ ```ruby
22
+ spec.add_development_dependency 'rubocop-template'
23
+ ```
24
+
25
+ And then run:
26
+
27
+ ```bash
28
+ $ bundle install
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ Create a `.rubocop.yml` with the following directives:
34
+
35
+ ```yaml
36
+ inherit_gem:
37
+ rubocop-template: default.yml
38
+ inherit_from: .rubocop_todo.yml
39
+ ```
40
+
41
+ Now, use rubocop through `bundle exec`:
42
+
43
+ ```bash
44
+ $ bundle exec rubocop --auto-gen-config
45
+ $ bundle exec rubocop -a
46
+ ```
47
+
48
+ Also you do not need to include rubocop gem directly in your application's dependences. Rubocop-template will include a specific version of `rubocop` automatically.
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
data/default.yml ADDED
@@ -0,0 +1,56 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'bin/*'
4
+ - 'db/schema.rb'
5
+ - 'node_modules/**/*'
6
+ - 'vendor/**/*'
7
+ TargetRubyVersion: 2.4
8
+ Layout/IndentationConsistency:
9
+ EnforcedStyle: normal
10
+ Lint/AssignmentInCondition:
11
+ Enabled: false
12
+ Lint/Debugger:
13
+ Enabled: true
14
+ Lint/DefEndAlignment:
15
+ AutoCorrect: true
16
+ Lint/EndAlignment:
17
+ AutoCorrect: true
18
+ EnforcedStyleAlignWith: keyword
19
+ Metrics/LineLength:
20
+ Enabled: false
21
+ Max: 100
22
+ Rails:
23
+ Enabled: true
24
+ Style/Alias:
25
+ EnforcedStyle: prefer_alias_method
26
+ Style/AsciiComments:
27
+ Enabled: false
28
+ Style/AutoResourceCleanup:
29
+ Enabled: true
30
+ Style/ClassAndModuleChildren:
31
+ Enabled: false
32
+ Style/CollectionMethods:
33
+ Description: Preferred collection methods.
34
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
35
+ Enabled: true
36
+ PreferredMethods:
37
+ collect: map
38
+ collect!: map!
39
+ find: detect
40
+ find_all: select
41
+ reduce: inject
42
+ Style/Documentation:
43
+ Enabled: false
44
+ Style/FileName:
45
+ Description: Use snake_case for source file names.
46
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
47
+ Enabled: false
48
+ Style/PercentLiteralDelimiters:
49
+ PreferredDelimiters:
50
+ '%i': '()'
51
+ '%I': '()'
52
+ '%r': '{}'
53
+ '%w': '()'
54
+ '%W': '()'
55
+ Style/StringLiterals:
56
+ EnforcedStyle: single_quotes
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubocopTemplate
4
+ VERSION = '1.0.0'
5
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubocop-template/version'
4
+
5
+ module RubocopTemplate
6
+ end
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ lib = File.expand_path('../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'rubocop-template/version'
7
+
8
+ Gem::Specification.new do |s|
9
+ s.name = 'rubocop-template'
10
+ s.version = RubocopTemplate::VERSION
11
+ s.authors = ['Vitaliy Emeliyantsev']
12
+ s.email = 'gambala.rus@gmail.com'
13
+ s.summary = 'Rubocop template as a gem'
14
+ s.description = <<-EOF
15
+ My .rubocop.yml template as a separated ruby gem.
16
+ EOF
17
+ s.homepage = 'https://github.com/gambala/rubocop-template'
18
+ s.date = Time.now.strftime('%Y-%m-%d')
19
+ s.require_paths = ['lib']
20
+ s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ s.add_dependency 'rubocop', '~> 0.49'
22
+ s.add_development_dependency 'bundler', '~> 1.15'
23
+ s.add_development_dependency 'rake', '~> 10.0'
24
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-template
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Vitaliy Emeliyantsev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.49'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.49'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.15'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.15'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: " My .rubocop.yml template as a separated ruby gem.\n"
56
+ email: gambala.rus@gmail.com
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - ".gitignore"
62
+ - ".rubocop.yml"
63
+ - ".rubocop_todo.yml"
64
+ - Gemfile
65
+ - LICENSE
66
+ - README.md
67
+ - Rakefile
68
+ - default.yml
69
+ - lib/rubocop-template.rb
70
+ - lib/rubocop-template/version.rb
71
+ - rubocop-template.gemspec
72
+ homepage: https://github.com/gambala/rubocop-template
73
+ licenses: []
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.6.11
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Rubocop template as a gem
95
+ test_files: []