guard-jade 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/guard/jade.rb +29 -0
  3. metadata +72 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzI4MzMxODhlOWM1NTBmMzEyZTkyYjVhOGVmOWU0Mjk5ZDRiMjBlZg==
5
+ data.tar.gz: !binary |-
6
+ MjU4ZTE5NjJjYTVhOGQxYWU2ZjZhYjIzYmQyNmEzYjE2MTc2Nzc1Yg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ZjM0YjYzMzdlM2FhZDBkYTMxN2ZlMWE5NWRlNDA1YTE5YWM4NGFmNDAzNTRi
10
+ ZmMwZjAzMzM2OGNjMTZiZmVkYThmMzRmM2JjZWFjMWRmZjFmNzBlNTJlYWYy
11
+ N2ZjNDA0YzFiOTEzZTE0ODdiY2Y5YmI0ZGI2ODc0OGY2ZDcwNWI=
12
+ data.tar.gz: !binary |-
13
+ YWFlM2E3ZGExMTZhN2FkNGQxNjc4MjU3ZjBiYmFmZjZlNGVhODc3OTc3NWIw
14
+ OTNkNjllOTBkOWZhNjBiNjI1OTJiMjg3MTBhYWQ1ZDBmZDEwNjM4N2FhYmU0
15
+ OTQzOGU0OGM1ODYwOTI5MTAyYzhkNTQ1OTY3MTIxYmYwMmJkZjg=
data/lib/guard/jade.rb ADDED
@@ -0,0 +1,29 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+ require 'guard/watcher'
4
+ require 'guard/helpers/starter'
5
+ require 'guard/helpers/formatter'
6
+
7
+ module Guard
8
+ class Jade < Guard
9
+ include ::Guard::Helpers::Starter
10
+
11
+ def target_filename(directory, file)
12
+ File.join(directory, File.basename(file).sub(/(\.html)?\.jade$/, '.html'))
13
+ end
14
+
15
+ def act_on(directory, file)
16
+ target = target_filename(directory, file)
17
+ FileUtils.mkdir_p(File.dirname(target))
18
+
19
+ if system("jade < #{file} > #{target}")
20
+ mtime = File.mtime(file)
21
+ File.utime(mtime, mtime, file)
22
+ file
23
+ else
24
+ raise Exception.new("Failed to compile.")
25
+ end
26
+ end
27
+ end
28
+ end
29
+
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-jade
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tim Joseph dumol
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-04-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: guard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 1.7.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.7.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: guard-helpers
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.2
41
+ description: A Guard plugin to watch and compile Jade files
42
+ email: tim@timdumol.com
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - lib/guard/jade.rb
48
+ homepage: https://github.com/TimDumol/guard-stylus
49
+ licenses:
50
+ - Apache 2.0
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubyforge_project:
68
+ rubygems_version: 2.0.3
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: A Guard plugin to watch and compile Jade files
72
+ test_files: []