Sha256: 0ecc804e15f1fcefa70551f8e4a4e75123a1a0477d8a0f1da6f7a125423fa02f

Contents?: true

Size: 517 Bytes

Versions: 52

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true
require "date"

module ShopifyCLI
  module Migrator
    class Migration
      attr_reader :name, :path, :date

      def initialize(name:, path:, date:)
        @name = name
        @path = path
        @date = date
      end

      def run
        require(path)
        ShopifyCLI::Migrator::Migrations.const_get(class_name).run
      rescue StandardError
        # Continue
      end

      def class_name
        name.split("_").collect(&:capitalize).join
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
shopify-cli-2.10.1 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.10.0 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.9.0 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.8.0 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.7.4 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.7.3 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.7.2 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.7.1 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.7.0 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.6.6 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.6.5 lib/shopify_cli/migrator/migration.rb
shopify-cli-2.6.4 lib/shopify_cli/migrator/migration.rb