phoenix_rails 0.0.7 → 0.0.8
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/phoenix_rails/client.rb +5 -6
- data/lib/phoenix_rails.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b4f4edabeb4d57b0eea76b862360c2e886321b6
|
4
|
+
data.tar.gz: c95f67d23e4a15bc87bbe7156789566ad3026178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd4e37a3835842a31541cee55effd1a69c0fc1b2cd88e26527f16b0a9db20e0ec87519d53887a3b311d56bf2af21682b45db1e0eac5dcadb0d6941cdc60803c2
|
7
|
+
data.tar.gz: 33ee646b825cc4f85831a7dc5e22239d3d6f766d95b3795393cae3bc3ef1eb8b153dfe88fdc31cb0255435b92b58ede9af337f2b4673b26f9057932828537d28
|
data/lib/phoenix_rails/client.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module PhoenixRails
|
2
2
|
class Client
|
3
|
-
attr_accessor :scheme, :host, :port, :
|
3
|
+
attr_accessor :scheme, :host, :port, :secret
|
4
4
|
attr_writer :connect_timeout, :send_timeout, :receive_timeout, :keep_alive_timeout
|
5
5
|
|
6
6
|
|
@@ -9,8 +9,8 @@ module PhoenixRails
|
|
9
9
|
:scheme => 'http',
|
10
10
|
:port => 80,
|
11
11
|
}.merge(options)
|
12
|
-
@scheme, @host, @port, @
|
13
|
-
:scheme, :host, :port, :
|
12
|
+
@scheme, @host, @port, @secret = options.values_at(
|
13
|
+
:scheme, :host, :port, :secret
|
14
14
|
)
|
15
15
|
|
16
16
|
# Default timeouts
|
@@ -23,7 +23,6 @@ module PhoenixRails
|
|
23
23
|
def url=(url)
|
24
24
|
uri = URI.parse(url)
|
25
25
|
@scheme = uri.scheme
|
26
|
-
@key = uri.user
|
27
26
|
@secret = uri.password
|
28
27
|
@host = uri.host
|
29
28
|
@port = uri.port
|
@@ -58,7 +57,7 @@ module PhoenixRails
|
|
58
57
|
end
|
59
58
|
|
60
59
|
def channel(channel_name)
|
61
|
-
raise ConfigurationError, 'Missing client configuration: please check that
|
60
|
+
raise ConfigurationError, 'Missing client configuration: please check that secret is configured.' unless configured?
|
62
61
|
Channel.new(url, channel_name, self)
|
63
62
|
end
|
64
63
|
|
@@ -112,7 +111,7 @@ module PhoenixRails
|
|
112
111
|
end
|
113
112
|
|
114
113
|
def configured?
|
115
|
-
host && scheme &&
|
114
|
+
host && scheme && secret
|
116
115
|
end
|
117
116
|
|
118
117
|
end
|
data/lib/phoenix_rails.rb
CHANGED
@@ -7,8 +7,8 @@ module PhoenixRails
|
|
7
7
|
class << self
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
def_delegators :default_client, :scheme, :host, :port, :
|
11
|
-
def_delegators :default_client, :scheme=, :host=, :port=, :
|
10
|
+
def_delegators :default_client, :scheme, :host, :port, :secret
|
11
|
+
def_delegators :default_client, :scheme=, :host=, :port=, :secret=
|
12
12
|
|
13
13
|
def_delegators :default_client, :url
|
14
14
|
def_delegators :default_client, :encrypted=, :url=
|