Skip to content

Commit

Permalink
RuboCop 0.49 fixes (#5)
Browse files Browse the repository at this point in the history
* Update RuboCop to `0.49`

* Fix RuboCop `Style/PercentLiteralDelimiters` cop

* Fix RuboCop `Layout/EmptyLineAfterMagicComment` cop

* Fix RuboCop `Performance/Caller` cop
  • Loading branch information
ShockwaveNN authored May 25, 2017
1 parent dc4744b commit 80a8b98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2016-11-14 18:28:34 +0300 using RuboCop version 0.45.0.
# on 2017-05-25 14:46:57 +0300 using RuboCop version 0.49.0.
# 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
5 changes: 4 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change log

# 1.0.0
## master (unrelased)
* Fix RuboCop 0.49 warnings (minor speedup by `Performance/Caller` cop)

## 1.0.0
* Shorter call `OnlyofficeLoggerHelper.log` instead of longer variant `OnlyofficeLoggerHelper::log.print_to_log`

## 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion lib/onlyoffice_logger_helper/logger_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Module for output stuff in console
module OnlyofficeLoggerHelper
def self.log(entry, color_code = nil)
caller_name = caller[0].to_s[/\w+.rb/].chomp('.rb')
caller_name = caller(1..1).first.to_s[/\w+.rb/].chomp('.rb')
time_stamp = Time.now.strftime('%T/%d.%m.%y')
message = "#{time_stamp} [#{caller_name}] #{entry}"
color_code ? puts(colorize(message, color_code)) : puts(message)
Expand Down
3 changes: 1 addition & 2 deletions onlyoffice_logger_helper.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'onlyoffice_logger_helper/version'
Expand All @@ -7,7 +6,7 @@ Gem::Specification.new do |spec|
spec.name = 'onlyoffice_logger_helper'
spec.version = OnlyofficeLoggerHelper::VERSION
spec.authors = ['ONLYOFFICE', 'Pavel Lobashov', 'Roman Zagudaev']
spec.email = %w([email protected] [email protected])
spec.email = %w[[email protected] [email protected]]

spec.summary = 'Simple logging gem for ONLYOFFICE projects'
spec.description = 'Simple logging gem for ONLYOFFICE projects. Used in QA'
Expand Down

0 comments on commit 80a8b98

Please sign in to comment.