README.adoc in alki-rails-0.4.1 vs README.adoc in alki-rails-0.5.0
- old
+ new
@@ -14,18 +14,18 @@
your core code encapsulated.
=== What about Rails Services?
Recent versions of Rails have added an `app/services` directory as a place to put
-dedicated service classes containing your business logic.
+dedicated service objects containing your business logic.
The key difference between these Rails services and Alki services is that Rails services are
-classes or modules,
-while Alki services can be any type of object.
+classes or modules, referenced directly by consumers when needed, while Alki services can be
+any time of object, but are typically instances of a service class.
-By using objects, Alki allows services to be configured and dependency injected before
-being used, allowing classes to be simpler, more focused, and easily tested.
+By using instances, Alki allows services to be configured and dependency injected before
+being used.
== Installation
Add this line to your Rails application's Gemfile:
@@ -53,11 +53,11 @@
Elements like services and application settings are defined in your Assembly definition
(`config/assembly.rb`). These elements are accessible by name directly within controllers
and the rails console.
-See http://alki.io[alki.io] for more documentation on how to use Alki.
+See https://github.com/alki-project/alki[here] for more documentation on how to use Alki.
.config/assembly.rb
```ruby
Alki do
group :orders do
@@ -80,11 +80,10 @@
.app/controllers/orders_controller.rb
```ruby
class OrdersController < ApplicationController
def post
- # Can reference Assembly elements directly in controllers
@order = orders.manager.place_order params[:order]
end
end
```
@@ -105,12 +104,11 @@
class StripeProcessor
...
end
```
-Elements can also be accessed directly in the rails console,
-or anywhere in your Rails application, via `Alki::Rails`:
+Elements can also be accessed anywhere in your Rails application, via `Alki::Rails`:
.config/assembly.rb
```ruby
Alki do
group :settings do
@@ -125,17 +123,11 @@
=> 'Hello World'
2.3.2 :001 > Alki::Rails.settings.msg
=> 'Hello World'
```
-=== Code Reloading
+Alki will automatically add your projects `lib` directory to the ruby load path, so you can require files from there directly. It also will handle auto-reloading files in lib.
-Alki::Rails automatically will set up http://alki.io/projects/alki-reload[Alki::Reload] and enable it whenever
-Rails itself has code reloading enabled. It will handle reloading all Alki configuration files and files in `lib/`.
-
-Generally the Rails and Alki code reloading systems should work together without any issues.
-One place however where they do work differently is in the console.
-Alki does not require the `reload!` method to be called and will automatically reload code as soon as it changes.
== Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/alki-project/alki-rails[https://github.com/alki-project/alki-rails]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the http://contributor-covenant.org[Contributor Covenant] code of conduct.