otto 1.1.0.pre.alpha2 → 1.1.0.pre.alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -10
- data/VERSION.yml +1 -1
- data/lib/otto/route.rb +1 -1
- data/lib/otto.rb +17 -1
- data/otto.gemspec +5 -2
- metadata +26 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1ad2b9c043b3b58202eadcae63354ebead1b70178fd7723dc24820462a3831a
|
4
|
+
data.tar.gz: f95e243be8e6e59c5a17f7ec98d7a05d1a31599e0970e9e20763c569a65acfb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ed91d559e7e339df4c5a28be0864ff2151e3e06e9dea577dedb346eaf4476e0d62adc84de508d3ff1ea1c55633789643b5f5bcee15d88bd6c8a43c6b7f04a59
|
7
|
+
data.tar.gz: 7d5f8bfb03f7e9ce91eebf632df7cc5ccf8b804beac9777662ef490507d1dba3a3ed1401d9e498ecb749617b8ab561a73c2226cb66c02f4796e18148b6afa479
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
otto (1.1.0.pre.alpha3)
|
5
|
+
addressable (~> 2.2, < 3)
|
6
|
+
rack (~> 2.2, < 3.0)
|
7
|
+
rexml (>= 3.3.6)
|
8
|
+
|
1
9
|
GEM
|
2
10
|
remote: https://rubygems.org/
|
3
11
|
specs:
|
4
|
-
addressable (2.8.
|
5
|
-
public_suffix (>= 2.0.2, <
|
12
|
+
addressable (2.8.7)
|
13
|
+
public_suffix (>= 2.0.2, < 7.0)
|
6
14
|
ast (2.4.2)
|
7
15
|
byebug (11.1.3)
|
8
16
|
coderay (1.1.3)
|
@@ -20,12 +28,12 @@ GEM
|
|
20
28
|
pry-byebug (3.10.1)
|
21
29
|
byebug (~> 11.0)
|
22
30
|
pry (>= 0.13, < 0.15)
|
23
|
-
public_suffix (
|
31
|
+
public_suffix (6.0.1)
|
24
32
|
racc (1.7.3)
|
25
|
-
rack (
|
33
|
+
rack (2.2.9)
|
26
34
|
rainbow (3.1.1)
|
27
35
|
regexp_parser (2.9.0)
|
28
|
-
rexml (3.
|
36
|
+
rexml (3.3.7)
|
29
37
|
rubocop (1.62.1)
|
30
38
|
json (~> 2.3)
|
31
39
|
language_server-protocol (>= 3.17.0)
|
@@ -53,14 +61,10 @@ PLATFORMS
|
|
53
61
|
ruby
|
54
62
|
|
55
63
|
DEPENDENCIES
|
56
|
-
|
64
|
+
otto!
|
57
65
|
pry-byebug
|
58
|
-
rack
|
59
66
|
rubocop
|
60
67
|
tryouts
|
61
68
|
|
62
|
-
RUBY VERSION
|
63
|
-
ruby 3.2.0p0
|
64
|
-
|
65
69
|
BUNDLED WITH
|
66
70
|
2.5.7
|
data/VERSION.yml
CHANGED
data/lib/otto/route.rb
CHANGED
data/lib/otto.rb
CHANGED
@@ -92,7 +92,23 @@ class Otto
|
|
92
92
|
end
|
93
93
|
path_info = Rack::Utils.unescape(env['PATH_INFO'])
|
94
94
|
path_info = '/' if path_info.to_s.empty?
|
95
|
-
|
95
|
+
|
96
|
+
begin
|
97
|
+
path_info_clean = path_info
|
98
|
+
.encode(
|
99
|
+
'UTF-8', # Target encoding
|
100
|
+
invalid: :replace, # Replace invalid byte sequences
|
101
|
+
undef: :replace, # Replace characters undefined in UTF-8
|
102
|
+
replace: '' # Use empty string for replacement
|
103
|
+
)
|
104
|
+
.gsub(/\/$/, '') # Remove trailing slash, if present
|
105
|
+
rescue ArgumentError => ex
|
106
|
+
# Log the error
|
107
|
+
Otto.logger.error "[Otto.call] Error cleaning `#{path_info}`: #{ex.message}"
|
108
|
+
# Set a default value or use the original path_info
|
109
|
+
path_info_clean = path_info
|
110
|
+
end
|
111
|
+
|
96
112
|
base_path = File.split(path_info).first
|
97
113
|
# Files in the root directory can refer to themselves
|
98
114
|
base_path = path_info if base_path == '/'
|
data/otto.gemspec
CHANGED
@@ -19,6 +19,9 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.required_ruby_version = ['>= 2.6.8', '< 4.0']
|
21
21
|
|
22
|
-
|
23
|
-
spec.
|
22
|
+
# https://github.com/delano/otto/security/dependabot/5
|
23
|
+
spec.add_dependency 'rexml', '>= 3.3.6'
|
24
|
+
|
25
|
+
spec.add_runtime_dependency 'addressable', '~> 2.2', '< 3'
|
26
|
+
spec.add_runtime_dependency 'rack', '~> 2.2', '< 3.0'
|
24
27
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: otto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.pre.
|
4
|
+
version: 1.1.0.pre.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rexml
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.3.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.3.6
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: addressable
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -17,9 +31,9 @@ dependencies:
|
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '2.2'
|
20
|
-
- - "
|
34
|
+
- - "<"
|
21
35
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
36
|
+
version: '3'
|
23
37
|
type: :runtime
|
24
38
|
prerelease: false
|
25
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,29 +41,29 @@ dependencies:
|
|
27
41
|
- - "~>"
|
28
42
|
- !ruby/object:Gem::Version
|
29
43
|
version: '2.2'
|
30
|
-
- - "
|
44
|
+
- - "<"
|
31
45
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
46
|
+
version: '3'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: rack
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
36
50
|
requirements:
|
37
51
|
- - "~>"
|
38
52
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
40
|
-
- - "
|
53
|
+
version: '2.2'
|
54
|
+
- - "<"
|
41
55
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
56
|
+
version: '3.0'
|
43
57
|
type: :runtime
|
44
58
|
prerelease: false
|
45
59
|
version_requirements: !ruby/object:Gem::Requirement
|
46
60
|
requirements:
|
47
61
|
- - "~>"
|
48
62
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
50
|
-
- - "
|
63
|
+
version: '2.2'
|
64
|
+
- - "<"
|
51
65
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
66
|
+
version: '3.0'
|
53
67
|
description: 'Otto: Auto-define your rack-apps in plaintext.'
|
54
68
|
email: gems@solutious.com
|
55
69
|
executables: []
|