vagrant-proxyconf 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.1 / 2013-12-01
2
+
3
+ - Ensure that Yum configuration includes the (default) port ([GH-36][])
4
+
1
5
  # 1.0.0 / 2013-11-05
2
6
 
3
7
  - Add support for configuring Yum directly (not only via global env vars) ([GH-4][])
@@ -91,3 +95,4 @@
91
95
  [GH-30]: https://github.com/tmatilai/vagrant-proxyconf/issues/30 "Issue 30"
92
96
  [GH-32]: https://github.com/tmatilai/vagrant-proxyconf/issues/32 "Issue 32"
93
97
  [GH-35]: https://github.com/tmatilai/vagrant-proxyconf/issues/35 "Issue 35"
98
+ [GH-36]: https://github.com/tmatilai/vagrant-proxyconf/issues/36 "Issue 36"
@@ -30,9 +30,9 @@ module VagrantPlugins
30
30
  # @param uri [URI::Generic] the URI with optional userinfo
31
31
  # @return [String] the URI without userinfo
32
32
  def strip_userinfo(uri)
33
- u = uri.dup
34
- u.userinfo = ''
35
- u.to_s
33
+ return '' if uri.to_s.empty?
34
+
35
+ "#{uri.scheme}://#{uri.host}:#{uri.port}"
36
36
  end
37
37
  end
38
38
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ProxyConf
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
@@ -62,7 +62,7 @@ describe VagrantPlugins::ProxyConf::Action::ConfigureChefProxy do
62
62
  end
63
63
 
64
64
  it "configures unset proxies" do
65
- expect(chef.https_proxy).to eq 'http://sslproxy:3128/'
65
+ expect(chef.https_proxy).to eq 'http://sslproxy:3128'
66
66
  end
67
67
  end
68
68
  end
@@ -19,7 +19,7 @@ describe VagrantPlugins::ProxyConf::Action::ConfigureYumProxy do
19
19
 
20
20
  context "without userinfo" do
21
21
  let(:http) { 'http://proxy:1234/' }
22
- it { should eq %q{-v proxy=http://proxy:1234/ -v user='' -v pass=''} }
22
+ it { should eq %q{-v proxy=http://proxy:1234 -v user='' -v pass=''} }
23
23
  end
24
24
 
25
25
  context "with userinfo" do
@@ -30,35 +30,51 @@ describe VagrantPlugins::ProxyConf::UserinfoURI do
30
30
  end
31
31
 
32
32
  context "without userinfo" do
33
- let(:uri) { 'http://proxy.example.com:8123/' }
34
- its(:to_s) { should eq 'http://proxy.example.com:8123/' }
35
- its(:uri) { should eq 'http://proxy.example.com:8123/' }
33
+ let(:uri) { 'http://proxy.example.com:8123' }
34
+ its(:to_s) { should eq 'http://proxy.example.com:8123' }
35
+ its(:uri) { should eq 'http://proxy.example.com:8123' }
36
36
  its(:user) { should be_nil }
37
37
  its(:pass) { should be_nil }
38
38
  end
39
39
 
40
40
  context "with username" do
41
41
  let(:uri) { 'http://foo@proxy.example.com:8123/' }
42
- its(:to_s) { should eq 'http://proxy.example.com:8123/' }
43
- its(:uri) { should eq 'http://proxy.example.com:8123/' }
42
+ its(:to_s) { should eq 'http://proxy.example.com:8123' }
43
+ its(:uri) { should eq 'http://proxy.example.com:8123' }
44
44
  its(:user) { should eq 'foo' }
45
45
  its(:pass) { should be_nil }
46
46
  end
47
47
 
48
48
  context "with password" do
49
- let(:uri) { 'http://:bar@proxy.example.com:8123/' }
50
- its(:to_s) { should eq 'http://proxy.example.com:8123/' }
51
- its(:uri) { should eq 'http://proxy.example.com:8123/' }
49
+ let(:uri) { 'http://:bar@proxy.example.com:8123' }
50
+ its(:to_s) { should eq 'http://proxy.example.com:8123' }
51
+ its(:uri) { should eq 'http://proxy.example.com:8123' }
52
52
  its(:user) { should eq '' }
53
53
  its(:pass) { should eq 'bar' }
54
54
  end
55
55
 
56
56
  context "with userinfo" do
57
57
  let(:uri) { 'http://foo:bar@proxy.example.com:8123/' }
58
- its(:to_s) { should eq 'http://proxy.example.com:8123/' }
59
- its(:uri) { should eq 'http://proxy.example.com:8123/' }
58
+ its(:to_s) { should eq 'http://proxy.example.com:8123' }
59
+ its(:uri) { should eq 'http://proxy.example.com:8123' }
60
60
  its(:user) { should eq 'foo' }
61
61
  its(:pass) { should eq 'bar' }
62
62
  end
63
63
 
64
+ context "without port" do
65
+ let(:uri) { 'http://foo:bar@proxy.example.com' }
66
+ its(:to_s) { should eq 'http://proxy.example.com:80' }
67
+ its(:uri) { should eq 'http://proxy.example.com:80' }
68
+ its(:user) { should eq 'foo' }
69
+ its(:pass) { should eq 'bar' }
70
+ end
71
+
72
+ context "with default port" do
73
+ let(:uri) { 'http://proxy.example.com:80/' }
74
+ its(:to_s) { should eq 'http://proxy.example.com:80' }
75
+ its(:uri) { should eq 'http://proxy.example.com:80' }
76
+ its(:user) { should be_nil }
77
+ its(:pass) { should be_nil }
78
+ end
79
+
64
80
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-proxyconf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Teemu Matilainen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-11-05 00:00:00.000000000 Z
12
+ date: 2013-12-01 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: A Vagrant plugin that configures the virtual machine to use proxy servers
14
15
  email:
@@ -92,26 +93,33 @@ files:
92
93
  homepage: http://tmatilai.github.io/vagrant-proxyconf/
93
94
  licenses:
94
95
  - MIT
95
- metadata: {}
96
96
  post_install_message:
97
97
  rdoc_options: []
98
98
  require_paths:
99
99
  - lib
100
100
  required_ruby_version: !ruby/object:Gem::Requirement
101
+ none: false
101
102
  requirements:
102
103
  - - ! '>='
103
104
  - !ruby/object:Gem::Version
104
105
  version: '0'
106
+ segments:
107
+ - 0
108
+ hash: -1237288161997812265
105
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
+ none: false
106
111
  requirements:
107
112
  - - ! '>='
108
113
  - !ruby/object:Gem::Version
109
114
  version: '0'
115
+ segments:
116
+ - 0
117
+ hash: -1237288161997812265
110
118
  requirements: []
111
119
  rubyforge_project:
112
- rubygems_version: 2.1.4
120
+ rubygems_version: 1.8.23
113
121
  signing_key:
114
- specification_version: 4
122
+ specification_version: 3
115
123
  summary: A Vagrant plugin that configures the virtual machine to use proxy servers
116
124
  test_files:
117
125
  - spec/spec_helper.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MjMwNWI4YzNjYmJjMTkyMGU4M2VmMjdmM2M4MjA2NTEzZjY2NDk4Zg==
5
- data.tar.gz: !binary |-
6
- NDFkOTMxOWU2ZTE4NWI0NGE5YjhmMDZhNTE4ZjRmYTVjY2RmNzRhMQ==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- NTE4MjQ2NWU1ZjgyMmM5ZDg0ODlhMGI0MDU4ZmEzZWJmOTBlZjA0NTk5ZWM4
10
- Mjk1NDZhYmJmMzljMzViNjNkMDFkNWI1ODAxMzE5ZTgzZmYxNzg0ZGY4MDdh
11
- ZmQ3MzYzZDQ1MWYyYmUzZTg5ODNiZDY2MDBjY2QyNTZkNGZmNjQ=
12
- data.tar.gz: !binary |-
13
- Y2RmN2Q2NjQ3YzQ3YjFkNWM1OWZjN2ExOGUyMjg1OGRkMDdkYTgyYmFkZTI5
14
- ZTAxYWQ5Zjk0ZDVjMmI2OWUyNDUyZjk2YWUwOWFmY2ExMTE0MTg1MzVkMDA2
15
- NTY2NGY3MDBlZTJhNjY1MjQ0YTE1ZWJjMjkyZTI2NDMwMGIxYjM=