hot_reload_proxy 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b32bd6ebb331a6f7363216beb2d4d05ab25b4ad
4
- data.tar.gz: affbdecec5305b3e42bb2446c6adb81ced570ac1
3
+ metadata.gz: 160051eb19ae3e49b7f96a379ef167bd10af96ac
4
+ data.tar.gz: 2f9ec52e5fe048c70f1585d69748fbc3bfdd0766
5
5
  SHA512:
6
- metadata.gz: 3b45a6fb53f1eea8a989857377db213aef5ac645cdcc69e53535ba787d7c304db4696cbb58d2ed0fd75beb5f401588b6056c255ef59191b92fb52fdc531fc6a3
7
- data.tar.gz: d188301c3bd1a9ddd2a3c8386d2945f092241fdd773fd2aeb4a7b413f0243117c7c16b5c0149c2562532efc1797ee8e3bec5d943bbedd72c9d6b9f8141691556
6
+ metadata.gz: 5f9e9ee7fed5f55b9be0e635e8a401216c9e5a0ecbe1020aea3aaea37bfeef0b7cc226df8fc8435b8d539f4abda9419a6ba3da19ab3c6ec938b63586663a3177
7
+ data.tar.gz: b2df9e97af607336dc6c0317c52b0af2efd1c7e7187d15c0365ec2bf171310fd7fbf18b6f237cef8814d083b474b9c1bc45d4c4238a0fab04061479ba46c8419
@@ -1,32 +1,8 @@
1
1
  require 'hot_reload_proxy/version'
2
+ require 'hot_reload_proxy/config'
2
3
  require 'hot_reload_proxy/proxy'
3
4
  require 'hot_reload_proxy/railtie' if defined?(Rails)
4
5
 
5
6
  module HotReloadProxy
6
- DEFAULT_HOST = 'localhost'
7
- DEFAULT_PORT = '3100'
8
7
 
9
- @host = DEFAULT_HOST
10
- @port = DEFAULT_PORT
11
-
12
- def self.host=(host)
13
- @host = host
14
- end
15
-
16
- def self.port=(port)
17
- @port = port.to_s
18
- end
19
-
20
- def self.host
21
- @host
22
- end
23
-
24
- def self.port
25
- @port
26
- end
27
-
28
- def self.reset!
29
- @host = DEFAULT_HOST
30
- @port = DEFAULT_PORT
31
- end
32
8
  end
@@ -0,0 +1,30 @@
1
+ module HotReloadProxy
2
+ class Config
3
+ DEFAULT_HOST = 'localhost'
4
+ DEFAULT_PORT = '3100'
5
+
6
+ @host = DEFAULT_HOST
7
+ @port = DEFAULT_PORT
8
+
9
+ def self.host=(host)
10
+ @host = host
11
+ end
12
+
13
+ def self.port=(port)
14
+ @port = port.to_s
15
+ end
16
+
17
+ def self.host
18
+ @host
19
+ end
20
+
21
+ def self.port
22
+ @port
23
+ end
24
+
25
+ def self.reset!
26
+ @host = DEFAULT_HOST
27
+ @port = DEFAULT_PORT
28
+ end
29
+ end
30
+ end
@@ -18,8 +18,8 @@ module HotReloadProxy
18
18
  end
19
19
 
20
20
  def rewrite_env(env)
21
- port = HotReloadProxy.port
22
- host = HotReloadProxy.host
21
+ host = HotReloadProxy::Config.host
22
+ port = HotReloadProxy::Config.port
23
23
  env['HTTP_HOST'] = "#{host}:#{port}"
24
24
  env
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module HotReloadProxy
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot_reload_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Burenstam
@@ -100,6 +100,7 @@ files:
100
100
  - bin/setup
101
101
  - hot_reload_proxy.gemspec
102
102
  - lib/hot_reload_proxy.rb
103
+ - lib/hot_reload_proxy/config.rb
103
104
  - lib/hot_reload_proxy/proxy.rb
104
105
  - lib/hot_reload_proxy/railtie.rb
105
106
  - lib/hot_reload_proxy/version.rb