Sha256: bf53433d482e83e143a35918f287318e3d50a8508353b1ddfe30cf2b47fec76a

Contents?: true

Size: 1 KB

Versions: 18

Compression:

Stored size: 1 KB

Contents

namespace :stripe do
  desc 'verify your stripe.com authentication configuration'
  task 'verify' => :environment do
    begin
      Stripe::Plan.all
      puts "[OK] - connection to stripe.com is functioning properly"
    rescue Stripe::AuthenticationError => e
      puts "[FAIL] - authentication failed"
    end
  end

  task 'products:prepare' => 'environment' do
    if CurrentApiVersion.after_switch_to_products_in_plans?
      Stripe::Products.put!
    else
      puts '[SKIPPED] Current API version does not support Products'
    end
  end

  task 'plans:prepare' => 'environment' do
    Stripe::Plans.put!
  end

  task 'coupons:prepare' => 'environment' do
    Stripe::Coupons.put!
  end

  desc 'delete and redefine all coupons defined in config/stripe/coupons.rb'
  task 'coupons:reset!' => 'environment' do
    Stripe::Coupons.reset!
  end

  desc "create all plans and coupons defined in config/stripe/{products|plans|coupons}.rb"
  task 'prepare' => ['products:prepare', 'plans:prepare', 'coupons:prepare']
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
stripe-rails-1.9.0 lib/stripe/rails/tasks.rake
stripe-rails-1.8.2 lib/stripe/rails/tasks.rake
stripe-rails-1.8.1 lib/stripe/rails/tasks.rake
stripe-rails-1.8.0 lib/stripe/rails/tasks.rake
stripe-rails-1.7.2 lib/stripe/rails/tasks.rake
stripe-rails-1.7.1 lib/stripe/rails/tasks.rake
stripe-rails-1.7.0 lib/stripe/rails/tasks.rake
stripe-rails-1.6.1 lib/stripe/rails/tasks.rake
stripe-rails-1.6.0 lib/stripe/rails/tasks.rake
stripe-rails-1.5.5 lib/stripe/rails/tasks.rake
stripe-rails-1.5.4 lib/stripe/rails/tasks.rake
stripe-rails-1.5.3 lib/stripe/rails/tasks.rake
stripe-rails-1.5.2 lib/stripe/rails/tasks.rake
stripe-rails-1.5.1 lib/stripe/rails/tasks.rake
stripe-rails-1.5.0 lib/stripe/rails/tasks.rake
stripe-rails-1.4.2 lib/stripe/rails/tasks.rake
stripe-rails-1.4.1 lib/stripe/rails/tasks.rake
stripe-rails-1.4.0 lib/stripe/rails/tasks.rake