vx-builder 0.6.3 → 0.6.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4541983bf91d4f98e16ad507957f175eb9105915
|
4
|
+
data.tar.gz: 524725958d43a2134142b5562be351f20303be79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a595982c7c3485a41ba73f2e26780b79a5e8072aa5b5affb250338249c5010ef57e7936a4b775d1d6d2f876db8160fcd4a990d9089d0c3aa9df5d29dccab8dba
|
7
|
+
data.tar.gz: f12a988f5138162c3903f1f191eb96a8a6f1a7c60833b6e99445472b9294fa865550ae72a00e5d8cc639925f110ebb9229b2bf7fd07b4c3109852ed6b2f59ddc
|
@@ -7,6 +7,7 @@ module Vx
|
|
7
7
|
|
8
8
|
def initialize(new_cache)
|
9
9
|
normalize_attributes(new_cache)
|
10
|
+
expand_directories!
|
10
11
|
end
|
11
12
|
|
12
13
|
def directories
|
@@ -20,7 +21,6 @@ module Vx
|
|
20
21
|
private
|
21
22
|
|
22
23
|
def normalize_attributes(new_cache)
|
23
|
-
|
24
24
|
@attributes =
|
25
25
|
case new_cache
|
26
26
|
when nil
|
@@ -39,7 +39,21 @@ module Vx
|
|
39
39
|
"enabled" => false
|
40
40
|
}
|
41
41
|
end
|
42
|
+
end
|
42
43
|
|
44
|
+
def expand_directories!
|
45
|
+
directories.map! do |dir|
|
46
|
+
case dir
|
47
|
+
when 'bundler'
|
48
|
+
'~/.rubygems'
|
49
|
+
when 'npm'
|
50
|
+
'node_modules'
|
51
|
+
when 'bower'
|
52
|
+
'bower_components'
|
53
|
+
else
|
54
|
+
dir
|
55
|
+
end
|
56
|
+
end
|
43
57
|
end
|
44
58
|
|
45
59
|
end
|
data/lib/vx/builder/version.rb
CHANGED
@@ -32,4 +32,11 @@ describe Vx::Builder::BuildConfiguration::Cache do
|
|
32
32
|
its(:directories){ should eq [] }
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
it "should expand directories" do
|
37
|
+
params = { "directories" => ["bundler", 'npm', 'bower'] }
|
38
|
+
cache = described_class.new(params)
|
39
|
+
expect(cache.directories).to eq ["~/.rubygems", "node_modules", "bower_components"]
|
40
|
+
end
|
41
|
+
|
35
42
|
end
|