vagrant-cachier 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 845908f7aaf2e34bc7a2fdf9b8a6f8ccef0081f3
4
- data.tar.gz: b4fc6095061bd704172251999bfe8a8e2637e145
3
+ metadata.gz: d0209cc19fe26986a49dd0a2637cf98f1472faeb
4
+ data.tar.gz: 5a7b25b210d1d24dfc88f1610d81ef31cfe1b4c3
5
5
  SHA512:
6
- metadata.gz: 212c652010365cccde66327bb8bfb13b60ce98a1bfc9373c3201bcbec9913c6cf0ad9ff014aeda2f22ec3870f915d7fcda083dbf3bf47ddce76a36b9d261be4d
7
- data.tar.gz: 140ac7f80cc15d00cb3ef08548f40e97ce3746bd81715652929904c29260ed9784e7223ffadba53ef0fe1847f8927abcccb8032e335558111263bc87fc7b7ae8
6
+ metadata.gz: bba3b58342c356f7fdd16d7f994572c1d520f3a8850c5de09913612ca4c30534cd5b4dea89ab7f990f09b4ef3bccd77df0ae10d811b57d86c90757476b357f42
7
+ data.tar.gz: f3460e4f029704664a6786224ef5d251e072a33b1a9c252d3e96c4d3b5a46d6354aba1400ef3e044c1b88729460d2a976cd7547614270563db469021732d9519
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [0.7.1](https://github.com/fgrehm/vagrant-cachier/compare/v0.7.0...v0.7.1) (May 04, 2014)
2
+
3
+ BUG FIXES:
4
+
5
+ - Fix support for using multiple generic buckets [[GH-101]]
6
+
7
+ [GH-101]: https://github.com/fgrehm/vagrant-cachier/pull/101
8
+
9
+
1
10
  ## [0.7.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.6.0...v0.7.0) (Apr 06, 2014)
2
11
 
3
12
  FEATURES:
data/Gemfile.lock CHANGED
@@ -6,7 +6,7 @@ GIT
6
6
 
7
7
  GIT
8
8
  remote: git://github.com/fgrehm/vagrant-lxc.git
9
- revision: 47cf361b983d71108619ce5f379ef0fe3358a6a8
9
+ revision: 3bd22955dd26d814f05f51e9f6a196d066985cd2
10
10
  specs:
11
11
  vagrant-lxc (1.0.0.alpha.2.dev)
12
12
 
@@ -36,14 +36,14 @@ GIT
36
36
  PATH
37
37
  remote: .
38
38
  specs:
39
- vagrant-cachier (0.7.0)
39
+ vagrant-cachier (0.7.1)
40
40
 
41
41
  GEM
42
42
  remote: https://rubygems.org/
43
43
  specs:
44
44
  celluloid (0.15.2)
45
45
  timers (~> 1.1.0)
46
- childprocess (0.5.2)
46
+ childprocess (0.5.3)
47
47
  ffi (~> 1.0, >= 1.0.11)
48
48
  erubis (2.7.0)
49
49
  ffi (1.9.3)
@@ -56,14 +56,14 @@ GEM
56
56
  net-scp (1.1.2)
57
57
  net-ssh (>= 2.6.5)
58
58
  net-ssh (2.7.0)
59
- rake (10.2.2)
59
+ rake (10.3.1)
60
60
  rb-fsevent (0.9.4)
61
- rb-inotify (0.9.3)
61
+ rb-inotify (0.9.4)
62
62
  ffi (>= 0.5.0)
63
63
  rb-kqueue (0.2.2)
64
64
  ffi (>= 0.5.0)
65
65
  timers (1.1.0)
66
- vagrant-omnibus (1.3.1)
66
+ vagrant-omnibus (1.4.1)
67
67
  wdm (0.1.0)
68
68
 
69
69
  PLATFORMS
@@ -10,20 +10,22 @@ end
10
10
  ```
11
11
 
12
12
  The `:cache_dir` parameter is required. It specifies the directory on the guest
13
- that will be cached under the "generic" bucket.
13
+ that will be cached under the "/tmp/vagrant-cache/generic" bucket.
14
14
 
15
- You may enable more than one generic bucket by giving them different names via
16
- the `:name` parameter, like this:
15
+ You may enable more than one generic bucket by giving them different names,
16
+ like this:
17
17
 
18
18
  ```ruby
19
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" }
20
+ config.cache.enable :generic, {
21
+ "one" => { cache_dir: "/var/cache/one" },
22
+ "two" => { cache_dir: "/var/cache/two" },
23
+ }
22
24
  end
23
25
  ```
24
26
 
25
- In this case you get two buckets called "generic-one" and "generic-two" under guest's
26
- `/tmp/vagrant-cache`.
27
+ In this case you get two buckets called "one" and "two" under the guest's
28
+ `/tmp/vagrant-cache` directory.
27
29
 
28
30
  The Generic bucket is useful if you want to implement a caching mechanism by
29
31
  hand. For instance, if you want to cache your wget downloads under
@@ -31,7 +33,9 @@ hand. For instance, if you want to cache your wget downloads under
31
33
 
32
34
  ```ruby
33
35
  Vagrant.configure("2") do |config|
34
- config.cache.enable :generic, { name: "wget", cache_dir: "/var/cache/wget" }
36
+ config.cache.enable :generic, {
37
+ "wget" => { cache_dir: "/var/cache/wget" },
38
+ }
35
39
  end
36
40
  ```
37
41
 
@@ -3,12 +3,22 @@ module VagrantPlugins
3
3
  class Bucket
4
4
  class Generic < Bucket
5
5
  def install
6
+
7
+ # First we normalize the @configs hash as a hash of hashes
6
8
  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')
9
+ @configs = { @name => @configs }
11
10
  end
11
+
12
+ # Now we iterate through all generic buckets's configurations and
13
+ # set them up.
14
+ @configs.each do |key, conf|
15
+ if conf.has_key?(:cache_dir)
16
+ symlink(conf[:cache_dir], "/tmp/vagrant-cache/#{key}")
17
+ else
18
+ @env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: "Generic[#{key}]")
19
+ end
20
+ end
21
+
12
22
  end
13
23
  end
14
24
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Cachier
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.1"
4
4
  end
5
5
  end
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.7.0
4
+ version: 0.7.1
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-04-07 00:00:00.000000000 Z
11
+ date: 2014-05-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Caffeine reducer
14
14
  email: