guard-cucumber 0.5.0 → 0.5.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
@@ -6,21 +6,29 @@ Guard::Cucumber allows you to automatically run Cucumber features when files are
6
6
 
7
7
  Tested on MRI Ruby 1.8.6, 1.8.7, 1.9.2 and the latest versions of JRuby & Rubinius.
8
8
 
9
+ If you have any questions please join us on our [Google group](http://groups.google.com/group/guard-dev) or on `#guard` (irc.freenode.net).
10
+
9
11
  ## Install
10
12
 
11
13
  Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
12
14
 
13
15
  Install the gem:
14
16
 
15
- gem install guard-cucumber
17
+ ```bash
18
+ $ gem install guard-cucumber
19
+ ```
16
20
 
17
21
  Add it to your `Gemfile`, preferably inside the test group:
18
22
 
19
- gem 'guard-cucumber'
23
+ ```ruby
24
+ gem 'guard-cucumber'
25
+ ```
20
26
 
21
27
  Add the default Guard::Cucumber template to your `Guardfile` by running this command:
22
28
 
23
- guard init cucumber
29
+ ```bash
30
+ $ guard init cucumber
31
+ ```
24
32
 
25
33
  ## Usage
26
34
 
@@ -30,11 +38,13 @@ Please read the [Guard usage documentation](https://github.com/guard/guard#readm
30
38
 
31
39
  Guard::Cucumber can be adapted to all kind of projects and comes with a default template that looks like this:
32
40
 
33
- guard 'cucumber' do
34
- watch(%r{features/.+\.feature})
35
- watch(%r{features/support/.+}) { 'features' }
36
- watch(%r{features/step_definitions/(.+)_steps\.rb}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
37
- end
41
+ ```ruby
42
+ guard 'cucumber' do
43
+ watch(%r{^features/.+\.feature$})
44
+ watch(%r{^features/support/.+$}) { 'features' }
45
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
46
+ end
47
+ ```
38
48
 
39
49
  Expressed in plain English, this configuration tells Guard::Cucumber:
40
50
 
@@ -50,38 +60,41 @@ Please read the [Guard documentation](http://github.com/guard/guard#readme) for
50
60
 
51
61
  You can pass any of the standard Cucumber CLI options using the :cli option:
52
62
 
53
- guard 'cucumber', :cli => '-c --drb --port 1234 --profile guard' do
54
- ...
55
- end
63
+ ```ruby
64
+ guard 'cucumber', :cli => '-c --drb --port 1234 --profile guard' do
65
+ end
66
+ ```
56
67
 
57
68
  Former `:color`, `:drb`, `:port` and `:profile` options are thus deprecated and have no effect anymore.
58
69
 
59
70
  ### List of available options
60
71
 
61
- :cli => '--profile guard -c' # Pass arbitrary Cucumber CLI arguments,
62
- # default: '--no-profile --color --format progress --strict'
72
+ ```ruby
73
+ :cli => '--profile guard -c' # Pass arbitrary Cucumber CLI arguments,
74
+ # default: '--no-profile --color --format progress --strict'
63
75
 
64
- :bundler => false # Don't use "bundle exec" to run the Cucumber command
65
- # default: true
76
+ :bundler => false # Don't use "bundle exec" to run the Cucumber command
77
+ # default: true
66
78
 
67
- :rvm => ['1.8.7', '1.9.2'] # Directly run your features on multiple ruby versions
68
- # default: nil
79
+ :rvm => ['1.8.7', '1.9.2'] # Directly run your features on multiple ruby versions
80
+ # default: nil
69
81
 
70
- :notification => false # Don't display Growl (or Libnotify) notification
71
- # default: true
82
+ :notification => false # Don't display Growl (or Libnotify) notification
83
+ # default: true
72
84
 
73
- :all_after_pass => false # Don't run all features after changed features pass
74
- # default: true
85
+ :all_after_pass => false # Don't run all features after changed features pass
86
+ # default: true
75
87
 
76
- :all_on_start => false # Don't run all the features at startup
77
- # default: true
88
+ :all_on_start => false # Don't run all the features at startup
89
+ # default: true
78
90
 
79
- :keep_failed => false # Keep failed features until them pass
80
- # default: true
91
+ :keep_failed => false # Keep failed features until them pass
92
+ # default: true
81
93
 
82
- :change_format => 'pretty' # Use a different cucumber format when running individual features
83
- # This replaces the Cucumber --format option within the :cli option
84
- # default: nil
94
+ :change_format => 'pretty' # Use a different cucumber format when running individual features
95
+ # This replaces the Cucumber --format option within the :cli option
96
+ # default: nil
97
+ ```
85
98
 
86
99
  ## Cucumber configuration
87
100
 
@@ -101,7 +114,9 @@ If you want to configure Cucumber from Guard solely, then you should pass `--no-
101
114
 
102
115
  Since guard-cucumber version 0.3.2, the default `:cli` options are:
103
116
 
104
- --no-profile --color --format progress --strict
117
+ ```ruby
118
+ :cli => '--no-profile --color --format progress --strict'
119
+ ```
105
120
 
106
121
  This default configuration has been chosen to avoid strange behavior when mixing configurations form
107
122
  the cucumber.yml default profile with the guard-cucumber `:cli` option.
@@ -113,42 +128,49 @@ You can safely remove `config/cucumber.yml`, since all configuration is done in
113
128
  If you're using different profiles with Cucumber then you should create a profile for Guard in cucumber.yml,
114
129
  something like this:
115
130
 
116
- guard: --format progress --strict --tags ~@wip
131
+ ```
132
+ guard: --format progress --strict --tags ~@wip
133
+ ```
117
134
 
118
- Now you want to make guard-cucumber use that profile by passing '--profile guard` to the `:cli`.
135
+ Now you want to make guard-cucumber use that profile by passing '--profile guard' to the `:cli`.
119
136
 
120
137
  ## Cucumber with Spork
121
138
 
122
139
  To use Guard::Cucumber with [Spork](https://github.com/timcharper/spork), you should install
123
140
  [Guard::Spork](https://github.com/guard/guard-spork)) and use the following configuration:
124
141
 
125
- guard 'spork' do
126
- watch('config/application.rb')
127
- watch('config/environment.rb')
128
- watch(%r{^config/environments/.*\.rb$})
129
- watch(%r{^config/initializers/.*\.rb$})
130
- watch('spec/spec_helper.rb')
131
- end
132
-
133
- guard 'cucumber', :cli => '--drb --format progress --no-profile' do
134
- watch(%r{features/.+\.feature})
135
- watch(%r{features/support/.+}) { 'features' }
136
- watch(%r{features/step_definitions/(.+)_steps\.rb}) { |m| Dir[File.join("**/#{ m[1] }.feature")][0] || 'features' }
137
- end
142
+ ```ruby
143
+ guard 'spork' do
144
+ watch('config/application.rb')
145
+ watch('config/environment.rb')
146
+ watch(%r{^config/environments/.*\.rb$})
147
+ watch(%r{^config/initializers/.*\.rb$})
148
+ watch('spec/spec_helper.rb')
149
+ end
150
+
151
+ guard 'cucumber', :cli => '--drb --format progress --no-profile' do
152
+ watch(%r{^features/.+\.feature$})
153
+ watch(%r{^features/support/.+$}) { 'features' }
154
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
155
+ end
156
+ ```
138
157
 
139
158
  ## Development
140
159
 
141
160
  - Source hosted at [GitHub](https://github.com/netzpirat/guard-cucumber)
142
- - Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/netzpirat/guard-cucumber/issues)
161
+ - Report issues and feature requests to [GitHub Issues](https://github.com/netzpirat/guard-cucumber/issues)
143
162
 
144
163
  Pull requests are very welcome! Make sure your patches are well tested.
145
164
 
165
+ For questions please join us on our [Google group](http://groups.google.com/group/guard-dev) or on `#guard` (irc.freenode.net).
166
+
146
167
  ## Contributors
147
168
 
148
169
  * [Aleksei Gusev](https://github.com/hron)
149
170
  * [Loren Norman](https://github.com/lorennorman)
150
171
  * [Nicholas A Clark](https://github.com/NickClark)
151
172
  * [Oriol Gual](https://github.com/oriolgual)
173
+ * [Robert Sanders](https://github.com/robertzx)
152
174
 
153
175
  Since guard-cucumber is very close to guard-rspec, some contributions by the following authors have been
154
176
  incorporated into guard-cucumber:
@@ -30,10 +30,14 @@ module Guard
30
30
 
31
31
  @failed_paths = [] if passed
32
32
  @last_failed = !passed
33
+
34
+ passed
33
35
  end
34
36
 
35
37
  def reload
36
38
  @failed_paths = []
39
+
40
+ true
37
41
  end
38
42
 
39
43
  def run_on_change(paths)
@@ -53,6 +57,8 @@ module Guard
53
57
  # track whether the changed feature failed for the next change
54
58
  @last_failed = true
55
59
  end
60
+
61
+ passed
56
62
  end
57
63
 
58
64
  private
@@ -614,7 +614,7 @@ x
614
614
  7
615
615
  run_all
616
616
  i
617
- 60
617
+ 63
618
618
  45
619
619
  0
620
620
  1
@@ -674,6 +674,9 @@ i
674
674
  3
675
675
  38
676
676
  12
677
+ 15
678
+ 20
679
+ 0
677
680
  11
678
681
  I
679
682
  8
@@ -724,7 +727,7 @@ x
724
727
  12
725
728
  @last_failed
726
729
  p
727
- 9
730
+ 11
728
731
  I
729
732
  -1
730
733
  I
@@ -743,6 +746,10 @@ I
743
746
  20
744
747
  I
745
748
  3c
749
+ I
750
+ 22
751
+ I
752
+ 3f
746
753
  x
747
754
  62
748
755
  /Users/michi/Repositories/guard-cucumber/lib/guard/cucumber.rb
@@ -762,11 +769,13 @@ x
762
769
  6
763
770
  reload
764
771
  i
765
- 5
772
+ 7
766
773
  35
767
774
  0
768
775
  38
769
776
  0
777
+ 15
778
+ 2
770
779
  11
771
780
  I
772
781
  1
@@ -783,17 +792,21 @@ x
783
792
  13
784
793
  @failed_paths
785
794
  p
786
- 5
795
+ 7
787
796
  I
788
797
  -1
789
798
  I
790
- 23
799
+ 25
791
800
  I
792
801
  0
793
802
  I
794
- 24
803
+ 26
795
804
  I
796
805
  5
806
+ I
807
+ 28
808
+ I
809
+ 7
797
810
  x
798
811
  62
799
812
  /Users/michi/Repositories/guard-cucumber/lib/guard/cucumber.rb
@@ -810,7 +823,7 @@ x
810
823
  13
811
824
  run_on_change
812
825
  i
813
- 181
826
+ 184
814
827
  39
815
828
  0
816
829
  7
@@ -991,6 +1004,9 @@ i
991
1004
  2
992
1005
  38
993
1006
  21
1007
+ 15
1008
+ 20
1009
+ 2
994
1010
  11
995
1011
  I
996
1012
  a
@@ -1075,49 +1091,53 @@ x
1075
1091
  20
1076
1092
  read_failed_features
1077
1093
  p
1078
- 21
1094
+ 23
1079
1095
  I
1080
1096
  -1
1081
1097
  I
1082
- 27
1098
+ 2b
1083
1099
  I
1084
1100
  0
1085
1101
  I
1086
- 28
1102
+ 2c
1087
1103
  I
1088
1104
  15
1089
1105
  I
1090
- 29
1106
+ 2d
1091
1107
  I
1092
1108
  20
1093
1109
  I
1094
- 2a
1110
+ 2e
1095
1111
  I
1096
1112
  3c
1097
1113
  I
1098
- 2b
1114
+ 2f
1099
1115
  I
1100
1116
  6b
1101
1117
  I
1102
- 2d
1118
+ 31
1103
1119
  I
1104
1120
  6f
1105
1121
  I
1106
- 2f
1122
+ 33
1107
1123
  I
1108
1124
  84
1109
1125
  I
1110
- 31
1126
+ 35
1111
1127
  I
1112
1128
  9b
1113
1129
  I
1114
- 34
1130
+ 38
1115
1131
  I
1116
1132
  b1
1117
1133
  I
1118
- 36
1134
+ 3a
1119
1135
  I
1120
1136
  b5
1137
+ I
1138
+ 3d
1139
+ I
1140
+ b8
1121
1141
  x
1122
1142
  62
1123
1143
  /Users/michi/Repositories/guard-cucumber/lib/guard/cucumber.rb
@@ -1243,31 +1263,31 @@ p
1243
1263
  I
1244
1264
  -1
1245
1265
  I
1246
- 3c
1266
+ 42
1247
1267
  I
1248
1268
  0
1249
1269
  I
1250
- 3d
1270
+ 43
1251
1271
  I
1252
1272
  5
1253
1273
  I
1254
- 3f
1274
+ 45
1255
1275
  I
1256
1276
  10
1257
1277
  I
1258
- 40
1278
+ 46
1259
1279
  I
1260
1280
  25
1261
1281
  I
1262
- 41
1282
+ 47
1263
1283
  I
1264
1284
  30
1265
1285
  I
1266
- 3f
1286
+ 45
1267
1287
  I
1268
1288
  32
1269
1289
  I
1270
- 44
1290
+ 4a
1271
1291
  I
1272
1292
  35
1273
1293
  x
@@ -1483,19 +1503,19 @@ p
1483
1503
  I
1484
1504
  0
1485
1505
  I
1486
- 49
1506
+ 4f
1487
1507
  I
1488
1508
  a
1489
1509
  I
1490
- 4a
1510
+ 50
1491
1511
  I
1492
1512
  2d
1493
1513
  I
1494
- 4b
1514
+ 51
1495
1515
  I
1496
1516
  41
1497
1517
  I
1498
- 4a
1518
+ 50
1499
1519
  I
1500
1520
  43
1501
1521
  x
@@ -1532,19 +1552,19 @@ p
1532
1552
  I
1533
1553
  -1
1534
1554
  I
1535
- 47
1555
+ 4d
1536
1556
  I
1537
1557
  0
1538
1558
  I
1539
- 48
1559
+ 4e
1540
1560
  I
1541
1561
  10
1542
1562
  I
1543
- 49
1563
+ 4f
1544
1564
  I
1545
1565
  18
1546
1566
  I
1547
- 4e
1567
+ 54
1548
1568
  I
1549
1569
  34
1550
1570
  x
@@ -1583,23 +1603,23 @@ I
1583
1603
  I
1584
1604
  42
1585
1605
  I
1586
- 23
1606
+ 25
1587
1607
  I
1588
1608
  50
1589
1609
  I
1590
- 27
1610
+ 2b
1591
1611
  I
1592
1612
  5e
1593
1613
  I
1594
- 3a
1614
+ 40
1595
1615
  I
1596
1616
  62
1597
1617
  I
1598
- 3c
1618
+ 42
1599
1619
  I
1600
1620
  70
1601
1621
  I
1602
- 47
1622
+ 4d
1603
1623
  I
1604
1624
  7e
1605
1625
  x
@@ -1,4 +1,5 @@
1
1
  require 'guard'
2
+ require 'guard/notifier'
2
3
  require 'cucumber/formatter/console'
3
4
  require 'cucumber/formatter/io'
4
5
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module CucumberVersion
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
@@ -152,7 +152,7 @@ x
152
152
  VERSION
153
153
  s
154
154
  5
155
- 0.4.0
155
+ 0.5.0
156
156
  x
157
157
  9
158
158
  const_set
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-cucumber
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.0
5
+ version: 0.5.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-06-10 00:00:00 +02:00
13
+ date: 2011-06-29 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency