vagrant-proxyconf 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzI4MTE4NzRhOTYzYWY1MDVkZThkM2Y5MTNjZmQ0ODY2ZTM0YmZjMg==
5
+ data.tar.gz: !binary |-
6
+ Mzg5Y2U5MWU3MmM2ZDQyOTQ3NGE1ODVmZGFhNmRlNTZkMGQxZWUxNg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ Mzk2YzM2ZjlhYTkwMmE2NTg4ZGI5YTIzMjU4OTE3YTM3YjFkOWU3MWUyOTRi
10
+ NWY1YjIxZjY2ZmNiOTQwMzAxNjRiNjVhOTM2ODkxYWMyMjM1YWY0YWFhNTVm
11
+ OWEwNDgyMmZkOTg5OTE3N2NlMWI0Mzc2YmQ2NGJiN2ZkMmY4N2M=
12
+ data.tar.gz: !binary |-
13
+ NDE4YTdlNjNlOTY1NDQ5ZTMxYzIzOTFiMDM2NWNkYTdlMjAyOWNlMzI1MDM1
14
+ MGFiNDIwOTRiMTk2YjFlZWUzNDM4ODQ3OWI5MDU2ZGNlODYzZWJjMzc4NTA3
15
+ MmFiMmVmNWM2YjA0MWYxNzFiNDczMzkxYjJiODM2ZDFlNWUyYWU=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.5.2 / 2013-09-27
2
+
3
+ - Fix sudo configuration on old Ubuntu 10.04 "lucid" guests ([GH-26][])
4
+ * Ubuntu bug [\#553786](https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/553786)
5
+ - Always set correct permissions on generated configuration files ([GH-27][], [GH-26][])
6
+
1
7
  # 0.5.1 / 2013-09-17
2
8
 
3
9
  - Configure sudo to preserve the `*_proxy` environment variables ([GH-23][], [GH-25][])
@@ -61,3 +67,5 @@
61
67
  [GH-23]: https://github.com/tmatilai/vagrant-proxyconf/issues/23 "Issue 23"
62
68
  [GH-24]: https://github.com/tmatilai/vagrant-proxyconf/issues/24 "Issue 24"
63
69
  [GH-25]: https://github.com/tmatilai/vagrant-proxyconf/issues/25 "Issue 25"
70
+ [GH-26]: https://github.com/tmatilai/vagrant-proxyconf/issues/26 "Issue 26"
71
+ [GH-27]: https://github.com/tmatilai/vagrant-proxyconf/issues/27 "Issue 27"
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gem 'rake'
7
7
  gem 'rspec', '~> 2.11'
8
8
  gem 'simplecov', '~> 0.7', :require => false
9
9
  gem 'tailor', '~> 1.2'
10
- gem 'vagrant', github: 'mitchellh/vagrant', ref: 'v1.3.1'
10
+ gem 'vagrant', github: 'mitchellh/vagrant', ref: 'v1.3.3'
11
11
 
12
12
  group :development do
13
13
  gem 'guard-rspec'
data/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  [gemnasium]: https://gemnasium.com/tmatilai/vagrant-proxyconf
13
13
  [codeclimate]: https://codeclimate.com/github/tmatilai/vagrant-proxyconf
14
14
 
15
- A [Vagrant](http://www.vagrantup.com/) plugin that configures the virtual machine to use specified proxies. This is useful for example in case you are behind a corporate proxy server, or you have a caching proxy.
15
+ A [Vagrant](http://www.vagrantup.com/) plugin that configures the virtual machine to use specified proxies. This is useful for example in case you are behind a corporate proxy server, or you have a caching proxy (for example [polipo](https://github.com/tmatilai/polipo-box)).
16
16
 
17
17
  At this state we support:
18
18
 
@@ -195,15 +195,13 @@ VAGRANT_APT_HTTP_PROXY="proxy.example.com:8080" vagrant up
195
195
 
196
196
  #### Running apt-cacher-ng on a Vagrant box
197
197
 
198
- [Here](https://github.com/tmatilai/apt-cacher-box) is an example for setting up apt-cacher proxy server in a Vagrant VM.
198
+ [apt-cacher-box](https://github.com/tmatilai/apt-cacher-box) gives an example for setting up apt-cacher proxy server in a Vagrant VM.
199
199
 
200
200
  ## Related plugins and projects
201
201
 
202
202
  * [apt-cacher-box](https://github.com/tmatilai/apt-cacher-box)<br/>
203
203
  a Vagrant setup for apt-cacher-ng.
204
+ * [polipo-box](https://github.com/tmatilai/polipo-box)<br/>
205
+ a Vagrant setup for [polipo](http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/) caching web proxy.
204
206
  * [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier)<br/>
205
207
  An excellent Vagrant plugin that shares various cache directories among similar VM instances. Should work fine together with vagrant-proxyconf.
206
- * [vagrant-httpproxy](https://github.com/juliandunn/vagrant-httpproxy)<br/>
207
- A Chef cookbook for configuring Chef resources to use the specified proxy (while offline).
208
- * [vagrant-proxy](https://github.com/clintoncwolfe/vagrant-proxy)<br/>
209
- A Vagrant plugin that uses iptables rules to force the VM to use a proxy.
@@ -67,22 +67,28 @@ module VagrantPlugins
67
67
  #
68
68
  # @param opts [Hash] optional file options
69
69
  # @option opts [String] :path (#config_path) the path of the configuration file
70
- # @option opts [String] :mode the mode of the file
70
+ # @option opts [String] :mode ("0644") the mode of the file
71
+ # @option opts [String] :owner ("root:root") the owner (and group) of the file
71
72
  def write_config(machine, config, opts = {})
73
+ tmp = "/tmp/vagrant-proxyconf"
72
74
  path = opts[:path] || config_path(machine)
73
- logger.debug "Configuration (#{path}):\n#{config}"
74
-
75
- temp = Tempfile.new("vagrant")
76
- temp.binmode
77
- temp.write(config)
78
- temp.close
79
75
 
76
+ logger.debug "Configuration (#{path}):\n#{config}"
80
77
  machine.communicate.tap do |comm|
81
- comm.upload(temp.path, "/tmp/vagrant-proxyconf")
78
+ comm.upload(tempfile(config).path, tmp)
79
+ comm.sudo("chmod #{opts[:mode] || '0644'} #{tmp}")
80
+ comm.sudo("chown #{opts[:owner] || 'root:root'} #{tmp}")
82
81
  comm.sudo("mkdir -p #{File.dirname(path)}")
83
- comm.sudo("cat /tmp/vagrant-proxyconf > #{path}")
84
- comm.sudo("chmod #{opts[:mode]} #{path}") if opts[:mode]
85
- comm.sudo("rm /tmp/vagrant-proxyconf")
82
+ comm.sudo("mv #{tmp} #{path}")
83
+ end
84
+ end
85
+
86
+ # @return [Tempfile] a temporary file with the specified content
87
+ def tempfile(content)
88
+ Tempfile.new("vagrant").tap do |temp|
89
+ temp.binmode
90
+ temp.write(content)
91
+ temp.close
86
92
  end
87
93
  end
88
94
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ProxyConf
3
- VERSION = '0.5.1'
3
+ VERSION = '0.5.2'
4
4
  end
5
5
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = VagrantPlugins::ProxyConf::VERSION
9
9
  spec.authors = ["Teemu Matilainen"]
10
10
  spec.email = ["teemu.matilainen@iki.fi"]
11
- spec.description = "A Vagrant plugin that configures the virtual machine to use proxies"
11
+ spec.description = "A Vagrant plugin that configures the virtual machine to use proxy servers"
12
12
  spec.summary = spec.description
13
13
  spec.homepage = "http://tmatilai.github.io/vagrant-proxyconf/"
14
14
  spec.license = "MIT"
metadata CHANGED
@@ -1,17 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-proxyconf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
5
- prerelease:
4
+ version: 0.5.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Teemu Matilainen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-17 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
13
12
  dependencies: []
14
- description: A Vagrant plugin that configures the virtual machine to use proxies
13
+ description: A Vagrant plugin that configures the virtual machine to use proxy servers
15
14
  email:
16
15
  - teemu.matilainen@iki.fi
17
16
  executables: []
@@ -62,34 +61,27 @@ files:
62
61
  homepage: http://tmatilai.github.io/vagrant-proxyconf/
63
62
  licenses:
64
63
  - MIT
64
+ metadata: {}
65
65
  post_install_message:
66
66
  rdoc_options: []
67
67
  require_paths:
68
68
  - lib
69
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
- none: false
71
70
  requirements:
72
71
  - - ! '>='
73
72
  - !ruby/object:Gem::Version
74
73
  version: '0'
75
- segments:
76
- - 0
77
- hash: -968959479372815338
78
74
  required_rubygems_version: !ruby/object:Gem::Requirement
79
- none: false
80
75
  requirements:
81
76
  - - ! '>='
82
77
  - !ruby/object:Gem::Version
83
78
  version: '0'
84
- segments:
85
- - 0
86
- hash: -968959479372815338
87
79
  requirements: []
88
80
  rubyforge_project:
89
- rubygems_version: 1.8.23
81
+ rubygems_version: 2.1.4
90
82
  signing_key:
91
- specification_version: 3
92
- summary: A Vagrant plugin that configures the virtual machine to use proxies
83
+ specification_version: 4
84
+ summary: A Vagrant plugin that configures the virtual machine to use proxy servers
93
85
  test_files:
94
86
  - spec/spec_helper.rb
95
87
  - spec/unit/support/shared/apt_proxy_config.rb