slim-grunt-helpers 0.3.0 → 0.4.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: cf34da52d8f48aa30ae95c45f5172aa29bd028d7
4
- data.tar.gz: acfdb0dff87197e58d0234f8cbd2e6a6001b3ccf
3
+ metadata.gz: 7dc5e08221840aa42d7e1f6c25bd9fd86bca041b
4
+ data.tar.gz: 0283607771c05df9b8c4adb39c168ba5dbfdc3fd
5
5
  SHA512:
6
- metadata.gz: aba6abd560165176f53759c215a534ff8799578ea8a711ff15511ab2afc2ccc41e035940ea147aadbfc183173dfdf437bd54a360c6cd029db48e946cbf76b58d
7
- data.tar.gz: cd6c112e2ef52d5e21458a3d9d1f3066ef2dc74a86749e782967c80a86f17091cab00ad995b8bc7f016df86ae6d884a7d7b627bc5199cc5a3ee31095acc91bd2
6
+ metadata.gz: 812e295d31bb2e6a86a51d23e881319bc7d4ef424ba145bbb02df8665283e4432fefcd8513e4927a151c3866edaf63ac52c28b5255bc7eee81280b7fb5c6a14e
7
+ data.tar.gz: b15e88a86b1f956fdd27f0e32c3638c37a46451901ede93b3d5c12928865c98cffb0952725fcbb90a9b268351f0124c670f7dc8b33e3e6b89ddee37bc8add557
data/README.md CHANGED
@@ -81,7 +81,7 @@ Additionally, notice that attributes with `nil` or `false` as value are not set
81
81
 
82
82
  - `root_path` which is the path will be used as base directory (and **omitted in tags**)
83
83
  - `pattern` which is the pattern accepted by [Dir glob](http://ruby-doc.org/core-1.9.3/Dir.html#method-c-glob), used to search files
84
- - `options` which are directly passed to `require`
84
+ - `options` which accepts `:transform_ext` which will replace the file extension. Other options are directly passed to `require`
85
85
 
86
86
  ## Contributing
87
87
 
@@ -41,6 +41,13 @@ module SlimGruntHelpers
41
41
  file_name = file.to_s
42
42
  real_root_path = "#{ root_path }/"
43
43
  file_name[real_root_path] = ''
44
+ transform_ext = options.delete(:transform_ext)
45
+ unless transform_ext.nil?
46
+ transform_ext = ".#{ transform_ext }" unless transform_ext[0] == '.'
47
+
48
+ origin_ext = File.extname(file_name)
49
+ file_name[origin_ext] = transform_ext
50
+ end
44
51
 
45
52
  self.require file_name, options
46
53
  end
@@ -1,3 +1,3 @@
1
1
  module SlimGruntHelpers
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.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.3.0
4
+ version: 0.4.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-27 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler