guard-phpspec 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 450cb386b75076b8fb4f70ff0c4709b2f6dd48e0
4
- data.tar.gz: eef0b03766b9bba3efe173778c25201ac7963f1e
3
+ metadata.gz: 87ad2be06f3588880baaed357cf39622a841fd75
4
+ data.tar.gz: f14638f811d0e80804aa20af0264b725900e6988
5
5
  SHA512:
6
- metadata.gz: 54c43b54051a0b11b96e919ea3b3237afc7720214e7cb4cf9f246e1460676cb7d05116ed8c09119dee8a1d808cd6c64e59146df12282e0ed296b015f9c9b1c4b
7
- data.tar.gz: afdde536505eaff553e26a5c32ab749f65e964b951e8bed4f6184c61ec5ee75f0c82d178b79d1ff01ec9164b31b8835603f4a78f272574b111f8a340575a0149
6
+ metadata.gz: 20a31b68c7b89e13aabc136b712296f9f1f088e2bd0317dc8c2e0341e7482783331757c280c6cdf7eb420cc9eb405977ccaa14ad0b985699b4a8c6e0c53e9d56
7
+ data.tar.gz: f2d3ba176b98b3ca90b4917df6290000e61902a2f253029b893e7119683dc870fd032f54b8f8c15b977e30557cdb57e0d4909efeb505de989567805473e2f712
@@ -0,0 +1,4 @@
1
+ .idea
2
+ .DS_Store
3
+ .yardoc
4
+ /*.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format doc
File without changes
data/Gemfile ADDED
@@ -0,0 +1 @@
1
+ gemspec
@@ -0,0 +1,54 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ guard-phpspec (1.0.0)
5
+ guard (>= 0.8.8)
6
+ guard-rspec
7
+ rspec
8
+
9
+ GEM
10
+ specs:
11
+ coderay (1.0.9)
12
+ diff-lcs (1.2.4)
13
+ ffi (1.9.0)
14
+ formatador (0.2.4)
15
+ guard (1.8.2)
16
+ formatador (>= 0.2.4)
17
+ listen (>= 1.0.0)
18
+ lumberjack (>= 1.0.2)
19
+ pry (>= 0.9.10)
20
+ thor (>= 0.14.6)
21
+ guard-rspec (3.0.2)
22
+ guard (>= 1.8)
23
+ rspec (~> 2.13)
24
+ listen (1.3.0)
25
+ rb-fsevent (>= 0.9.3)
26
+ rb-inotify (>= 0.9)
27
+ rb-kqueue (>= 0.2)
28
+ lumberjack (1.0.4)
29
+ method_source (0.8.2)
30
+ pry (0.9.12.2)
31
+ coderay (~> 1.0.5)
32
+ method_source (~> 0.8)
33
+ slop (~> 3.4)
34
+ rb-fsevent (0.9.3)
35
+ rb-inotify (0.9.1)
36
+ ffi (>= 0.5.0)
37
+ rb-kqueue (0.2.0)
38
+ ffi (>= 0.5.0)
39
+ rspec (2.14.1)
40
+ rspec-core (~> 2.14.0)
41
+ rspec-expectations (~> 2.14.0)
42
+ rspec-mocks (~> 2.14.0)
43
+ rspec-core (2.14.5)
44
+ rspec-expectations (2.14.2)
45
+ diff-lcs (>= 1.1.3, < 2.0)
46
+ rspec-mocks (2.14.3)
47
+ slop (3.4.6)
48
+ thor (0.18.1)
49
+
50
+ PLATFORMS
51
+ ruby
52
+
53
+ DEPENDENCIES
54
+ guard-phpspec!
@@ -0,0 +1,8 @@
1
+ notification :off
2
+ guard :rspec do
3
+ watch(%r{^.+\.gemspec$})
4
+ watch(%r{^lib/guard/(.+)\.rb$}) { |m| "spec/lib/guard/#{m[1]}_spec.rb" }
5
+ watch(%r{^lib/guard/phpspec/(.+)\.rb$}) { |m| "spec/lib/guard/phpspec/#{m[1]}_spec.rb" }
6
+ watch(%r{^spec/.+_spec\.rb$})
7
+ watch('spec/spec_helper.rb') { "spec" }
8
+ end
@@ -0,0 +1,5 @@
1
+ # guard-phpspec Changelog
2
+
3
+ ## Version 0.0.1 - 2013-08-20
4
+
5
+ * work in progress began
@@ -0,0 +1,127 @@
1
+ # Guard::PHPSpec
2
+
3
+ ## Desc
4
+
5
+ **guard-phpspec** allows you to automatically run [PHPSpec][6] tests when sources
6
+ are modified. It helps with integrating test-driven development (TDD) into
7
+ your development process: Just launch guard-phpspec before you start working
8
+ and it will notify you about the status of your tests!
9
+
10
+ *Note*: Although guard-phpspec should work with any [PHP][7] version [PHPSpec][6] supports,
11
+ it has only been tested on [PHP][7] 5.3.8 and 5.4.4.
12
+
13
+ ## Meta
14
+
15
+ * Isam Machlovi: <http://pwnjutsu.com> **|** <https://github.com/lsd>
16
+ * Source on GitHub: <https://github.com/lsd/guard-phpspec>
17
+ * RubyGems.org Source: <https://rubygems.org/lsd/guard-phpspec>
18
+
19
+ ## Install
20
+
21
+ Please be sure to have [PHP][7], [PHPSpec][6] and [Ruby][1] installed on your machine before
22
+ you proceed with the installation.
23
+
24
+ The latest versions of [Ruby][1] come with a packages-manager called `gem`. `gem` can be used to
25
+ install various packages, including guard-phpspec.
26
+
27
+ To install guard-phpspec using gem, run the following command:
28
+
29
+ `$ gem install guard-phpspec`
30
+
31
+ but I suggest instead using Bundler/Gemfile when possible.
32
+
33
+ Update your Gemfile
34
+
35
+ group :test do
36
+ gem 'guard'
37
+ gem 'guard-phpspec', '1.0.*@dev'
38
+ gem
39
+
40
+ Then create/update the Guardfile to include PHPSpec watcher
41
+
42
+ run `guard init phpspec` or `bundle exec guard init phpspec`
43
+
44
+ This appends initialization of "guard-phpspec" to the Guardfile.
45
+ You can manually update your Guardfile without `guard init phpspec`
46
+
47
+ guard 'phpspec', :tests_path => 'spec', :cli => '--colors' do
48
+ watch(%r{^.+Spec\.php$})
49
+ end
50
+
51
+ ## Validate installation with Guard::PHPSpec's own specs
52
+
53
+
54
+ If you would like to run the specs guard-phpspec comes with:
55
+
56
+ cd `gem phpspec`
57
+ rspec spec
58
+
59
+
60
+ ## Usage
61
+
62
+ Just run `guard` or `bundle exec guard` in the in root working dir (where /specs dir is)
63
+ Please read the [Guard usage documentation][3].
64
+
65
+ ## Guardfile
66
+
67
+ guard-phpspec can be used with any kind of [PHP][7] projects that uses PHPSpec as
68
+ its testing framwork. Please read the [Guard documentation][3] for more information
69
+ about the Guardfile DSL.
70
+
71
+ By default, guard-phpspec will use the current working directory (pwd) to
72
+ search for tests and run them on start (if you enabled the `:all_on_start` option).
73
+
74
+ ### Example PHP project
75
+
76
+ The [PHPSpec documentaion][4] uses the [Object Freezer][5] library as an example on how
77
+ to organize tests. This project uses the `Tests` directory for its tests.
78
+
79
+ An example of the Guardfile for the same project would look
80
+ something like:
81
+
82
+ guard 'phpspec', :tests_path => 'spec', :cli => '--colors' do
83
+ # Watch tests files
84
+ watch(%r{^.+_?[sS]pec\.php$})
85
+
86
+ # Watch library files and run their tests
87
+ watch(%r{^Object/(.+)\.php}) { |m| "Tests/#{m[1]}Spec.php" }
88
+ end
89
+
90
+ ## Options
91
+
92
+ The following options can be passed to Guard::PHPSpec:
93
+
94
+ :all_on_start => false # Run all tests on startup.
95
+ # default: true
96
+
97
+ :all_after_pass => false # Run all tests after changed tests pass. This ensures
98
+ # that the process of making changed tests pass didn't
99
+ # break something else.
100
+ # default: true
101
+
102
+
103
+ :keep_failed => false # Remember failed tests and keep running them with
104
+ # each change until they pass.
105
+ # default: true
106
+
107
+
108
+ :tests_path => 'tests' # Relative path to the tests directory. This path
109
+ # is used when running all the tests.
110
+ # default: the current working directory (pwd)
111
+
112
+
113
+ :cli => '--colors' # The options passed to the phpunit command
114
+ # when running the tests.
115
+ # default: nil
116
+
117
+ ## Development
118
+
119
+ * Source hosted at [GitHub/lsd](https://github.com/lsd/guard-phpspec)
120
+ * Report issues/questions/requests on [GitHub Issues](https://github.com/lsd/guard-phpspec/issues)
121
+
122
+ [1]:http://ruby-lang.org
123
+ [3]:https://github.com/guard/guard#readme
124
+ [4]:http://www.phpunit.de/manual/current/en/
125
+ [5]:https://github.com/sebastianbergmann/php-object-freezer/
126
+ [6]:http://www.phpunit.de
127
+ [7]:http://php.net
@@ -0,0 +1,20 @@
1
+ # vim: syntax=ruby
2
+ load 'tasks/this.rb'
3
+
4
+ This.name = "guard-phpspec"
5
+ This.author = "Isam Machlovi"
6
+ This.email = "zenchloride@gmail.com"
7
+ This.homepage = "http://github.com/lsd/#{ This.name }"
8
+
9
+ This.ruby_gemspec do |spec|
10
+ # spec.add_dependency( 'addressable', '~> 2.3')
11
+ # spec.add_development_dependency( 'rake' , '~> 10.0.3')
12
+ # spec.add_development_dependency( 'minitest' , '~> 4.5.0' )
13
+ # spec.add_development_dependency( 'rdoc' , '~> 3.12' )
14
+ end
15
+
16
+ This.java_gemspec( This.ruby_gemspec ) do |spec|
17
+ # spec.add_dependency( 'spoon', '~> 0.0.1' )
18
+ end
19
+
20
+ load 'tasks/default.rake'
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Guard
8
+
9
+ &mdash; Documentation by YARD 0.8.7
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (G)</a> &raquo;
35
+
36
+
37
+ <span class="title">Guard</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Guard
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/guard/phpspec/runner.rb<span class="defines">,<br />
83
+ lib/guard/phpspec/version.rb,<br /> lib/guard/phpspec/watcher.rb,<br /> lib/guard/phpspec/notifier.rb,<br /> lib/guard/phpspec/inspector.rb,<br /> lib/guard/phpspec/formatter.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Defined Under Namespace</h2>
90
+ <p class="children">
91
+
92
+
93
+
94
+
95
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Guard/PHPSpec.html" title="Guard::PHPSpec (class)">PHPSpec</a></span>
96
+
97
+
98
+ </p>
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ </div>
109
+
110
+ <div id="footer">
111
+ Generated on Sat Aug 24 15:20:45 2013 by
112
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
113
+ 0.8.7 (ruby-2.0.0).
114
+ </div>
115
+
116
+ </body>
117
+ </html>
@@ -0,0 +1,714 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Guard::PHPSpec
8
+
9
+ &mdash; Documentation by YARD 0.8.7
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Guard.html" title="Guard (module)">Guard</a></span></span>
36
+ &raquo;
37
+ <span class="title">PHPSpec</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Guard::PHPSpec
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="../Guard.html" title="Guard (module)">Guard</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="../Guard.html" title="Guard (module)">Guard</a></span></li>
82
+
83
+ <li class="next">Guard::PHPSpec</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/guard/phpspec/runner.rb<span class="defines">,<br />
100
+ lib/guard/phpspec/version.rb,<br /> lib/guard/phpspec/watcher.rb,<br /> lib/guard/phpspec/notifier.rb,<br /> lib/guard/phpspec/inspector.rb,<br /> lib/guard/phpspec/formatter.rb</span>
101
+ </dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Defined Under Namespace</h2>
107
+ <p class="children">
108
+
109
+
110
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="PHPSpec/Formatter.html" title="Guard::PHPSpec::Formatter (module)">Formatter</a></span>, <span class='object_link'><a href="PHPSpec/Inspector.html" title="Guard::PHPSpec::Inspector (module)">Inspector</a></span>, <span class='object_link'><a href="PHPSpec/Notifier.html" title="Guard::PHPSpec::Notifier (module)">Notifier</a></span>, <span class='object_link'><a href="PHPSpec/Runner.html" title="Guard::PHPSpec::Runner (module)">Runner</a></span>
111
+
112
+
113
+
114
+
115
+ </p>
116
+
117
+ <h2>Constant Summary</h2>
118
+
119
+ <dl class="constants">
120
+
121
+ <dt id="VERSION-constant" class="">VERSION =
122
+
123
+ </dt>
124
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>&#39;</span></span></pre></dd>
125
+
126
+ <dt id="DEFAULT_OPTIONS-constant" class="">DEFAULT_OPTIONS =
127
+
128
+ </dt>
129
+ <dd><pre class="code"><span class='lbrace'>{</span>
130
+ <span class='symbol'>:all_on_start</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span>
131
+ <span class='symbol'>:all_after_pass</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span>
132
+ <span class='symbol'>:keep_failed</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span>
133
+ <span class='symbol'>:cli</span> <span class='op'>=&gt;</span> <span class='kw'>nil</span><span class='comma'>,</span>
134
+ <span class='symbol'>:tests_path</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span><span class='embexpr_end'>}</span><span class='tstring_content'>/spec</span><span class='tstring_end'>&quot;</span></span>
135
+ <span class='rbrace'>}</span></pre></dd>
136
+
137
+ </dl>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <h2>
148
+ Instance Method Summary
149
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
150
+ </h2>
151
+
152
+ <ul class="summary">
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (PHPSpec) <strong>initialize</strong>(watchers = [], options = {}) </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+ <span class="note title constructor">constructor</span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'>
174
+ <p>Initialize Guard::PHPSpec.</p>
175
+ </div></span>
176
+
177
+ </li>
178
+
179
+
180
+ <li class="public ">
181
+ <span class="summary_signature">
182
+
183
+ <a href="#run_all-instance_method" title="#run_all (instance method)">- (Object) <strong>run_all</strong>(runner = nil) </a>
184
+
185
+
186
+
187
+ </span>
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <span class="summary_desc"><div class='inline'>
198
+ <p>Gets called when all tests should be run.</p>
199
+ </div></span>
200
+
201
+ </li>
202
+
203
+
204
+ <li class="public ">
205
+ <span class="summary_signature">
206
+
207
+ <a href="#run_on_changes-instance_method" title="#run_on_changes (instance method)">- (Object) <strong>run_on_changes</strong>(paths, runner = nil, inspector = nil) </a>
208
+
209
+
210
+
211
+ </span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="summary_desc"><div class='inline'>
222
+ <p>Gets called when the watched tests have changes.</p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#start-instance_method" title="#start (instance method)">- (Object) <strong>start</strong> </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="summary_desc"><div class='inline'>
246
+ <p>Gets called once when Guard starts.</p>
247
+ </div></span>
248
+
249
+ </li>
250
+
251
+
252
+ </ul>
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <div id="constructor_details" class="method_details_list">
262
+ <h2>Constructor Details</h2>
263
+
264
+ <div class="method_details first">
265
+ <h3 class="signature first" id="initialize-instance_method">
266
+
267
+ - (<tt><span class='object_link'><a href="" title="Guard::PHPSpec (class)">PHPSpec</a></span></tt>) <strong>initialize</strong>(watchers = [], options = {})
268
+
269
+
270
+
271
+
272
+
273
+ </h3><div class="docstring">
274
+ <div class="discussion">
275
+
276
+ <p>Initialize Guard::PHPSpec</p>
277
+
278
+
279
+ </div>
280
+ </div>
281
+ <div class="tags">
282
+ <p class="tag_title">Parameters:</p>
283
+ <ul class="param">
284
+
285
+ <li>
286
+
287
+ <span class='name'>watchers</span>
288
+
289
+
290
+ <span class='type'>(<tt>Array&lt;Guard::Watcher&gt;</tt>)</span>
291
+
292
+
293
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
294
+
295
+
296
+ &mdash;
297
+ <div class='inline'>
298
+ <p>the watchers in the Guard block</p>
299
+ </div>
300
+
301
+ </li>
302
+
303
+ <li>
304
+
305
+ <span class='name'>options</span>
306
+
307
+
308
+ <span class='type'>(<tt>Hash</tt>)</span>
309
+
310
+
311
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
312
+
313
+
314
+ &mdash;
315
+ <div class='inline'>
316
+ <p>the options for the Guard</p>
317
+ </div>
318
+
319
+ </li>
320
+
321
+ </ul>
322
+
323
+
324
+
325
+
326
+
327
+
328
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
329
+ <ul class="option">
330
+
331
+ <li>
332
+ <span class="name">:all_on_start</span>
333
+ <span class="type">(<tt>Boolean</tt>)</span>
334
+ <span class="default">
335
+
336
+ </span>
337
+
338
+ &mdash; <div class='inline'>
339
+ <p>run all tests on start</p>
340
+ </div>
341
+
342
+ </li>
343
+
344
+ <li>
345
+ <span class="name">:all_after_pass</span>
346
+ <span class="type">(<tt>Boolean</tt>)</span>
347
+ <span class="default">
348
+
349
+ </span>
350
+
351
+ &mdash; <div class='inline'>
352
+ <p>run all tests after failed tests pass</p>
353
+ </div>
354
+
355
+ </li>
356
+
357
+ <li>
358
+ <span class="name">:keep_failed</span>
359
+ <span class="type">(<tt>Boolean</tt>)</span>
360
+ <span class="default">
361
+
362
+ </span>
363
+
364
+ &mdash; <div class='inline'>
365
+ <p>remember failed tests or not</p>
366
+ </div>
367
+
368
+ </li>
369
+
370
+ <li>
371
+ <span class="name">:cli</span>
372
+ <span class="type">(<tt>String</tt>)</span>
373
+ <span class="default">
374
+
375
+ </span>
376
+
377
+ &mdash; <div class='inline'>
378
+ <p>The CLI arguments passed to phpspec</p>
379
+ </div>
380
+
381
+ </li>
382
+
383
+ <li>
384
+ <span class="name">:tests_path</span>
385
+ <span class="type">(<tt>String</tt>)</span>
386
+ <span class="default">
387
+
388
+ </span>
389
+
390
+ &mdash; <div class='inline'>
391
+ <p>the path where all tests exist</p>
392
+ </div>
393
+
394
+ </li>
395
+
396
+ </ul>
397
+
398
+
399
+
400
+ </div><table class="source_code">
401
+ <tr>
402
+ <td>
403
+ <pre class="lines">
404
+
405
+
406
+ 29
407
+ 30
408
+ 31
409
+ 32
410
+ 33
411
+ 34
412
+ 35
413
+ 36
414
+ 37
415
+ 38</pre>
416
+ </td>
417
+ <td>
418
+ <pre class="code"><span class="info file"># File 'lib/guard/phpspec/watcher.rb', line 29</span>
419
+
420
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_watchers'>watchers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
421
+ <span class='id identifier rubyid_defaults'>defaults</span> <span class='op'>=</span> <span class='const'>DEFAULT_OPTIONS</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span>
422
+ <span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_defaults'>defaults</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
423
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_watchers'>watchers</span><span class='comma'>,</span> <span class='ivar'>@options</span><span class='rparen'>)</span>
424
+
425
+ <span class='ivar'>@failed_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
426
+ <span class='ivar'>@previous_failed</span> <span class='op'>=</span> <span class='kw'>false</span>
427
+
428
+ <span class='const'>Inspector</span><span class='period'>.</span><span class='id identifier rubyid_tests_path'>tests_path</span> <span class='op'>=</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:tests_path</span><span class='rbracket'>]</span>
429
+ <span class='kw'>end</span></pre>
430
+ </td>
431
+ </tr>
432
+ </table>
433
+ </div>
434
+
435
+ </div>
436
+
437
+
438
+ <div id="instance_method_details" class="method_details_list">
439
+ <h2>Instance Method Details</h2>
440
+
441
+
442
+ <div class="method_details first">
443
+ <h3 class="signature first" id="run_all-instance_method">
444
+
445
+ - (<tt>Object</tt>) <strong>run_all</strong>(runner = nil)
446
+
447
+
448
+
449
+
450
+
451
+ </h3><div class="docstring">
452
+ <div class="discussion">
453
+
454
+ <p>Gets called when all tests should be run.</p>
455
+
456
+
457
+ </div>
458
+ </div>
459
+ <div class="tags">
460
+ <p class="tag_title">Parameters:</p>
461
+ <ul class="param">
462
+
463
+ <li>
464
+
465
+ <span class='name'>runner</span>
466
+
467
+
468
+ <span class='type'>(<tt><span class='object_link'><a href="PHPSpec/Runner.html" title="Guard::PHPSpec::Runner (module)">Runner</a></span></tt>)</span>
469
+
470
+
471
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
472
+
473
+
474
+ &mdash;
475
+ <div class='inline'>
476
+ <p>(nil) The test runner. If nil, Runner is assumed</p>
477
+ </div>
478
+
479
+ </li>
480
+
481
+ </ul>
482
+
483
+ <p class="tag_title">Raises:</p>
484
+ <ul class="raise">
485
+
486
+ <li>
487
+
488
+
489
+ <span class='type'>(<tt>:task_has_failed</tt>)</span>
490
+
491
+
492
+
493
+ &mdash;
494
+ <div class='inline'>
495
+ <p>when stop has failed</p>
496
+ </div>
497
+
498
+ </li>
499
+
500
+ </ul>
501
+
502
+ </div><table class="source_code">
503
+ <tr>
504
+ <td>
505
+ <pre class="lines">
506
+
507
+
508
+ 49
509
+ 50
510
+ 51
511
+ 52
512
+ 53
513
+ 54
514
+ 55
515
+ 56
516
+ 57</pre>
517
+ </td>
518
+ <td>
519
+ <pre class="code"><span class="info file"># File 'lib/guard/phpspec/watcher.rb', line 49</span>
520
+
521
+ <span class='kw'>def</span> <span class='id identifier rubyid_run_all'>run_all</span><span class='lparen'>(</span><span class='id identifier rubyid_runner'>runner</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
522
+ <span class='id identifier rubyid_runner'>runner</span> <span class='op'>||=</span> <span class='const'>Runner</span>
523
+ <span class='id identifier rubyid_success'>success</span> <span class='op'>=</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:tests_path</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
524
+ <span class='symbol'>:message</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Running all tests</span><span class='tstring_end'>&#39;</span></span>
525
+ <span class='rparen'>)</span><span class='rparen'>)</span>
526
+
527
+ <span class='ivar'>@previous_failed</span> <span class='op'>=</span> <span class='op'>!</span><span class='id identifier rubyid_success'>success</span>
528
+ <span class='id identifier rubyid_throw'>throw</span> <span class='symbol'>:task_has_failed</span> <span class='kw'>unless</span> <span class='id identifier rubyid_success'>success</span>
529
+ <span class='kw'>end</span></pre>
530
+ </td>
531
+ </tr>
532
+ </table>
533
+ </div>
534
+
535
+ <div class="method_details ">
536
+ <h3 class="signature " id="run_on_changes-instance_method">
537
+
538
+ - (<tt>Object</tt>) <strong>run_on_changes</strong>(paths, runner = nil, inspector = nil)
539
+
540
+
541
+
542
+
543
+
544
+ </h3><div class="docstring">
545
+ <div class="discussion">
546
+
547
+ <p>Gets called when the watched tests have changes.</p>
548
+
549
+
550
+ </div>
551
+ </div>
552
+ <div class="tags">
553
+ <p class="tag_title">Parameters:</p>
554
+ <ul class="param">
555
+
556
+ <li>
557
+
558
+ <span class='name'>paths</span>
559
+
560
+
561
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
562
+
563
+
564
+
565
+ &mdash;
566
+ <div class='inline'>
567
+ <p>to the changed tests</p>
568
+ </div>
569
+
570
+ </li>
571
+
572
+ <li>
573
+
574
+ <span class='name'>runner</span>
575
+
576
+
577
+ <span class='type'>(<tt><span class='object_link'><a href="PHPSpec/Runner.html" title="Guard::PHPSpec::Runner (module)">Runner</a></span></tt>)</span>
578
+
579
+
580
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
581
+
582
+
583
+ &mdash;
584
+ <div class='inline'>
585
+ <p>(nil) The test runner. If nil, Runner is assumed</p>
586
+ </div>
587
+
588
+ </li>
589
+
590
+ </ul>
591
+
592
+ <p class="tag_title">Raises:</p>
593
+ <ul class="raise">
594
+
595
+ <li>
596
+
597
+
598
+ <span class='type'>(<tt>:task_has_failed</tt>)</span>
599
+
600
+
601
+
602
+ &mdash;
603
+ <div class='inline'>
604
+ <p>when stop has failed</p>
605
+ </div>
606
+
607
+ </li>
608
+
609
+ </ul>
610
+
611
+ </div><table class="source_code">
612
+ <tr>
613
+ <td>
614
+ <pre class="lines">
615
+
616
+
617
+ 63
618
+ 64
619
+ 65
620
+ 66
621
+ 67
622
+ 68
623
+ 69
624
+ 70
625
+ 71</pre>
626
+ </td>
627
+ <td>
628
+ <pre class="code"><span class="info file"># File 'lib/guard/phpspec/watcher.rb', line 63</span>
629
+
630
+ <span class='kw'>def</span> <span class='id identifier rubyid_run_on_changes'>run_on_changes</span><span class='lparen'>(</span><span class='id identifier rubyid_paths'>paths</span><span class='comma'>,</span> <span class='id identifier rubyid_runner'>runner</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_inspector'>inspector</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
631
+ <span class='id identifier rubyid_runner'>runner</span> <span class='op'>||=</span> <span class='const'>Runner</span>
632
+ <span class='id identifier rubyid_inspector'>inspector</span> <span class='op'>||=</span> <span class='const'>Inspector</span>
633
+ <span class='id identifier rubyid_paths'>paths</span> <span class='op'>=</span> <span class='id identifier rubyid_inspector'>inspector</span><span class='period'>.</span><span class='id identifier rubyid_clean'>clean</span><span class='lparen'>(</span><span class='id identifier rubyid_paths'>paths</span> <span class='op'>+</span> <span class='ivar'>@failed_paths</span><span class='rparen'>)</span>
634
+ <span class='id identifier rubyid_success'>success</span> <span class='op'>=</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_paths'>paths</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
635
+ <span class='id identifier rubyid_update_failed_paths'>update_failed_paths</span><span class='lparen'>(</span><span class='id identifier rubyid_success'>success</span><span class='comma'>,</span> <span class='id identifier rubyid_paths'>paths</span><span class='rparen'>)</span>
636
+ <span class='id identifier rubyid_run_all_after_pass'>run_all_after_pass</span><span class='lparen'>(</span><span class='id identifier rubyid_success'>success</span><span class='rparen'>)</span>
637
+ <span class='id identifier rubyid_throw'>throw</span> <span class='symbol'>:task_has_failed</span> <span class='kw'>unless</span> <span class='id identifier rubyid_success'>success</span>
638
+ <span class='kw'>end</span></pre>
639
+ </td>
640
+ </tr>
641
+ </table>
642
+ </div>
643
+
644
+ <div class="method_details ">
645
+ <h3 class="signature " id="start-instance_method">
646
+
647
+ - (<tt>Object</tt>) <strong>start</strong>
648
+
649
+
650
+
651
+
652
+
653
+ </h3><div class="docstring">
654
+ <div class="discussion">
655
+
656
+ <p>Gets called once when Guard starts.</p>
657
+
658
+
659
+ </div>
660
+ </div>
661
+ <div class="tags">
662
+
663
+ <p class="tag_title">Raises:</p>
664
+ <ul class="raise">
665
+
666
+ <li>
667
+
668
+
669
+ <span class='type'>(<tt>:task_has_failed</tt>)</span>
670
+
671
+
672
+
673
+ &mdash;
674
+ <div class='inline'>
675
+ <p>when stop has failed</p>
676
+ </div>
677
+
678
+ </li>
679
+
680
+ </ul>
681
+
682
+ </div><table class="source_code">
683
+ <tr>
684
+ <td>
685
+ <pre class="lines">
686
+
687
+
688
+ 42
689
+ 43
690
+ 44</pre>
691
+ </td>
692
+ <td>
693
+ <pre class="code"><span class="info file"># File 'lib/guard/phpspec/watcher.rb', line 42</span>
694
+
695
+ <span class='kw'>def</span> <span class='id identifier rubyid_start'>start</span>
696
+ <span class='id identifier rubyid_run_all'>run_all</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:all_on_start</span><span class='rbracket'>]</span>
697
+ <span class='kw'>end</span></pre>
698
+ </td>
699
+ </tr>
700
+ </table>
701
+ </div>
702
+
703
+ </div>
704
+
705
+ </div>
706
+
707
+ <div id="footer">
708
+ Generated on Sat Aug 24 15:20:45 2013 by
709
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
710
+ 0.8.7 (ruby-2.0.0).
711
+ </div>
712
+
713
+ </body>
714
+ </html>