navykit 1.0.1 → 1.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/navykit.rb +3 -2
  3. metadata +4 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b38ef3eb54e3c5c5badf26cb08cbf91223135f5c619aa82dcb3d3ebe1753577
4
- data.tar.gz: 8d6a2a118603a1804a8d44d2cd201f373193c9c3b05d470f8224df9f45d1ec75
3
+ metadata.gz: 3a40d0837c81b078b1b8dbbd85ef0124edf8ab1ea55cffa9bcbd2c5305fee12e
4
+ data.tar.gz: d54bc73b439f07299c43b47b43478d4c19c159ec5a49dd50d1e789c1d62e17c4
5
5
  SHA512:
6
- metadata.gz: 689425aac4576a30e634cf0155dca475244ec5df769d98502da1ede0ff62f68fc5a88b62818579cb25fcc0d088993697bd7db2ca580801c0bf53ae166baf0b9c
7
- data.tar.gz: 06d28709cb1e2514366d0ff86543fb4777e064e7898e480eca69dffa2e35a9c627259aff9f4e67348682a5adf27c270dd5613a27ca2955817774ea87a2395d45
6
+ metadata.gz: 2c660d7a1bbe0c06a99175c042798f7114d3547b296ada7ba9d30740571216cc18bfa52eed7c6d6459096961b1bc5eca9644d6bd1e414fe7f7da3e2cf8eada51
7
+ data.tar.gz: f1024abeb6c7a4428678659124ec4d0a8dab81877e0156c4579adbc5abc7b85b55ed0a28bdfee3617b2a77c36b19a450b2a2839361c7ccd65fa4e3f02530510a
data/lib/navykit.rb CHANGED
@@ -4,9 +4,10 @@ require 'cgi'
4
4
 
5
5
  class Request
6
6
  def initialize(real, params={})
7
+ uri = URI.parse(real.request_uri)
7
8
  @real = real
8
9
  @params = params
9
- @query = CGI.parse(@real.request_uri).transform_values do |values|
10
+ @query = CGI.parse(uri.query || "").transform_values do |values|
10
11
  values.size == 1 ? values[0] : values
11
12
  end
12
13
  end
@@ -60,7 +61,7 @@ class Response
60
61
  end
61
62
 
62
63
  class NavyKit
63
- @@version = "1.0.1"
64
+ @@version = "1.1.0"
64
65
 
65
66
  def initialize
66
67
  @routes = []
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - trulyursdelv
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
10
+ date: 2025-05-11 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: 'NavyKit is a simple, lightweight server routing framework for Ruby that
13
13
  helps build web servers with ease. It provides the core functionalities to route
14
14
  requests and send responses, making it ideal for creating RESTful services or APIs
15
- with minimal overhead. With support for custom route handling, dynamic parameters,
16
- and a fallback for unmatched routes, Navy is designed for developers who need a
17
- fast and flexible routing solution.
15
+ with minimal overhead.
18
16
 
19
17
  '
20
18
  executables: []
@@ -40,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
38
  - !ruby/object:Gem::Version
41
39
  version: '0'
42
40
  requirements: []
43
- rubygems_version: 3.6.8
41
+ rubygems_version: 3.6.2
44
42
  specification_version: 4
45
43
  summary: A simple, lightweight server routing framework for Ruby
46
44
  test_files: []