stipa 0.1.5 → 0.1.7
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/CHANGELOG.md +11 -0
- data/LICENSE +1 -1
- data/lib/stipa/app.rb +8 -2
- data/lib/stipa/generators/base.rb +4 -1
- data/lib/stipa/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 80e062eee66bb5fb015d00f45bb604c85ad905fbf35bbb32652ac48dbbc2b888
|
|
4
|
+
data.tar.gz: c2883dd7c9e9bf9025330d43ee0053bfb602841c47c12683df67497fe41a59f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c434487c1186267976b98d73e3dfa9723babd352f46eacadaf0623045668e99e02972c12799c5123f11e35cc8855253ade8de05d6e913e958fde156138b67c2
|
|
7
|
+
data.tar.gz: feca4e22d0712c1fd927a828c49bed7e6696575fdb34cef8c2a73e013e50a2c7523c44a2a35c1a9ba12d416a1fe4cd4cf35b395b8d8ff5f77e1002ddb5c07359
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.6] - 2026-03-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Colon-segment route patterns** — string routes now accept `:param` placeholders
|
|
13
|
+
(e.g. `'/users/:id'`, `'/admin/users/:id'`). Segments are converted to anchored
|
|
14
|
+
named-capture Regexps at match time; captured values are available via `req.params`.
|
|
15
|
+
- **Namespaced controller resolution** — `to:` values such as `'admin/users#update'`
|
|
16
|
+
are now resolved to `Admin::UsersController#update`. Slash separators become `::` and
|
|
17
|
+
each segment is camel-cased independently (snake_case preserved).
|
|
18
|
+
|
|
8
19
|
## [0.1.5] - 2026-03-20
|
|
9
20
|
|
|
10
21
|
### Added
|
data/LICENSE
CHANGED
data/lib/stipa/app.rb
CHANGED
|
@@ -95,8 +95,14 @@ module Stipa
|
|
|
95
95
|
|
|
96
96
|
match = case pattern
|
|
97
97
|
when String
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
if pattern.include?(':')
|
|
99
|
+
# Colon-segment pattern: /users/:id → named-capture Regexp
|
|
100
|
+
re = pattern.gsub(%r{:([a-zA-Z_][a-zA-Z0-9_]*)}) { "(?<#{Regexp.last_match(1)}>[^/]+)" }
|
|
101
|
+
Regexp.new("\\A#{re}\\z").match(req.path)
|
|
102
|
+
else
|
|
103
|
+
# Exact string match
|
|
104
|
+
req.path == pattern ? true : nil
|
|
105
|
+
end
|
|
100
106
|
when Regexp
|
|
101
107
|
# Full Regexp match — named captures become req.params
|
|
102
108
|
pattern.match(req.path)
|
|
@@ -132,7 +132,10 @@ module Stipa
|
|
|
132
132
|
|
|
133
133
|
def resolve(to)
|
|
134
134
|
ctrl, action = to.split('#', 2)
|
|
135
|
-
|
|
135
|
+
# 'admin/users' → 'Admin::UsersController'
|
|
136
|
+
# 'users' → 'UsersController'
|
|
137
|
+
class_name = ctrl.split('/').map { |seg| seg.split('_').map(&:capitalize).join }.join('::') + 'Controller'
|
|
138
|
+
klass = Object.const_get(class_name)
|
|
136
139
|
[klass, action.to_sym]
|
|
137
140
|
end
|
|
138
141
|
|
data/lib/stipa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stipa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Jānis Harbs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|
|
@@ -79,7 +79,7 @@ description: |
|
|
|
79
79
|
- Structured logging in logfmt format
|
|
80
80
|
- Named route parameters via regex captures
|
|
81
81
|
email:
|
|
82
|
-
-
|
|
82
|
+
- janisharbs@inbox.lv
|
|
83
83
|
executables:
|
|
84
84
|
- stipa
|
|
85
85
|
extensions: []
|
|
@@ -110,15 +110,15 @@ files:
|
|
|
110
110
|
- lib/stipa/version.rb
|
|
111
111
|
- media/favicon.ico
|
|
112
112
|
- media/logo.png
|
|
113
|
-
homepage: https://github.com/
|
|
113
|
+
homepage: https://github.com/janisharbs/stipa
|
|
114
114
|
licenses:
|
|
115
115
|
- MIT
|
|
116
116
|
metadata:
|
|
117
|
-
bug_tracker_uri: https://github.com/
|
|
118
|
-
changelog_uri: https://github.com/
|
|
119
|
-
documentation_uri: https://github.com/
|
|
120
|
-
homepage_uri: https://github.com/
|
|
121
|
-
source_code_uri: https://github.com/
|
|
117
|
+
bug_tracker_uri: https://github.com/janisharbs/stipa/issues
|
|
118
|
+
changelog_uri: https://github.com/janisharbs/stipa/releases
|
|
119
|
+
documentation_uri: https://github.com/janisharbs/stipa
|
|
120
|
+
homepage_uri: https://github.com/janisharbs/stipa
|
|
121
|
+
source_code_uri: https://github.com/janisharbs/stipa
|
|
122
122
|
rubygems_mfa_required: 'true'
|
|
123
123
|
post_install_message: "╔══════════════════════════════════════════════════════════════════════════╗\n║
|
|
124
124
|
\ ║\n║ Welcome
|
|
@@ -128,7 +128,7 @@ post_install_message: "╔══════════════════
|
|
|
128
128
|
stipa new my_app ║\n║ $ cd
|
|
129
129
|
my_app && bundle install && npm install ║\n║ $ bundle
|
|
130
130
|
exec ruby server.rb ║\n║ ║\n║
|
|
131
|
-
\ Documentation: https://github.com/
|
|
131
|
+
\ Documentation: https://github.com/janisharbs/stipa ║\n║ ║\n╚══════════════════════════════════════════════════════════════════════════╝\n"
|
|
132
132
|
rdoc_options: []
|
|
133
133
|
require_paths:
|
|
134
134
|
- lib
|
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
144
|
version: '0'
|
|
145
145
|
requirements: []
|
|
146
|
-
rubygems_version: 3.
|
|
146
|
+
rubygems_version: 3.4.19
|
|
147
147
|
signing_key:
|
|
148
148
|
specification_version: 4
|
|
149
149
|
summary: Minimal, production-ready HTTP framework for Ruby
|