optimum-energy-rubocop 0.0.8 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a6143df05ddd076de8a6ec13b0ae679209f7c054ff77b229b7d5eed04379e92
4
- data.tar.gz: c2ef3d5e0fdb194b67e50183b375bda39bb2f9c814a75642ad718607b140ee17
3
+ metadata.gz: e7a9ce45359f66881a361b5bd465906d84f3f6901933f7baaa5bab4afdd57fea
4
+ data.tar.gz: 56b1fd0c19ef4d20a3cafed1a9401e937db8badd0b41fb621b533c68111d1206
5
5
  SHA512:
6
- metadata.gz: 6df9b4334fc2945b8c61ccba374795095b2b70db478eea690f12bf90cc6f648425b3109181939ead58fb4080e38438e9665788c498def0d85e0eeb2c52f64406
7
- data.tar.gz: e35acc739d6e271adaf3bdc52bce35307a86c0c3ef84c103283a4c838f0c104bfce864606c233a63187892e69a31bf585711f97f7765317d75e6bd34cca47c3a
6
+ metadata.gz: 1637fa4601572e88d7408d58bff9f2d2d5275e5a9c7a7ce1320f53f8dcc30f69fe525ff63050e147d40ea2e1bb9743b9e47411d9d1c505ba53445f6890fe1c9b
7
+ data.tar.gz: 657ea757a1df2a43c486213ec5eeb60bfdaf8f9b866238a20d71227017b04b16012cf3d718cc49bc79a93291b95e4d1439bb101a6c9fc31f8d1b9d9a44369d03
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ *.gem
2
+ *.aes
3
+ *.env
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.0
data/Dockerfile ADDED
@@ -0,0 +1,12 @@
1
+ FROM ruby:2.6.0
2
+
3
+ # Install the dependencies
4
+ ADD Gemfile Gemfile.lock .ruby-version optimum-energy-rubocop.gemspec VERSION.txt /app/
5
+ WORKDIR /app
6
+ RUN bundle install
7
+
8
+ # Add the app
9
+ ADD . /app
10
+
11
+ # Add the bin directory to the $PATH
12
+ ENV PATH="/app/bin:${PATH}"
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
+
3
+ ruby IO.read(".ruby-version")
2
4
 
3
5
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- optimum-energy-rubocop (0.0.8)
4
+ optimum-energy-rubocop (0.1.3)
5
5
  rubocop (~> 0.50)
6
6
 
7
7
  GEM
@@ -31,5 +31,8 @@ PLATFORMS
31
31
  DEPENDENCIES
32
32
  optimum-energy-rubocop!
33
33
 
34
+ RUBY VERSION
35
+ ruby 2.6.0p0
36
+
34
37
  BUNDLED WITH
35
- 1.16.1
38
+ 1.17.2
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Landon Schropp
3
+ Copyright (c) 2019 Optimum Energy LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -3,11 +3,10 @@
3
3
  This is the [shared](https://rubocop.readthedocs.io/en/latest/configuration/) team Rubocop
4
4
  configuration for [Optimum Energy](http://optimumenergyco.com/).
5
5
 
6
+ ## Installation
6
7
 
7
- ## Usage
8
-
9
- First, add the gem to your Gemfile. We recommend not locking in the version of the gem because we
10
- regularly update this repo as we come across new rules.
8
+ First, add `optimum-energy-rubocop` to your `Gemfile` and run `bundle install`. We recommend not
9
+ locking in the version of the gem because we regularly update this repo as we come across new rules.
11
10
 
12
11
  ```
13
12
  gem 'optimum-energy-rubocop'
@@ -23,6 +22,12 @@ inherit_from:
23
22
  - optimum_energy_rubocop.yml
24
23
  ```
25
24
 
25
+ ## Updating This Gem
26
+
27
+ After making changes to the rules in the [default.yml](default.yml) file, be sure that the version
28
+ is bumped in both the [VERSION.txt](VERSION.txt) and [Gemfile.lock](Gemfile.lock) files. If the
29
+ version is not changed, repos consuming this gem will not get the updates.
30
+
26
31
  ## Running Rubocop
27
32
 
28
33
  To run the cops, run `rubocop` from the command line.
data/VERSION.txt ADDED
@@ -0,0 +1 @@
1
+ 0.1.3
data/bin/publish ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ # This script publishes this gem to rubygems.org. It is intended to be run in the CI only. Running
6
+ # this locally will have global side effects.
7
+
8
+ # Create the credentials file
9
+ mkdir -p "$HOME/.gem"
10
+ echo -e "---\\r\\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
11
+ chmod 0600 "$HOME/.gem/credentials"
12
+
13
+ # Publish the gem
14
+ GEM_NAME="optimum-energy-rubocop"
15
+ gem build "$GEM_NAME.gemspec"
16
+ gem push "$GEM_NAME-$(cat VERSION.txt).gem"
@@ -0,0 +1,9 @@
1
+ optimum-energy-rubocop:
2
+ build: .
3
+ cached: true
4
+ encrypted_env_file: deployment.env.encrypted
5
+
6
+ shellcheck:
7
+ image: koalaman/shellcheck-alpine:stable
8
+ volumes:
9
+ - .:/app
@@ -0,0 +1,14 @@
1
+ -
2
+ name: run-shellcheck
3
+ service: shellcheck
4
+ command: sh -c "cd /app && shellcheck -x bin/*"
5
+
6
+ -
7
+ name: rubocop
8
+ service: optimum-energy-rubocop
9
+ command: rubocop
10
+ -
11
+ name: publish-to-rubygems
12
+ service: optimum-energy-rubocop
13
+ command: publish
14
+ tag: master
@@ -0,0 +1,2 @@
1
+ codeship:v2
2
+ JjzJa5IPPlslZNYdlQaBuQwNLu1cNBVcIFyCqOQ1Bz9Rfmo/b673eak7fgsGFNs1cMIvp28L61IfIBKwRsy0x1lrGGIfdjo8lwIGA/JCyM5IpHrpsBazaVjaL0cHzOulATzlwQ==
@@ -1,13 +1,13 @@
1
1
  Gem::Specification.new do |spec|
2
- spec.name = 'optimum-energy-rubocop'
3
- spec.version = File.read('VERSION.txt')
4
- spec.authors = [ 'Optimum Energy' ]
2
+ spec.name = "optimum-energy-rubocop"
3
+ spec.version = File.read("VERSION.txt")
4
+ spec.authors = [ "Optimum Energy" ]
5
5
 
6
- spec.summary = 'The shared Rubocop configuration for Optimum Energy'
7
- spec.homepage = 'https://github.com/optimiumenergyco/optimum-energy-rubocop'
8
- spec.license = 'MIT'
6
+ spec.summary = "The shared Rubocop configuration for Optimum Energy"
7
+ spec.homepage = "https://github.com/optimiumenergyco/optimum-energy-rubocop"
8
+ spec.license = "MIT"
9
9
 
10
10
  spec.files = `git ls-files -z`.split("\x0")
11
11
 
12
- spec.add_dependency 'rubocop', '~> 0.50'
12
+ spec.add_dependency "rubocop", "~> 0.50"
13
13
  end
@@ -20,6 +20,9 @@ Layout/AlignParameters:
20
20
  Layout/CaseIndentation:
21
21
  EnforcedStyle: end
22
22
 
23
+ Layout/EmptyLineAfterGuardClause:
24
+ Enabled: false
25
+
23
26
  # Ideally, I would like to insert empty lines at the beginning on a class definition, but not at the
24
27
  # end. https://github.com/bbatsov/rubocop/issues/4812
25
28
  Layout/EmptyLinesAroundClassBody:
@@ -35,6 +38,7 @@ Layout/EmptyLineBetweenDefs:
35
38
  AllowAdjacentOneLineDefs: true
36
39
  NumberOfEmptyLines: 1
37
40
 
41
+
38
42
  Layout/EndOfLine:
39
43
  EnforcedStyle: lf
40
44
 
@@ -75,6 +79,14 @@ Naming/FileName:
75
79
  - 'bin/**/*'
76
80
  - 'db/**/*'
77
81
  - 'spec/**/*'
82
+ - '**/config.ru'
83
+ - 'lib/tasks/**'
84
+
85
+ Rails/BulkChangeTable:
86
+ Enabled: false
87
+
88
+ Style/AccessModifierDeclarations:
89
+ EnforcedStyle: inline
78
90
 
79
91
  Style/ConditionalAssignment:
80
92
  EnforcedStyle: assign_to_condition
@@ -87,21 +99,35 @@ Style/Copyright:
87
99
  Style/Documentation:
88
100
  Enabled: false
89
101
 
102
+ Style/DoubleNegation:
103
+ Enabled: false
104
+
90
105
  Style/FormatString:
91
106
  EnforcedStyle: percent
92
107
 
93
108
  # This won't be necessary when we upgrade to Ruby 3.0. Until then, rather than adding a comment to
94
- # every file, we should simply not mutate strings.
109
+ # every file, we should not mutate strings.
95
110
  Style/FrozenStringLiteralComment:
96
111
  EnforcedStyle: never
97
112
 
98
- Style/StringLiterals:
99
- Exclude:
100
- - 'spec/**/*'
113
+ Style/MultilineBlockChain:
114
+ Enabled: false
115
+
116
+ Style/MultilineTernaryOperator:
117
+ Enabled: false
118
+
119
+ Style/PercentLiteralDelimiters:
120
+ Enabled: false
121
+
122
+ Style/RegexpLiteral:
123
+ Enabled: false
101
124
 
102
125
  Style/ReturnNil:
103
126
  Enabled: true
104
127
 
128
+ Style/StringLiterals:
129
+ EnforcedStyle: double_quotes
130
+
105
131
  Style/SymbolArray:
106
132
  MinSize: 3
107
133
 
@@ -138,15 +164,9 @@ Layout/BlockAlignment:
138
164
  Layout/EndAlignment:
139
165
  EnforcedStyleAlignWith: start_of_line
140
166
 
141
- Rails/RequestReferer:
142
- EnforcedStyle: referrer
143
-
144
167
  Rails/Date:
145
168
  EnforcedStyle: strict
146
169
 
147
- Rails/TimeZone:
148
- EnforcedStyle: flexible
149
-
150
170
  Rails/FilePath:
151
171
  Enabled: false
152
172
 
@@ -154,8 +174,11 @@ Rails/FilePath:
154
174
  Rails/InverseOf:
155
175
  Enabled: false
156
176
 
157
- Style/MultilineTernaryOperator:
158
- Enabled: false
159
-
160
177
  Rails/NotNullColumn:
161
178
  Enabled: false
179
+
180
+ Rails/RequestReferer:
181
+ EnforcedStyle: referrer
182
+
183
+ Rails/TimeZone:
184
+ EnforcedStyle: flexible
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimum-energy-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Optimum Energy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -30,11 +30,19 @@ executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
+ - ".gitignore"
33
34
  - ".rubocop.yml"
35
+ - ".ruby-version"
36
+ - Dockerfile
34
37
  - Gemfile
35
38
  - Gemfile.lock
36
39
  - LICENSE.txt
37
40
  - README.md
41
+ - VERSION.txt
42
+ - bin/publish
43
+ - codeship-services.yml
44
+ - codeship-steps.yml
45
+ - deployment.env.encrypted
38
46
  - optimum-energy-rubocop.gemspec
39
47
  - optimum_energy_rubocop.yml
40
48
  homepage: https://github.com/optimiumenergyco/optimum-energy-rubocop
@@ -56,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
64
  - !ruby/object:Gem::Version
57
65
  version: '0'
58
66
  requirements: []
59
- rubyforge_project:
60
- rubygems_version: 2.7.3
67
+ rubygems_version: 3.0.1
61
68
  signing_key:
62
69
  specification_version: 4
63
70
  summary: The shared Rubocop configuration for Optimum Energy