Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ name: Ruby CI

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]

jobs:
lint:
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![Build Status](https://travis-ci.org/liveh2o/active_remote.svg?branch=master)](https://travis-ci.org/liveh2o/active_remote)
![Build](https://github.com/liveh2o/active_remote/actions/workflows/main.yml/badge.svg?branch=main)

# Active Remote

Active Remote provides [Active Record](https://github.com/rails/rails/tree/master/activerecord)-like object-relational mapping over RPC. Think of it as Active Record for your platform: within a service, use Active Record to persist objects and between services, use Active Remote.

Active Remote provides a base class that when subclassed, provides the functionality you need to setup your remote model. Because Active Remote provides model persistence between RPC services, it uses a GUID to retrieve records and establish associations. So Active Remote expects your RPC data format to provide a :guid field that can be used to identify your remote models.

Unlike Active Record, Active Remote doesn't have access to a database table to create attribute mappings. So you'll need to do a little setup to let Active Remote know how to persist your model*.
Unlike Active Record, Active Remote doesn't have access to a database table to create attribute mappings. So you'll need to do a little setup to let Active Remote know how to persist your model\*.

```Ruby
# Given a product record that has :guid & :name fields:
Expand All @@ -21,7 +21,7 @@ Unlike Active Record, Active Remote doesn't have access to a database table to c
end
```

_*Using Ruby's inherited hook, you could build an attribute mapper to setup your remote models for you._
_\*Using Ruby's inherited hook, you could build an attribute mapper to setup your remote models for you._

Like Active Record, Active Remote relies heavily on naming conventions and standard CRUD actions. It expects models name to map to it's service (e.g Product => ProductService) and will infer the service name automatically.

Expand Down Expand Up @@ -50,7 +50,7 @@ Like Active Record, Active Remote relies heavily on naming conventions and stand
end
```

You can, of course override it if need be:
You can, of course override it if need be:

```Ruby
# If you have a custom service:
Expand Down Expand Up @@ -78,7 +78,6 @@ Or install it yourself as:

$ gem install active_remote


## Contributing

1. Fork it
Expand Down
Loading