mdeering-style 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0567a9728d2796ba948633d8b5a367a61a4d4a239259bc4ad1a989b8af9d1f6c
4
+ data.tar.gz: 585953b1a022ab6850a52f17cd41e5913fcf857d131a51e85b7c920ddaa22b08
5
+ SHA512:
6
+ metadata.gz: 1d9a6b1ac98ca3093bfa63ee199bb15e816d8e2e25135bad91ceafe7e0e907769ac1f0293565a7fb9a29fffd8c52327876e7221902a58b8e9912e58f21fe9085
7
+ data.tar.gz: c993709752a5ba2d25a103cfeab049370d616514bd9f8e94621e6c329593e45479e8da7ee4bcc3de17da0a4356392d01d7422af37764f0bec949bb7fcaf8c38f
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+
13
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,4 @@
1
+ inherit_gem:
2
+ mdeering-style:
3
+ - rubocop/rspec.yml
4
+ - rubocop/ruby.yml
@@ -0,0 +1,6 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3
5
+ - 2.4
6
+ - 2.5
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ group :development do
6
+ gem 'guard-bundler', require: false
7
+ gem 'guard-rspec', require: false
8
+ gem 'guard-rubocop', require: false
9
+ gem 'guard-yardstick', require: false
10
+ end
11
+
12
+ group :test do
13
+ gem 'rspec', require: false
14
+ gem 'yardstick', require: false
15
+ end
16
+
17
+ # Specify your gem's dependencies in mdeering-style.gemspec
18
+ gemspec
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mdeering/style'
4
+
5
+ # A sample Guardfile
6
+ # More info at https://github.com/guard/guard#readme
7
+
8
+ ## Uncomment and set this to only include directories you want to watch
9
+ # directories %w(app lib config test spec features) \
10
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
11
+
12
+ ## Note: if you are using the `directories` clause above and you are not
13
+ ## watching the project directory ('.'), then you will want to move
14
+ ## the Guardfile to a watched dir and symlink it back, e.g.
15
+ #
16
+ # $ mkdir config
17
+ # $ mv Guardfile config/
18
+ # $ ln -s config/Guardfile .
19
+ #
20
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
21
+
22
+ # Note: The cmd option is now required due to the increasing number of ways
23
+ # rspec may be run, below are examples of the most common uses.
24
+ # * bundler: 'bundle exec rspec'
25
+ # * bundler binstubs: 'bin/rspec'
26
+ # * spring: 'bin/rspec' (This will use spring if running and you have
27
+ # installed the spring binstubs per the docs)
28
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
29
+ # * 'just' rspec: 'rspec'
30
+
31
+ guard :rspec, all_on_start: true, cmd: 'bundle exec rspec' do
32
+ require 'guard/rspec/dsl'
33
+ dsl = Guard::RSpec::Dsl.new(self)
34
+
35
+ # Feel free to open issues for suggestions and improvements
36
+
37
+ # RSpec files
38
+ rspec = dsl.rspec
39
+ watch(rspec.spec_helper) { rspec.spec_dir }
40
+ watch(rspec.spec_support) { rspec.spec_dir }
41
+ watch(rspec.spec_files)
42
+
43
+ # Ruby files
44
+ ruby = dsl.ruby
45
+ dsl.watch_spec_files_for(ruby.lib_files)
46
+
47
+ end
48
+
49
+ guard :rubocop do
50
+ watch(/.+\.rb$/)
51
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
52
+ end
53
+
54
+ guard :bundler do
55
+ require 'guard/bundler'
56
+ require 'guard/bundler/verify'
57
+ helper = Guard::Bundler::Verify.new
58
+
59
+ files = ['Gemfile']
60
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
61
+
62
+ # Assume files are symlinked from somewhere
63
+ files.each { |file| watch(helper.real_path(file)) }
64
+ end
65
+
66
+ guard :yardstick, config: Mdeering::Style.yardstick do
67
+ watch(%r{^lib\/(.+)\.rb$})
68
+ end
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Michael Deering
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,38 @@
1
+ # Mdeering::Style
2
+
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ group :development, :test do
9
+ gem 'mdeering-style', require: false
10
+ end
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install mdeering-style
20
+
21
+ ## Usage
22
+
23
+ Add the following to your .rubocop.yml
24
+
25
+ ```yaml
26
+ inherit_gem:
27
+ mdeering-style:
28
+ - rubocop/all.yml # Includes Rails, Ruby && RSpec Cops
29
+ # - rubocop/ruby.yml # Includes Ruby && RSpec Cops
30
+ ```
31
+
32
+ ## Contributing
33
+
34
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mdeering/mdeering-style.
35
+
36
+ ## License
37
+
38
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yaml'
4
+
5
+ require 'bundler/gem_tasks'
6
+ require 'rspec/core/rake_task'
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ require 'rubocop/rake_task'
11
+
12
+ RuboCop::RakeTask.new(:rubocop) do |t|
13
+ t.options = ['--display-cop-names']
14
+ end
15
+
16
+ require 'yardstick/rake/verify'
17
+ require 'mdeering/style'
18
+
19
+ yardstick_options = YAML.load_file(Mdeering::Style.yardstick)
20
+ Yardstick::Rake::Verify.new(:yardstick, yardstick_options)
21
+
22
+ task default: [:spec, :rubocop, :yardstick]
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'mdeering/style'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mdeering/style/version'
4
+
5
+ module Mdeering
6
+ # The purpose of mdeering-style is to have centralized and evolving source
7
+ # of Ruby and Rails configurations for tools common to most of my development
8
+ # and build environments.
9
+ module Style
10
+
11
+ # Path to yarstick.yml configuration
12
+ #
13
+ # @example
14
+ # require 'yardstick/rake/verify'
15
+ # require 'mdeering/style'
16
+ # yardstick_options = YAML.load_file(Mdeering::Style.yardstick)
17
+ # Yardstick::Rake::Verify.new(:yardstick, yardstick_options)
18
+ #
19
+ # @return [String]
20
+ def self.yardstick
21
+ File.expand_path('../../yardstick/.yardstick.yml', __dir__)
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mdeering
4
+ module Style
5
+ # Semantic versioning
6
+ module Version
7
+
8
+ MAJOR = 0
9
+ MINOR = 0
10
+ PATCH = 1
11
+
12
+ # Current semantic version of the gem
13
+ #
14
+ # @example
15
+ # "mdeering-style #{Mdeering::Style::Version} is loaded"
16
+ #
17
+ # @return [String]
18
+ def self.to_s
19
+ [MAJOR, MINOR, PATCH].join('.')
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'mdeering/style/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'mdeering-style'
9
+ spec.version = Mdeering::Style::Version
10
+ spec.authors = ['Michael Deering']
11
+ spec.email = ['mdeering@mdeering.com']
12
+
13
+ spec.summary = 'My perfered style and linter configurations'
14
+ spec.description = 'My opinionated and even sometimes misinformed style and code linting configurations'
15
+ spec.homepage = 'https://github.com/mdeering/mdeering-style'
16
+ spec.license = 'MIT'
17
+
18
+ spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ end
25
+ spec.bindir = 'exe'
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ['lib']
28
+
29
+ spec.add_dependency 'rubocop'
30
+ spec.add_dependency 'rubocop-rspec'
31
+
32
+ spec.add_development_dependency 'bundler', '~> 1.16'
33
+ spec.add_development_dependency 'rake', '~> 10.0'
34
+ spec.add_development_dependency 'rspec', '~> 3.0'
35
+ end
@@ -0,0 +1,4 @@
1
+ inherit_from:
2
+ - ./rails.yml
3
+ - ./rspec.yml
4
+ - ./ruby.yml
@@ -0,0 +1,12 @@
1
+ AllCops:
2
+ Exclude:
3
+ - bin/*
4
+ - db/schema.rb
5
+
6
+ Documentation:
7
+ Exclude:
8
+ - app/mailers/application_mailer.rb
9
+ - app/models/application_record.rb
10
+ - app/helpers/application_helper.rb
11
+ - config/application.rb
12
+ - db/migrate/*.rb
@@ -0,0 +1,5 @@
1
+ require: rubocop-rspec
2
+
3
+ BlockComments:
4
+ Exclude:
5
+ - spec/spec_helper.rb
@@ -0,0 +1,13 @@
1
+ EmptyLinesAroundBlockBody:
2
+ Enabled: false
3
+
4
+ EmptyLinesAroundModuleBody:
5
+ Enabled: false
6
+
7
+ LineLength:
8
+ # I have choosen the value of 125 as that is the width GitHub/GitLab provide
9
+ # before you need to do any horizontal scrolling
10
+ Max: 125
11
+
12
+ SymbolArray:
13
+ Enabled: false
@@ -0,0 +1,6 @@
1
+ ---
2
+ rules:
3
+ ApiTag::Presence:
4
+ enabled: false
5
+ ApiTag::Inclusion:
6
+ enabled: false
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mdeering-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Deering
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-10-11 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'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
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: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
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.16'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.16'
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: My opinionated and even sometimes misinformed style and code linting
84
+ configurations
85
+ email:
86
+ - mdeering@mdeering.com
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".rubocop.yml"
94
+ - ".travis.yml"
95
+ - Gemfile
96
+ - Guardfile
97
+ - LICENSE.txt
98
+ - README.md
99
+ - Rakefile
100
+ - bin/console
101
+ - bin/setup
102
+ - lib/mdeering/style.rb
103
+ - lib/mdeering/style/version.rb
104
+ - mdeering-style.gemspec
105
+ - rubocop/all.yml
106
+ - rubocop/rails.yml
107
+ - rubocop/rspec.yml
108
+ - rubocop/ruby.yml
109
+ - yardstick/.yardstick.yml
110
+ homepage: https://github.com/mdeering/mdeering-style
111
+ licenses:
112
+ - MIT
113
+ metadata:
114
+ yard.run: yri
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ requirements: []
130
+ rubyforge_project:
131
+ rubygems_version: 2.7.6
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: My perfered style and linter configurations
135
+ test_files: []