guard-coffeescript 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -2
- data/lib/guard/coffeescript.rb +2 -1
- data/lib/guard/coffeescript.rbc +71 -50
- data/lib/guard/coffeescript/formatter.rb +29 -0
- data/lib/guard/coffeescript/formatter.rbc +904 -0
- data/lib/guard/coffeescript/runner.rb +9 -9
- data/lib/guard/coffeescript/runner.rbc +89 -102
- data/lib/guard/coffeescript/version.rb +1 -1
- data/lib/guard/coffeescript/version.rbc +1 -1
- metadata +4 -2
@@ -11,15 +11,15 @@ module Guard
|
|
11
11
|
notify_result(changed_files, errors, options)
|
12
12
|
|
13
13
|
changed_files
|
14
|
-
rescue ::
|
15
|
-
|
14
|
+
rescue ExecJS::RuntimeError => e
|
15
|
+
Formatter.error("ExecJS engine error: " + e.message)
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def notify_start(files, options)
|
21
21
|
message = options[:message] || "Compile #{ files.join(', ') }"
|
22
|
-
|
22
|
+
Formatter.info(message, :reset => true)
|
23
23
|
end
|
24
24
|
|
25
25
|
def compile_files(files, options, watchers)
|
@@ -32,10 +32,10 @@ module Guard
|
|
32
32
|
begin
|
33
33
|
content = compile(file, options)
|
34
34
|
changed_files << process_compile_result(content, file, directory)
|
35
|
-
rescue ::
|
36
|
-
error_message = file + ': ' + e.message
|
35
|
+
rescue ExecJS::ProgramError => e
|
36
|
+
error_message = file + ': ' + e.message.to_s
|
37
37
|
errors << error_message
|
38
|
-
|
38
|
+
Formatter.error(error_message)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -76,11 +76,11 @@ module Guard
|
|
76
76
|
|
77
77
|
def notify_result(changed_files, errors, options = {})
|
78
78
|
if !errors.empty?
|
79
|
-
|
79
|
+
Formatter.notify(errors.join("\n"), :title => 'CoffeeScript results', :image => :failed)
|
80
80
|
elsif !options[:hide_success]
|
81
81
|
message = "Successfully generated #{ changed_files.join(', ') }"
|
82
|
-
|
83
|
-
|
82
|
+
Formatter.success(message)
|
83
|
+
Formatter.notify(message, :title => 'CoffeeScript results')
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
@@ -377,7 +377,7 @@ x
|
|
377
377
|
3
|
378
378
|
run
|
379
379
|
i
|
380
|
-
|
380
|
+
123
|
381
381
|
23
|
382
382
|
2
|
383
383
|
10
|
@@ -448,52 +448,50 @@ i
|
|
448
448
|
3
|
449
449
|
30
|
450
450
|
8
|
451
|
-
|
451
|
+
119
|
452
452
|
26
|
453
453
|
93
|
454
454
|
1
|
455
455
|
15
|
456
456
|
24
|
457
457
|
13
|
458
|
-
|
459
|
-
43
|
458
|
+
45
|
460
459
|
5
|
461
|
-
43
|
462
460
|
6
|
461
|
+
43
|
462
|
+
7
|
463
463
|
12
|
464
464
|
49
|
465
|
-
|
465
|
+
8
|
466
466
|
1
|
467
467
|
10
|
468
468
|
90
|
469
469
|
8
|
470
|
-
|
470
|
+
114
|
471
471
|
15
|
472
472
|
24
|
473
473
|
19
|
474
474
|
5
|
475
475
|
15
|
476
|
-
|
477
|
-
43
|
478
|
-
8
|
479
|
-
43
|
476
|
+
45
|
480
477
|
9
|
481
|
-
7
|
482
478
|
10
|
479
|
+
7
|
480
|
+
11
|
483
481
|
64
|
484
482
|
20
|
485
483
|
5
|
486
484
|
49
|
487
|
-
|
485
|
+
12
|
488
486
|
0
|
489
487
|
81
|
490
|
-
12
|
491
|
-
49
|
492
488
|
13
|
489
|
+
49
|
490
|
+
14
|
493
491
|
1
|
494
492
|
25
|
495
493
|
8
|
496
|
-
|
494
|
+
119
|
497
495
|
15
|
498
496
|
92
|
499
497
|
1
|
@@ -513,7 +511,7 @@ I
|
|
513
511
|
3
|
514
512
|
n
|
515
513
|
p
|
516
|
-
|
514
|
+
15
|
517
515
|
x
|
518
516
|
4
|
519
517
|
Hash
|
@@ -530,23 +528,22 @@ x
|
|
530
528
|
13
|
531
529
|
notify_result
|
532
530
|
x
|
533
|
-
|
534
|
-
|
531
|
+
6
|
532
|
+
ExecJS
|
533
|
+
n
|
535
534
|
x
|
536
|
-
|
537
|
-
|
535
|
+
12
|
536
|
+
RuntimeError
|
538
537
|
x
|
539
538
|
3
|
540
539
|
===
|
541
540
|
x
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
2
|
546
|
-
UI
|
541
|
+
9
|
542
|
+
Formatter
|
543
|
+
n
|
547
544
|
s
|
548
|
-
|
549
|
-
|
545
|
+
21
|
546
|
+
ExecJS engine error:
|
550
547
|
x
|
551
548
|
7
|
552
549
|
message
|
@@ -595,7 +592,7 @@ I
|
|
595
592
|
I
|
596
593
|
f
|
597
594
|
I
|
598
|
-
|
595
|
+
7b
|
599
596
|
x
|
600
597
|
77
|
601
598
|
/Users/michi/Repositories/guard-coffeescript/lib/guard/coffeescript/runner.rb
|
@@ -639,7 +636,7 @@ x
|
|
639
636
|
12
|
640
637
|
notify_start
|
641
638
|
i
|
642
|
-
|
639
|
+
53
|
643
640
|
20
|
644
641
|
1
|
645
642
|
7
|
@@ -669,10 +666,8 @@ i
|
|
669
666
|
19
|
670
667
|
2
|
671
668
|
15
|
672
|
-
|
673
|
-
43
|
669
|
+
45
|
674
670
|
6
|
675
|
-
43
|
676
671
|
7
|
677
672
|
20
|
678
673
|
2
|
@@ -725,11 +720,9 @@ x
|
|
725
720
|
4
|
726
721
|
to_s
|
727
722
|
x
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
2
|
732
|
-
UI
|
723
|
+
9
|
724
|
+
Formatter
|
725
|
+
n
|
733
726
|
x
|
734
727
|
4
|
735
728
|
Hash
|
@@ -760,7 +753,7 @@ I
|
|
760
753
|
I
|
761
754
|
16
|
762
755
|
I
|
763
|
-
|
756
|
+
35
|
764
757
|
x
|
765
758
|
77
|
766
759
|
/Users/michi/Repositories/guard-coffeescript/lib/guard/coffeescript/runner.rb
|
@@ -899,7 +892,7 @@ x
|
|
899
892
|
13
|
900
893
|
compile_files
|
901
894
|
i
|
902
|
-
|
895
|
+
118
|
903
896
|
57
|
904
897
|
19
|
905
898
|
0
|
@@ -944,26 +937,26 @@ i
|
|
944
937
|
1
|
945
938
|
30
|
946
939
|
8
|
947
|
-
|
940
|
+
114
|
948
941
|
26
|
949
942
|
93
|
950
943
|
1
|
951
944
|
15
|
952
945
|
24
|
953
946
|
13
|
954
|
-
|
955
|
-
43
|
947
|
+
45
|
956
948
|
3
|
957
|
-
43
|
958
949
|
4
|
950
|
+
43
|
951
|
+
5
|
959
952
|
12
|
960
953
|
49
|
961
|
-
|
954
|
+
6
|
962
955
|
1
|
963
956
|
10
|
964
957
|
64
|
965
958
|
8
|
966
|
-
|
959
|
+
109
|
967
960
|
15
|
968
961
|
24
|
969
962
|
19
|
@@ -972,17 +965,20 @@ i
|
|
972
965
|
20
|
973
966
|
0
|
974
967
|
7
|
975
|
-
|
968
|
+
7
|
976
969
|
64
|
977
970
|
81
|
978
|
-
|
971
|
+
8
|
979
972
|
20
|
980
973
|
2
|
981
974
|
49
|
982
|
-
|
975
|
+
9
|
976
|
+
0
|
977
|
+
49
|
978
|
+
10
|
983
979
|
0
|
984
980
|
81
|
985
|
-
|
981
|
+
8
|
986
982
|
19
|
987
983
|
3
|
988
984
|
15
|
@@ -995,19 +991,17 @@ i
|
|
995
991
|
2
|
996
992
|
1
|
997
993
|
15
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
43
|
1002
|
-
10
|
994
|
+
45
|
995
|
+
11
|
996
|
+
12
|
1003
997
|
20
|
1004
998
|
3
|
1005
999
|
49
|
1006
|
-
|
1000
|
+
13
|
1007
1001
|
1
|
1008
1002
|
25
|
1009
1003
|
8
|
1010
|
-
|
1004
|
+
114
|
1011
1005
|
15
|
1012
1006
|
92
|
1013
1007
|
1
|
@@ -1027,7 +1021,7 @@ I
|
|
1027
1021
|
1
|
1028
1022
|
n
|
1029
1023
|
p
|
1030
|
-
|
1024
|
+
14
|
1031
1025
|
x
|
1032
1026
|
7
|
1033
1027
|
compile
|
@@ -1038,11 +1032,12 @@ x
|
|
1038
1032
|
2
|
1039
1033
|
<<
|
1040
1034
|
x
|
1041
|
-
|
1042
|
-
|
1035
|
+
6
|
1036
|
+
ExecJS
|
1037
|
+
n
|
1043
1038
|
x
|
1044
|
-
|
1045
|
-
|
1039
|
+
12
|
1040
|
+
ProgramError
|
1046
1041
|
x
|
1047
1042
|
3
|
1048
1043
|
===
|
@@ -1056,11 +1051,12 @@ x
|
|
1056
1051
|
7
|
1057
1052
|
message
|
1058
1053
|
x
|
1059
|
-
|
1060
|
-
|
1054
|
+
4
|
1055
|
+
to_s
|
1061
1056
|
x
|
1062
|
-
|
1063
|
-
|
1057
|
+
9
|
1058
|
+
Formatter
|
1059
|
+
n
|
1064
1060
|
x
|
1065
1061
|
5
|
1066
1062
|
error
|
@@ -1095,15 +1091,15 @@ I
|
|
1095
1091
|
I
|
1096
1092
|
24
|
1097
1093
|
I
|
1098
|
-
|
1094
|
+
59
|
1099
1095
|
I
|
1100
1096
|
25
|
1101
1097
|
I
|
1102
|
-
|
1098
|
+
62
|
1103
1099
|
I
|
1104
1100
|
26
|
1105
1101
|
I
|
1106
|
-
|
1102
|
+
76
|
1107
1103
|
x
|
1108
1104
|
77
|
1109
1105
|
/Users/michi/Repositories/guard-coffeescript/lib/guard/coffeescript/runner.rb
|
@@ -1964,7 +1960,7 @@ x
|
|
1964
1960
|
13
|
1965
1961
|
notify_result
|
1966
1962
|
i
|
1967
|
-
|
1963
|
+
134
|
1968
1964
|
23
|
1969
1965
|
2
|
1970
1966
|
10
|
@@ -1985,7 +1981,7 @@ i
|
|
1985
1981
|
2
|
1986
1982
|
0
|
1987
1983
|
9
|
1988
|
-
|
1984
|
+
93
|
1989
1985
|
20
|
1990
1986
|
2
|
1991
1987
|
7
|
@@ -2000,7 +1996,7 @@ i
|
|
2000
1996
|
34
|
2001
1997
|
3
|
2002
1998
|
9
|
2003
|
-
|
1999
|
+
90
|
2004
2000
|
7
|
2005
2001
|
5
|
2006
2002
|
20
|
@@ -2019,10 +2015,8 @@ i
|
|
2019
2015
|
19
|
2020
2016
|
3
|
2021
2017
|
15
|
2022
|
-
|
2023
|
-
43
|
2018
|
+
45
|
2024
2019
|
9
|
2025
|
-
43
|
2026
2020
|
10
|
2027
2021
|
20
|
2028
2022
|
3
|
@@ -2030,10 +2024,8 @@ i
|
|
2030
2024
|
11
|
2031
2025
|
1
|
2032
2026
|
15
|
2033
|
-
|
2034
|
-
43
|
2027
|
+
45
|
2035
2028
|
9
|
2036
|
-
43
|
2037
2029
|
12
|
2038
2030
|
20
|
2039
2031
|
3
|
@@ -2058,19 +2050,17 @@ i
|
|
2058
2050
|
16
|
2059
2051
|
2
|
2060
2052
|
8
|
2061
|
-
|
2053
|
+
91
|
2062
2054
|
1
|
2063
2055
|
8
|
2064
|
-
|
2065
|
-
|
2066
|
-
43
|
2056
|
+
133
|
2057
|
+
45
|
2067
2058
|
9
|
2068
|
-
|
2069
|
-
12
|
2059
|
+
17
|
2070
2060
|
20
|
2071
2061
|
1
|
2072
2062
|
7
|
2073
|
-
|
2063
|
+
18
|
2074
2064
|
64
|
2075
2065
|
49
|
2076
2066
|
7
|
@@ -2094,9 +2084,9 @@ i
|
|
2094
2084
|
15
|
2095
2085
|
13
|
2096
2086
|
7
|
2097
|
-
18
|
2098
|
-
7
|
2099
2087
|
19
|
2088
|
+
7
|
2089
|
+
20
|
2100
2090
|
49
|
2101
2091
|
15
|
2102
2092
|
2
|
@@ -2115,7 +2105,7 @@ I
|
|
2115
2105
|
3
|
2116
2106
|
n
|
2117
2107
|
p
|
2118
|
-
|
2108
|
+
21
|
2119
2109
|
x
|
2120
2110
|
4
|
2121
2111
|
Hash
|
@@ -2144,17 +2134,13 @@ x
|
|
2144
2134
|
4
|
2145
2135
|
to_s
|
2146
2136
|
x
|
2147
|
-
|
2148
|
-
|
2149
|
-
|
2150
|
-
2
|
2151
|
-
UI
|
2152
|
-
x
|
2153
|
-
4
|
2154
|
-
info
|
2137
|
+
9
|
2138
|
+
Formatter
|
2139
|
+
n
|
2155
2140
|
x
|
2156
|
-
|
2157
|
-
|
2141
|
+
7
|
2142
|
+
success
|
2143
|
+
n
|
2158
2144
|
x
|
2159
2145
|
5
|
2160
2146
|
title
|
@@ -2167,6 +2153,7 @@ x
|
|
2167
2153
|
x
|
2168
2154
|
6
|
2169
2155
|
notify
|
2156
|
+
n
|
2170
2157
|
s
|
2171
2158
|
1
|
2172
2159
|
|
@@ -2200,19 +2187,19 @@ I
|
|
2200
2187
|
I
|
2201
2188
|
52
|
2202
2189
|
I
|
2203
|
-
|
2190
|
+
3f
|
2204
2191
|
I
|
2205
2192
|
53
|
2206
2193
|
I
|
2207
|
-
|
2194
|
+
5a
|
2208
2195
|
I
|
2209
2196
|
50
|
2210
2197
|
I
|
2211
|
-
|
2198
|
+
5d
|
2212
2199
|
I
|
2213
2200
|
4f
|
2214
2201
|
I
|
2215
|
-
|
2202
|
+
86
|
2216
2203
|
x
|
2217
2204
|
77
|
2218
2205
|
/Users/michi/Repositories/guard-coffeescript/lib/guard/coffeescript/runner.rb
|