degica-style 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e71c155429cd1d08623e30880a79a70fdcc5fa0c
4
+ data.tar.gz: 985792a3cb5762504107e31ac94884c0a729f85e
5
+ SHA512:
6
+ metadata.gz: faffa0b30dd0c218c20efdb4a3af3b25ba02da606c0db00ae7028720295066f5ddfba5fad8b02e66287c4753c425f5d65143373b641329c66be7ffa7d3becd9d
7
+ data.tar.gz: 1b013c8bef22dade626eec3c8256cdcf1fb6919624e01c5826b53ee5535a145c15ed6738b6058f02f5fe33a4bd10b0c44a5c20cc9017c6fd27bd0c5bd7e30d73
@@ -0,0 +1,29 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ build:
10
+ name: Build + Publish
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@master
15
+ - name: Set up Ruby 2.4
16
+ uses: actions/setup-ruby@v1
17
+ with:
18
+ version: 2.4.x
19
+
20
+ - name: Publish to RubyGems
21
+ run: |
22
+ mkdir -p $HOME/.gem
23
+ touch $HOME/.gem/credentials
24
+ chmod 0600 $HOME/.gem/credentials
25
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
26
+ gem build *.gemspec
27
+ gem push *.gem
28
+ env:
29
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
@@ -0,0 +1,13 @@
1
+ name: Rubocop
2
+ on: [push]
3
+
4
+ jobs:
5
+ lint:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v2
9
+ - uses: actions/setup-ruby@v1
10
+ with:
11
+ ruby-version: '2.4'
12
+ - run: bundle install
13
+ - run: bundle exec rubocop
@@ -0,0 +1 @@
1
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -0,0 +1,35 @@
1
+ # degica-style
2
+
3
+ Degica shared style configs
4
+
5
+ ## Installation
6
+
7
+ ```ruby
8
+ group :development do
9
+ gem 'degica-style'
10
+ end
11
+ ```
12
+
13
+ And then run:
14
+
15
+ ```
16
+ $ bundle install
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Create a `.rubocop.yml` with the following directives:
22
+
23
+ ```
24
+ inherit_gem:
25
+ degica-style:
26
+ - default.yml
27
+ ```
28
+
29
+ Run:
30
+
31
+ ```
32
+ $ bundle exec rubocop
33
+ ```
34
+
35
+ NOTE: You don't have to include rubocop directly in your application's dependencies.
@@ -0,0 +1,137 @@
1
+ Rails:
2
+ Enabled: true
3
+
4
+ AllCops:
5
+ Exclude:
6
+ - db/**/*
7
+ - vendor/**/*
8
+ - vendor/**/*.gemspec
9
+ - Rakefile
10
+ - bin/**/*
11
+ - node_modules/**/*
12
+ TargetRubyVersion: 2.4
13
+
14
+ Rails/UniqBeforePluck:
15
+ Enabled: true
16
+ EnforcedStyle: aggressive
17
+
18
+ Rails/SkipsModelValidations:
19
+ Enabled: true
20
+ Exclude:
21
+ - 'lib/tasks/dev.rake'
22
+ - 'spec/**/*'
23
+ - 'drivers/*/spec/**/*'
24
+
25
+ Rails/SafeNavigation:
26
+ Enabled: true
27
+ ConvertTry: true
28
+
29
+ Metrics/LineLength:
30
+ Max: 130
31
+ IgnoreCopDirectives: true
32
+ Exclude:
33
+ - config/**/*
34
+ - lib/**/*
35
+ - drivers/*/lib/**/*
36
+ - spec/**/*
37
+ - drivers/*/spec/**/*
38
+ - danger/**/*
39
+
40
+ Metrics/CyclomaticComplexity:
41
+ Exclude:
42
+ - lib/tasks/dev.rake
43
+ - spec/**/*
44
+ - drivers/*/spec/**/*
45
+
46
+ # Ensure ternary's aren't abusive - Alessandro
47
+ Style/TernaryParentheses:
48
+ Enabled: true
49
+ EnforcedStyle: require_parentheses_when_complex
50
+
51
+ ########################
52
+ # CANNED RULES
53
+ ########################
54
+
55
+ Naming/PredicateName:
56
+ NameWhitelist:
57
+ - has_attachment
58
+
59
+ # Style preference - Richard
60
+ Layout/CaseIndentation:
61
+ Enabled: false
62
+
63
+ # Style preference (false) - Richard
64
+ Layout/EndAlignment:
65
+ Enabled: true
66
+ EnforcedStyleAlignWith: variable # turned it on with new config - Alessandro
67
+
68
+ # These rules expand code and I think look worse for it - Alessandro
69
+ Layout/EmptyLineBetweenDefs:
70
+ Enabled: false
71
+
72
+ Layout/SpaceAroundEqualsInParameterDefault:
73
+ Enabled: false
74
+ # end #
75
+
76
+ # Doesn't add anything useful in my opnion - Alessandro
77
+ Lint/AmbiguousOperator:
78
+ Enabled: false
79
+
80
+ # Maybe bad practice but the rubocop solution isn't pretty - Alessandro
81
+ Lint/AssignmentInCondition:
82
+ Enabled: false
83
+
84
+ # Too much work to fix and doesn't always make sense to have - Alessandro
85
+ Naming/MemoizedInstanceVariableName:
86
+ Enabled: false
87
+
88
+ # Preferred style - Nick
89
+ # Rails guide uses explicit - Richard
90
+ Rails/RedundantReceiverInWithOptions:
91
+ Enabled: false
92
+
93
+ # Use responsibly - Alessandro
94
+ Style/ParallelAssignment:
95
+ Enabled: false
96
+
97
+ # Not useful to have enforced a particular way - Alessandro
98
+ Style/IfUnlessModifier:
99
+ Enabled: false
100
+
101
+ # Not useful in this app - Alessandro
102
+ Style/NumericLiteralPrefix:
103
+ Enabled: false
104
+
105
+ ########################
106
+ # CANNED RULES ON SPECS
107
+ ########################
108
+
109
+ Lint/AmbiguousBlockAssociation:
110
+ Enabled: true
111
+ Exclude:
112
+ - spec/**/*
113
+ - drivers/*/spec/**/*
114
+
115
+ Lint/HandleExceptions:
116
+ Enabled: true
117
+ Exclude:
118
+ - spec/**/*
119
+ - drivers/*/spec/**/*
120
+
121
+ Lint/ParenthesesAsGroupedExpression:
122
+ Enabled: true
123
+ Exclude:
124
+ - spec/**/*
125
+ - drivers/*/spec/**/*
126
+
127
+ Metrics/ParameterLists:
128
+ Enabled: true
129
+ Exclude:
130
+ - spec/**/*
131
+ - drivers/*/spec/**/*
132
+
133
+ Layout/SpaceBeforeBlockBraces:
134
+ Enabled: true
135
+ Exclude:
136
+ - spec/**/*
137
+ - drivers/*/spec/**/*
@@ -0,0 +1,25 @@
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 'degica/style/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'degica-style'
9
+ spec.version = Degica::Style::VERSION
10
+ spec.authors = ['Kenta Shirai']
11
+ spec.email = ['knt01222@gmail.com']
12
+
13
+ spec.summary = 'Degica style guides'
14
+ spec.homepage = 'https://github.com/degica/degica-style'
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.66.0'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Degica
4
+ module Style
5
+ VERSION = '0.1.0'.freeze
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: degica-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kenta Shirai
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-03-14 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.66.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.66.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - knt01222@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".github/workflows/gempush.yml"
49
+ - ".github/workflows/main.yml"
50
+ - ".gitignore"
51
+ - Gemfile
52
+ - README.md
53
+ - default.yml
54
+ - degica-style.gemspec
55
+ - lib/degica/style/version.rb
56
+ homepage: https://github.com/degica/degica-style
57
+ licenses: []
58
+ metadata: {}
59
+ post_install_message:
60
+ rdoc_options: []
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ requirements: []
74
+ rubyforge_project:
75
+ rubygems_version: 2.6.14.4
76
+ signing_key:
77
+ specification_version: 4
78
+ summary: Degica style guides
79
+ test_files: []