kangaru 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9007bb0fb5d483fe6fb13697b94ec895958b93c5db157e82e4e7178e04278137
4
- data.tar.gz: ff23e3595c129e04ae6391269570060929ecc73409d3e024eef14374c7d5957e
3
+ metadata.gz: e098e423f68b6d540b63100a2d08b3580bf7ef43fb474f1610341b1ca9abe54a
4
+ data.tar.gz: c507badf07b6b1a72721fa0669b8ec483f43ecd0333e71035008dd8387ba93f4
5
5
  SHA512:
6
- metadata.gz: c3eb823da88e761346f49eff461333b79fe63768eb5093be6b6842e911eb9a4feab588755c7bceed9fc16d74118cc25cadf715b7f7dea829b47441c48843b86a
7
- data.tar.gz: b1e203b218b378f571568e2730cd199ff8bc785929ec7eb1d8f42de3b34ce1f486fff4323607d95593bf7e2ae000db0b26a0eb0d6cd8d198464e122073b581b9
6
+ metadata.gz: c75ea57cd323a96034643389c65392439efb117cd800ba56f6296540dd94e1de027271db5af73191725a87c5f31a49af0298bcce8ff1092b6afc2b0574ba3205
7
+ data.tar.gz: b86424947eea484d98ed12d8df85399f7637aabcf6d74a98444264f4ccc78db9a49706a0ee7efad6aecb935c683bec07ef9a92957c7f8dd82b923c37094ea175
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kangaru (0.2.2)
4
+ kangaru (0.2.3)
5
5
  colorize (~> 1.1)
6
6
  erb (~> 4.0)
7
7
  sequel (~> 5.72)
@@ -27,6 +27,10 @@ module Kangaru
27
27
 
28
28
  def_delegators :request, :params
29
29
 
30
+ def target_id
31
+ request.id
32
+ end
33
+
30
34
  private
31
35
 
32
36
  def view_path(file)
@@ -2,6 +2,8 @@ module Kangaru
2
2
  class Request
3
3
  using Patches::Inflections
4
4
 
5
+ extend Forwardable
6
+
5
7
  include Configurable
6
8
 
7
9
  DEFAULT_CONTROLLER = "DefaultController".freeze
@@ -25,6 +27,8 @@ module Kangaru
25
27
  path_parser.action || DEFAULT_ACTION
26
28
  end
27
29
 
30
+ def_delegators :path_parser, :id
31
+
28
32
  private
29
33
 
30
34
  def path_parser
@@ -1,3 +1,3 @@
1
1
  module Kangaru
2
- VERSION = "0.2.2".freeze
2
+ VERSION = "0.2.3".freeze
3
3
  end
@@ -13,6 +13,8 @@ module Kangaru
13
13
  def self.path: -> String
14
14
 
15
15
  def params: -> Hash[Symbol, untyped]
16
+
17
+ def target_id: -> Integer?
16
18
 
17
19
  private
18
20
 
@@ -1,5 +1,7 @@
1
1
  module Kangaru
2
2
  class Request
3
+ extend Forwardable
4
+
3
5
  include Configurable
4
6
 
5
7
  DEFAULT_CONTROLLER: String
@@ -15,6 +17,8 @@ module Kangaru
15
17
 
16
18
  def action: -> Symbol
17
19
 
20
+ def id: -> Integer?
21
+
18
22
  private
19
23
 
20
24
  attr_reader path_parser: PathParser
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kangaru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Welham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-20 00:00:00.000000000 Z
11
+ date: 2023-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize