Sha256: 54c3fe9395edf0abfff1892c005a091ed126e34cd7844a4457474c3c94b8612b

Contents?: true

Size: 1.44 KB

Versions: 36

Compression:

Stored size: 1.44 KB

Contents

module ShopifyCLI
  module Commands
    class App
      class Create
        class Rails < ShopifyCLI::Command::AppSubCommand
          prerequisite_task :ensure_authenticated
          prerequisite_task :ensure_git_dependency

          recommend_default_ruby_range
          recommend_default_node_range

          options do |parser, flags|
            parser.on("--name=NAME") { |t| flags[:name] = t }
            parser.on("--organization-id=ID") { |id| flags[:organization_id] = id }
            parser.on("--store-domain=MYSHOPIFYDOMAIN") { |url| flags[:store_domain] = url }
            parser.on("--type=APPTYPE") { |type| flags[:type] = type }
            parser.on("--db=DB") { |db| flags[:db] = db }
            parser.on("--rails-opts=RAILSOPTS") { |opts| flags[:rails_opts] = opts }
          end

          def call(*)
            Services::App::Create::RailsService.call(
              name: options.flags[:name],
              organization_id: options.flags[:organization_id],
              store_domain: options.flags[:store_domain],
              type: options.flags[:type],
              db: options.flags[:db],
              rails_opts: options.flags[:rails_opts],
              context: @ctx
            )
          end

          class << self
            def help
              ShopifyCLI::Context.message("core.app.create.rails.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
            end
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
shopify-cli-2.19.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.18.1 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.18.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.17.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.16.1 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.16.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.6 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.5 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.4 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.3 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.2 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.1 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.15.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.14.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.13.0 lib/shopify_cli/commands/app/create/rails.rb
shopify-cli-2.12.0 lib/shopify_cli/commands/app/create/rails.rb