proxly 0.1.2 → 0.1.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/lib/proxly/host_router.rb +11 -0
- data/lib/proxly/railtie.rb +21 -2
- data/lib/proxly/version.rb +1 -1
- data/lib/proxly.rb +1 -1
- metadata +6 -6
- data/lib/proxly/tag_helper.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 964e24eec8aee2ecd3157f44421999ae06c6dd02be14d6c8f01e0180b626442c
|
4
|
+
data.tar.gz: 241253f43a76f7d5e753e027d3f603391009838eea61fb7a2cdc9d39bad0d62a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c855defbf141a1436e6df1400e1d62217dc3f5bb3bbfaa55b46a323391bedb5bd4604075bdd0ac215f5e628795023c8ef2d1e64ebd516f5bd9bfb0619bb7e4a0
|
7
|
+
data.tar.gz: 44ac58bc96ceae1c35b8eb9e3634f24b4e68a75637eb5f5555a8bd9178fc396331f4bd4b14975ad6ca70c5ef04690e86de1582ca06c1a013bd8f26c2b236ec60
|
data/lib/proxly/railtie.rb
CHANGED
@@ -1,7 +1,26 @@
|
|
1
|
+
# require_relative "./tunnels/cloudflare"
|
2
|
+
|
3
|
+
# TODO:
|
4
|
+
# - Try to implement auto-start stop in the gem
|
5
|
+
|
1
6
|
module Proxly
|
2
7
|
class Railtie < ::Rails::Railtie
|
3
|
-
initializer "proxly.
|
4
|
-
|
8
|
+
initializer "proxly.host_router", after: :load_config_initializers do
|
9
|
+
unless Rails.env.production?
|
10
|
+
ActiveSupport.on_load(:action_controller_base) do
|
11
|
+
include Proxly::HostRouter
|
12
|
+
end
|
13
|
+
|
14
|
+
# at_exit do
|
15
|
+
# begin
|
16
|
+
# Tunnels::Cloudflare.stop
|
17
|
+
# rescue => e
|
18
|
+
# puts "There was an #{e} while stopping cloudflare tunnel..."
|
19
|
+
# ensure
|
20
|
+
# puts "Tunnel shutdown"
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
end
|
5
24
|
end
|
6
25
|
end
|
7
26
|
end
|
data/lib/proxly/version.rb
CHANGED
data/lib/proxly.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mason Stallmo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -124,8 +124,8 @@ files:
|
|
124
124
|
- README.md
|
125
125
|
- Rakefile
|
126
126
|
- lib/proxly.rb
|
127
|
+
- lib/proxly/host_router.rb
|
127
128
|
- lib/proxly/railtie.rb
|
128
|
-
- lib/proxly/tag_helper.rb
|
129
129
|
- lib/proxly/version.rb
|
130
130
|
- lib/tasks/proxly_tasks.rake
|
131
131
|
homepage: https://github.com/mstallmo/proxly
|
@@ -135,7 +135,7 @@ metadata:
|
|
135
135
|
homepage_uri: https://github.com/mstallmo/proxly
|
136
136
|
source_code_uri: https://github.com/mstallmo/proxly
|
137
137
|
changelog_uri: https://github.com/mstallmo/proxly/blob/main/CHANGELOG.md
|
138
|
-
post_install_message:
|
138
|
+
post_install_message:
|
139
139
|
rdoc_options: []
|
140
140
|
require_paths:
|
141
141
|
- lib
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubygems_version: 3.3.3
|
154
|
-
signing_key:
|
154
|
+
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Serve your JS and CSS from a local server over a proxied connection
|
157
157
|
test_files: []
|
data/lib/proxly/tag_helper.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
module Proxly
|
2
|
-
module TagHelper
|
3
|
-
extend ActionView::Helpers::AssetTagHelper
|
4
|
-
|
5
|
-
def self.javascript_include_tag(*sources)
|
6
|
-
if Proxly.host
|
7
|
-
sources.last[:host] = Proxly.host
|
8
|
-
sources.last[:protocol] = Proxly.protocol
|
9
|
-
end
|
10
|
-
|
11
|
-
super(*sources)
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.stylesheet_link_tag(*sources)
|
15
|
-
if Proxly.host
|
16
|
-
sources.last[:host] = Proxly.host
|
17
|
-
sources.last[:protocol] = Proxly.protocol
|
18
|
-
end
|
19
|
-
|
20
|
-
super(*sources)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|