Skip to content

Commit

Permalink
Merge pull request #1311 from hpatoio/fix_1182
Browse files Browse the repository at this point in the history
Fix #1182 | Changed regexp to match standard ngrok urls
  • Loading branch information
BranLiang committed Jan 6, 2022
2 parents fec24fd + dc8a824 commit a7ce777
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/generators/shopify_app/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def mount_engine
def insert_hosts_into_development_config
inject_into_file(
'config/environments/development.rb',
" config.hosts = (config.hosts rescue []) << /\\w+\\.ngrok\\.io/\n",
" config.hosts = (config.hosts rescue []) << /\[-\w]+\\.ngrok\\.io/\n",
after: "Rails.application.configure do\n"
)
end
Expand Down
2 changes: 1 addition & 1 deletion test/generators/install_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class InstallGeneratorTest < Rails::Generators::TestCase
test "adds host config to development.rb" do
run_generator
assert_file "config/environments/development.rb" do |config|
assert_match "config.hosts = (config.hosts rescue []) << /\\w+\\.ngrok\\.io/", config
assert_match "config.hosts = (config.hosts rescue []) << /\[-\w]+\\.ngrok\\.io/", config
end
end

Expand Down

0 comments on commit a7ce777

Please sign in to comment.