web-console 4.0.2 → 4.0.3
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.markdown +13 -6
- data/README.markdown +2 -2
- data/lib/web_console/injector.rb +5 -3
- data/lib/web_console/permissions.rb +1 -1
- data/lib/web_console/railtie.rb +16 -1
- data/lib/web_console/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 843f71412a6d2c6a31f35062ad86326656caed6a75de13d9e9c3b09d143ccb3c
|
4
|
+
data.tar.gz: 6a7a70ff565431ff9f1a2f47db2cfaf9498abf95a030e5ea285c27cf42412dab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34e95ab70102f30b04fb9f538a5773b927773be82e9d350374e50d743bbcc02186d66b71506198cde59e169ad0fbaf291ca15e43aeac1b6bb676bf993de668d5
|
7
|
+
data.tar.gz: 0b3ad53ed8e1d27d06f11bd9d8f07f197e2a60e902fdba4d7cb1c8014eeac7c3cbc5af2f34b359fb6f60fbd005795cfdcc58185144b8e2ca5a8ca18a767182c6
|
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 4.0.3
|
6
|
+
|
7
|
+
* [#291](https://github.com/rails/web-console/pull/291) Deprecate config.web_console.whitelisted_ips ([@JuanitoFatas])
|
8
|
+
* [#290](https://github.com/rails/web-console/pull/290) Fix Content-Length for rack >= 2.1.0 ([@p8])
|
9
|
+
|
5
10
|
## 4.0.2
|
6
11
|
|
7
12
|
* [#285](https://github.com/rails/web-console/pull/285) Increase timeout on paste ([@celvro])
|
@@ -12,12 +17,12 @@
|
|
12
17
|
|
13
18
|
## 4.0.0
|
14
19
|
|
15
|
-
* [
|
16
|
-
* [
|
17
|
-
* [
|
18
|
-
* [
|
19
|
-
* [
|
20
|
-
* [
|
20
|
+
* [61ce65b5](https://github.com/rails/web-console/commit/61ce65b599f56809de1bd8da6590a80acbd92017) Move to config.web_console.permissions ([@gsamokovarov])
|
21
|
+
* [96127ac1](https://github.com/rails/web-console/commit/96127aac143e1e653fffdc4bb65e1ce0b5ff342d) Introduce Binding#console as an alternative interface ([@gsamokovarov])
|
22
|
+
* [d4591ca5](https://github.com/rails/web-console/commit/d4591ca5396ed15a08818f3da11134852a485b27) Introduce Rails 6 support ([@gsamokovarov])
|
23
|
+
* [f97d8a88](https://github.com/rails/web-console/commit/f97d8a889a38366485e5c5e8985995c19bf61d13) Introduce Ruby 2.6 support ([@gsamokovarov])
|
24
|
+
* [d6deacd9](https://github.com/rails/web-console/commit/d6deacd9d5fcaabf3e3051d6985b53f924f86956) Drop Rails 5 support ([@gsamokovarov])
|
25
|
+
* [90fda878](https://github.com/rails/web-console/commit/90fda8789d402f05647c18f8cdf8e5c3d01692dd) Drop Ruby 2.4 support ([@gsamokovarov])
|
21
26
|
* [#265](https://github.com/rails/web-console/pull/265) Add support for nested exceptions ([@yuki24])
|
22
27
|
|
23
28
|
## 3.7.0
|
@@ -159,3 +164,5 @@ go to 3.1.0 instead.
|
|
159
164
|
[@yuki24]: https://github.com/yuki24
|
160
165
|
[@patorash]: https://github.com/patorash
|
161
166
|
[@celvro]: https://github.com/celvro
|
167
|
+
[@JuanitoFatas]: https://github.com/JuanitoFatas
|
168
|
+
[@p8]: https://github.com/p8
|
data/README.markdown
CHANGED
@@ -66,7 +66,7 @@ By default, only requests coming from IPv4 and IPv6 localhosts are allowed.
|
|
66
66
|
`config.web_console.permissions` lets you control which IP's have access to
|
67
67
|
the console.
|
68
68
|
|
69
|
-
You can
|
69
|
+
You can allow single IP's or whole networks. Say you want to share your
|
70
70
|
console with `192.168.0.100`:
|
71
71
|
|
72
72
|
```ruby
|
@@ -75,7 +75,7 @@ class Application < Rails::Application
|
|
75
75
|
end
|
76
76
|
```
|
77
77
|
|
78
|
-
If you want to
|
78
|
+
If you want to allow the whole private network:
|
79
79
|
|
80
80
|
```ruby
|
81
81
|
Rails.application.configure do
|
data/lib/web_console/injector.rb
CHANGED
@@ -13,9 +13,11 @@ module WebConsole
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def inject(content)
|
16
|
-
#
|
17
|
-
# the
|
18
|
-
@headers
|
16
|
+
# Set Content-Length header to the size of the current body
|
17
|
+
# + the extra content. Otherwise the response will be truncated.
|
18
|
+
if @headers["Content-Length"]
|
19
|
+
@headers["Content-Length"] = @body.bytesize + content.bytesize
|
20
|
+
end
|
19
21
|
|
20
22
|
[
|
21
23
|
if position = @body.rindex("</body>")
|
data/lib/web_console/railtie.rb
CHANGED
@@ -52,10 +52,25 @@ module WebConsole
|
|
52
52
|
end
|
53
53
|
|
54
54
|
initializer "web_console.permissions" do
|
55
|
-
permissions =
|
55
|
+
permissions = web_console_permissions
|
56
56
|
Request.permissions = Permissions.new(permissions)
|
57
57
|
end
|
58
58
|
|
59
|
+
def web_console_permissions
|
60
|
+
case
|
61
|
+
when config.web_console.permissions
|
62
|
+
config.web_console.permissions
|
63
|
+
when config.web_console.allowed_ips
|
64
|
+
config.web_console.allowed_ips
|
65
|
+
when config.web_console.whitelisted_ips
|
66
|
+
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
67
|
+
The config.web_console.whitelisted_ips is deprecated and will be ignored in future release of web_console.
|
68
|
+
Please use config.web_console.allowed_ips instead.
|
69
|
+
MSG
|
70
|
+
config.web_console.whitelisted_ips
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
59
74
|
initializer "web_console.whiny_requests" do
|
60
75
|
if config.web_console.key?(:whiny_requests)
|
61
76
|
Middleware.whiny_requests = config.web_console.whiny_requests
|
data/lib/web_console/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-
|
14
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: railties
|