Sha256: 1045dc31af773cd1f297c555804298cb90fff4477d05b37c021ab0b0497377cc

Contents?: true

Size: 1007 Bytes

Versions: 20

Compression:

Stored size: 1007 Bytes

Contents

# frozen_string_literal: true

require 'shopify_cli'

module Rails
  module Commands
    class Tunnel < ShopifyCli::Command
      # subcommands :auth, :start, :stop

      def call(args, _name)
        subcommand = args.shift
        case subcommand
        when 'auth'
          token = args.shift
          if token.nil?
            @ctx.puts(@ctx.message('rails.tunnel.error.token_argument_missing'))
            @ctx.puts("#{self.class.help}\n#{self.class.extended_help}")
          else
            ShopifyCli::Tunnel.auth(@ctx, token)
          end
        when 'start'
          ShopifyCli::Tunnel.start(@ctx)
        when 'stop'
          ShopifyCli::Tunnel.stop(@ctx)
        else
          @ctx.puts(self.class.help)
        end
      end

      def self.help
        ShopifyCli::Context.message('rails.tunnel.help', ShopifyCli::TOOL_NAME)
      end

      def self.extended_help
        ShopifyCli::Context.message('rails.tunnel.extended_help', ShopifyCli::TOOL_NAME)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
shopify-cli-1.6.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.5.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.4.1 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.4.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.3.1 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.3.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.2.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.1.2 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.1.1 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.1.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.0.5 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.0.4 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.0.3 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.0.2 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.0.1 lib/project_types/rails/commands/tunnel.rb
shopify-cli-1.0.0 lib/project_types/rails/commands/tunnel.rb
shopify-cli-0.9.3 lib/project_types/rails/commands/tunnel.rb
shopify-cli-0.9.2 lib/project_types/rails/commands/tunnel.rb
shopify-cli-0.9.1 lib/project_types/rails/commands/tunnel.rb
shopify-cli-0.9.0 lib/project_types/rails/commands/tunnel.rb