Selaa lähdekoodia

Fix the creation of abbreviations for the command line tasks.

The code to create the shortcuts just needed to be moved after the tasks
are defined, so that tasks.keys doesn't return an empty list.
Dylan Smith 13 vuotta sitten
vanhempi
commit
64c39b554e
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      lib/shopify_api/cli.rb

+ 5 - 5
lib/shopify_api/cli.rb

@@ -8,10 +8,6 @@ module ShopifyAPI
     class ConfigFileError < StandardError
     class ConfigFileError < StandardError
     end
     end
 
 
-    tasks.keys.abbrev.each do |shortcut, command|
-      map shortcut => command.to_sym
-    end
-    
     desc "list", "list available connections"
     desc "list", "list available connections"
     def list
     def list
       available_connections.each do |c|
       available_connections.each do |c|
@@ -107,7 +103,11 @@ module ShopifyAPI
       ARGV.clear
       ARGV.clear
       IRB.start
       IRB.start
     end
     end
-    
+
+    tasks.keys.abbrev.each do |shortcut, command|
+      map shortcut => command.to_sym
+    end
+
     private
     private
     
     
     def shop_config_dir
     def shop_config_dir