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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bb67d32bc51b4aa26e666ec6d4f942dba16b454d07cf65cb5ebff1f052766ae
4
- data.tar.gz: b5d68c84445bde028dcc0038cfe075947de6d45ffb31afb5f7bec088de680a09
3
+ metadata.gz: bffbd5680be44e59335195e606064c1c4861c30eebdf5a94063b97b6831b564d
4
+ data.tar.gz: 112ffcf30bfcd30f58ff24c8bd8b28a29d82e3708335f462192b3d8b1bc20854
5
5
  SHA512:
6
- metadata.gz: c2604e2557de1bf029e1fbb0f32d16957e150a302c80b4db0c95e70dc2c7809f4883365b0e7f5756dfb8348aafd304f7262087ca80f95fa3f24e626a4dafe2b0
7
- data.tar.gz: a54c254012d8de5f00c799a5cc9fa3e65467d8c624e3ad1d8eff8adf892f3bd7ec6b80134abd61766e0cadf37719a56d607b9d241af7c038fb56591b93255e94
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.0](https://www.rubydoc.info/gems/azeroth/2.1.0)
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.0](https://github.com/darthjee/azeroth/tree/2.1.0)
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.0...master)
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 method [resource_for](https://www.rubydoc.info/gems/azeroth/Azeroth/Resourceable/ClassMethods#resource_for-instance_method)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Azeroth
4
- VERSION = '2.1.0'
4
+ VERSION = '2.1.1'
5
5
  end
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.0
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-14 00:00:00.000000000 Z
11
+ date: 2025-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport