Sha256: 5ceeb3506c263ca6086188e4be695b74b4d81b3c5b64d7dbfe232cc94778c20c

Contents?: true

Size: 774 Bytes

Versions: 19

Compression:

Stored size: 774 Bytes

Contents

require 'yaml'

namespace :generate do
  desc 'Generate new Shopify app from partner dashboard'
  task partner_app: :environment do
    begin
      config_path = File.join(ENV['HOME'], '.disco_app.yml')
      config = YAML.load_file(config_path)
    rescue StandardError
      abort("Could not load configuration file from #{config_path}, aborting.")
    end

    if config
      params = {
        email: config['params']['PARTNER_EMAIL'].to_s,
        password: config['params']['PARTNER_PASSWORD'].to_s,
        organization: config['params']['PARTNER_ORGANIZATION'].to_s,
        app_name: ENV['SHOPIFY_APP_NAME'],
        app_url: ENV['DEFAULT_HOST']
      }

      service = DiscoApp::PartnerAppService.new(params)
      service.generate_partner_app
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release lib/tasks/partner_app.rake
disco_app-0.13.7 lib/tasks/partner_app.rake
disco_app-0.13.8 lib/tasks/partner_app.rake
disco_app-0.14.1 lib/tasks/partner_app.rake
disco_app-0.14.2 lib/tasks/partner_app.rake
disco_app-0.15.0 lib/tasks/partner_app.rake
disco_app-0.16.0 lib/tasks/partner_app.rake
disco_app-0.17.0 lib/tasks/partner_app.rake
disco_app-0.18.0 lib/tasks/partner_app.rake
disco_app-0.18.2 lib/tasks/partner_app.rake
disco_app-0.14.4 lib/tasks/partner_app.rake
disco_app-0.18.3 lib/tasks/partner_app.rake
disco_app-0.18.6 lib/tasks/partner_app.rake
disco_app-0.14.3 lib/tasks/partner_app.rake
disco_app-0.16.1 lib/tasks/partner_app.rake
disco_app-0.15.2 lib/tasks/partner_app.rake
disco_app-0.18.4 lib/tasks/partner_app.rake
disco_app-0.18.1 lib/tasks/partner_app.rake
disco_app-0.14.0 lib/tasks/partner_app.rake