slim-grunt-helpers 0.2.0 → 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/slim-grunt-helpers/models/usemin.rb +8 -1
- data/lib/slim-grunt-helpers/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1cdf8247c56df9ebc0368e2c5b09da63be94413
|
4
|
+
data.tar.gz: a54e0cfe65a655fd4be2e62667655ca06f90de53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd93bf79733566e214866f93ec64e2e3850128c29d623771b9e7b37c9aa41584205fb99d99f1694f413a2558375d4062df9a907e9e5cfdfbc9ce9207a4a92154
|
7
|
+
data.tar.gz: 18f897ea8e7a70b5474289649c85d054e82ce917c6c604aa97de9df1cf0dd700bf5d0aa417869cc3df6e26f5ac5097c933fedd5dbf7433d686731ee6cd5bd570
|
@@ -19,7 +19,7 @@ module SlimGruntHelpers
|
|
19
19
|
alias_method :include, :<<
|
20
20
|
|
21
21
|
def require(path, options={})
|
22
|
-
self.include(path, options) unless
|
22
|
+
self.include(path, options) unless file_already_included? path
|
23
23
|
end
|
24
24
|
|
25
25
|
def each
|
@@ -53,6 +53,13 @@ module SlimGruntHelpers
|
|
53
53
|
raise NotImplementedError, 'This method must be implemented in child classes'
|
54
54
|
end
|
55
55
|
|
56
|
+
private
|
57
|
+
|
58
|
+
def file_already_included?(path)
|
59
|
+
path = path.to_s
|
60
|
+
@links.find { |link| link[:path] == path }
|
61
|
+
end
|
62
|
+
|
56
63
|
end
|
57
64
|
|
58
65
|
end
|