ru.Bee 1.1.1 → 1.1.2
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/bin/rubee +1 -0
- data/readme.md +15 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3080691c90ff2c8d48ac531c6534fe29906fc5e3392b49727701e7c2989024c
|
4
|
+
data.tar.gz: d9f6579a0a1bcd26caecf0bc518a53124c9890089c059953d92e4503f7c86a8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9699fce90a6a07ed7190c3e89bb4f0ea3b81d63dd25423909e9a7ace756a06f9ec14f09a25e289e2638c20955eefed886ed7b33767b7afc5e454607666a6ca9b
|
7
|
+
data.tar.gz: 8ff79bc9e18a9db76ac7b0c34531d5c3b36b2e31b80e5929b304a5a79fb46560408f199b9bacaa8ea38aa0db9ca2945090380475487d332471d7590394c25fbd
|
data/bin/rubee
CHANGED
data/readme.md
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|

|
2
2
|

|
3
|
+

|
4
|
+

|
5
|
+

|
3
6
|

|
4
7
|
|
5
8
|
|
6
|
-
# <img src="images/rubee.svg" alt="
|
9
|
+
# <img src="lib/images/rubee.svg" alt="ru.Bee" height="40"> ... ru.Bee
|
7
10
|
|
8
|
-
|
11
|
+
ru.Bee is a fast and lightweight Ruby application server designed for minimalism and flexibility .
|
9
12
|
|
10
|
-
The main philosophy of
|
13
|
+
The main philosophy of ru.Bee is to focus on Ruby language explicit implementation of the MVC web application.
|
11
14
|
|
12
15
|
Want to get a quick API server up and runing? You can do it for real quick!
|
13
16
|
<br />
|
@@ -24,7 +27,7 @@ All greaet features are yet to come!
|
|
24
27
|
- **Router**: Router driven - generates all required files from the routes.
|
25
28
|
- **Databases**: Sqlite3, Postgres, Mysql and many more supported by sequel gem.
|
26
29
|
- **Views**: Json, ERB and plain HTML
|
27
|
-
- **Bundlable** Charge your
|
30
|
+
- **Bundlable** Charge your ru.Bee with any gem you need and update your project with bundle.
|
28
31
|
- **ORM** All models are natively ORM objects, however you can use it as a blueurpint for any datasources.
|
29
32
|
- **Authentificatable** Add JWT authentification easily to any controller action.
|
30
33
|
- **Hooks** Add logic before, after and around any action.
|
@@ -33,7 +36,7 @@ All greaet features are yet to come!
|
|
33
36
|
|
34
37
|
## Installation
|
35
38
|
|
36
|
-
1. Install
|
39
|
+
1. Install ru.Bee
|
37
40
|
```bash
|
38
41
|
gem install ru.Bee
|
39
42
|
```
|
@@ -47,7 +50,7 @@ cd my_project
|
|
47
50
|
3. Install dependencies
|
48
51
|
|
49
52
|
***Prerequisites***<br />
|
50
|
-
**
|
53
|
+
**ru.Bee** is using **Sqlite** as a default database. However you can pick up any other database supported by sequel gem.
|
51
54
|
Aside that, make sure:
|
52
55
|
**Ruby** language (3+) is installed
|
53
56
|
**Bundler** is installed
|
@@ -56,7 +59,7 @@ Aside that, make sure:
|
|
56
59
|
bundle install
|
57
60
|
```
|
58
61
|
|
59
|
-
4. Run
|
62
|
+
4. Run ru.Bee server. Default port is 7000
|
60
63
|
```bash
|
61
64
|
rubee start
|
62
65
|
```
|
@@ -94,7 +97,7 @@ rubee generate get /apples
|
|
94
97
|
4. Fill those files with the logic you need and run the server again!
|
95
98
|
|
96
99
|
## Model
|
97
|
-
Model in
|
100
|
+
Model in ru.Bee is just simple ruby object that can be serilalized in the view
|
98
101
|
in the way it required (ie json).
|
99
102
|
|
100
103
|
Here below is a simple example on how it can be used by rendering json from in memory object
|
@@ -143,11 +146,11 @@ So in the controller you would need to query your target object now.
|
|
143
146
|
```
|
144
147
|
|
145
148
|
## Views
|
146
|
-
View in
|
149
|
+
View in ru.Bee is just a plain html/erb file that can be rendered from the controller.
|
147
150
|
|
148
151
|
## Object hooks
|
149
152
|
|
150
|
-
In
|
153
|
+
In ru.Bee by extending Hookable module any Ruby object can be charged with hooks (logic),
|
151
154
|
that can be executed before, after and around a specific method execution.
|
152
155
|
|
153
156
|
Here below a controller example. However it can be used in any Ruby object, like Model etc.
|
@@ -225,7 +228,7 @@ class UsersController < Rubee::BaseController
|
|
225
228
|
# POST /usres/logout (logout logic)
|
226
229
|
def logout
|
227
230
|
unauthentificate! # AuthTokenable method aimed to handle logout action.
|
228
|
-
# Make sure @zeroed_token_header is
|
231
|
+
# Make sure @zeroed_token_header is paRssed within headers options
|
229
232
|
response_with type: :redirect, to: "/users/login", headers: @zeroed_token_header
|
230
233
|
end
|
231
234
|
|
@@ -265,7 +268,7 @@ rubee console # start the console
|
|
265
268
|
rubee test # run all tests
|
266
269
|
rubee test auth_tokenable_test.rb # run specific tests
|
267
270
|
```
|
268
|
-
If you want to run any
|
271
|
+
If you want to run any ru.Bee command within a specific ENV make sure you added it before a command.
|
269
272
|
For instance if you want to run console in test environment you need to run the following command
|
270
273
|
|
271
274
|
```bash
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ru.Bee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Saltykov
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bundler
|