rubocop-guild 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
+ SHA256:
3
+ metadata.gz: 466b0005b6dc35330f583dfeeac8441ef2d12b0ca6c9679bf3eb726f1e41dfde
4
+ data.tar.gz: 64264aead05aad92a8e1da44299ede7a497fe3ebc49f98ac27819b7334ee4d8f
5
+ SHA512:
6
+ metadata.gz: eaf62f0796f6e9d1c67211a8fc5b0ca95764231929e790bc8101035e6e71f71746b4c549c1d30c5097290a6a256bf9a9a103f176bc3179f07ed993e5550895d6
7
+ data.tar.gz: e98e4434045255a9aedc24746dbf684d922b6e33da676365f0b6b1b58d5bdd35aa66e254bf23b6d8e458d71080844b94cef59939ce506b7d71d7d49273dd839e
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in rubocop-guild.gemspec
6
+ gemspec
data/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # RuboCop Guild
2
+
3
+ Guild Education shared RuboCop config
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'rubocop-guild'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install rubocop-guild
20
+
21
+ ## Usage
22
+
23
+ ### Rake Task
24
+
25
+ This gem exposes a Rake task that will perform the installation for you:
26
+
27
+ ```bash
28
+ rake guild:rubocop:install
29
+ ```
30
+
31
+ ### Manually
32
+
33
+ Add this to the top of your `.rubocop.yml`:
34
+
35
+ ```yaml
36
+ inherit_gem:
37
+ rubocop-guild:
38
+ - config/guild.yml
39
+ ```
40
+
41
+ If you want to override the settings, do that below these lines.
42
+
43
+ ## Development
44
+
45
+ Clone the repo and make the associated changes to the [`config/guild.yml`](https://github.com/GuildEducationInc/rubocop-guild/tree/master/config/guild.yml) file.
46
+
47
+ In addition, please follow these guildlines:
48
+
49
+ 1. Associated cop definitions should be grouped
50
+ 2. Cops should be in alphabetical order within their groups. This makes it easier to look up the cop in the RuboCop documentation
51
+
52
+ ## Publishing
53
+
54
+ Make sure you've been granted publish access to the [rubygem](https://rubygems.org/gems/rubocop-guild)
55
+
56
+ 1. Increment the gem version in `version.rb`
57
+ 2. Run `bin/rake release`. This will create a new tag based on the version, push the tag to Github, and then push the gem to Rubygems
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ import "./lib/tasks/install.rake"
data/bin/rake ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rake", "rake")
data/config/guild.yml ADDED
@@ -0,0 +1,63 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ Exclude:
5
+ - lib/templates/**/*
6
+ - lib/scripts/**/*
7
+ - db/**/*
8
+ - tmp/**/*
9
+ - vendor/**/*
10
+ - bin/**/*
11
+ - log/**/*
12
+ - scripts/**/*
13
+ - Rakefile
14
+ - node_modules/**/*
15
+
16
+ Metrics/AbcSize:
17
+ Max: 20
18
+
19
+ Metrics/BlockLength:
20
+ CountComments: false
21
+ Exclude:
22
+ - 'Rakefile'
23
+ - '**/*.rake'
24
+ - 'spec/**/*.rb'
25
+
26
+ Metrics/LineLength:
27
+ Max: 120
28
+
29
+ Metrics/MethodLength:
30
+ Max: 20
31
+
32
+ Metrics/ModuleLength:
33
+ Exclude:
34
+ - 'Rakefile'
35
+ - '**/*.rake'
36
+ - 'spec/**/*.rb'
37
+
38
+ RSpec/ExampleLength:
39
+ Max: 8
40
+
41
+ RSpec/MultipleExpectations:
42
+ Max: 3
43
+
44
+ RSpec/NestedGroups:
45
+ Max: 5
46
+
47
+ RSpec/MessageSpies:
48
+ Enabled: false
49
+
50
+ Style/BlockDelimiters:
51
+ Enabled: false
52
+
53
+ Style/Documentation:
54
+ Enabled: false
55
+
56
+ Style/Lambda:
57
+ Enabled: false
58
+
59
+ Style/NumericLiterals:
60
+ Enabled: false
61
+
62
+ Style/SymbolArray:
63
+ Enabled: false
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubocop/guild/railtie' if defined?(Rails)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class RubocopGuildRailtie < Rails::Railtie
4
+ rake_tasks do
5
+ load "tasks/install.rake"
6
+ end
7
+ end
@@ -0,0 +1,22 @@
1
+ namespace :guild do
2
+ namespace :rubocop do
3
+ desc 'Install the Guild RuboCop config to .rubocop.yml'
4
+ task :install do
5
+ require 'yaml'
6
+
7
+ if File.exist?('.rubocop.yml')
8
+ STDOUT.puts "Warning: this will blow away your existing .rubocop.yml!"
9
+ STDOUT.print "Do you wish to continue? (y/n) "
10
+ exit if STDIN.gets.strip.downcase != 'y'
11
+ end
12
+
13
+ File.open('.rubocop.yml', 'w') do |f|
14
+ f.write({
15
+ 'inherit_gem' => {
16
+ 'rubocop-guild' => ['config/guild.yml']
17
+ }
18
+ }.to_yaml.gsub("---\n", ''))
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rubocop-guild"
7
+ spec.version = "1.0.0"
8
+ spec.authors = ["Stafford Brunk"]
9
+ spec.email = ["stafford@guildeducation.com"]
10
+
11
+ spec.summary = %q{Guild's shared RuboCop config}
12
+ spec.description = %q{Guild's RuboCop config based around our preferred style}
13
+ spec.homepage = "https://github.com/GuildEducationInc/rubocop-guild"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^(test|spec|features)/})
17
+ end
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "rubocop", "~> 0.49"
23
+ spec.add_dependency "rubocop-rspec", "~> 1.15"
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.15"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-guild
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Stafford Brunk
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-03-12 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: rubocop-rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.15'
34
+ type: :runtime
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: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.15'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ description: Guild's RuboCop config based around our preferred style
84
+ email:
85
+ - stafford@guildeducation.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - Gemfile
92
+ - README.md
93
+ - Rakefile
94
+ - bin/rake
95
+ - config/guild.yml
96
+ - lib/rubocop/guild.rb
97
+ - lib/rubocop/guild/railtie.rb
98
+ - lib/tasks/install.rake
99
+ - rubocop-guild.gemspec
100
+ homepage: https://github.com/GuildEducationInc/rubocop-guild
101
+ licenses: []
102
+ metadata: {}
103
+ post_install_message:
104
+ rdoc_options: []
105
+ require_paths:
106
+ - lib
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ requirements: []
118
+ rubyforge_project:
119
+ rubygems_version: 2.7.3
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: Guild's shared RuboCop config
123
+ test_files: []