{"repo":"adomokos/light-service","free":true,"listed":false,"github":"https://github.com/adomokos/light-service","clone":"git clone https://github.com/adomokos/light-service.git","description":"Series of Actions with an emphasis on simplicity.","language":"Ruby","stars":882,"topics":["ruby","workflow","aop"],"license":"MIT","category":"workflow-automation","readme_excerpt":"LightService is a powerful and flexible service skeleton framework with an emphasis on simplicity Table of Contents - Table of Contents - Why LightService? - Getting started - Requirements - Installation - Your first action - Your first organizer - Stopping the Series of Actions - Failing the Context - Skipping the rest of the actions - Skipping ALL the rest of the actions - Benchmarking Actions with Around Advice - Before and After Action Hooks - Expects and Promises - Default values for optional Expected keys - Key Aliases - Logging - Error Codes - Action Rollback - Localizing Messages - Built-in localization adapter - I18n localization adapter - Custom localization adapter - Orchestrating Logic in Organizers - ContextFactory for Faster Action Testing - Rails support - Organizer generation - Action generation - Advanced action generation - Other implementations - Contributing - Release Notes - License Why LightService? What do you think of this code? This controller violates SRP all over. Also, imagine what it would take to test this beast. You could move the tax percentage finders and calculations into the tax model, but then you'll make your model logic heavy. This controller does 3 things in order: Looks up the tax percentage based on order total Calculates the order tax Provides free shipping if the total with tax is greater than $200 The order of these tasks matters: you can't calculate the order tax without the percentage. Wouldn't it be nice to see this instead? This","default_branch":null,"files":null,"tree":[],"storefront":"/r/adomokos","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adomokos/light-service/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}