Skip to content

Commit

Permalink
bumping rubocop to 0.55
Browse files Browse the repository at this point in the history
  • Loading branch information
GBH committed May 10, 2018
1 parent ca48f52 commit 2368409
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group :development, :test do
gem "byebug", "~> 10.0.0", platforms: %i[mri mingw x64_mingw]
gem "kaminari", "~> 1.1.1"
gem "puma", "~> 3.11.2"
gem "rubocop", "~> 0.52.1", require: false
gem "rubocop", "~> 0.55.0", require: false
gem "sqlite3", "~> 1.3.13"
end

Expand Down
2 changes: 1 addition & 1 deletion comfy_blog.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

$LOAD_PATH.push File.expand_path("../lib", __FILE__)
$LOAD_PATH.push File.expand_path("lib", __dir__)

require "comfy_blog/version"

Expand Down
2 changes: 1 addition & 1 deletion config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Set up gems listed in the Gemfile.
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
File.exist?(ENV["BUNDLE_GEMFILE"])
2 changes: 1 addition & 1 deletion config/environment.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Load the rails application
require File.expand_path("../application", __FILE__)
require File.expand_path("application", __dir__)

# Initialize the rails application
ComfyBlog::Application.initialize!
2 changes: 1 addition & 1 deletion lib/generators/comfy/blog/blog_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BlogGenerator < Rails::Generators::Base
include Rails::Generators::Migration
include Thor::Actions

source_root File.expand_path("../../../../..", __FILE__)
source_root File.expand_path("../../../..", __dir__)

def self.next_migration_number(dirname)
ActiveRecord::Generators::Base.next_migration_number(dirname)
Expand Down
6 changes: 4 additions & 2 deletions test/gemfiles/5.2.gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
source 'http://rubygems.org'
# frozen_string_literal: true

source "http://rubygems.org"

gemspec path: "../../"

Expand All @@ -9,7 +11,7 @@ group :development, :test do
gem "byebug", "~> 10.0.0", platforms: %i[mri mingw x64_mingw]
gem "kaminari", "~> 1.1.1"
gem "puma", "~> 3.11.2"
gem "rubocop", "~> 0.52.1", require: false
gem "rubocop", "~> 0.55.0", require: false
gem "sqlite3", "~> 1.3.13"
end

Expand Down
8 changes: 4 additions & 4 deletions test/integration/i18n_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class I18nIntegrationTest < ActionDispatch::IntegrationTest

def collect_combined_keys(hash, ns = nil)
def collect_combined_keys(hash, namespace = nil)
hash.collect do |k, v|
keys = []
keys << collect_combined_keys(v, "#{ns}.#{k}") if v.is_a?(Hash)
keys << "#{ns}.#{k}"
keys << collect_combined_keys(v, "#{namespace}.#{k}") if v.is_a?(Hash)
keys << "#{namespace}.#{k}"
end.flatten
end

def test_translations
locales_path = File.expand_path("../../../config/locales", __FILE__)
locales_path = File.expand_path("../../config/locales", __dir__)
locales = Dir.glob("#{locales_path}/*.yml").collect do |file_path|
File.basename(file_path, ".yml")
end
Expand Down

0 comments on commit 2368409

Please sign in to comment.