specific_asset_compiler 0.1.8 → 0.2.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 +4 -4
- data/lib/tasks/specific_asset_compiler.rake +4 -4
- 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: c74e74141c1e403c7817274028c6ded2aa66e375
|
4
|
+
data.tar.gz: 79da89e693c1f7b62ca3ddd1d3e821d0dcb01b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3d08312c7cf027afddbacd557e85972107b7d64340a947ef32322a370fa65845e6077984c71d93839fe409843d8aa9e9d1f8f27cbe032ae9e13c92927990c37
|
7
|
+
data.tar.gz: 9a812d948bc8d6fb37a9c61c4e90dec971f681f50ddeda44fe2178097795a6e0c5e5ca9d4c567eee59a8429e5d9b6e941bde51a403d32d5d8bfec4ac90246ae3
|
@@ -39,7 +39,7 @@ namespace :assets do
|
|
39
39
|
digest = nil
|
40
40
|
_ = ActionView::Base
|
41
41
|
target_files = (ENV["ASSET_FILES"].gsub("[","").gsub("]","").split(",") rescue [])
|
42
|
-
target_files = target_files.collect{|file| find_parent(file) }.flatten
|
42
|
+
target_files = target_files.collect{|file| find_parent(file) }.flatten.compact.uniq.collect{|k| k.gsub(".scss","")}
|
43
43
|
config = Rails.application.config
|
44
44
|
config.assets.compile = true
|
45
45
|
config.assets.digest = digest unless digest.nil?
|
@@ -60,7 +60,7 @@ namespace :assets do
|
|
60
60
|
file_pure_path = file_path.split(".").first
|
61
61
|
file_pure_name = file_path.split("/").last.split(".").first
|
62
62
|
all_path = Rails.application.config.assets.paths
|
63
|
-
all_found = all_path.collect{|path| %x[ grep -rw '#{path}' -e '#{file_pure_name}' ].split("\n") }.flatten.compact.select{|h| h.split(":").last.split("/").last.include?(file_pure_name) && h.split(":").last.
|
63
|
+
all_found = all_path.collect{|path| %x[ grep -rw '#{path}' -e '#{file_pure_name}' ].split("\n") }.flatten.compact.select{|h| h.split(":").last.split("/").last.include?(file_pure_name) && (h.split(":").last.include?("import") || h.split(":").last.include?("require")) }
|
64
64
|
all_found.present?
|
65
65
|
end
|
66
66
|
|
@@ -69,13 +69,13 @@ namespace :assets do
|
|
69
69
|
file_pure_path = file_path.split(".").first
|
70
70
|
file_pure_name = file_path.split("/").last.split(".").first
|
71
71
|
all_path = Rails.application.config.assets.paths
|
72
|
-
all_found = all_path.collect{|path| %x[ grep -rw '#{path}' -e '#{file_pure_name}' ].split("\n") }.flatten.compact.select{|h| h.split(":").last.split("/").last.include?(file_pure_name) && h.split(":").last.
|
72
|
+
all_found = all_path.collect{|path| %x[ grep -rw '#{path}' -e '#{file_pure_name}' ].split("\n") }.flatten.compact.select{|h| h.split(":").last.split("/").last.include?(file_pure_name) && (h.split(":").last.include?("import") || h.split(":").last.include?("require")) }
|
73
73
|
if all_found.present?
|
74
74
|
all_found.each do |aff|
|
75
75
|
this_file_path = aff.split(":")[0]
|
76
76
|
this_only_path = this_file_path.split("/")[0..this_file_path.split("/").count-2].join("/")
|
77
77
|
imported_raw_message = aff.split(":")[1]
|
78
|
-
imported_raw_path = imported_raw_message.gsub(/\A.* \"/,"").gsub(/\";/,"")
|
78
|
+
imported_raw_path = imported_raw_message.gsub(/\A.* \"/,"").gsub(/\";/,"").gsub("*= require ./","")
|
79
79
|
next unless (this_only_path+"/"+imported_raw_path).match(file_pure_path)
|
80
80
|
result << this_file_path.split(/images\/|stylesheets\/|javascripts\//).last
|
81
81
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specific_asset_compiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanapat Sainak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Specific Asset files to compile
|
14
14
|
email: tanapat@computerlogy.com
|