Skip to content

Commit

Permalink
[gh383] Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
andyduong1920 committed Feb 15, 2023
1 parent a28d322 commit f0f6b53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .template/addons/phrase_app/spec/codebase/codebase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# rubocop:disable RSpec/ExampleLength
it 'does not offend PhraseApp Pull configuration' do
locale_tags = Dir[File.expand_path(Rails.root.join('config', 'locales', '*.yml'))]
locale_tags = Dir[Rails.root.expand_path('config', 'locales', '*.yml')]
.map { |path| path.split('/').last } # ["campaign.en.yml", "article.en.yml", "campaign.th.yml"]
.map { |path| path.split('.').first } # ["campaign", "article", "campaign"]
.uniq # ["campaign", "article"]
Expand Down
2 changes: 1 addition & 1 deletion spec/codebase/codebase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end

it 'does not offend engine prefix name' do
engine_paths = Dir[File.expand_path(Rails.root.join('engines', '*'))]
engine_paths = Dir[Rails.root.expand_path('engines', '*')]
.select { |f| File.directory? f }
.map { |path| path.split('/').last }
invalid_engine_paths = engine_paths.reject { |path| path.start_with?('APP_NAME_HERE_') }
Expand Down

0 comments on commit f0f6b53

Please sign in to comment.