Skip to content

Commit 111640d

Browse files
committed
Merge branch 'develop'
2 parents 0ef095d + 5ac56e4 commit 111640d

File tree

7 files changed

+200
-185
lines changed

7 files changed

+200
-185
lines changed

.rubocop.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
inherit_from: ./.rubocop_todo.yml
1+
inherit_from:
2+
- .rubocop_todo.yml
23

34
AllCops:
45
Exclude:

.rubocop_todo.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2019-03-07 18:25:02 -0800 using RuboCop version 0.65.0.
3+
# on 2019-06-16 12:01:03 -0700 using RuboCop version 0.68.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -51,7 +51,7 @@ Layout/AlignArray:
5151
Exclude:
5252
- 'spec/annotate/annotate_models_spec.rb'
5353

54-
# Offense count: 103
54+
# Offense count: 104
5555
# Cop supports --auto-correct.
5656
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
5757
# SupportedHashRocketStyles: key, separator, table
@@ -149,7 +149,7 @@ Layout/EmptyLinesAroundExceptionHandlingKeywords:
149149

150150
# Offense count: 24
151151
# Cop supports --auto-correct.
152-
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
152+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
153153
Layout/ExtraSpacing:
154154
Exclude:
155155
- 'Guardfile'
@@ -170,7 +170,7 @@ Layout/ExtraSpacing:
170170
# Cop supports --auto-correct.
171171
# Configuration parameters: IndentationWidth.
172172
# SupportedStyles: special_inside_parentheses, consistent, align_braces
173-
Layout/IndentHash:
173+
Layout/IndentFirstHashElement:
174174
EnforcedStyle: consistent
175175

176176
# Offense count: 54
@@ -247,7 +247,7 @@ Layout/SpaceAroundKeyword:
247247
- 'spec/integration/rails_4.2.0/Gemfile'
248248
- 'spec/integration/standalone/Gemfile'
249249

250-
# Offense count: 4
250+
# Offense count: 5
251251
# Cop supports --auto-correct.
252252
# Configuration parameters: AllowForAlignment.
253253
Layout/SpaceAroundOperators:
@@ -419,15 +419,15 @@ Lint/UnusedBlockArgument:
419419
Exclude:
420420
- 'bin/annotate'
421421

422-
# Offense count: 18
422+
# Offense count: 19
423423
Metrics/AbcSize:
424-
Max: 139
424+
Max: 138
425425

426-
# Offense count: 29
426+
# Offense count: 27
427427
# Configuration parameters: CountComments, ExcludedMethods.
428428
# ExcludedMethods: refine
429429
Metrics/BlockLength:
430-
Max: 1140
430+
Max: 244
431431

432432
# Offense count: 1
433433
# Configuration parameters: CountBlocks.
@@ -475,14 +475,6 @@ Naming/UncommunicativeMethodParamName:
475475
Exclude:
476476
- 'Rakefile'
477477

478-
# Offense count: 4
479-
# Cop supports --auto-correct.
480-
Performance/RegexpMatch:
481-
Exclude:
482-
- 'lib/annotate/annotate_models.rb'
483-
- 'lib/annotate/annotate_routes.rb'
484-
- 'spec/integration/rails_2.3_with_bundler/config/boot.rb'
485-
486478
# Offense count: 1
487479
# Configuration parameters: EnforcedStyle.
488480
# SupportedStyles: inline, group
@@ -688,7 +680,7 @@ Style/NestedParenthesizedCalls:
688680
Style/NumericLiterals:
689681
MinDigits: 15
690682

691-
# Offense count: 2
683+
# Offense count: 3
692684
# Cop supports --auto-correct.
693685
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
694686
# SupportedStyles: predicate, comparison
@@ -809,7 +801,7 @@ Style/StderrPuts:
809801
- 'lib/annotate/annotate_models.rb'
810802
- 'spec/integration/rails_2.3_with_bundler/config/boot.rb'
811803

812-
# Offense count: 240
804+
# Offense count: 243
813805
# Cop supports --auto-correct.
814806
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
815807
# SupportedStyles: single_quotes, double_quotes
@@ -867,8 +859,9 @@ Style/UnneededPercentQ:
867859
- 'annotate.gemspec'
868860
- 'spec/integration/rails_2.3_with_bundler/config/boot.rb'
869861

870-
# Offense count: 424
871-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
862+
# Offense count: 431
863+
# Cop supports --auto-correct.
864+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
872865
# URISchemes: http, https
873866
Metrics/LineLength:
874867
Max: 276

.travis.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
11
sudo: false
22
language: ruby
33
rvm:
4-
- 2.2.7
5-
- 2.3.4
6-
- 2.4.1
4+
- 2.2.10
5+
- 2.3.8
6+
- 2.4.6
7+
- 2.5.5
78
- 2.6.0
9+
- 2.6.1
10+
- 2.6.2
11+
- 2.6.3
812
- ruby-head
13+
914
matrix:
1015
allow_failures:
1116
- rvm: ruby-head
17+
1218
before_install:
13-
- gem update --system
19+
- gem update --system || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
1420
- gem update bundler
21+
1522
script:
1623
- bundle exec rubocop && bundle exec rspec
17-
deploy:
18-
provider: rubygems
19-
api_key:
20-
secure: Y7DUitak26kcRAAkgph/7m6Y1wHeObD0BelSSJbmCfjkRd/qaVy7fz9VvHL9zxlRJtLGVHInyCnwcfzinibY6OFd3MoMYHKv8GFa2LxLJNEVSY46KQYFxfH5JTg1ejh6ldoJRRBoeOx9dcWS80pRNjYMKPGnpSz7yDBl1azibFs=
21-
gem: annotate
22-
on:
23-
tags: true
24-
repo: ctran/annotate_models
24+
25+
jobs:
26+
include:
27+
- stage: gem release
28+
if: tag =~ ^v
29+
rvm: 2.6.0
30+
script: echo "Deploying to rubygems.org ..."
31+
deploy:
32+
provider: rubygems
33+
api_key: $RUBYGEMS_API_KEY
34+
gem: annotate
35+
on:
36+
tags: true
37+
repo: ctran/annotate_models

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ group :development, :test do
1919
gem 'guard-rspec', require: false
2020
gem 'rspec', require: false
2121

22-
gem 'rubocop', '~> 0.67.2', require: false unless RUBY_VERSION =~ /^1.8/
22+
gem 'rubocop', '~> 0.68.1', require: false unless RUBY_VERSION =~ /^1.8/
2323
gem 'simplecov', require: false
2424
gem 'terminal-notifier-guard', require: false
2525

2626
gem 'codeclimate-test-reporter'
2727
gem 'coveralls'
2828

2929
gem 'overcommit'
30-
gem 'ruby_dep', '1.3.1'
30+
gem 'ruby_dep', '1.5.0'
3131

3232
platforms :mri, :mingw do
3333
gem 'pry', require: false

lib/annotate/annotate_models.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,11 @@ def width(string)
910910
def mb_chars_ljust(string, length)
911911
string = string.to_s
912912
padding = length - width(string)
913-
string + (' ' * padding)
913+
if padding > 0
914+
string + (' ' * padding)
915+
else
916+
string[0..length-1]
917+
end
914918
end
915919
end
916920

0 commit comments

Comments
 (0)