restaurant 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -11
- data/lib/restaurant/railtie.rb +2 -2
- data/lib/restaurant/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9240b0b57d5349170de3603b00cb905f7b9be258
|
4
|
+
data.tar.gz: 8a2bf81d2789e6a28f01deb75d6d831cf7794049
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 761bddbc10f7fc2e3e1160bd91d80046a2882efa92c355e40b88578b41514e8a38cb3618069687a91bf23878312529c37d02e4e025f5930bcd2947b559cbcf39
|
7
|
+
data.tar.gz: 636bee79b982d0145cd3fe5ec4407be309bfc9fe3d7d5858f3e3e26e9bfab65901099dbb0dd2c3e6fa9b11201bde78b9cd1066a10812cf9e2c85086bc9ecf053
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Restaurant
|
2
|
-
Restaurant serves your data via auto-defined RESTful API on your rails application.
|
2
|
+
Restaurant serves your data via auto-defined RESTful API on your rails application.
|
3
|
+
All you have to do is to write config/restaurant.yml and create DB tables.
|
3
4
|
|
4
5
|
## Features
|
5
6
|
* Auto-defined models
|
@@ -72,16 +73,6 @@ end
|
|
72
73
|
```ruby
|
73
74
|
# Gemfile
|
74
75
|
gem "restaurant"
|
75
|
-
|
76
|
-
# app/controllers/application_controller.rb
|
77
|
-
class ApplicationController < ActionController::Base
|
78
|
-
include Restaurant::ControllerHelper
|
79
|
-
end
|
80
|
-
|
81
|
-
# config/routes.rb
|
82
|
-
Rails.application.routes.draw do
|
83
|
-
Restaurant::Router.route(self)
|
84
|
-
end
|
85
76
|
```
|
86
77
|
|
87
78
|
```
|
@@ -89,6 +80,8 @@ $ bundle install
|
|
89
80
|
$ bundle exec rails g doorkeeper:install
|
90
81
|
$ bundle exec rails g doorkeeper:migration
|
91
82
|
$ bundle exec rake db:migrate
|
83
|
+
$ ... create your db and tables ...
|
84
|
+
$ ... write your config/restaurant.yml
|
92
85
|
```
|
93
86
|
|
94
87
|
## More
|
data/lib/restaurant/railtie.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Force to load ApplicationController to define the other controllers.
|
2
1
|
class Restaurant::Railtie < Rails::Railtie
|
3
2
|
config.after_initialize do
|
4
|
-
::
|
3
|
+
Rails.application.routes.append { Restaurant::Router.route(self) }
|
4
|
+
ApplicationController.send :include, Restaurant::ControllerHelper
|
5
5
|
end
|
6
6
|
end
|
data/lib/restaurant/version.rb
CHANGED