guard-mthaml 0.2.2 → 0.2.3

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: dfb7415b1ef25b25d9bca0c141ea2356874db293
4
- data.tar.gz: 314b133502244389b1ad4a5b3248136a03a8387d
3
+ metadata.gz: bf60a53b3e1903615ea808484bf4214fb84d7093
4
+ data.tar.gz: 53295e37956b12972113146042cc21769626f75b
5
5
  SHA512:
6
- metadata.gz: 9a742106cf67f41927f600076531d6609785639cd01f1b468e37e31f4545fe47fa6da050a2fad98d8ba81358cbcd50e813e89ceca5b983329bcb84c48b48bfcc
7
- data.tar.gz: 0f7366833f2e9badc7f8504749b905d733c5f7a2d18720549405248d386674340e1a584f735def12b3315d7ec5b4f4c0c2ffdc4e55bae00de59d7b86d675c758
6
+ metadata.gz: ec8b9f29917fae1764bd4ee78ea699123106df7b6a323b5399255b0f0fd40dc32a5e99fc5f59a456362a99d3c29e63e30f57e8b19454c9875cae4ff482cbf2d8
7
+ data.tar.gz: 3cc38f1b4d69941b53f75c83d5b333672115ebcdee6e571502b3311b2f53a6862c98ee835beda9d6a5c580b7c5354f24411194fc094fc78f214fabbf60547cbb
@@ -136,6 +136,18 @@ class MtHamlCompiler {
136
136
  self::set_environment();
137
137
  }
138
138
 
139
+ /**
140
+ * Colorize output messages to terminal
141
+ *
142
+ * @param {String} $message
143
+ * @param {String} $color
144
+ *
145
+ * @since 0.2.0
146
+ */
147
+ public static function colorize($message, $color) {
148
+ return "\e[0$color" . "m" . "$message\e[0m";
149
+ }
150
+
139
151
  /**
140
152
  * Runs compiler and writes contents to output file
141
153
  *
@@ -237,18 +249,6 @@ class MtHamlCompiler {
237
249
  throw new \Exception( self::colorize( "It looks like `" . basename( $this->input_file ) . "` compiled without any output.", ";33" ) );
238
250
  }
239
251
  }
240
-
241
- /**
242
- * Colorize output messages to terminal
243
- *
244
- * @param {String} $message
245
- * @param {String} $color
246
- *
247
- * @since 0.2.0
248
- */
249
- private function colorize($message, $color) {
250
- return "\e[0$color" . "m" . "$message\e[0m";
251
- }
252
252
  }
253
253
 
254
254
  /**
@@ -271,5 +271,6 @@ try {
271
271
  ));
272
272
  $compiler->run();
273
273
  } catch ( \Exception $err ) {
274
- exit ( $err->getMessage() . "\n" );
274
+ fwrite( STDERR, "Guard::MtHaml: " . MtHamlCompiler::colorize( $err->getMessage() . "\n", ";31" ) );
275
+ exit(1);
275
276
  }
@@ -1,5 +1,5 @@
1
1
  module ::Guard
2
2
  class MtHamlVersion
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-mthaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse