Sha256: a6b7abd40809b3b191f96df21404b5a9e4a8e244363d07c88caf80587dfdd140

Contents?: true

Size: 496 Bytes

Versions: 5

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true

desc 'Add S3 storage to a Heroku app'
namespace :mw do
  task add_heroku_s3_storage: :environment do
    require 'mobile_workflow/cli'
    app_name = ENV['APP_NAME']
    aws_region = ENV['AWS_REGION'] || 'us-east-1'
    aws = MobileWorkflow::Cli::AwsBackend.new(app_name: app_name, region: aws_region)
    heroku = MobileWorkflow::Cli::HerokuBackend.new(app_name: app_name)
    aws.create!
    aws.create_topic_subscription(heroku.notifications_endpoint)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mobile_workflow-0.12.2 lib/mobile_workflow/tasks/s3.rake
mobile_workflow-0.12.1 lib/mobile_workflow/tasks/s3.rake
mobile_workflow-0.12.0 lib/mobile_workflow/tasks/s3.rake
mobile_workflow-0.11.1 lib/mobile_workflow/tasks/s3.rake
mobile_workflow-0.11.0 lib/mobile_workflow/tasks/s3.rake