MenuDietetico_alu0100825510 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/MenuDietetico.gemspec +34 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/CODE_OF_CONDUCT_md.html +195 -0
- data/doc/Gemfile.html +100 -0
- data/doc/Gemfile_lock.html +182 -0
- data/doc/Guardfile.html +180 -0
- data/doc/LICENSE_txt.html +117 -0
- data/doc/List.html +532 -0
- data/doc/Menu.html +645 -0
- data/doc/MenuAlimentos.html +231 -0
- data/doc/MenuDietetico.html +109 -0
- data/doc/MenuDietetico_gemspec.html +135 -0
- data/doc/MenuEdad.html +231 -0
- data/doc/Object.html +116 -0
- data/doc/Plato.html +247 -0
- data/doc/README_md.html +164 -0
- data/doc/Rakefile.html +101 -0
- data/doc/bin/setup.html +101 -0
- data/doc/created.rid +19 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +117 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +5 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +237 -0
- data/lib/MenuDietetico.rb +7 -0
- data/lib/MenuDietetico/lista.rb +139 -0
- data/lib/MenuDietetico/menu.rb +145 -0
- data/lib/MenuDietetico/menu_dsl.rb +85 -0
- data/lib/MenuDietetico/version.rb +3 -0
- metadata +206 -0
data/doc/Gemfile.html
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Gemfile - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="project-metadata">
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
58
|
+
|
59
|
+
<ul class="link-list">
|
60
|
+
|
61
|
+
<li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
62
|
+
|
63
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
64
|
+
|
65
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
66
|
+
|
67
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
68
|
+
|
69
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
70
|
+
|
71
|
+
<li><a href="./MenuDietetico_gemspec.html">MenuDietetico.gemspec</a>
|
72
|
+
|
73
|
+
<li><a href="./README_md.html">README</a>
|
74
|
+
|
75
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
76
|
+
|
77
|
+
<li><a href="./bin/setup.html">setup</a>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-label="Page Gemfile">
|
86
|
+
|
87
|
+
<p>source '<a href="https://rubygems.org">rubygems.org</a>'</p>
|
88
|
+
|
89
|
+
<p># Specify your gem's dependencies in <a
|
90
|
+
href="MenuDietetico_gemspec.html">MenuDietetico.gemspec</a> gemspec</p>
|
91
|
+
</main>
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<footer id="validator-badges" role="contentinfo">
|
96
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
97
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
98
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
99
|
+
</footer>
|
100
|
+
|
@@ -0,0 +1,182 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Gemfile.lock - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="project-metadata">
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
58
|
+
|
59
|
+
<ul class="link-list">
|
60
|
+
|
61
|
+
<li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
62
|
+
|
63
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
64
|
+
|
65
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
66
|
+
|
67
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
68
|
+
|
69
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
70
|
+
|
71
|
+
<li><a href="./MenuDietetico_gemspec.html">MenuDietetico.gemspec</a>
|
72
|
+
|
73
|
+
<li><a href="./README_md.html">README</a>
|
74
|
+
|
75
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
76
|
+
|
77
|
+
<li><a href="./bin/setup.html">setup</a>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-label="Page Gemfile.lock">
|
86
|
+
|
87
|
+
<p>PATH</p>
|
88
|
+
|
89
|
+
<pre>remote: .
|
90
|
+
specs:
|
91
|
+
MenuDietetico (0.1.0)</pre>
|
92
|
+
|
93
|
+
<p>GEM</p>
|
94
|
+
|
95
|
+
<pre>remote: https://rubygems.org/
|
96
|
+
specs:
|
97
|
+
coderay (1.1.1)
|
98
|
+
diff-lcs (1.2.5)
|
99
|
+
ffi (1.9.14)
|
100
|
+
formatador (0.2.5)
|
101
|
+
guard (2.14.0)
|
102
|
+
formatador (>= 0.2.4)
|
103
|
+
listen (>= 2.7, < 4.0)
|
104
|
+
lumberjack (~> 1.0)
|
105
|
+
nenv (~> 0.1)
|
106
|
+
notiffany (~> 0.0)
|
107
|
+
pry (>= 0.9.12)
|
108
|
+
shellany (~> 0.0)
|
109
|
+
thor (>= 0.18.1)
|
110
|
+
guard-bundler (2.1.0)
|
111
|
+
bundler (~> 1.0)
|
112
|
+
guard (~> 2.2)
|
113
|
+
guard-compat (~> 1.1)
|
114
|
+
guard-compat (1.2.1)
|
115
|
+
guard-rspec (4.7.3)
|
116
|
+
guard (~> 2.1)
|
117
|
+
guard-compat (~> 1.1)
|
118
|
+
rspec (>= 2.99.0, < 4.0)
|
119
|
+
listen (3.1.5)
|
120
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
121
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
122
|
+
ruby_dep (~> 1.2)
|
123
|
+
lumberjack (1.0.10)
|
124
|
+
method_source (0.8.2)
|
125
|
+
nenv (0.3.0)
|
126
|
+
notiffany (0.1.1)
|
127
|
+
nenv (~> 0.1)
|
128
|
+
shellany (~> 0.0)
|
129
|
+
pry (0.10.4)
|
130
|
+
coderay (~> 1.1.0)
|
131
|
+
method_source (~> 0.8.1)
|
132
|
+
slop (~> 3.4)
|
133
|
+
rake (10.5.0)
|
134
|
+
rb-fsevent (0.9.8)
|
135
|
+
rb-inotify (0.9.7)
|
136
|
+
ffi (>= 0.5.0)
|
137
|
+
rspec (3.5.0)
|
138
|
+
rspec-core (~> 3.5.0)
|
139
|
+
rspec-expectations (~> 3.5.0)
|
140
|
+
rspec-mocks (~> 3.5.0)
|
141
|
+
rspec-core (3.5.4)
|
142
|
+
rspec-support (~> 3.5.0)
|
143
|
+
rspec-expectations (3.5.0)
|
144
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
145
|
+
rspec-support (~> 3.5.0)
|
146
|
+
rspec-mocks (3.5.0)
|
147
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
148
|
+
rspec-support (~> 3.5.0)
|
149
|
+
rspec-support (3.5.0)
|
150
|
+
ruby_dep (1.5.0)
|
151
|
+
shellany (0.0.1)
|
152
|
+
slop (3.6.0)
|
153
|
+
thor (0.19.1)</pre>
|
154
|
+
|
155
|
+
<p>PLATFORMS</p>
|
156
|
+
|
157
|
+
<pre class="ruby"><span class="ruby-identifier">ruby</span>
|
158
|
+
</pre>
|
159
|
+
|
160
|
+
<p>DEPENDENCIES</p>
|
161
|
+
|
162
|
+
<pre>MenuDietetico!
|
163
|
+
bundler (~> 1.13)
|
164
|
+
guard
|
165
|
+
guard-bundler
|
166
|
+
guard-rspec
|
167
|
+
rake (~> 10.0)
|
168
|
+
rspec (~> 3.0)</pre>
|
169
|
+
|
170
|
+
<p>BUNDLED WITH</p>
|
171
|
+
|
172
|
+
<pre>1.13.6</pre>
|
173
|
+
</main>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<footer id="validator-badges" role="contentinfo">
|
178
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
179
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
180
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
181
|
+
</footer>
|
182
|
+
|
data/doc/Guardfile.html
ADDED
@@ -0,0 +1,180 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Guardfile - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="project-metadata">
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
58
|
+
|
59
|
+
<ul class="link-list">
|
60
|
+
|
61
|
+
<li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
62
|
+
|
63
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
64
|
+
|
65
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
66
|
+
|
67
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
68
|
+
|
69
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
70
|
+
|
71
|
+
<li><a href="./MenuDietetico_gemspec.html">MenuDietetico.gemspec</a>
|
72
|
+
|
73
|
+
<li><a href="./README_md.html">README</a>
|
74
|
+
|
75
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
76
|
+
|
77
|
+
<li><a href="./bin/setup.html">setup</a>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-label="Page Guardfile">
|
86
|
+
|
87
|
+
<p># A sample <a href="Guardfile.html">Guardfile</a> # More info at <a
|
88
|
+
href="https://github.com/guard/guard#readme">github.com/guard/guard#readme</a></p>
|
89
|
+
|
90
|
+
<p>## Uncomment and set this to only include directories you want to watch #
|
91
|
+
directories %w(app lib config test spec features) \ # .select{|d|
|
92
|
+
Dir.exists?(d) ? d : UI.warning(“Directory #{d} does not exist”)}</p>
|
93
|
+
|
94
|
+
<p>## Note: if you are using the `directories` clause above and you are not ##
|
95
|
+
watching the project directory ('.'), then you will want to move ##
|
96
|
+
the <a href="Guardfile.html">Guardfile</a> to a watched dir and symlink it
|
97
|
+
back, e.g. # # $ mkdir config # $ mv <a
|
98
|
+
href="Guardfile.html">Guardfile</a> config/ # $ ln -s config/Guardfile . #
|
99
|
+
# and, you'll have to watch “config/Guardfile” instead of “Guardfile”</p>
|
100
|
+
|
101
|
+
<p>guard :bundler do</p>
|
102
|
+
|
103
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler'</span>
|
104
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler/verify'</span>
|
105
|
+
<span class="ruby-identifier">helper</span> = <span class="ruby-constant">Guard</span><span class="ruby-operator">::</span><span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Verify</span>.<span class="ruby-identifier">new</span>
|
106
|
+
|
107
|
+
<span class="ruby-identifier">files</span> = [<span class="ruby-string">'Gemfile'</span>]
|
108
|
+
<span class="ruby-identifier">files</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Dir</span>[<span class="ruby-string">'*.gemspec'</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">helper</span>.<span class="ruby-identifier">uses_gemspec?</span>(<span class="ruby-identifier">f</span>) }
|
109
|
+
|
110
|
+
<span class="ruby-comment"># Assume files are symlinked from somewhere</span>
|
111
|
+
<span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">watch</span>(<span class="ruby-identifier">helper</span>.<span class="ruby-identifier">real_path</span>(<span class="ruby-identifier">file</span>)) }
|
112
|
+
</pre>
|
113
|
+
|
114
|
+
<p>end</p>
|
115
|
+
|
116
|
+
<p># Note: The cmd option is now required due to the increasing number of ways
|
117
|
+
# rspec may be run, below are examples of the most common uses. # *
|
118
|
+
bundler: 'bundle exec rspec' # * bundler binstubs:
|
119
|
+
'bin/rspec' # * spring: 'bin/rspec' (This will use spring
|
120
|
+
if running and you have # installed the spring
|
121
|
+
binstubs per the docs) # * zeus: 'zeus rspec' (requires the server
|
122
|
+
to be started separately) # * 'just' rspec: 'rspec'</p>
|
123
|
+
|
124
|
+
<p>guard :rspec, cmd: “bundle exec rspec” do</p>
|
125
|
+
|
126
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">"guard/rspec/dsl"</span>
|
127
|
+
<span class="ruby-identifier">dsl</span> = <span class="ruby-constant">Guard</span><span class="ruby-operator">::</span><span class="ruby-constant">RSpec</span><span class="ruby-operator">::</span><span class="ruby-constant">Dsl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>)
|
128
|
+
|
129
|
+
<span class="ruby-comment"># Feel free to open issues for suggestions and improvements</span>
|
130
|
+
|
131
|
+
<span class="ruby-comment"># RSpec files</span>
|
132
|
+
<span class="ruby-identifier">rspec</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rspec</span>
|
133
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_helper</span>) { <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
134
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_support</span>) { <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
135
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_files</span>)
|
136
|
+
|
137
|
+
<span class="ruby-comment"># Ruby files</span>
|
138
|
+
<span class="ruby-identifier">ruby</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">ruby</span>
|
139
|
+
<span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">watch_spec_files_for</span>(<span class="ruby-identifier">ruby</span>.<span class="ruby-identifier">lib_files</span>)
|
140
|
+
|
141
|
+
<span class="ruby-comment"># Rails files</span>
|
142
|
+
<span class="ruby-identifier">rails</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rails</span>(<span class="ruby-identifier">view_extensions</span><span class="ruby-operator">:</span> <span class="ruby-node">%w(erb haml slim)</span>)
|
143
|
+
<span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">watch_spec_files_for</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">app_files</span>)
|
144
|
+
<span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">watch_spec_files_for</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">views</span>)
|
145
|
+
|
146
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">controllers</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
|
147
|
+
[
|
148
|
+
<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"routing/#{m[1]}_routing"</span>),
|
149
|
+
<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"controllers/#{m[1]}_controller"</span>),
|
150
|
+
<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"acceptance/#{m[1]}"</span>)
|
151
|
+
]
|
152
|
+
<span class="ruby-keyword">end</span>
|
153
|
+
|
154
|
+
<span class="ruby-comment"># Rails config changes</span>
|
155
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">spec_helper</span>) { <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_dir</span> }
|
156
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">routes</span>) { <span class="ruby-node">"#{rspec.spec_dir}/routing"</span> }
|
157
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">app_controller</span>) { <span class="ruby-node">"#{rspec.spec_dir}/controllers"</span> }
|
158
|
+
|
159
|
+
<span class="ruby-comment"># Capybara features specs</span>
|
160
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">view_dirs</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"features/#{m[1]}"</span>) }
|
161
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rails</span>.<span class="ruby-identifier">layouts</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">call</span>(<span class="ruby-node">"features/#{m[1]}"</span>) }
|
162
|
+
|
163
|
+
<span class="ruby-comment"># Turnip features and steps</span>
|
164
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^spec/acceptance/(.+)\.feature$}</span>)
|
165
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^spec/acceptance/steps/(.+)_steps\.rb$}</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
|
166
|
+
<span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">"**/#{m[1]}.feature"</span>)][<span class="ruby-value">0</span>] <span class="ruby-operator">||</span> <span class="ruby-string">"spec/acceptance"</span>
|
167
|
+
<span class="ruby-keyword">end</span>
|
168
|
+
</pre>
|
169
|
+
|
170
|
+
<p>end</p>
|
171
|
+
</main>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
<footer id="validator-badges" role="contentinfo">
|
176
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
177
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
178
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
179
|
+
</footer>
|
180
|
+
|