rack_web_console 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/README.md +7 -7
- data/lib/rack_console/version.rb +1 -1
- data/lib/rack_web_console.rb +3 -1
- data/rack_web_console.gemspec +6 -4
- metadata +45 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 149b958c664ecf146ab6a5ef125b18a0284fc39da5f5d97f2cad19f56cbba14a
|
4
|
+
data.tar.gz: 0b8d95d928f868ee2ab240a31da3278e85890b0acc2144685334f37b5de8cd52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58e7a0c1cd2044bbb9ee24ebee8ba2582df912d07e66183300d56dd2311e8b1a2924928810c326dfabd39fdeb362f15fbab729c71617315b2b5a50c141f08556
|
7
|
+
data.tar.gz: 25042555f4c32705431ff7457e37afd109ee3a8d0591798ae2164e420608e2a5e5556745a6815ba234678c70e16ee4e4b03b4fdcfc70a14d65e865b7692e0d0d
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -57,12 +57,12 @@ you may have to do this:
|
|
57
57
|
# app/controllers/console_controller.rb:
|
58
58
|
require 'rack_web_console'
|
59
59
|
class ConsoleController < ApplicationController
|
60
|
-
|
60
|
+
skip_forgery_protection
|
61
61
|
|
62
62
|
def index
|
63
|
-
status, headers, body = RackConsole.new(binding).call(env)
|
64
|
-
response.headers.merge headers
|
65
|
-
render
|
63
|
+
status, headers, body = RackConsole.new(binding).call(request.env)
|
64
|
+
response.headers.merge! headers
|
65
|
+
render html: body.join("\n").html_safe, status: status
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -73,9 +73,9 @@ Rails.application.routes.draw do
|
|
73
73
|
end
|
74
74
|
```
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
This example demonstrates how to use it with a Rails project, but it could be used with basically
|
77
|
+
any framework. If you're not really interested on some specific binding, you can simply mount it
|
78
|
+
directly in config.ru:
|
79
79
|
|
80
80
|
```ruby
|
81
81
|
# config.ru
|
data/lib/rack_console/version.rb
CHANGED
data/lib/rack_web_console.rb
CHANGED
@@ -21,7 +21,9 @@ class RackConsole
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def process_script(env)
|
24
|
-
|
24
|
+
rack_input = env['rack.input']
|
25
|
+
rack_input.rewind
|
26
|
+
params = CGI.parse rack_input.read
|
25
27
|
token = params['token']&.first.to_s
|
26
28
|
return [403, {}, []] unless same_origin?(env) && token == @@token
|
27
29
|
script = params['script'].first
|
data/rack_web_console.gemspec
CHANGED
@@ -16,8 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
-
spec.add_development_dependency 'bundler', '~>
|
20
|
-
spec.add_development_dependency 'rake', '~>
|
21
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
22
|
-
spec.add_development_dependency 'rack'
|
19
|
+
spec.add_development_dependency 'bundler', '~> 2.5'
|
20
|
+
spec.add_development_dependency 'rake', '~> 13.2'
|
21
|
+
spec.add_development_dependency 'rspec', '~> 3.13.0'
|
22
|
+
spec.add_development_dependency 'rack', '~> 3.1'
|
23
|
+
spec.add_development_dependency 'puma', '~> 6.4.3'
|
24
|
+
spec.add_development_dependency 'rails', '~> 7.2.1'
|
23
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack_web_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Rosenfeld Rosas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,57 +16,85 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.2'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.13.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 3.13.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rack
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: puma
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: 6.4.3
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 6.4.3
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 7.2.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
description:
|
96
|
+
version: 7.2.1
|
97
|
+
description:
|
70
98
|
email:
|
71
99
|
- rr.rosas@gmail.com
|
72
100
|
executables: []
|
@@ -93,7 +121,7 @@ homepage: https://github.com/rosenfeld/rack_web_console
|
|
93
121
|
licenses:
|
94
122
|
- MIT
|
95
123
|
metadata: {}
|
96
|
-
post_install_message:
|
124
|
+
post_install_message:
|
97
125
|
rdoc_options: []
|
98
126
|
require_paths:
|
99
127
|
- lib
|
@@ -108,9 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
136
|
- !ruby/object:Gem::Version
|
109
137
|
version: '0'
|
110
138
|
requirements: []
|
111
|
-
|
112
|
-
|
113
|
-
signing_key:
|
139
|
+
rubygems_version: 3.5.16
|
140
|
+
signing_key:
|
114
141
|
specification_version: 4
|
115
142
|
summary: A web console for Rack apps.
|
116
143
|
test_files: []
|