-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
27
hugo/content/docs/development_patterns/change_operation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
title: Event Source | ||
|
||
description: > | ||
Our enterprise eventing system. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |