guard-coffeescript 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Michael Kessler, Thibaud Guillaume-Gentil
1
+ Copyright (c) 2010 Michael Kessler
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
17
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -37,13 +37,13 @@ Please read {guard doc}[http://github.com/guard/guard#readme] for more info abou
37
37
 
38
38
  === Standard ruby gems
39
39
 
40
- guard 'coffee-script' do
40
+ guard 'coffeescript' do
41
41
  watch('^coffeescripts/(.*)\.coffee')
42
42
  end
43
43
 
44
44
  === Rails app
45
45
 
46
- guard 'coffee-script', :output => 'public/javascripts/compiled' do
46
+ guard 'coffeescript', :output => 'public/javascripts/compiled' do
47
47
  watch('^app/coffeescripts/(.*)\.coffee')
48
48
  end
49
49
 
@@ -16,7 +16,7 @@ module Guard
16
16
 
17
17
  def run_all
18
18
  paths = Inspector.clean(Watcher.match_files(self, Dir.glob(File.join('**', '*.coffee'))))
19
- Runner.run(paths, options.merge(:message => 'Generate all CoffeeScripts')) unless paths.empty?
19
+ Runner.run(paths, options.merge(:message => 'Compile all CoffeeScripts')) unless paths.empty?
20
20
  end
21
21
 
22
22
  def run_on_change(paths)
@@ -1,19 +1,26 @@
1
+ require 'open3'
2
+
1
3
  module Guard
2
4
  class CoffeeScript
3
5
  module Runner
4
6
  class << self
7
+ include Open3
5
8
 
6
9
  def run(paths, options = {})
10
+
7
11
  if coffee_executable_exists?
8
- message = options[:message] || "Running: #{paths.join(' ')}"
12
+ message = options[:message] || "Compile #{paths.join(' ')}"
9
13
  ::Guard::UI.info message, :reset => true
10
14
 
11
- out = `#{ coffee_script_command(paths, options) } 2>&1`
12
- if $?.to_i == 0
13
- message = message.gsub(/Running:/, 'Successful compiled')
15
+ output, status = capture2e(coffee_script_command(paths, options))
16
+
17
+ puts output
18
+
19
+ if status.to_i == 0
20
+ message = message.gsub(/^Compile/, 'Successfully compiled')
14
21
  ::Guard::Notifier.notify(message, :title => 'CoffeeScript results')
15
22
  else
16
- message = out.split("\n").select { |line| line =~ /^Error:/ }.join("\n")
23
+ message = output.split("\n").select { |line| line =~ /^Error:/ }.join("\n")
17
24
  ::Guard::Notifier.notify(message, :title => 'CoffeeScript results', :image => :failed)
18
25
  end
19
26
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module CoffeeScriptVersion
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
- end
5
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-coffeescript
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Kessler
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-26 00:00:00 +02:00
18
+ date: 2010-10-28 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -24,62 +24,62 @@ dependencies:
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ">="
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 23
29
+ hash: 19
30
30
  segments:
31
31
  - 0
32
32
  - 2
33
- - 0
34
- version: 0.2.0
33
+ - 2
34
+ version: 0.2.2
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: rspec
38
+ name: bundler
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- hash: 13
45
+ hash: 19
46
46
  segments:
47
- - 2
48
- - 0
49
47
  - 1
50
- version: 2.0.1
48
+ - 0
49
+ - 2
50
+ version: 1.0.2
51
51
  type: :development
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
54
- name: guard-rspec
54
+ name: rspec
55
55
  prerelease: false
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- hash: 19
61
+ hash: 13
62
62
  segments:
63
+ - 2
63
64
  - 0
64
65
  - 1
65
- - 4
66
- version: 0.1.4
66
+ version: 2.0.1
67
67
  type: :development
68
68
  version_requirements: *id003
69
69
  - !ruby/object:Gem::Dependency
70
- name: bundler
70
+ name: guard-rspec
71
71
  prerelease: false
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ">="
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  hash: 19
78
78
  segments:
79
- - 1
80
79
  - 0
81
- - 2
82
- version: 1.0.2
80
+ - 1
81
+ - 4
82
+ version: 0.1.4
83
83
  type: :development
84
84
  version_requirements: *id004
85
85
  description: Guard::CoffeeScript automatically generates your JavaScripts from your CoffeeScripts
@@ -100,7 +100,7 @@ files:
100
100
  - LICENSE
101
101
  - README.rdoc
102
102
  has_rdoc: true
103
- homepage: http://rubygems.org/gems/guard-coffeescript
103
+ homepage: http://github.com/netzpirat/guard-coffeescript
104
104
  licenses: []
105
105
 
106
106
  post_install_message: