azeroth 2.1.0 → 2.1.1
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 +13 -4
- data/lib/azeroth/resourceable/class_methods.rb +2 -2
- data/lib/azeroth/version.rb +1 -1
- 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: bffbd5680be44e59335195e606064c1c4861c30eebdf5a94063b97b6831b564d
|
4
|
+
data.tar.gz: 112ffcf30bfcd30f58ff24c8bd8b28a29d82e3708335f462192b3d8b1bc20854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44dacff749a10df31d63b6a51f2f9769030ff3b9addceb537839db3c98dac51885cbcea229992ebcb68e024dd1012ebe9a3d94f158ba587e562802e26c98a570
|
7
|
+
data.tar.gz: ae2263e16bc69ed18bf8690c4e938b4622dab9e645d20458cee4d6afb2529531726c54e582249d265d79fc551d51af096e9b08b41fb304d3578227c66eba4492
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Azeroth
|
|
11
11
|
|
12
12
|
Yard Documentation
|
13
13
|
-------------------
|
14
|
-
[https://www.rubydoc.info/gems/azeroth/2.1.
|
14
|
+
[https://www.rubydoc.info/gems/azeroth/2.1.1](https://www.rubydoc.info/gems/azeroth/2.1.1)
|
15
15
|
|
16
16
|
Azeroth has been designed making the coding of controllers easier
|
17
17
|
as routes in controllers are usually copy, paste and replace of same
|
@@ -25,9 +25,9 @@ does not perform database operations
|
|
25
25
|
Future versions will enable `html` rendering to also perform
|
26
26
|
database operations.
|
27
27
|
|
28
|
-
Current Release: [2.1.
|
28
|
+
Current Release: [2.1.1](https://github.com/darthjee/azeroth/tree/2.1.1)
|
29
29
|
|
30
|
-
[Next release](https://github.com/darthjee/azeroth/compare/2.1.
|
30
|
+
[Next release](https://github.com/darthjee/azeroth/compare/2.1.1...master)
|
31
31
|
|
32
32
|
Installation
|
33
33
|
---------------
|
@@ -54,10 +54,14 @@ Usage
|
|
54
54
|
## Azeroth::Resourceable
|
55
55
|
|
56
56
|
[Resourceable](https://www.rubydoc.info/gems/azeroth/Azeroth/Resourceable)
|
57
|
-
module adds class
|
57
|
+
module adds class methods
|
58
|
+
[resource_for](https://www.rubydoc.info/gems/azeroth/Azeroth/Resourceable/ClassMethods#resource_for-instance_method)
|
58
59
|
which adds a resource and action methods for `create`, `show`, `index`,
|
59
60
|
`update`, `delete`, `edit`
|
61
|
+
and
|
62
|
+
[model_for](https://www.rubydoc.info/gems/azeroth/Azeroth/Resourceable/ClassMethods#model_for-instance_method)
|
60
63
|
|
64
|
+
### #resource_for
|
61
65
|
It accepts options
|
62
66
|
- only: List of actions to be built
|
63
67
|
- except: List of actions to not to be built
|
@@ -167,6 +171,11 @@ It accepts options
|
|
167
171
|
# }
|
168
172
|
```
|
169
173
|
|
174
|
+
### #model_for
|
175
|
+
It accepts options
|
176
|
+
- id_key: key used to find a model. id by default
|
177
|
+
- param_key: parameter key used to find the model
|
178
|
+
|
170
179
|
## Azeroth::Decorator
|
171
180
|
|
172
181
|
[Decorators](https://www.rubydoc.info/gems/azeroth/Azeroth/Decorator) are
|
@@ -28,9 +28,9 @@ module Azeroth
|
|
28
28
|
#
|
29
29
|
# @see (see Resourceable.model_for)
|
30
30
|
# @example (see Resourceable.model_for)
|
31
|
-
def model_for(name)
|
31
|
+
def model_for(name, **options)
|
32
32
|
ResourcesBuilder.new(
|
33
|
-
self, name, Azeroth::Options.new(
|
33
|
+
self, name, Azeroth::Options.new(options)
|
34
34
|
).build
|
35
35
|
end
|
36
36
|
end
|
data/lib/azeroth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azeroth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darthjee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|