rackr 0.0.46 → 0.0.47
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/lib/rackr.rb +9 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63b5f08cc4a80ac9d5a0ea2a511256242aaf4ed4a243315e6674252f1912888d
|
4
|
+
data.tar.gz: e1e232c9b61919c3d1f34fda5fcb446c2a000c0d2b7330c8b247fe1cf40886d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9356de83cf84a8eda2afdecc1a4d7832b6eb2aa25dc3adfb21a6d979db2eba41e0f92470d1cf26c2f5e4dc8f31deb064c6c4546f8e5df104ba26cec25647f9ef
|
7
|
+
data.tar.gz: 5d474d1584a27200f16876c5da455c5249d66fad31a3c27a4339554285e55270b5e141ddd7d5cec932d479b7952885d71276434e8c160d5fe2b8d7c0fa1d43e7
|
data/lib/rackr.rb
CHANGED
@@ -60,7 +60,10 @@ class Rackr
|
|
60
60
|
end
|
61
61
|
|
62
62
|
%w[GET POST DELETE PUT TRACE OPTIONS PATCH].each do |http_method|
|
63
|
-
define_method(http_method.downcase.to_sym) do
|
63
|
+
define_method(http_method.downcase.to_sym) do |*params, as: nil, before: nil, after: nil, &block|
|
64
|
+
path = params[0] || ''
|
65
|
+
endpoint = params[1] || ''
|
66
|
+
|
64
67
|
if block.respond_to?(:call)
|
65
68
|
@router.add(
|
66
69
|
http_method,
|
@@ -71,6 +74,11 @@ class Rackr
|
|
71
74
|
route_afters: after
|
72
75
|
)
|
73
76
|
else
|
77
|
+
if path.is_a?(Module) && path.include?(Action)
|
78
|
+
endpoint = path
|
79
|
+
path = ''
|
80
|
+
end
|
81
|
+
|
74
82
|
@router.add(
|
75
83
|
http_method,
|
76
84
|
path,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rackr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique F. Teixeira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubi
|
@@ -75,7 +75,7 @@ homepage: https://github.com/henrique-ft/rackr
|
|
75
75
|
licenses:
|
76
76
|
- MIT
|
77
77
|
metadata: {}
|
78
|
-
post_install_message:
|
78
|
+
post_install_message:
|
79
79
|
rdoc_options: []
|
80
80
|
require_paths:
|
81
81
|
- lib
|
@@ -90,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
94
|
-
signing_key:
|
93
|
+
rubygems_version: 3.5.16
|
94
|
+
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: A complete http router solution that fit well with pure rack apps.
|
97
97
|
test_files: []
|