Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Feb 9, 2024
1 parent 478126a commit 355fbf9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions spec/dummy/config/lokalise_rails.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

if defined?(LokaliseRails) && defined?(LokaliseRails::GlobalConfig)
LokaliseRails::GlobalConfig.config do |c|
c.api_token = ENV['LOKALISE_API_TOKEN']
c.project_id = ENV['LOKALISE_PROJECT_ID']
c.api_token = ENV.fetch('LOKALISE_API_TOKEN', nil)
c.project_id = ENV.fetch('LOKALISE_PROJECT_ID', nil)
end
end
end
8 changes: 5 additions & 3 deletions spec/support/file_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ def add_translation_files!(with_ru: false, additional: nil)

def add_config!(custom_text = '')
data = <<~DATA
# frozen_string_literal: true
if defined?(LokaliseRails) && defined?(LokaliseRails::GlobalConfig)
LokaliseRails::GlobalConfig.config do |c|
c.api_token = ENV['LOKALISE_API_TOKEN']
c.project_id = ENV['LOKALISE_PROJECT_ID']
c.api_token = ENV.fetch('LOKALISE_API_TOKEN', nil)
c.project_id = ENV.fetch('LOKALISE_PROJECT_ID', nil)
DATA

data += custom_text
data += "end\nend"
data += "end\nend\n"
open_and_write('config/lokalise_rails.rb') { |f| f.write data }
end

Expand Down

0 comments on commit 355fbf9

Please sign in to comment.