Skip to content

Commit

Permalink
Add change operation instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
TreyE committed Apr 13, 2024
1 parent b6d1bb3 commit baabf11
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 5 deletions.
6 changes: 6 additions & 0 deletions hugo/content/docs/development_patterns/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Development Patterns
weight: 3
description: >
Development patterns we use to accelerate and standardize delivery.
---
27 changes: 27 additions & 0 deletions hugo/content/docs/development_patterns/change_operation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Change Operation
description: >
A Change Operation is a one-time or repeatable task with optional parameters intended for execution against the back-end of an IdeaCrew system.
---

## Design Pattern

A Change Operation should consist of a Rake task wrapping a well-tested operation. Other than the rake task skeleton and any rake argument retrieval, the only code of any real consequence you should be executing in the Rake task are calling `.new` and `#call` on the operation. No other behavioural or actionable logic should be present in the code for the Rake task.

## An Example

Below is the example Rake task. Note that it performs no behaviour or actions other than invoking `.new` and `#call` on our operations.

```ruby
# lib/tasks/unexpire_account.rake
namespace :accounts do

desc "Unexpire an administrative user account locked for inactivity"
task :unexpire, [:account_email] => :environment do |t, args|
Accounts::Unexpire.new.call({
:account_email => args[:account_email]
})
end

end
```
3 changes: 2 additions & 1 deletion hugo/content/docs/legacy_technologies/_index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Legacy Technologies

description: >
Libraries and technologies previously used in IdeaCrew projects, that new code should not use.
---
3 changes: 2 additions & 1 deletion hugo/content/docs/legacy_technologies/acapi/_index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: ACAPI

description: >
A legacy toolkit used to broadcast and receive AMQP messages.
---
4 changes: 3 additions & 1 deletion hugo/content/docs/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ description: >
This page provides an inventory and links to documentation for projects within ideacrew.

* [ACA Entities](http://ic-aca-entities-docs.s3-website-us-east-1.amazonaws.com/trunk/) - very out of date, and bare.
* CRM Gateway - no documentation site yet.
* [Event Source](http://ic-event-source-docs.s3-website-us-east-1.amazonaws.com/trunk) - out of date, needs some love.
* FDSH Gateway - no documentation site yet.
* [GlueDB](https://gluedb.docs.ideacrew.com/me_carrier_boarding/)
* [Enroll](https://enroll.docs.ideacrew.com/)
* [Medicaid Gateway](http://medicaid-gateway.docs.ideacrew.com/)
* [Medicaid Gateway](http://medicaid-gateway.docs.ideacrew.com/)
* Resource Registry - no documentation site yet.
3 changes: 2 additions & 1 deletion hugo/content/docs/technologies/event_source/_index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Event Source

description: >
Our enterprise eventing system.
---
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/blavi_speaks.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading"><img src="/images/blavi.gif">Yo, harken!</h4>
<h4 class="alert-heading"><img src="/images/blavi.gif">Important</h4>
{{ .Inner }}
</div>

0 comments on commit baabf11

Please sign in to comment.