Does your Rails code suffer from bloat, brittleness, or inaccuracy? Cure these problems with a regular dose of test-driven development. Rails 4 Test Prescriptions is a comprehensive guide to how tests can help you design and write better Rails applications. In this completely revised edition, you'll learn why testing works and how to test effectively using Rails 4, Minitest 5, and RSpec 3, as well as popular testing libraries such as factory_girl and Cucumber. Do what the doctor ordered to make your applications feel all better. Side effects may include better code, fewer bugs, and happier developers.Your Ruby on Rails application is sick. Deadlines are looming, but every time you make the slightest change to the code, something else breaks. Nobody remembers what that tricky piece of code was supposed to do, and nobody can tell what it actually does. Plus, it has bugs. You need test-driven development, a process for improving the design, maintainability, and long- term viability of software.Containing both practical code examples and discussion of why testing works, this book starts with the most basic features delivered as part of core Ruby on Rails. Once you've integrated those features into your coding practice, you'll learn how to use popular third-party testing tools such as RSpec, Mocha, Cucumber, and factory_girl. You'll test the component parts of a Rails application, including the back-end model logic and the front-end display logic. Using Rails examples, you'll learn how to use testing to enable your code to respond better to future change. Plus, you'll see how to handle real-world testing situations.This completely revised edition contains a new tutorial, as well as new examples throughout the book. Many chapters, including the JavaScript chapter, have undergone major changes to reflect new tools and new practices. And there are brand new chapters on testing for security, and testing external services.What You Need:Ruby 2.1, Rails 4
Noel Rappin Knihy






Take My Money
Accepting Payments on the Web
Getting paid using Stripe or PayPal is only the beginning of creating a full-featured e-commerce application. You also need to handle failure cases, inventory management, administration, security, reporting and be complliant with legal issues. With this comprehensive guide, you'll ensure your customers have a smooth, hassle-free experience. Set up a payment gateway and accept credit card payments. Improve security by validfating credit card dta, design your application for maximum flexibility, manage the multiple failure points of dealing with payment gateways, and test for failure cases. Use background jobs to simplify third-party interactions. Issue refunds and discounts while maintaining data integrity and security. Create subscription plans and manage recurring payments, and stay on top of legal issues regarding taxes, reporting, and compliance. By the end you'll know how to create a fully functional web payment-taking machine.--
Modern Front-End Development for Rails
- 250 stránek
- 9 hodin čtení
1. Getting started with client-side Rails -- 2. Hotwire and Turbo -- 3. Stimulus -- 4. React -- 5. Cascading style sheets -- 6. TypeScript -- 7. webpack -- 8. Webpacker -- 9. Talking to the server -- 10. Immediate communication with ActionCable -- 11. Managing state in stimulus code -- 12. Managing state in React -- 13. Using Redux to manage state -- 14. Validating code with advanced TypeScript -- 15. Testing with Cypress -- 16. More testing and troubleshooting -- A1. Framework swap.
wxPython in action
- 620 stránek
- 22 hodin čtení
Because they are often large and complex, GUI programming tool kits can be hard to use. wxPython is a combination of the Python programming language and the wxWidgets toolkit, which allows programmers to create programs with a robust, highly functional graphical user interface, simply and easily. wxPython combines the power of an exceptionally complete user interface toolkit with an exceptionally flexible programming language. The result is a toolkit that is unique in the ease with which complex applications can be built and maintained.""wxPython in Action"" is a complete guide to the wxPython toolkit, containing a tutorial for getting started, a guide to best practices, and a reference to wxPython's extensive widget set. After an easy introduction to wxPython concepts and programming practices, the book takes an in-depth tour of when and how to use the bountiful collection of widgets offered by wxPython. All features are illustrated with useful code examples and reference tables are included for handy lookup of an object's properties, methods, and events. The book enables developers to learn wxPython quickly and remains a valuable resource for futurework.
Modern CSS with Tailwind
- 92 stránek
- 4 hodiny čtení
With this book, you'll learn how to use the Tailwind for its flexibility and its consistency, from the smallest detail of your typography to the entire design of your site.