slim-grunt-helpers 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da62d1c88d005d01ddb7c6afb7045c9584351db1
4
- data.tar.gz: 4e1e1947d18f1c8bd4308f124d73a2b35187e1b1
3
+ metadata.gz: 20e8513107759c51072567f6a9bf8eaac947daf0
4
+ data.tar.gz: 189e753cea3c2c6cb8f8dc54c938ab10befa81f4
5
5
  SHA512:
6
- metadata.gz: 7a0c004ba6ba3857f09a158c691f3def08970438d3729c410269f9c454975e6d1b3c620f3c72e62982ba4b8179b6f141510ff36042b3a2cd389881d98ae0a534
7
- data.tar.gz: 400d8d10bad7228ee294f70f41ba309c501c84939d4956cbd534549bb04e5a3de557ed374e1d54c07fea67f0a1ace399fcbeb9f8581d743cf384a5bc27b6b182
6
+ metadata.gz: 198b4fa59667f2a76f7a96153e56631757fdc07e13c500ecc9236a5566dc61cb20ce86af68920d2aa4a3ecaa8eee648dab2591ff577b0febd1a8ec06e83bbe76
7
+ data.tar.gz: 76d7483c61447ce79c5789c5dd7d22e1899b39e215a37701f7ff8acf2491bc2b3d9bbac7472697bc3334d580e318a54ee9fff7137019ccfa1c5686d5b3f21d4f
@@ -11,9 +11,14 @@ module SlimGruntHelpers
11
11
  end
12
12
 
13
13
  def <<(path, options={})
14
- @links << { path: path, options: base_options.merge(options) }
14
+ @links << { path: path.to_s, options: base_options.merge(options) }
15
+ end
16
+ alias_method :add, :<<
17
+ alias_method :include, :<<
18
+
19
+ def require(path, options={})
20
+ self.include(path, options) unless @links.include? path.to_s
15
21
  end
16
- alias_method :add, :<<
17
22
 
18
23
  def each
19
24
  @links.each { |link| yield(transform_link(link)) }
@@ -23,6 +28,17 @@ module SlimGruntHelpers
23
28
  BASE_OPTIONS
24
29
  end
25
30
 
31
+ def require_tree(root_path, pattern, options={})
32
+ Dir[root_path.join(pattern)].reject do |file|
33
+ File.directory? file
34
+ end.each do |file|
35
+ file_name = file.to_s
36
+ file_name["#{ root_path }/"] = ''
37
+
38
+ self.require file_name, options
39
+ end
40
+ end
41
+
26
42
  protected
27
43
 
28
44
  def transform_link(link)
@@ -1,3 +1,3 @@
1
1
  module SlimGruntHelpers
2
- VERSION = "0.0.5"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim-grunt-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fire-Dragon-DoL
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-04 00:00:00.000000000 Z
11
+ date: 2014-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler