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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d566aa9db2ec0e20872d9d84f75b8c828d544774
4
- data.tar.gz: a61fb1704ca4ad4a3e322d31cdc6888813739040
3
+ metadata.gz: c1cdf8247c56df9ebc0368e2c5b09da63be94413
4
+ data.tar.gz: a54e0cfe65a655fd4be2e62667655ca06f90de53
5
5
  SHA512:
6
- metadata.gz: e779274082e12e0ad0f2f748f2264f308bd150a04b3b5316b86ade8e1fb41b4f9b48b4947f4869bec7f4ca9e5b2b71286beedecd6c4b7b5bd53de3ab5bd1e92f
7
- data.tar.gz: 09d78f7bd69ba051f3a1e1b5d7824b3a771fce06a9247f271bb0c098d2346ca998b20e5a812141fab3f0e307b75c378b40abaf316dab7d45a7b0771b0b980ad4
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 @links.include? path.to_s
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
@@ -1,3 +1,3 @@
1
1
  module SlimGruntHelpers
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim-grunt-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fire-Dragon-DoL