Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
drwl committed Jun 22, 2019
2 parents 0ef095d + 5ac56e4 commit 111640d
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 185 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
@@ -1,4 +1,5 @@
inherit_from: ./.rubocop_todo.yml
inherit_from:
- .rubocop_todo.yml

AllCops:
Exclude:
Expand Down
35 changes: 14 additions & 21 deletions .rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-03-07 18:25:02 -0800 using RuboCop version 0.65.0.
# on 2019-06-16 12:01:03 -0700 using RuboCop version 0.68.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -51,7 +51,7 @@ Layout/AlignArray:
Exclude:
- 'spec/annotate/annotate_models_spec.rb'

# Offense count: 103
# Offense count: 104
# Cop supports --auto-correct.
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
Expand Down Expand Up @@ -149,7 +149,7 @@ Layout/EmptyLinesAroundExceptionHandlingKeywords:

# Offense count: 24
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
Layout/ExtraSpacing:
Exclude:
- 'Guardfile'
Expand All @@ -170,7 +170,7 @@ Layout/ExtraSpacing:
# Cop supports --auto-correct.
# Configuration parameters: IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Layout/IndentHash:
Layout/IndentFirstHashElement:
EnforcedStyle: consistent

# Offense count: 54
Expand Down Expand Up @@ -247,7 +247,7 @@ Layout/SpaceAroundKeyword:
- 'spec/integration/rails_4.2.0/Gemfile'
- 'spec/integration/standalone/Gemfile'

# Offense count: 4
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceAroundOperators:
Expand Down Expand Up @@ -419,15 +419,15 @@ Lint/UnusedBlockArgument:
Exclude:
- 'bin/annotate'

# Offense count: 18
# Offense count: 19
Metrics/AbcSize:
Max: 139
Max: 138

# Offense count: 29
# Offense count: 27
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 1140
Max: 244

# Offense count: 1
# Configuration parameters: CountBlocks.
Expand Down Expand Up @@ -475,14 +475,6 @@ Naming/UncommunicativeMethodParamName:
Exclude:
- 'Rakefile'

# Offense count: 4
# Cop supports --auto-correct.
Performance/RegexpMatch:
Exclude:
- 'lib/annotate/annotate_models.rb'
- 'lib/annotate/annotate_routes.rb'
- 'spec/integration/rails_2.3_with_bundler/config/boot.rb'

# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: inline, group
Expand Down Expand Up @@ -688,7 +680,7 @@ Style/NestedParenthesizedCalls:
Style/NumericLiterals:
MinDigits: 15

# Offense count: 2
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Expand Down Expand Up @@ -809,7 +801,7 @@ Style/StderrPuts:
- 'lib/annotate/annotate_models.rb'
- 'spec/integration/rails_2.3_with_bundler/config/boot.rb'

# Offense count: 240
# Offense count: 243
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Expand Down Expand Up @@ -867,8 +859,9 @@ Style/UnneededPercentQ:
- 'annotate.gemspec'
- 'spec/integration/rails_2.3_with_bundler/config/boot.rb'

# Offense count: 424
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Offense count: 431
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 276
37 changes: 25 additions & 12 deletions .travis.yml
@@ -1,24 +1,37 @@
sudo: false
language: ruby
rvm:
- 2.2.7
- 2.3.4
- 2.4.1
- 2.2.10
- 2.3.8
- 2.4.6
- 2.5.5
- 2.6.0
- 2.6.1
- 2.6.2
- 2.6.3
- ruby-head

matrix:
allow_failures:
- rvm: ruby-head

before_install:
- gem update --system
- gem update --system || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
- gem update bundler

script:
- bundle exec rubocop && bundle exec rspec
deploy:
provider: rubygems
api_key:
secure: Y7DUitak26kcRAAkgph/7m6Y1wHeObD0BelSSJbmCfjkRd/qaVy7fz9VvHL9zxlRJtLGVHInyCnwcfzinibY6OFd3MoMYHKv8GFa2LxLJNEVSY46KQYFxfH5JTg1ejh6ldoJRRBoeOx9dcWS80pRNjYMKPGnpSz7yDBl1azibFs=
gem: annotate
on:
tags: true
repo: ctran/annotate_models

jobs:
include:
- stage: gem release
if: tag =~ ^v
rvm: 2.6.0
script: echo "Deploying to rubygems.org ..."
deploy:
provider: rubygems
api_key: $RUBYGEMS_API_KEY
gem: annotate
on:
tags: true
repo: ctran/annotate_models
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -19,15 +19,15 @@ group :development, :test do
gem 'guard-rspec', require: false
gem 'rspec', require: false

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

gem 'codeclimate-test-reporter'
gem 'coveralls'

gem 'overcommit'
gem 'ruby_dep', '1.3.1'
gem 'ruby_dep', '1.5.0'

platforms :mri, :mingw do
gem 'pry', require: false
Expand Down
6 changes: 5 additions & 1 deletion lib/annotate/annotate_models.rb
Expand Up @@ -910,7 +910,11 @@ def width(string)
def mb_chars_ljust(string, length)
string = string.to_s
padding = length - width(string)
string + (' ' * padding)
if padding > 0
string + (' ' * padding)
else
string[0..length-1]
end
end
end

Expand Down

0 comments on commit 111640d

Please sign in to comment.