Browse Source

Merge pull request #148 from Shopify/change_admin_link

Update admin link in API console
Shayne Parmelee 10 years ago
parent
commit
d5c6e7326b
2 changed files with 4 additions and 4 deletions
  1. 1 1
      lib/shopify_api/cli.rb
  2. 3 3
      test/cli_test.rb

+ 1 - 1
lib/shopify_api/cli.rb

@@ -27,7 +27,7 @@ module ShopifyAPI
         config['domain']   = ask("Domain? (leave blank for #{connection}.myshopify.com)")
         config['domain']   = "#{connection}.myshopify.com" if config['domain'].blank?
         config['domain']   = "#{config['domain']}.myshopify.com" unless config['domain'].match(/[.:]/)
-        puts "\nopen https://#{config['domain']}/admin/api in your browser to get API credentials\n"
+        puts "\nopen https://#{config['domain']}/admin/apps/private in your browser to create a private app and get API credentials\n"
         config['api_key']  = ask("API key?")
         config['password'] = ask("Password?")
         if ask("Would you like to use pry as your shell? (y/n)") === "y"

+ 3 - 3
test/cli_test.rb

@@ -28,7 +28,7 @@ class CliTest < Test::Unit::TestCase
   test "add with blank domain" do
     standard_add_shop_prompts
     $stdin.expects(:gets).times(4).returns("", "key", "pass", "y")
-    @cli.expects(:puts).with("\nopen https://foo.myshopify.com/admin/api in your browser to get API credentials\n")
+    @cli.expects(:puts).with("\nopen https://foo.myshopify.com/admin/apps/private in your browser to create a private app and get API credentials\n")
     @cli.expects(:puts).with("Default connection is foo")
 
     @cli.add('foo')
@@ -45,7 +45,7 @@ class CliTest < Test::Unit::TestCase
   test "add with explicit domain" do
     standard_add_shop_prompts
     $stdin.expects(:gets).times(4).returns("bar.myshopify.com", "key", "pass", "y")
-    @cli.expects(:puts).with("\nopen https://bar.myshopify.com/admin/api in your browser to get API credentials\n")
+    @cli.expects(:puts).with("\nopen https://bar.myshopify.com/admin/apps/private in your browser to create a private app and get API credentials\n")
     @cli.expects(:puts).with("Default connection is foo")
 
     @cli.add('foo')
@@ -57,7 +57,7 @@ class CliTest < Test::Unit::TestCase
   test "add with irb as shell" do
     standard_add_shop_prompts
     $stdin.expects(:gets).times(4).returns("bar.myshopify.com", "key", "pass", "fuuuuuuu")
-    @cli.expects(:puts).with("\nopen https://bar.myshopify.com/admin/api in your browser to get API credentials\n")
+    @cli.expects(:puts).with("\nopen https://bar.myshopify.com/admin/apps/private in your browser to create a private app and get API credentials\n")
     @cli.expects(:puts).with("Default connection is foo")
 
     @cli.add('foo')