optimum-energy-rubocop 0.0.8 → 0.1.4

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: 898bb526143b7e8eb0597fd82d98e7c51fecc27882b640c5104b72e519f2b68c
4
+ data.tar.gz: a06de13a281fb2697b5f280cd8bf6beaa1df05f7310280a0d20b1290ea025d95
5
5
  SHA512:
6
- metadata.gz: 6df9b4334fc2945b8c61ccba374795095b2b70db478eea690f12bf90cc6f648425b3109181939ead58fb4080e38438e9665788c498def0d85e0eeb2c52f64406
7
- data.tar.gz: e35acc739d6e271adaf3bdc52bce35307a86c0c3ef84c103283a4c838f0c104bfce864606c233a63187892e69a31bf585711f97f7765317d75e6bd34cca47c3a
6
+ metadata.gz: b67b9ce2551e529e68c98534043872f46381f422a00d6c43f4b50231f5ec3e9f1bd87849ad4c77888b18215685145723d6143bf64e4e027781430486ff0e3de4
7
+ data.tar.gz: becabb5135450f4874222130618dc3c87f8b16b1ccaa5260dce8ebd4e7f8a17a9134b6c12b760fed52ebea9ab42ccc85dd4038adbc46a75e2986fc827ee5666a
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.4
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
@@ -4,6 +4,7 @@
4
4
  AllCops:
5
5
  Exclude:
6
6
  - 'db/schema.rb'
7
+ - 'bin/*'
7
8
 
8
9
  Rails:
9
10
  Enabled: true
@@ -20,6 +21,9 @@ Layout/AlignParameters:
20
21
  Layout/CaseIndentation:
21
22
  EnforcedStyle: end
22
23
 
24
+ Layout/EmptyLineAfterGuardClause:
25
+ Enabled: false
26
+
23
27
  # Ideally, I would like to insert empty lines at the beginning on a class definition, but not at the
24
28
  # end. https://github.com/bbatsov/rubocop/issues/4812
25
29
  Layout/EmptyLinesAroundClassBody:
@@ -35,6 +39,7 @@ Layout/EmptyLineBetweenDefs:
35
39
  AllowAdjacentOneLineDefs: true
36
40
  NumberOfEmptyLines: 1
37
41
 
42
+
38
43
  Layout/EndOfLine:
39
44
  EnforcedStyle: lf
40
45
 
@@ -75,6 +80,14 @@ Naming/FileName:
75
80
  - 'bin/**/*'
76
81
  - 'db/**/*'
77
82
  - 'spec/**/*'
83
+ - '**/config.ru'
84
+ - 'lib/tasks/**'
85
+
86
+ Rails/BulkChangeTable:
87
+ Enabled: false
88
+
89
+ Style/AccessModifierDeclarations:
90
+ EnforcedStyle: inline
78
91
 
79
92
  Style/ConditionalAssignment:
80
93
  EnforcedStyle: assign_to_condition
@@ -87,21 +100,35 @@ Style/Copyright:
87
100
  Style/Documentation:
88
101
  Enabled: false
89
102
 
103
+ Style/DoubleNegation:
104
+ Enabled: false
105
+
90
106
  Style/FormatString:
91
107
  EnforcedStyle: percent
92
108
 
93
109
  # 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.
110
+ # every file, we should not mutate strings.
95
111
  Style/FrozenStringLiteralComment:
96
112
  EnforcedStyle: never
97
113
 
98
- Style/StringLiterals:
99
- Exclude:
100
- - 'spec/**/*'
114
+ Style/MultilineBlockChain:
115
+ Enabled: false
116
+
117
+ Style/MultilineTernaryOperator:
118
+ Enabled: false
119
+
120
+ Style/PercentLiteralDelimiters:
121
+ Enabled: false
122
+
123
+ Style/RegexpLiteral:
124
+ Enabled: false
101
125
 
102
126
  Style/ReturnNil:
103
127
  Enabled: true
104
128
 
129
+ Style/StringLiterals:
130
+ EnforcedStyle: double_quotes
131
+
105
132
  Style/SymbolArray:
106
133
  MinSize: 3
107
134
 
@@ -138,15 +165,9 @@ Layout/BlockAlignment:
138
165
  Layout/EndAlignment:
139
166
  EnforcedStyleAlignWith: start_of_line
140
167
 
141
- Rails/RequestReferer:
142
- EnforcedStyle: referrer
143
-
144
168
  Rails/Date:
145
169
  EnforcedStyle: strict
146
170
 
147
- Rails/TimeZone:
148
- EnforcedStyle: flexible
149
-
150
171
  Rails/FilePath:
151
172
  Enabled: false
152
173
 
@@ -154,8 +175,11 @@ Rails/FilePath:
154
175
  Rails/InverseOf:
155
176
  Enabled: false
156
177
 
157
- Style/MultilineTernaryOperator:
158
- Enabled: false
159
-
160
178
  Rails/NotNullColumn:
161
179
  Enabled: false
180
+
181
+ Rails/RequestReferer:
182
+ EnforcedStyle: referrer
183
+
184
+ Rails/TimeZone:
185
+ 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.4
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-02-05 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