README.md in localtower-0.1.8 vs README.md in localtower-0.1.9
- old
+ new
@@ -39,19 +39,47 @@
bundle install
```
Add to your `config/routes.rb`:
```ruby
-if Rails.env.development?
- mount Localtower::Engine, at: "localtower"
+MyApp::Application.routes.draw do
+ if Rails.env.development?
+ mount Localtower::Engine, at: "localtower"
+ end
+
+ # Your other routes here:
+ # ...
end
```
## Usage
Open your browser at [http://localhost:3000/localtower](http://localhost:3000/localtower).
-## RSpec
+## Logger Usage (Capture plugin)
+
+You can put this line anywhere in your code:
+
+ Localtower::Plugins::Capture.new(self, binding).save
+
+For example:
+
+ def my_method
+ user = User.find(1)
+ some_data = {foo: "bar"}
+
+ Localtower::Plugins::Capture.new(self, binding).save
+ end
+
+Then go to the Localtower intercave here: [http://localhost:3000/localtower/logs](http://localhost:3000/localtower/logs) and you will see the variables `user` and `some_data` in the UI.
+
+### Notes for the Capture plugin:
+
+The value for each variable will try to call `.to_json`. If you have a huge collection of models likes `@users` you will see all the collection as an Array.
+
+## RSpec and Contribute
+
+If you want to contribute to the gem:
Create a `spec/dummy/.env` file with the credentials to your PostgreSQL Database. It should look like this:
```
LOCALTOWER_PG_USERNAME="admin"