bower_vendor 0.0.13 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bower_vendor/base.rb +10 -3
- data/lib/bower_vendor/copy.rb +14 -9
- data/lib/bower_vendor/setup.rb +1 -1
- data/lib/bower_vendor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e716af98bdadfcee4b4f36b69b4237ea4cc7b08
|
4
|
+
data.tar.gz: c5a5a56fa5c33b06137c1561ab791a40814a3c7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b4ae3578ff4f9975aec31049dfd56f87df8513f5ec874f8d499d341db6a13bfa198b220da838009ebad7f063b8831997cc3b123a933ea7d9d4313558cb5e2ce
|
7
|
+
data.tar.gz: e952bdb016279cdc93729100e4292ae84b3336f1c586d3f2d8e7cb97d5c45e9d63beb622aefcdda219a68060659377ab5f742126787da97cc91c5c8ca5dcbea2
|
data/lib/bower_vendor/base.rb
CHANGED
@@ -4,7 +4,7 @@ module BowerVendor
|
|
4
4
|
end
|
5
5
|
|
6
6
|
def vendors
|
7
|
-
@vendors ||=
|
7
|
+
@vendors ||= load_vendors
|
8
8
|
validate_vendors
|
9
9
|
@vendors
|
10
10
|
end
|
@@ -12,8 +12,8 @@ module BowerVendor
|
|
12
12
|
def validate_vendors
|
13
13
|
# validate resources
|
14
14
|
@vendors.each do |vendor_key, vendor|
|
15
|
-
raise "VERSION MISSING: #{vendor.inspect}" unless vendor['version']
|
16
|
-
|
15
|
+
raise "VERSION MISSING: #{vendor_key}: #{vendor.inspect}" unless vendor['version']
|
16
|
+
puts "WARN: ASSETS MISSING: #{vendor_key}: #{vendor.inspect}" unless vendor['assets']
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -45,5 +45,12 @@ module BowerVendor
|
|
45
45
|
def local_node_bin
|
46
46
|
"#{Rails.root}/node_modules/.bin"
|
47
47
|
end
|
48
|
+
|
49
|
+
def load_vendors
|
50
|
+
vendors = YAML.load_file('vendor.yml')
|
51
|
+
vendors.sort do |a, b|
|
52
|
+
a[0] <=> b[0]
|
53
|
+
end.to_h
|
54
|
+
end
|
48
55
|
end
|
49
56
|
end
|
data/lib/bower_vendor/copy.rb
CHANGED
@@ -12,16 +12,16 @@ module BowerVendor
|
|
12
12
|
|
13
13
|
def run_scripts(asset_key, asset_data, level)
|
14
14
|
scripts = (asset_data['build'] || [])
|
15
|
-
if
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Process.wait pid
|
15
|
+
return if scripts.empty?
|
16
|
+
|
17
|
+
msg level, "building..."
|
18
|
+
scripts.each do |cmd|
|
19
|
+
full_cmd ="cd #{src_dir} && #{cmd}"
|
20
|
+
msg level + 1, full_cmd
|
21
|
+
pid = fork do
|
22
|
+
exec full_cmd
|
24
23
|
end
|
24
|
+
Process.wait pid
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -31,6 +31,11 @@ module BowerVendor
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def copy_asset(asset_key, asset_data, assets, target_path = '', level)
|
34
|
+
assets ||= []
|
35
|
+
if assets.empty?
|
36
|
+
msg level, "WARN: ASSETS MISSING"
|
37
|
+
end
|
38
|
+
|
34
39
|
assets.each do |asset|
|
35
40
|
if asset.is_a? Hash
|
36
41
|
sub_asset = asset.keys.first
|
data/lib/bower_vendor/setup.rb
CHANGED
data/lib/bower_vendor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bower_vendor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|