Sha256: 74458281465d1d5f502a4dee690c133f2ad38696fac3f1e4544248cbd6cc5c53

Contents?: true

Size: 933 Bytes

Versions: 10

Compression:

Stored size: 933 Bytes

Contents

module ShopifyApp
  class Configuration

    # Shopify App settings. These values should match the configuration
    # for the app in your Shopify Partners page. Change your settings in
    # `config/initializers/shopify_app.rb`
    attr_accessor :api_key
    attr_accessor :secret
    attr_accessor :scope
    attr_accessor :embedded_app
    alias_method  :embedded_app?, :embedded_app
    attr_accessor :webhooks
    attr_accessor :scripttags

    # configure myshopify domain for local shopify development
    attr_accessor :myshopify_domain

    def initialize
      @myshopify_domain = 'myshopify.com'
    end

    def has_webhooks?
      webhooks.present?
    end

    def has_scripttags?
      scripttags.present?
    end
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configuration=(config)
    @configuration = config
  end

  def self.configure
    yield configuration
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shopify_app-7.0.11 lib/shopify_app/configuration.rb
shopify_app-7.0.10 lib/shopify_app/configuration.rb
shopify_app-7.0.9 lib/shopify_app/configuration.rb
shopify_app-7.0.8 lib/shopify_app/configuration.rb
shopify_app-7.0.7 lib/shopify_app/configuration.rb
shopify_app-7.0.6 lib/shopify_app/configuration.rb
shopify_app-7.0.5 lib/shopify_app/configuration.rb
shopify_app-7.0.4 lib/shopify_app/configuration.rb
shopify_app-7.0.2 lib/shopify_app/configuration.rb
shopify_app-7.0.1 lib/shopify_app/configuration.rb