guard-coffeescript 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.
data/README.md CHANGED
@@ -4,10 +4,10 @@ Guard::CoffeeScript compiles you CoffeeScripts automatically when files are modi
4
4
 
5
5
  ## Install
6
6
 
7
- Please be sure to have [Guard](http://github.com/guard/guard) installed before continue.
7
+ Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
8
8
 
9
9
  Install the gem:
10
-
10
+ https://github
11
11
  gem install guard-coffeescript
12
12
 
13
13
  Add it to your `Gemfile`, preferably inside the development group:
@@ -20,12 +20,12 @@ Add guard definition to your `Guardfile` by running this command:
20
20
 
21
21
  ## JSON
22
22
 
23
- The json library is also required but is not explicitly stated as a gem dependency. If you're on Ruby 1.8 you'll need
24
- to install the json or json_pure gem. On Ruby 1.9, json is included in the standard library.
23
+ The JSON library is also required but is not explicitly stated as a gem dependency. If you're on Ruby 1.8 you'll need
24
+ to install the json or json_pure gem. On Ruby 1.9, JSON is included in the standard library.
25
25
 
26
26
  ## CoffeeScript
27
27
 
28
- Guard::CoffeeScript uses [Ruby CoffeeScript](http://github.com/josh/ruby-coffee-script/) to compile the CoffeeScripts,
28
+ Guard::CoffeeScript uses [Ruby CoffeeScript](https://github.com/josh/ruby-coffee-script/) to compile the CoffeeScripts,
29
29
  that in turn uses [ExecJS](https://github.com/sstephenson/execjs) to pick the best runtime to evaluate the JavaScript.
30
30
 
31
31
  ### node.js
@@ -62,12 +62,12 @@ Windows operating systems.
62
62
 
63
63
  ## Usage
64
64
 
65
- Please read the [Guard usage documentation](http://github.com/guard/guard#readme).
65
+ Please read the [Guard usage documentation](https://github.com/guard/guard#readme).
66
66
 
67
67
  ## Guardfile
68
68
 
69
69
  Guard::CoffeeScript can be adapted to all kind of projects. Please read the
70
- [Guard documentation](http://github.com/guard/guard#readme) for more information about the Guardfile DSL.
70
+ [Guard documentation](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
71
71
 
72
72
  In addition to the standard configuration, this Guard has a short notation for configure projects with a single input a output
73
73
  directory. This notation creates a watcher from the `:input` parameter that matches all CoffeeScript files under the given directory
@@ -89,6 +89,7 @@ There following options can be passed to Guard::CoffeeScript:
89
89
  :output => 'javascripts' # Relative path to the output directory, default: nil
90
90
  :bare => true # Compile without the top-level function wrapper, default: false
91
91
  :shallow => true # Do not create nested output directories, default: false
92
+ :hide_success => true # Disable successful compilation messages, default: false
92
93
 
93
94
  ### Nested directories
94
95
 
@@ -114,7 +115,7 @@ will be compiled to
114
115
  Note the parenthesis around the `.+\.coffee`. This enables Guard::CoffeeScript to place the full path that was matched inside the
115
116
  parenthesis into the proper output directory.
116
117
 
117
- This behaviour can be switched off by passing the option `:shallow => true` to the guard, so that all JavaScripts will be compiled
118
+ This behavior can be switched off by passing the option `:shallow => true` to the guard, so that all JavaScripts will be compiled
118
119
  directly to the output directory.
119
120
 
120
121
  ### Multiple source directories
@@ -145,17 +146,21 @@ which is equivalent to:
145
146
 
146
147
  ## Development
147
148
 
148
- - Source hosted at [GitHub](http://github.com/netzpirat/guard-coffeescript)
149
- - Report issues/Questions/Feature requests on [GitHub Issues](http://github.com/netzpirat/guard-coffeescript/issues)
149
+ - Source hosted at [GitHub](https://github.com/netzpirat/guard-coffeescript)
150
+ - Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/netzpirat/guard-coffeescript/issues)
150
151
 
151
152
  Pull requests are very welcome! Make sure your patches are well tested.
152
153
 
154
+ ## Contributors
155
+
156
+ * [Patrick Ewing](https://github.com/hoverbird)
157
+
153
158
  ## Acknowledgment
154
159
 
155
160
  The [Guard Team](https://github.com/guard/guard/contributors) for giving us such a nice pice of software
156
161
  that is so easy to extend, one *has* to make a plugin for it!
157
162
 
158
- All the authors of the numerous [Guards](http://github.com/guard) avaiable for making the Guard ecosystem
163
+ All the authors of the numerous [Guards](https://github.com/guard) available for making the Guard ecosystem
159
164
  so much growing and comprehensive.
160
165
 
161
166
  ## License
@@ -7,7 +7,6 @@ module Guard
7
7
 
8
8
  autoload :Inspector, 'guard/coffeescript/inspector'
9
9
  autoload :Runner, 'guard/coffeescript/runner'
10
- autoload :Compiler, 'guard/coffeescript/compiler'
11
10
 
12
11
  def initialize(watchers = [], options = {})
13
12
  watchers = [] if !watchers
@@ -15,7 +14,8 @@ module Guard
15
14
 
16
15
  super(watchers, {
17
16
  :bare => false,
18
- :shallow => false
17
+ :shallow => false,
18
+ :hide_success => false,
19
19
  }.merge(options))
20
20
  end
21
21
 
@@ -8,7 +8,7 @@ module Guard
8
8
  def run(files, watchers, options = {})
9
9
  notify_start(files, options)
10
10
  changed_files, errors = compile_files(files, options, watchers)
11
- notify_result(changed_files, errors)
11
+ notify_result(changed_files, errors, options)
12
12
 
13
13
  changed_files
14
14
  rescue ::CoffeeScript::EngineError => e
@@ -74,12 +74,12 @@ module Guard
74
74
  directories
75
75
  end
76
76
 
77
- def notify_result(changed_files, errors)
78
- if errors.empty?
77
+ def notify_result(changed_files, errors, options = {})
78
+ if !errors.empty?
79
+ ::Guard::Notifier.notify(errors.join("\n"), :title => 'CoffeeScript results', :image => :failed)
80
+ elsif !options[:hide_success]
79
81
  message = "Successfully generated #{ changed_files.join(', ') }"
80
82
  ::Guard::Notifier.notify(message, :title => 'CoffeeScript results')
81
- else
82
- ::Guard::Notifier.notify(errors.join("\n"), :title => 'CoffeeScript results', :image => :failed)
83
83
  end
84
84
  end
85
85
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module CoffeeScriptVersion
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-coffeescript
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Kessler
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-04 00:00:00 Z
13
+ date: 2011-05-09 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: guard
@@ -107,9 +107,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements: []
108
108
 
109
109
  rubyforge_project: guard-coffeescript
110
- rubygems_version: 1.7.1
110
+ rubygems_version: 1.7.2
111
111
  signing_key:
112
112
  specification_version: 3
113
113
  summary: Guard gem for CoffeeScript
114
114
  test_files: []
115
115
 
116
+ has_rdoc: