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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 339c14e14bc3097da780a56abad2655524a41bb7
4
- data.tar.gz: 306d48b65163597e6146657094b190136556c58a
3
+ metadata.gz: 0ff908cf5e048950d98851d1c7f145458c03e9a5
4
+ data.tar.gz: 17cab0279ab374e31e41f7fa5245c285805c3f5f
5
5
  SHA512:
6
- metadata.gz: 13f1eafe9547319dd5eb1e36832e2dcffdbe16ab80ed516d3186b4b11966464d3762584b721932ef9c5321f7e82ffb2645bd913c99fde7a3ae79f7aa58cb013d
7
- data.tar.gz: e8a3dff0819542807f04a178690d1cc71ff1f504f552201fa693bff4f26964a1392f18051795fb1108263e7a24d29fb51098d9990daf05c34e86d5c7a04f6b9e
6
+ metadata.gz: e210714e8f06214d61ecf493e81186e7b50b80909677c2349832115154acb0907e5a35967966f8dd56741625786078c589e8be96ac66e71558d37f00cce9334a
7
+ data.tar.gz: c5c6aeaa5dd65b3162450c334f98323ff41dc2bb999a2e11d85acd1a9e0fc957fb645f67287d370edb22ec22170e901c25834816c3ab5a4faddcfd8ceddf84f0
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Infrataster
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -94,4 +94,11 @@ describe server(:app) do
94
94
  end
95
95
  end
96
96
 
97
+ describe server(:example_com) do
98
+ describe http('https://example.com') do
99
+ it "is example domain" do
100
+ expect(response.body).to include('Example Domain')
101
+ end
102
+ end
103
+ end
97
104
 
@@ -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.0
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-06-18 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec