README.md in pliny-0.2.1 vs README.md in pliny-0.3.0
- old
+ new
@@ -13,11 +13,11 @@
- Models: very thin wrappers around the database
And gems/helpers to tie these together and support operations:
- [CORS middleware](lib/pliny/middleware/cors.rb) to allow JS developers to consume your API
-- [Honeybadger](https://www.honeybadger.io/) for tracking exceptions
+- [Rollbar](https://www.rollbar.com/) for tracking exceptions
- [Log helper](test/log_test.rb) that logs in [data format](https://www.youtube.com/watch?v=rpmc-wHFUBs) [to stdout](https://adam.heroku.com/past/2011/4/1/logs_are_streams_not_files)
- [Mediators](http://brandur.org/mediator) to help encapsulate more complex interactions
- [Rspec](https://github.com/rspec/rspec) for lean and fast testing
- [Puma](http://puma.io/) as the web server, [configured for optimal performance on Heroku](https://github.com/interagent/pliny-template/blob/master/config/puma.rb)
- [Rack-test](https://github.com/brynary/rack-test) to test the API endpoints
@@ -45,22 +45,21 @@
```bash
$ pliny-new myapp
$ cd myapp && bin/setup
```
-Pliny also bundles some generators to help you get started:
+Pliny also bundles [some generators](#generators) to help you get started:
```bash
$ bundle exec pliny-generate model artist
created model file ./lib/models/artist.rb
-created migration ./db/migrate/1395873224_create_artist.rb
-created test ./test/models/artist_test.rb
+created migration ./db/migrate/1408995997_create_artists.rb
+created test ./spec/models/artist_spec.rb
$ bundle exec pliny-generate mediator artists/creator
-created base mediator ./lib/mediators/base.rb
created mediator file ./lib/mediators/artists/creator.rb
-created test ./test/mediators/artists/creator_test.rb
+created test ./spec/mediators/artists/creator_spec.rb
$ bundle exec pliny-generate endpoint artists
created endpoint file ./lib/endpoints/artists.rb
add the following to lib/routes.rb:
mount Endpoints::Artists
@@ -76,26 +75,75 @@
```
To test your application:
```bash
-bundle exec rake
+$ bundle exec rake
```
Or to run a single test suite:
```bash
-bundle exec rspec spec/acceptance/artists_spec.rb
+$ bundle exec rspec spec/acceptance/artists_spec.rb
```
+### Generators
+
+```bash
+$ bin/pliny-generate
+```
+
+```
+Commands:
+ pliny-generate endpoint NAME # Generates an endpoint
+ pliny-generate help [COMMAND] # Describe available commands or one specific command
+ pliny-generate mediator NAME # Generates a mediator
+ pliny-generate migration NAME # Generates a migration
+ pliny-generate model NAME # Generates a model
+ pliny-generate scaffold NAME # Generates a scaffold of endpoint, model, schema and serializer
+ pliny-generate schema NAME # Generates a schema
+ pliny-generate serializer NAME # Generates a serializer
+```
+
+### Rake tasks
+
+Pliny comes with several rake tasks:
+
+```bash
+rake db:create # Create the database
+rake db:drop # Drop the database
+rake db:migrate # Run database migrations
+rake db:nuke # Nuke the database (drop all tables)
+rake db:reset # Reset the database
+rake db:rollback # Rollback the database
+rake db:schema:dump # Dump the database schema
+rake db:schema:load # Load the database schema
+rake db:schema:merge # Merges migrations into schema and removes them
+rake db:seed # Seed the database with data
+rake db:setup # Setup the database
+rake schema # Rebuild schema.json
+rake test # Run tests
+```
+
+### Commands
+
+And provides the following commands:
+
+```bash
+$ foreman run bin/console # IRB/Pry console
+$ foreman run bin/run 'puts "hello world"' # Run automated code
+```
+
+(hint: don't forget `foreman run` in development)
+
## Development
Run tests:
```
-bundle install
-git submodule update --init
-rake
+$ bundle install
+$ git submodule update --init
+$ rake
```
## Meta
Created by Brandur Leach and Pedro Belo.