handshake-style 0.1.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.
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/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,113 @@
1
+ AllCops:
2
+ Exclude:
3
+ - bin/**/*
4
+ - db/schema.rb
5
+ - vendor/**/*
6
+
7
+ # Bump to 2.5 when https://github.com/houndci/linters/blob/master/Gemfile.lock uses rubocop 0.52.*
8
+ TargetRubyVersion: 2.4
9
+
10
+ Rails:
11
+ Enabled: true
12
+
13
+ Style/CollectionMethods:
14
+ Enabled: true
15
+ PreferredMethods:
16
+ collect: 'map'
17
+ collect!: 'map!'
18
+ inject: 'reduce'
19
+
20
+ Style/FrozenStringLiteralComment:
21
+ Enabled: false
22
+
23
+ Layout/AccessModifierIndentation:
24
+ Enabled: false
25
+
26
+ Style/BlockDelimiters:
27
+ Enabled: false
28
+
29
+ Style/BracesAroundHashParameters:
30
+ Enabled: false
31
+
32
+ Style/Documentation:
33
+ Enabled: false
34
+
35
+ Layout/DotPosition:
36
+ EnforcedStyle: trailing
37
+
38
+ Naming/FileName:
39
+ Enabled: false
40
+
41
+ Style/GuardClause:
42
+ Enabled: false
43
+
44
+ Style/Not:
45
+ Enabled: false
46
+
47
+ Style/NumericPredicate:
48
+ Enabled: false
49
+
50
+ Style/RedundantSelf:
51
+ Enabled: false
52
+
53
+ Style/SignalException:
54
+ Enabled: false
55
+
56
+ Style/StringLiterals:
57
+ Enabled: false
58
+
59
+ Style/TrailingCommaInLiteral:
60
+ Enabled: false
61
+
62
+ Style/TrailingCommaInArguments:
63
+ Enabled: false
64
+
65
+ Style/SymbolArray:
66
+ Enabled: false
67
+
68
+ Metrics/AbcSize:
69
+ Enabled: false
70
+
71
+ Metrics/BlockLength:
72
+ Exclude:
73
+ - 'spec/**/*'
74
+ - 'app/search_params/*'
75
+
76
+ Metrics/ClassLength:
77
+ Enabled: false
78
+
79
+ Metrics/CyclomaticComplexity:
80
+ Enabled: false
81
+
82
+ Metrics/LineLength:
83
+ Enabled: false
84
+
85
+ Metrics/MethodLength:
86
+ Enabled: false
87
+
88
+ Metrics/PerceivedComplexity:
89
+ Enabled: false
90
+
91
+ Lint/UselessAssignment:
92
+ Enabled: false
93
+
94
+ Rails/Delegate:
95
+ Enabled: false
96
+
97
+ Rails/HasAndBelongsToMany:
98
+ Enabled: false
99
+
100
+ Rails/Output:
101
+ Enabled: false # We use puts for things like migrations
102
+
103
+ Rails/Blank:
104
+ Enabled: false
105
+
106
+ # We copy the 'default.yml' file provided by rubocop gem repo into the config/rubocop.yml file
107
+ # in order to make upgrades easy (just drop the new default in). This ensures we get the lastest
108
+ # config file when we upgrade with all new cops.
109
+ # Any non-default configuration should go into this file so that when we upgrade the dropped in
110
+ # new default file does not override any of our configurations.
111
+ # NOTE: Inorder to prioritize this file's declaration, we must inherit at bottom of file
112
+ inherit_from:
113
+ - .default.yml
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.14.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in handshake-style.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Scott Ringwelski
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.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # Handshake::Style
2
+
3
+ A common Rubocop config for Handshake projects. Very much inspired by https://github.com/percy/percy-style.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ group :test, :development do
11
+ gem 'handshake-style'
12
+ end
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ ## Usage
20
+
21
+ Create a .rubocop.yml with the following directives:
22
+
23
+ ```
24
+ inherit_gem:
25
+ percy-style:
26
+ - default.yml
27
+
28
+ ```
29
+
30
+ Now, run:
31
+
32
+ ```
33
+ $ bundle exec rubocop
34
+ ```
35
+
36
+ You do not need to include rubocop directly in your application's dependences. Percy-style will include a specific version of rubocop and rubocop-rspec that is shared across all projects.
37
+
38
+ ## Development
39
+
40
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
41
+
42
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
43
+
44
+ ## Contributing
45
+
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/joinhandshake/handshake-style.
47
+
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
52
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "handshake/style"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -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,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'handshake/style/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "handshake-style"
8
+ spec.version = Handshake::Style::VERSION
9
+ spec.authors = ["Scott Ringwelski"]
10
+ spec.email = ["scott@joinhandshake.com"]
11
+
12
+ spec.summary = %q{A common Rubocop config for Handshake projects.}
13
+ spec.homepage = "https://joinhandshake.com/engineering-blog/"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency "rubocop", "~> 0.51.0"
24
+ spec.add_dependency "rubocop-rspec", "~> 1.20.1"
25
+ spec.add_development_dependency "bundler", "~> 1.14"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ end
@@ -0,0 +1,7 @@
1
+ require "handshake/style/version"
2
+
3
+ module Handshake
4
+ module Style
5
+ # Your code goes here...
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Handshake
2
+ module Style
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: handshake-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Scott Ringwelski
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-01-23 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.51.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.51.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: 1.20.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.20.1
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.14'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.14'
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:
84
+ email:
85
+ - scott@joinhandshake.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".default.yml"
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".rubocop.yml"
94
+ - ".travis.yml"
95
+ - Gemfile
96
+ - LICENSE.txt
97
+ - README.md
98
+ - Rakefile
99
+ - bin/console
100
+ - bin/setup
101
+ - handshake-style.gemspec
102
+ - lib/handshake/style.rb
103
+ - lib/handshake/style/version.rb
104
+ homepage: https://joinhandshake.com/engineering-blog/
105
+ licenses:
106
+ - MIT
107
+ metadata: {}
108
+ post_install_message:
109
+ rdoc_options: []
110
+ require_paths:
111
+ - lib
112
+ required_ruby_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 2.6.13
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: A common Rubocop config for Handshake projects.
128
+ test_files: []