puppet 5.3.6 → 5.3.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2a89923499069bb0d0ebffd3adfc7454c6c87a26
4
+ data.tar.gz: 61aecec7d0f54c192990f44a690c70406c9a78d5
5
+ SHA512:
6
+ metadata.gz: 84514f060de77aa28cd938719358857343ced288425f384e8692344574bc1af16790f0861b3e4209872eb7165ba39869038f683a47b0574dbd30bf4d5c86d8e3
7
+ data.tar.gz: 901d30f458df772d33b4a22a557729b6bb14a6042a24942d7c68563c5fac9d9ccf8f869434ec7efd809674082b0a44340d1f498422f2e9c1d5f7c47baf573f3d
@@ -1257,7 +1257,13 @@ EOT
1257
1257
  :desc => "File that provides mapping between custom SSL oids and user-friendly names"
1258
1258
  },
1259
1259
  :basemodulepath => {
1260
- :default => "$codedir/modules#{File::PATH_SEPARATOR}/opt/puppetlabs/puppet/modules",
1260
+ :default => lambda do
1261
+ if Puppet::Util::Platform.windows?
1262
+ '$codedir/modules'
1263
+ else
1264
+ '$codedir/modules:/opt/puppetlabs/puppet/modules'
1265
+ end
1266
+ end,
1261
1267
  :type => :path,
1262
1268
  :desc => "The search path for **global** modules. Should be specified as a
1263
1269
  list of directories separated by the system path separator character. (The
@@ -12,6 +12,8 @@ require 'puppet/util/http_proxy'
12
12
  class Puppet::Network::HTTP::Factory
13
13
  @@openssl_initialized = false
14
14
 
15
+ KEEP_ALIVE_TIMEOUT = 2**31 - 1
16
+
15
17
  def initialize
16
18
  # PUP-1411, make sure that openssl is initialized before we try to connect
17
19
  if ! @@openssl_initialized
@@ -37,6 +39,7 @@ class Puppet::Network::HTTP::Factory
37
39
  http.use_ssl = site.use_ssl?
38
40
  http.read_timeout = Puppet[:http_read_timeout]
39
41
  http.open_timeout = Puppet[:http_connect_timeout]
42
+ http.keep_alive_timeout = KEEP_ALIVE_TIMEOUT if http.respond_to?(:keep_alive_timeout=)
40
43
 
41
44
  if Puppet[:sourceaddress]
42
45
  if http.respond_to?(:local_host)
@@ -6,7 +6,7 @@
6
6
  # Raketasks and such to set the version based on the output of `git describe`
7
7
 
8
8
  module Puppet
9
- PUPPETVERSION = '5.3.6'
9
+ PUPPETVERSION = '5.3.7'
10
10
 
11
11
  ##
12
12
  # version is a public API method intended to always provide a fast and
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPETCONF" "5" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPETCONF" "5" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  \fBThis page is autogenerated; any changes will get overwritten\fR
6
6
  .
7
7
  .SH "Configuration settings"
@@ -935,7 +935,7 @@ The time to wait for one block to be read from an HTTP connection\. If nothing i
935
935
  The HTTP User\-Agent string to send when making network requests\.
936
936
  .
937
937
  .IP "\(bu" 4
938
- \fIDefault\fR: Puppet/5\.3\.6 Ruby/2\.3\.1\-p112 (x86_64\-linux)
938
+ \fIDefault\fR: Puppet/5\.3\.7 Ruby/2\.3\.1\-p112 (x86_64\-linux)
939
939
  .
940
940
  .IP "" 0
941
941
  .
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-AGENT" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-AGENT" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-agent\fR \- The puppet agent daemon
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-APPLY" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-APPLY" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-apply\fR \- Apply Puppet manifests locally
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CA" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CA" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-ca\fR \- Local Puppet Certificate Authority management\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CATALOG" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CATALOG" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CERT" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERT" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-cert\fR \- Manage certificates and requests
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CERTIFICATE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERTIFICATE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-certificate\fR \- Provide access to the CA for certificate management\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CERTIFICATE_REQUEST" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERTIFICATE_REQUEST" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-certificate_request\fR \- Manage certificate requests\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CERTIFICATE_REVOCATION_LIST" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERTIFICATE_REVOCATION_LIST" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-certificate_revocation_list\fR \- Manage the list of revoked certificates\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CONFIG" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CONFIG" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-config\fR \- Interact with Puppet\'s settings\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DESCRIBE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DESCRIBE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-describe\fR \- Display help about resource types
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DEVICE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DEVICE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-device\fR \- Manage remote network devices
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DOC" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DOC" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-doc\fR \- Generate Puppet references
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-EPP" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-EPP" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-FACTS" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FACTS" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-facts\fR \- Retrieve and store facts\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-FILEBUCKET" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FILEBUCKET" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-GENERATE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-GENERATE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-HELP" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-HELP" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-help\fR \- Display Puppet help\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-KEY" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-KEY" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-key\fR \- Create, save, and remove certificate keys\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-LOOKUP" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-LOOKUP" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-lookup\fR \- Interactive Hiera lookup
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MAN" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MAN" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-man\fR \- Display Puppet manual pages\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MASTER" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MASTER" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-master\fR \- The puppet master daemon
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MODULE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MODULE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-NODE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-NODE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-node\fR \- View and manage node definitions\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-PARSER" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PARSER" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-parser\fR \- Interact directly with the parser\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-PLUGIN" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PLUGIN" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-REPORT" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-REPORT" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-report\fR \- Create, display, and submit reports\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-RESOURCE" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-RESOURCE" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-resource\fR \- The resource abstraction layer shell
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-STATUS" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-STATUS" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-status\fR \- View puppet server status\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET" "8" "April 2018" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET" "8" "May 2018" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\fR
@@ -16,4 +16,4 @@ Available subcommands:
16
16
  agent The puppet agent daemon apply Apply Puppet manifests locally ca Local Puppet Certificate Authority management\. (Deprecated) catalog Compile, save, view, and convert catalogs\. cert Manage certificates and requests certificate Provide access to the CA for certificate management\. certificate_request Manage certificate requests\. (Deprecated) certificate_revocation_list Manage the list of revoked certificates\. (Deprecated) config Interact with Puppet\'s settings\. describe Display help about resource types device Manage remote network devices doc Generate Puppet references epp Interact directly with the EPP template parser/renderer\. facts Retrieve and store facts\. filebucket Store and retrieve files in a filebucket generate Generates Puppet code from Ruby definitions\. help Display Puppet help\. key Create, save, and remove certificate keys\. (Deprecated) lookup Interactive Hiera lookup man Display Puppet manual pages\. master The puppet master daemon module Creates, installs and searches for modules on the Puppet Forge\. node View and manage node definitions\. parser Interact directly with the parser\. plugin Interact with the Puppet plugin system\. report Create, display, and submit reports\. resource The resource abstraction layer shell status View puppet server status\. (Deprecated)
17
17
  .
18
18
  .P
19
- See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v5\.3\.6
19
+ See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v5\.3\.7
@@ -88,4 +88,18 @@ describe "Defaults" do
88
88
  Puppet.settings.handlearg("--server", "test_server")
89
89
  end
90
90
  end
91
+
92
+ describe 'basemodulepath' do
93
+ it 'includes the global and system modules on non-windows', :unless => Puppet::Util::Platform.windows? do
94
+ expect(
95
+ Puppet[:basemodulepath]
96
+ ).to match(%r{.*/code/modules:/opt/puppetlabs/puppet/modules})
97
+ end
98
+
99
+ it 'includes global modules on windows', :if => Puppet::Util::Platform.windows? do
100
+ expect(
101
+ Puppet[:basemodulepath]
102
+ ).to match(%r{.*/code/modules})
103
+ end
104
+ end
91
105
  end
@@ -78,42 +78,49 @@ describe Puppet::Network::HTTP::Factory do
78
78
 
79
79
  expect(conn.proxy_port).to eq(proxy_port)
80
80
  end
81
+ end
81
82
 
82
- context 'socket timeouts' do
83
- it 'sets open timeout' do
84
- Puppet[:http_connect_timeout] = "10s"
85
- conn = create_connection(site)
83
+ context 'socket timeouts' do
84
+ it 'sets open timeout' do
85
+ Puppet[:http_connect_timeout] = "10s"
86
+ conn = create_connection(site)
86
87
 
87
- expect(conn.open_timeout).to eq(10)
88
- end
88
+ expect(conn.open_timeout).to eq(10)
89
+ end
89
90
 
90
- it 'sets read timeout' do
91
- Puppet[:http_read_timeout] = "2m"
92
- conn = create_connection(site)
91
+ it 'sets read timeout' do
92
+ Puppet[:http_read_timeout] = "2m"
93
+ conn = create_connection(site)
93
94
 
94
- expect(conn.read_timeout).to eq(120)
95
- end
95
+ expect(conn.read_timeout).to eq(120)
96
96
  end
97
+ end
97
98
 
98
- context 'source address' do
99
- it 'defaults to system-defined' do
100
- skip "Requires Ruby >= 2.0" unless RUBY_VERSION.to_i >= 2
101
- conn = create_connection(site)
99
+ it "disables ruby's http_keepalive_timeout on Ruby 2" do
100
+ skip "Requires Ruby >= 2.0" unless RUBY_VERSION.to_i >= 2
101
+ conn = create_connection(site)
102
102
 
103
- expect(conn.local_host).to be(nil)
104
- end
103
+ expect(conn.keep_alive_timeout).to eq(2147483647)
104
+ end
105
+
106
+ context 'source address' do
107
+ it 'defaults to system-defined' do
108
+ skip "Requires Ruby >= 2.0" unless RUBY_VERSION.to_i >= 2
109
+ conn = create_connection(site)
110
+
111
+ expect(conn.local_host).to be(nil)
112
+ end
113
+
114
+ it 'sets the local_host address' do
115
+ Puppet[:sourceaddress] = "127.0.0.1"
116
+ if RUBY_VERSION.to_i >= 2
117
+ conn = create_connection(site)
105
118
 
106
- it 'sets the local_host address' do
107
- Puppet[:sourceaddress] = "127.0.0.1"
108
- if RUBY_VERSION.to_i >= 2
109
- conn = create_connection(site)
110
-
111
- expect(conn.local_host).to eq('127.0.0.1')
112
- else
113
- expect {
114
- create_connection(site)
115
- }.to raise_error(ArgumentError, "Setting 'sourceaddress' is unsupported by this version of Net::HTTP.")
116
- end
119
+ expect(conn.local_host).to eq('127.0.0.1')
120
+ else
121
+ expect {
122
+ create_connection(site)
123
+ }.to raise_error(ArgumentError, "Setting 'sourceaddress' is unsupported by this version of Net::HTTP.")
117
124
  end
118
125
  end
119
126
  end