bower_vendor 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/lib/bower_vendor/base.rb +2 -2
- data/lib/bower_vendor/copy.rb +12 -11
- data/lib/bower_vendor/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 27476877f118a83d965b71a0098728d23fb26bbc3d4c94273a3df02730ba9dbf
|
4
|
+
data.tar.gz: 79a1eca558c32f4a7316149f3995341ccb14f4ad9b95f59d31991aa9921817d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74183e4289f806c4f99e0fa3e51134c2a817c89b039f6929f4e5f51db61224834bac3f4be0849e1f51f32ca351e2c1587c4e2b14ebc03249970fe91db9711e74
|
7
|
+
data.tar.gz: 6f3be2f50e11e756473e2e27d6c2b7554549ffe4e50c9e583ff98a345f3b3d63f6fb3401c29977400d1608348d5f1b1e1a342e9f1f0b3652fe6d846bbdec91f6
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.5.0
|
data/lib/bower_vendor/base.rb
CHANGED
data/lib/bower_vendor/copy.rb
CHANGED
@@ -2,24 +2,27 @@ module BowerVendor
|
|
2
2
|
class Copy < Base
|
3
3
|
def execute
|
4
4
|
vendors.each do |asset_key, asset_data|
|
5
|
-
src_dir =
|
5
|
+
src_dir = full_asset_key_src_dir(asset_key)
|
6
6
|
msg 0, "processing: #{src_dir}"
|
7
7
|
|
8
|
-
|
8
|
+
run_build_scripts(asset_key, asset_data, 1)
|
9
9
|
copy_assets(asset_key, asset_data, 1)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def run_build_scripts(asset_key, asset_data, level)
|
14
14
|
scripts = (asset_data['build'] || [])
|
15
15
|
return if scripts.empty?
|
16
16
|
|
17
|
+
src_dir = full_asset_key_src_dir(asset_key)
|
18
|
+
|
17
19
|
msg level, "building..."
|
18
20
|
scripts.each do |cmd|
|
19
|
-
|
20
|
-
|
21
|
+
msg level + 1, "cd #{src_dir} && #{cmd}"
|
22
|
+
|
21
23
|
pid = fork do
|
22
|
-
|
24
|
+
Dir.chdir src_dir
|
25
|
+
puts `#{cmd}`
|
23
26
|
end
|
24
27
|
Process.wait pid
|
25
28
|
end
|
@@ -47,10 +50,8 @@ module BowerVendor
|
|
47
50
|
version = asset_data['version'].to_s
|
48
51
|
raise "VERSION MISSING: #{asset_data.inspect}" if version.blank?
|
49
52
|
|
50
|
-
|
51
|
-
|
52
|
-
base_src_dir = "#{work_dir}/bower_components"
|
53
|
-
src = "#{base_src_dir}/#{asset_key}/#{src_path}"
|
53
|
+
asset_path = asset.gsub("{{VERSION}}", version)
|
54
|
+
src = "#{full_asset_key_src_dir(asset_key)}/#{asset_path}"
|
54
55
|
|
55
56
|
files = Dir[src].sort!
|
56
57
|
raise "NOT_FOUND: #{src}" if files.empty?
|
@@ -71,7 +72,7 @@ module BowerVendor
|
|
71
72
|
ext = src_file.split('.').last
|
72
73
|
dst_file = src_file
|
73
74
|
|
74
|
-
base_dst_dir = dst_dirs[ext]
|
75
|
+
base_dst_dir = self.dst_dirs[ext]
|
75
76
|
raise "NOT_FOUND_EXT: #{ext}" unless base_dst_dir
|
76
77
|
|
77
78
|
dst_dir = "#{base_dst_dir}/#{asset_key}-#{version}"
|
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.16
|
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: 2018-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
102
|
+
rubygems_version: 2.7.3
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Use bower to manage resources for rails application
|