<NME> utils.rb
<BEF> require 'json'
# powify server functions
# invoked via powify utils [COMMAND] [ARGS]
module Powify
  class Utils
    extend Powify
    AVAILABLE_METHODS = %w(install reinstall uninstall remove help)

    class << self
      def run(args = [])
        method = args[0].to_s.downcase
        raise "The command `#{args.first}` does not exist for `powify utils`!" unless Powify::Utils::AVAILABLE_METHODS.include?(method)
        self.send(method)
      end

      # Install powify.dev
      def install
        uninstall
        %x{git clone git@github.com:sethvargo/powify.dev.git powify && cd powify && bundle install --deployment && cd .. && mv powify #{self.config['hostRoot']}}
      end
      alias_method :reinstall, :install

      # Uninstall powify.dev
      def uninstall
        %x{rm -rf #{self.config['hostRoot']}/powify}
      end
      alias_method :remove, :uninstall
    end
      end
      alias_method :remove, :uninstall
    end
  end
end

<MSG> use Powify::Server config method

<DFF> @@ -16,13 +16,13 @@ module Powify
       # Install powify.dev
       def install
         uninstall
-        %x{git clone git@github.com:sethvargo/powify.dev.git powify && cd powify && bundle install --deployment && cd .. && mv powify #{self.config['hostRoot']}}
+        %x{git clone git@github.com:sethvargo/powify.dev.git powify && cd powify && bundle install --deployment && cd .. && mv powify #{Powify::Server.config['hostRoot']}}
       end
       alias_method :reinstall, :install
 
       # Uninstall powify.dev
       def uninstall
-        %x{rm -rf #{self.config['hostRoot']}/powify}
+        %x{rm -rf #{Powify::Server.config['hostRoot']}/powify}
       end
       alias_method :remove, :uninstall
     end

{'addition_count': 2, 'commit_subject': 'use Powify::Server config method', 'deletion_count': 2, 'file_extension': '.rb', 'lang': 'rb', 'license': 'mit', 'repo_name': 'sethvargo/powify'}