Rails : Capybara Webkit : Issue : Multiple JS events in single example

I recently moved from Selenium Web Driver to Thoughtbot’s Capybara Webkit as JS Driver for Capybara. The main reason is, webkit is super fast in running the test suite and its headless (no browser pops up ) .

Problem I faced

I was changing the option in select box and expecting the change in span’s content. Actually some sort of calculation should have been triggered. Webkit was not triggering the ‘change‘ event properly.

Continue reading

Advertisements

Stripe : What events can I see when a subscription is renewed?

Since subscriptions are handled asynchronously by our system, we keep your servers up-to-date with a variety of events.

If a subscription is on a trial, we’ll first let you know that the trial is ending with the customer.subscription.trial_will_end event; this can give your customers an opportunity to update their payment information, choose a specific plan, and so on.

We’ll then generate an invoice.created event. The invoice will be open for modification if your customer’s subscription is active, so you’ll have an hour to make any adjustments before we attempt to pay it.

Since the billing periods have changed, there will be acustomer.subscription.updated event to update the current_period_startand current_period_end values. The events you see from here depend on whether or not the invoice was successfully paid:

Invoice payment was successful

If the invoice was successfully paid, we’ll let you know that the invoice was paid with an invoice.payment_succeeded event. If the invoice total was for more than our minimum charge, we’ll create an actual charge, so you’ll also see acharge.succeeded event.

There will be a customer.updated event to reset the delinquent flag if your customer previously had a failed invoice.

Invoice payment failed

We’ll let you know about this case with an invoice.payment_failed event. The payment could have failed either because your customer did not have a card on file or because the charge was declined; if it was due to a decline, we’ll also emit a charge.failed event.

You’ll also see a customer.updated event to set the delinquent flag, an invoice.updated event to track the payment attempts, and customer.subscription.updated or customer.subscription.deleted depending on your retry settings.

 

 

 

Copied from ( for reference/note )

https://support.stripe.com/questions/what-events-can-i-see-when-a-subscription-is-renewed

Capistrano 3.0 : Task Flow : Rails deployment

Deploy flow

When you run cap production deploy, it invokes the following tasks in sequence:

deploy:starting    - start a deployment, make sure everything is ready
deploy:started     - started hook (for custom tasks)
deploy:updating    - update server(s) with a new release
deploy:updated     - updated hook
deploy:publishing  - publish the new release
deploy:published   - published hook
deploy:finishing   - finish the deployment, clean up everything
deploy:finished    - finished hook

Notice there are several hook tasks e.g. :started, :updated for you to hook up custom tasks into the flow using after() and before().

Flow examples

Continue reading