vagrant-cachier 0.6.0 → 0.7.0

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: 307983515bc00363631b1742d531e79f2fb24e8e
4
- data.tar.gz: 6bebf0f7c9e887566d4f1161506d461ae43f3b06
3
+ metadata.gz: 845908f7aaf2e34bc7a2fdf9b8a6f8ccef0081f3
4
+ data.tar.gz: b4fc6095061bd704172251999bfe8a8e2637e145
5
5
  SHA512:
6
- metadata.gz: 6677e3fcb6ebb9c699fd3c774250fba801a50c914c32022d53367ad2a2b1fe029f03f8853f84858fe8bf554e982c5763bab24d1f2ed70a140847f587287ad01e
7
- data.tar.gz: 20574de968aac25e1d2295739a2f97d2876be801f1d966841c631d7524b3186aef29e522952ce7b2c5c3ed2d53cac244826d171db505eab9265e4ab8f4efe583
6
+ metadata.gz: 212c652010365cccde66327bb8bfb13b60ce98a1bfc9373c3201bcbec9913c6cf0ad9ff014aeda2f22ec3870f915d7fcda083dbf3bf47ddce76a36b9d261be4d
7
+ data.tar.gz: 140ac7f80cc15d00cb3ef08548f40e97ce3746bd81715652929904c29260ed9784e7223ffadba53ef0fe1847f8927abcccb8032e335558111263bc87fc7b7ae8
data/.gitignore CHANGED
@@ -15,4 +15,3 @@ test/tmp
15
15
  test/version_tmp
16
16
  tmp
17
17
  .vagrant
18
- development/cookbooks
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
+ ## [0.7.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.6.0...v0.7.0) (Apr 06, 2014)
2
+
3
+ FEATURES:
4
+
5
+ - ["Generic" cache bucket](http://fgrehm.viewdocs.io/vagrant-cachier/buckets/generic) [[GH-94]] / [[GH-4]].
6
+
7
+ BUG FIXES:
8
+
9
+ - Fix apt-cacher bucket undefined method error [[GH-96]]
10
+
11
+ [GH-94]: https://github.com/fgrehm/vagrant-cachier/pull/94
12
+ [GH-4]: https://github.com/fgrehm/vagrant-cachier/issues/4
13
+ [GH-96]: https://github.com/fgrehm/vagrant-cachier/issues/96
14
+
1
15
  ## [0.6.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.5.1...v0.6.0) (Feb 26, 2014)
2
16
 
3
- BACKWARDS INCOMPATIBILITY:
17
+ BACKWARDS INCOMPATIBILITIES:
4
18
 
5
19
  - Plugin activation is now triggered by the `cache.scope` config and that config
6
20
  is now required. Previous versions of the plugin had it set to `:box` but
data/Gemfile CHANGED
@@ -1,14 +1,14 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in vagrant-cachier.gemspec
4
- gemspec
5
-
6
3
  group :development do
7
- gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.4.3'
4
+ gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.5.2'
5
+ gem 'rake'
6
+ end
7
+
8
+ group :plugins do
9
+ gemspec
8
10
  gem 'vagrant-lxc', github: 'fgrehm/vagrant-lxc'
9
11
  gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
10
12
  gem 'vagrant-global-status', github: 'fgrehm/vagrant-global-status'
11
- gem 'vagrant-librarian-chef'
12
13
  gem 'vagrant-omnibus'
13
- gem 'rake'
14
14
  end
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  GIT
2
2
  remote: git://github.com/fgrehm/vagrant-global-status.git
3
- revision: 8ae82e2c57b085a030137a40e9b3d232f42e5117
3
+ revision: 6a93c79c7595b76392a2b559674985eabc004aa8
4
4
  specs:
5
5
  vagrant-global-status (0.1.5.dev)
6
6
 
7
7
  GIT
8
8
  remote: git://github.com/fgrehm/vagrant-lxc.git
9
- revision: 1083f100adc4cf1bd20e7eb794ecfda94ef8b365
9
+ revision: 47cf361b983d71108619ce5f379ef0fe3358a6a8
10
10
  specs:
11
- vagrant-lxc (0.7.1.dev)
11
+ vagrant-lxc (1.0.0.alpha.2.dev)
12
12
 
13
13
  GIT
14
14
  remote: git://github.com/fgrehm/vagrant-pristine.git
@@ -18,112 +18,53 @@ GIT
18
18
 
19
19
  GIT
20
20
  remote: git://github.com/mitchellh/vagrant.git
21
- revision: 4f0eb9504cc786d5a57a43814427e8eb35407a4c
22
- tag: v1.4.3
21
+ revision: 5b360d0990f0f6fb286dadf65581c345c55d3b32
22
+ tag: v1.5.2
23
23
  specs:
24
- vagrant (1.4.3)
25
- childprocess (~> 0.3.7)
24
+ vagrant (1.5.2)
25
+ bundler (~> 1.5.2)
26
+ childprocess (~> 0.5.0)
26
27
  erubis (~> 2.7.0)
27
28
  i18n (~> 0.6.0)
28
- log4r (~> 1.1.9)
29
+ listen (~> 2.4.0)
30
+ log4r (~> 1.1.9, < 1.1.11)
29
31
  net-scp (~> 1.1.0)
30
32
  net-ssh (>= 2.6.6, < 2.8.0)
33
+ rb-kqueue (~> 0.2.0)
34
+ wdm (~> 0.1.0)
31
35
 
32
36
  PATH
33
37
  remote: .
34
38
  specs:
35
- vagrant-cachier (0.6.0)
39
+ vagrant-cachier (0.7.0)
36
40
 
37
41
  GEM
38
42
  remote: https://rubygems.org/
39
43
  specs:
40
- archive-tar-minitar (0.5.2)
41
- chef (11.8.2)
42
- chef-zero (~> 1.6, >= 1.6.2)
43
- diff-lcs (~> 1.2, >= 1.2.4)
44
- erubis (~> 2.7)
45
- highline (~> 1.6, >= 1.6.9)
46
- json (>= 1.4.4, <= 1.7.7)
47
- mime-types (~> 1.16)
48
- mixlib-authentication (~> 1.3)
49
- mixlib-cli (~> 1.3)
50
- mixlib-config (~> 2.0)
51
- mixlib-log (~> 1.3)
52
- mixlib-shellout (~> 1.2)
53
- net-ssh (~> 2.6)
54
- net-ssh-multi (~> 1.1.0)
55
- ohai (~> 6.0)
56
- pry (~> 0.9)
57
- puma (~> 1.6)
58
- rest-client (>= 1.0.4, < 1.7.0)
59
- yajl-ruby (~> 1.1)
60
- chef-zero (1.7.2)
61
- hashie (~> 2.0)
62
- json
63
- mixlib-log (~> 1.3)
64
- moneta (< 0.7.0)
65
- rack
66
- childprocess (0.3.9)
44
+ celluloid (0.15.2)
45
+ timers (~> 1.1.0)
46
+ childprocess (0.5.2)
67
47
  ffi (~> 1.0, >= 1.0.11)
68
- coderay (1.1.0)
69
- diff-lcs (1.2.5)
70
48
  erubis (2.7.0)
71
49
  ffi (1.9.3)
72
- hashie (2.0.5)
73
- highline (1.6.20)
74
50
  i18n (0.6.9)
75
- ipaddress (0.8.0)
76
- json (1.7.7)
77
- librarian (0.1.1)
78
- highline
79
- thor (~> 0.15)
80
- librarian-chef (0.0.2)
81
- archive-tar-minitar (>= 0.5.2)
82
- chef (>= 0.10)
83
- librarian (~> 0.1.0)
51
+ listen (2.4.1)
52
+ celluloid (>= 0.15.2)
53
+ rb-fsevent (>= 0.9.3)
54
+ rb-inotify (>= 0.9)
84
55
  log4r (1.1.10)
85
- method_source (0.8.2)
86
- mime-types (1.25.1)
87
- mixlib-authentication (1.3.0)
88
- mixlib-log
89
- mixlib-cli (1.4.0)
90
- mixlib-config (2.1.0)
91
- mixlib-log (1.6.0)
92
- mixlib-shellout (1.3.0)
93
- moneta (0.6.0)
94
56
  net-scp (1.1.2)
95
57
  net-ssh (>= 2.6.5)
96
58
  net-ssh (2.7.0)
97
- net-ssh-gateway (1.2.0)
98
- net-ssh (>= 2.6.5)
99
- net-ssh-multi (1.1)
100
- net-ssh (>= 2.1.4)
101
- net-ssh-gateway (>= 0.99.0)
102
- ohai (6.20.0)
103
- ipaddress
104
- mixlib-cli
105
- mixlib-config
106
- mixlib-log
107
- mixlib-shellout
108
- systemu (~> 2.5.2)
109
- yajl-ruby
110
- pry (0.9.12.4)
111
- coderay (~> 1.0)
112
- method_source (~> 0.8)
113
- slop (~> 3.4)
114
- puma (1.6.3)
115
- rack (~> 1.2)
116
- rack (1.5.2)
117
- rake (10.1.1)
118
- rest-client (1.6.7)
119
- mime-types (>= 1.16)
120
- slop (3.4.7)
121
- systemu (2.5.2)
122
- thor (0.18.1)
123
- vagrant-librarian-chef (0.1.4)
124
- librarian-chef
125
- vagrant-omnibus (1.2.1)
126
- yajl-ruby (1.2.0)
59
+ rake (10.2.2)
60
+ rb-fsevent (0.9.4)
61
+ rb-inotify (0.9.3)
62
+ ffi (>= 0.5.0)
63
+ rb-kqueue (0.2.2)
64
+ ffi (>= 0.5.0)
65
+ timers (1.1.0)
66
+ vagrant-omnibus (1.3.1)
67
+ wdm (0.1.0)
127
68
 
128
69
  PLATFORMS
129
70
  ruby
@@ -133,7 +74,6 @@ DEPENDENCIES
133
74
  vagrant!
134
75
  vagrant-cachier!
135
76
  vagrant-global-status!
136
- vagrant-librarian-chef
137
77
  vagrant-lxc!
138
78
  vagrant-omnibus
139
79
  vagrant-pristine!
@@ -1,12 +1,6 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
3
 
4
- Vagrant.require_plugin 'vagrant-cachier'
5
- Vagrant.require_plugin 'vagrant-librarian-chef'
6
- Vagrant.require_plugin 'vagrant-lxc'
7
- Vagrant.require_plugin 'vagrant-omnibus'
8
- Vagrant.require_plugin 'vagrant-pristine'
9
-
10
4
  Vagrant.configure("2") do |config|
11
5
  config.vm.synced_folder "../", "/vagrant", id: 'vagrant-root'
12
6
 
@@ -18,6 +12,10 @@ Vagrant.configure("2") do |config|
18
12
  vb.customize [ "modifyvm", :id, "--memory", 256, "--cpus", "1" ]
19
13
  end
20
14
 
15
+ config.vm.provider :lxc do |lxc|
16
+ lxc.customize 'aa_profile', 'unconfined'
17
+ end
18
+
21
19
  configure_private_network = lambda do |node, suffix|
22
20
  node.vm.network :private_network, ip: "192.168.50.#{suffix}"
23
21
  end
@@ -61,7 +59,11 @@ Vagrant.configure("2") do |config|
61
59
  end
62
60
 
63
61
  config.vm.define :ubuntu do |ubuntu|
64
- ubuntu.vm.box = "quantal64"
62
+ ubuntu.vm.box = "raring64"
63
+ ubuntu.vm.provider :lxc do |_, override|
64
+ override.vm.box = 'fgrehm/raring64-lxc'
65
+ end
66
+
65
67
  configure_private_network.call ubuntu, 10
66
68
 
67
69
  initial_debian_setup.call(ubuntu)
@@ -69,14 +71,7 @@ Vagrant.configure("2") do |config|
69
71
 
70
72
  ubuntu.omnibus.chef_version = :latest
71
73
  ubuntu.vm.provision :chef_solo do |chef|
72
- chef.add_recipe "java::oracle"
73
- chef.json = {
74
- :java => {
75
- :oracle => {
76
- :accept_oracle_download_terms => true
77
- }
78
- }
79
- }
74
+ chef.add_recipe "cachier::default"
80
75
  end
81
76
  end
82
77
 
@@ -0,0 +1,4 @@
1
+ zip_filepath = "#{Chef::Config['file_cache_path']}/vagrant-cachier.tar.gz"
2
+ zip_url = "https://github.com/fgrehm/vagrant-cachier/archive/v0.6.0.tar.gz"
3
+
4
+ remote_file(zip_filepath) { source zip_url }
@@ -0,0 +1,42 @@
1
+ # Generic
2
+
3
+ This bucket is never enabled by default. You have to enable it explicitly like
4
+ this:
5
+
6
+ ```ruby
7
+ Vagrant.configure("2") do |config|
8
+ config.cache.enable :generic, { :cache_dir => "/var/cache/some" }
9
+ end
10
+ ```
11
+
12
+ The `:cache_dir` parameter is required. It specifies the directory on the guest
13
+ that will be cached under the "generic" bucket.
14
+
15
+ You may enable more than one generic bucket by giving them different names via
16
+ the `:name` parameter, like this:
17
+
18
+ ```ruby
19
+ Vagrant.configure("2") do |config|
20
+ config.cache.enable :generic, { name: "one", cache_dir: "/var/cache/one" }
21
+ config.cache.enable :generic, { name: "two", cache_dir: "/var/cache/two" }
22
+ end
23
+ ```
24
+
25
+ In this case you get two buckets called "generic-one" and "generic-two" under guest's
26
+ `/tmp/vagrant-cache`.
27
+
28
+ The Generic bucket is useful if you want to implement a caching mechanism by
29
+ hand. For instance, if you want to cache your wget downloads under
30
+ `/var/cache/wget` you can do this:
31
+
32
+ ```ruby
33
+ Vagrant.configure("2") do |config|
34
+ config.cache.enable :generic, { name: "wget", cache_dir: "/var/cache/wget" }
35
+ end
36
+ ```
37
+
38
+ Then, you invoke wget like this:
39
+
40
+ ```sh
41
+ wget -N -P /var/cache/wget URL
42
+ ```
data/docs/template.html CHANGED
@@ -82,6 +82,7 @@
82
82
  <li class="dropdown">
83
83
  <a class="dropdown-toggle" data-toggle="dropdown" href="#">Available Buckets <span class="caret"></span></a>
84
84
  <ul class="dropdown-menu">
85
+ <li><a tabindex="-1" href="buckets/generic">Generic</a></li>
85
86
  <li><a tabindex="-1" href="buckets/apt">APT</a></li>
86
87
  <li><a tabindex="-1" href="buckets/apt-lists">apt-lists</a></li>
87
88
  <li><a tabindex="-1" href="buckets/apt-cacher">apt-cacher</a></li>
@@ -8,7 +8,7 @@ module VagrantPlugins
8
8
 
9
9
  def self.auto_detect(env)
10
10
  @buckets.each do |bucket|
11
- if env[:machine].guest.capability?(bucket.capability)
11
+ if bucket.respond_to?(:capability) && env[:machine].guest.capability?(bucket.capability)
12
12
  env[:machine].config.cache.enable bucket.bucket_name
13
13
  end
14
14
  end
@@ -98,3 +98,4 @@ require_relative "bucket/apt_lists"
98
98
  require_relative "bucket/composer"
99
99
  require_relative "bucket/npm"
100
100
  require_relative "bucket/zypper"
101
+ require_relative "bucket/generic"
@@ -11,10 +11,11 @@ module VagrantPlugins
11
11
  def install
12
12
  if guest.capability?(:apt_cacher_dir)
13
13
  if guest_path = guest.capability(:apt_cacher_dir)
14
- if machine.config.cache.enable_nfs
14
+ synced_folder_type = (machine.config.cache.synced_folder_opts || {})[:type]
15
+ if synced_folder_type && synced_folder_type.to_sym == :nfs
15
16
  symlink(guest_path)
16
17
  else
17
- @env[:ui].info I18n.t('vagrant_cachier.nfs_required', bucket: 'apt-cacher')
18
+ @env[:ui].warn I18n.t('vagrant_cachier.nfs_required', bucket: 'apt-cacher')
18
19
  end
19
20
  end
20
21
  else
@@ -0,0 +1,16 @@
1
+ module VagrantPlugins
2
+ module Cachier
3
+ class Bucket
4
+ class Generic < Bucket
5
+ def install
6
+ if @configs.has_key?(:cache_dir)
7
+ @name = @configs.has_key?(:name) ? "generic-#{@configs[:name]}" : "generic"
8
+ symlink(@configs[:cache_dir])
9
+ else
10
+ @env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Generic')
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Cachier
3
- VERSION = "0.6.0"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -8,7 +8,7 @@ en:
8
8
  Unknown cache scope '%{cache_scope}' (allowed scopes: %{allowed})
9
9
  nfs_required: |-
10
10
  The '%{bucket}' cache bucket requires NFS to be enabled, please add
11
- `config.cache.enable_nfs = true` to your Vagrantfile.
11
+ `config.cache.synced_folder_opts = {type: :nfs}` to your Vagrantfile.
12
12
  will_fix_machine_cache_dir: |-
13
13
  A vagrant-cachier provider specific cache dir was found under
14
14
  '%{current_path}' and it will be moved to
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-cachier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-27 00:00:00.000000000 Z
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Caffeine reducer
14
14
  email:
@@ -27,12 +27,14 @@ files:
27
27
  - development/Cheffile
28
28
  - development/Cheffile.lock
29
29
  - development/Vagrantfile
30
+ - development/cookbooks/cachier/recipes/default.rb
30
31
  - docs/benchmarks.md
31
32
  - docs/buckets/apt-cacher.md
32
33
  - docs/buckets/apt-lists.md
33
34
  - docs/buckets/apt.md
34
35
  - docs/buckets/chef.md
35
36
  - docs/buckets/composer.md
37
+ - docs/buckets/generic.md
36
38
  - docs/buckets/npm.md
37
39
  - docs/buckets/pacman.md
38
40
  - docs/buckets/rubygems.md
@@ -55,6 +57,7 @@ files:
55
57
  - lib/vagrant-cachier/bucket/chef.rb
56
58
  - lib/vagrant-cachier/bucket/composer.rb
57
59
  - lib/vagrant-cachier/bucket/gem.rb
60
+ - lib/vagrant-cachier/bucket/generic.rb
58
61
  - lib/vagrant-cachier/bucket/npm.rb
59
62
  - lib/vagrant-cachier/bucket/pacman.rb
60
63
  - lib/vagrant-cachier/bucket/rvm.rb