infrataster 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/infrataster/server.rb +6 -1
- data/lib/infrataster/version.rb +1 -1
- data/spec/integration/http_spec.rb +7 -0
- data/spec/integration/spec_helper.rb +4 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff908cf5e048950d98851d1c7f145458c03e9a5
|
4
|
+
data.tar.gz: 17cab0279ab374e31e41f7fa5245c285805c3f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e210714e8f06214d61ecf493e81186e7b50b80909677c2349832115154acb0907e5a35967966f8dd56741625786078c589e8be96ac66e71558d37f00cce9334a
|
7
|
+
data.tar.gz: c5c6aeaa5dd65b3162450c334f98323ff41dc2bb999a2e11d85acd1a9e0fc957fb645f67287d370edb22ec22170e901c25834816c3ab5a4faddcfd8ceddf84f0
|
data/lib/infrataster/server.rb
CHANGED
@@ -165,9 +165,14 @@ module Infrataster
|
|
165
165
|
end
|
166
166
|
|
167
167
|
def determine_address(address)
|
168
|
+
begin
|
169
|
+
ipaddr = IPAddr.new(address)
|
170
|
+
rescue IPAddr::InvalidAddressError
|
171
|
+
return address
|
172
|
+
end
|
173
|
+
|
168
174
|
Logger.debug("Determining ip address...")
|
169
175
|
|
170
|
-
ipaddr = IPAddr.new(address)
|
171
176
|
if ipaddr.to_range.begin == ipaddr.to_range.end
|
172
177
|
# subnet mask is 255.255.255.255
|
173
178
|
return ipaddr.to_s
|
data/lib/infrataster/version.rb
CHANGED
@@ -12,13 +12,11 @@ Infrataster::Server.define(
|
|
12
12
|
from: :proxy,
|
13
13
|
http: {host: 'example.com'},
|
14
14
|
)
|
15
|
+
Infrataster::Server.define(
|
16
|
+
:example_com,
|
17
|
+
'example.com',
|
18
|
+
)
|
15
19
|
|
16
20
|
RSpec.configure do |config|
|
17
|
-
if RSpec::Core::Version::STRING.start_with?('2')
|
18
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
19
|
-
end
|
20
|
-
config.run_all_when_everything_filtered = true
|
21
|
-
config.filter_run :focus
|
22
|
-
|
23
21
|
config.order = 'random'
|
24
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infrataster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|