dieta_alu0100648782 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +9 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +47 -0
- data/Rakefile +6 -0
- data/bat +122 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dieta.gemspec +39 -0
- data/doc/CODE_OF_CONDUCT_md.html +197 -0
- data/doc/Dieta.html +109 -0
- data/doc/Dietas.html +219 -0
- data/doc/Gemfile.html +109 -0
- data/doc/Gemfile_lock.html +184 -0
- data/doc/Grupo_alimento.html +221 -0
- data/doc/Grupo_edad.html +221 -0
- data/doc/Guardfile.html +182 -0
- data/doc/LICENSE_txt.html +119 -0
- data/doc/Lista.html +457 -0
- data/doc/Menu.html +624 -0
- data/doc/Object.html +116 -0
- data/doc/Plato.html +314 -0
- data/doc/README_md.html +175 -0
- data/doc/Rakefile.html +103 -0
- data/doc/bat.html +224 -0
- data/doc/bin/setup.html +103 -0
- data/doc/created.rid +20 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/dieta_gemspec.html +137 -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 +121 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -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 +260 -0
- data/lib/dieta/dietas.rb +11 -0
- data/lib/dieta/dsl.rb +59 -0
- data/lib/dieta/lista.rb +66 -0
- data/lib/dieta/menu.rb +79 -0
- data/lib/dieta/plato.rb +19 -0
- data/lib/dieta/version.rb +3 -0
- data/lib/dieta.rb +10 -0
- metadata +211 -0
@@ -0,0 +1,221 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Grupo_alimento - 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="class">
|
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="class-metadata">
|
56
|
+
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
58
|
+
<h3>Parent</h3>
|
59
|
+
|
60
|
+
|
61
|
+
<p class="link"><a href="Menu.html">Menu</a>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
<!-- Method Quickref -->
|
68
|
+
<div id="method-list-section" class="nav-section">
|
69
|
+
<h3>Methods</h3>
|
70
|
+
|
71
|
+
<ul class="link-list" role="directory">
|
72
|
+
|
73
|
+
<li ><a href="#method-c-new">::new</a>
|
74
|
+
|
75
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
76
|
+
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<main role="main" aria-labelledby="class-Grupo_alimento">
|
84
|
+
<h1 id="class-Grupo_alimento" class="class">
|
85
|
+
class Grupo_alimento
|
86
|
+
</h1>
|
87
|
+
|
88
|
+
<section class="description">
|
89
|
+
|
90
|
+
</section>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<section class="attribute-method-details" class="method-section">
|
104
|
+
<header>
|
105
|
+
<h3>Attributes</h3>
|
106
|
+
</header>
|
107
|
+
|
108
|
+
|
109
|
+
<div id="attribute-i-grupo_alimento" class="method-detail">
|
110
|
+
<div class="method-heading attribute-method-heading">
|
111
|
+
<span class="method-name">grupo_alimento</span><span
|
112
|
+
class="attribute-access-type">[RW]</span>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div class="method-description">
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
</section>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
127
|
+
<header>
|
128
|
+
<h3>Public Class Methods</h3>
|
129
|
+
</header>
|
130
|
+
|
131
|
+
|
132
|
+
<div id="method-c-new" class="method-detail ">
|
133
|
+
|
134
|
+
<div class="method-heading">
|
135
|
+
<span class="method-name">new</span><span
|
136
|
+
class="method-args">(titulo, porcentaje, platos, vct, proteinas, grasas, hidratos, grupo_alimento)</span>
|
137
|
+
|
138
|
+
<span class="method-click-advice">click to toggle source</span>
|
139
|
+
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
<div class="method-description">
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<div class="method-source-code" id="new-source">
|
151
|
+
<pre><span class="ruby-comment"># File lib/dieta/menu.rb, line 50</span>
|
152
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje</span>, <span class="ruby-identifier">platos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-identifier">grupo_alimento</span>
|
153
|
+
<span class="ruby-ivar">@titulo</span>, <span class="ruby-ivar">@porcentaje</span>, <span class="ruby-ivar">@platos</span>, <span class="ruby-ivar">@vct</span>, <span class="ruby-ivar">@proteinas</span>, <span class="ruby-ivar">@grasas</span>, <span class="ruby-ivar">@hidratos</span>, <span class="ruby-ivar">@grupo_alimento</span> = <span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje</span>, <span class="ruby-identifier">platos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-identifier">grupo_alimento</span>
|
154
|
+
<span class="ruby-keyword">end</span></pre>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
</div>
|
163
|
+
|
164
|
+
|
165
|
+
</section>
|
166
|
+
|
167
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
168
|
+
<header>
|
169
|
+
<h3>Public Instance Methods</h3>
|
170
|
+
</header>
|
171
|
+
|
172
|
+
|
173
|
+
<div id="method-i-to_s" class="method-detail ">
|
174
|
+
|
175
|
+
<div class="method-heading">
|
176
|
+
<span class="method-name">to_s</span><span
|
177
|
+
class="method-args">()</span>
|
178
|
+
|
179
|
+
<span class="method-click-advice">click to toggle source</span>
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
<div class="method-description">
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<div class="method-source-code" id="to_s-source">
|
192
|
+
<pre><span class="ruby-comment"># File lib/dieta/menu.rb, line 54</span>
|
193
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
194
|
+
<span class="ruby-identifier">out</span> = <span class="ruby-node">"Menu dietetico del grupo #{@grupo_alimento}\n"</span>
|
195
|
+
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@titulo.upcase} (#{@porcentaje}%)\n"</span>
|
196
|
+
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">plato</span><span class="ruby-operator">|</span> <span class="ruby-node">"- #{plato}"</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-string">",\n"</span>)
|
197
|
+
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\nV.C.T. | % #{vct} kcal | #{proteinas}% - #{grasas}% - #{hidratos}%"</span>
|
198
|
+
<span class="ruby-identifier">out</span>
|
199
|
+
<span class="ruby-keyword">end</span></pre>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
|
210
|
+
</section>
|
211
|
+
|
212
|
+
</section>
|
213
|
+
</main>
|
214
|
+
|
215
|
+
|
216
|
+
<footer id="validator-badges" role="contentinfo">
|
217
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
218
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
219
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
220
|
+
</footer>
|
221
|
+
|
data/doc/Grupo_edad.html
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Grupo_edad - 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="class">
|
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="class-metadata">
|
56
|
+
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
58
|
+
<h3>Parent</h3>
|
59
|
+
|
60
|
+
|
61
|
+
<p class="link"><a href="Menu.html">Menu</a>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
<!-- Method Quickref -->
|
68
|
+
<div id="method-list-section" class="nav-section">
|
69
|
+
<h3>Methods</h3>
|
70
|
+
|
71
|
+
<ul class="link-list" role="directory">
|
72
|
+
|
73
|
+
<li ><a href="#method-c-new">::new</a>
|
74
|
+
|
75
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
76
|
+
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<main role="main" aria-labelledby="class-Grupo_edad">
|
84
|
+
<h1 id="class-Grupo_edad" class="class">
|
85
|
+
class Grupo_edad
|
86
|
+
</h1>
|
87
|
+
|
88
|
+
<section class="description">
|
89
|
+
|
90
|
+
</section>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<section class="attribute-method-details" class="method-section">
|
104
|
+
<header>
|
105
|
+
<h3>Attributes</h3>
|
106
|
+
</header>
|
107
|
+
|
108
|
+
|
109
|
+
<div id="attribute-i-grupo_edad" class="method-detail">
|
110
|
+
<div class="method-heading attribute-method-heading">
|
111
|
+
<span class="method-name">grupo_edad</span><span
|
112
|
+
class="attribute-access-type">[RW]</span>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div class="method-description">
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
</section>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
127
|
+
<header>
|
128
|
+
<h3>Public Class Methods</h3>
|
129
|
+
</header>
|
130
|
+
|
131
|
+
|
132
|
+
<div id="method-c-new" class="method-detail ">
|
133
|
+
|
134
|
+
<div class="method-heading">
|
135
|
+
<span class="method-name">new</span><span
|
136
|
+
class="method-args">(titulo, porcentaje, platos, vct, proteinas, grasas, hidratos, grupo_edad)</span>
|
137
|
+
|
138
|
+
<span class="method-click-advice">click to toggle source</span>
|
139
|
+
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
<div class="method-description">
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<div class="method-source-code" id="new-source">
|
151
|
+
<pre><span class="ruby-comment"># File lib/dieta/menu.rb, line 68</span>
|
152
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje</span>, <span class="ruby-identifier">platos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-identifier">grupo_edad</span>
|
153
|
+
<span class="ruby-ivar">@titulo</span>, <span class="ruby-ivar">@porcentaje</span>, <span class="ruby-ivar">@platos</span>, <span class="ruby-ivar">@vct</span>, <span class="ruby-ivar">@proteinas</span>, <span class="ruby-ivar">@grasas</span>, <span class="ruby-ivar">@hidratos</span>, <span class="ruby-ivar">@grupo_edad</span> = <span class="ruby-identifier">titulo</span>, <span class="ruby-identifier">porcentaje</span>, <span class="ruby-identifier">platos</span>, <span class="ruby-identifier">vct</span>, <span class="ruby-identifier">proteinas</span>, <span class="ruby-identifier">grasas</span>, <span class="ruby-identifier">hidratos</span>, <span class="ruby-identifier">grupo_edad</span>
|
154
|
+
<span class="ruby-keyword">end</span></pre>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
</div>
|
163
|
+
|
164
|
+
|
165
|
+
</section>
|
166
|
+
|
167
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
168
|
+
<header>
|
169
|
+
<h3>Public Instance Methods</h3>
|
170
|
+
</header>
|
171
|
+
|
172
|
+
|
173
|
+
<div id="method-i-to_s" class="method-detail ">
|
174
|
+
|
175
|
+
<div class="method-heading">
|
176
|
+
<span class="method-name">to_s</span><span
|
177
|
+
class="method-args">()</span>
|
178
|
+
|
179
|
+
<span class="method-click-advice">click to toggle source</span>
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
<div class="method-description">
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<div class="method-source-code" id="to_s-source">
|
192
|
+
<pre><span class="ruby-comment"># File lib/dieta/menu.rb, line 72</span>
|
193
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
194
|
+
<span class="ruby-identifier">out</span> = <span class="ruby-node">"Menu dietetico del grupo #{@grupo_edad}\n"</span>
|
195
|
+
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@titulo.upcase} (#{@porcentaje}%)\n"</span>
|
196
|
+
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@platos</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">plato</span><span class="ruby-operator">|</span> <span class="ruby-node">"- #{plato}"</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-string">",\n"</span>)
|
197
|
+
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\nV.C.T. | % #{vct} kcal | #{proteinas}% - #{grasas}% - #{hidratos}%"</span>
|
198
|
+
<span class="ruby-identifier">out</span>
|
199
|
+
<span class="ruby-keyword">end</span></pre>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
|
210
|
+
</section>
|
211
|
+
|
212
|
+
</section>
|
213
|
+
</main>
|
214
|
+
|
215
|
+
|
216
|
+
<footer id="validator-badges" role="contentinfo">
|
217
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
218
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
219
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
220
|
+
</footer>
|
221
|
+
|
data/doc/Guardfile.html
ADDED
@@ -0,0 +1,182 @@
|
|
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="./README_md.html">README</a>
|
72
|
+
|
73
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
74
|
+
|
75
|
+
<li><a href="./bat.html">bat</a>
|
76
|
+
|
77
|
+
<li><a href="./bin/setup.html">setup</a>
|
78
|
+
|
79
|
+
<li><a href="./dieta_gemspec.html">dieta.gemspec</a>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
</nav>
|
86
|
+
|
87
|
+
<main role="main" aria-label="Page Guardfile">
|
88
|
+
|
89
|
+
<p># A sample <a href="Guardfile.html">Guardfile</a> # More info at <a
|
90
|
+
href="https://github.com/guard/guard#readme">github.com/guard/guard#readme</a></p>
|
91
|
+
|
92
|
+
<p>## Uncomment and set this to only include directories you want to watch #
|
93
|
+
directories %w(app lib config test spec features) \ # .select{|d|
|
94
|
+
Dir.exists?(d) ? d : UI.warning(“Directory #{d} does not exist”)}</p>
|
95
|
+
|
96
|
+
<p>## Note: if you are using the `directories` clause above and you are not ##
|
97
|
+
watching the project directory ('.'), then you will want to move ##
|
98
|
+
the <a href="Guardfile.html">Guardfile</a> to a watched dir and symlink it
|
99
|
+
back, e.g. # # $ mkdir config # $ mv <a
|
100
|
+
href="Guardfile.html">Guardfile</a> config/ # $ ln -s config/Guardfile . #
|
101
|
+
# and, you'll have to watch “config/Guardfile” instead of “Guardfile”</p>
|
102
|
+
|
103
|
+
<p>guard :bundler do</p>
|
104
|
+
|
105
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler'</span>
|
106
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'guard/bundler/verify'</span>
|
107
|
+
<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>
|
108
|
+
|
109
|
+
<span class="ruby-identifier">files</span> = [<span class="ruby-string">'Gemfile'</span>]
|
110
|
+
<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>) }
|
111
|
+
|
112
|
+
<span class="ruby-comment"># Assume files are symlinked from somewhere</span>
|
113
|
+
<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>)) }
|
114
|
+
</pre>
|
115
|
+
|
116
|
+
<p>end</p>
|
117
|
+
|
118
|
+
<p># Note: The cmd option is now required due to the increasing number of ways
|
119
|
+
# rspec may be run, below are examples of the most common uses. # *
|
120
|
+
bundler: 'bundle exec rspec' # * bundler binstubs:
|
121
|
+
'bin/rspec' # * spring: 'bin/rspec' (This will use spring
|
122
|
+
if running and you have # installed the spring
|
123
|
+
binstubs per the docs) # * zeus: 'zeus rspec' (requires the server
|
124
|
+
to be started separately) # * 'just' rspec: 'rspec'</p>
|
125
|
+
|
126
|
+
<p>guard :rspec, cmd: “bundle exec rspec” do</p>
|
127
|
+
|
128
|
+
<pre class="ruby"> <span class="ruby-identifier">require</span> <span class="ruby-string">"guard/rspec/dsl"</span>
|
129
|
+
<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>)
|
130
|
+
|
131
|
+
<span class="ruby-comment"># Feel free to open issues for suggestions and improvements</span>
|
132
|
+
|
133
|
+
<span class="ruby-comment"># RSpec files</span>
|
134
|
+
<span class="ruby-identifier">rspec</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">rspec</span>
|
135
|
+
<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> }
|
136
|
+
<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> }
|
137
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-identifier">rspec</span>.<span class="ruby-identifier">spec_files</span>)
|
138
|
+
|
139
|
+
<span class="ruby-comment"># Ruby files</span>
|
140
|
+
<span class="ruby-identifier">ruby</span> = <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">ruby</span>
|
141
|
+
<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>)
|
142
|
+
|
143
|
+
<span class="ruby-comment"># Rails files</span>
|
144
|
+
<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>)
|
145
|
+
<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>)
|
146
|
+
<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>)
|
147
|
+
|
148
|
+
<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>
|
149
|
+
[
|
150
|
+
<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>),
|
151
|
+
<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>),
|
152
|
+
<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>)
|
153
|
+
]
|
154
|
+
<span class="ruby-keyword">end</span>
|
155
|
+
|
156
|
+
<span class="ruby-comment"># Rails config changes</span>
|
157
|
+
<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> }
|
158
|
+
<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> }
|
159
|
+
<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> }
|
160
|
+
|
161
|
+
<span class="ruby-comment"># Capybara features specs</span>
|
162
|
+
<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>) }
|
163
|
+
<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>) }
|
164
|
+
|
165
|
+
<span class="ruby-comment"># Turnip features and steps</span>
|
166
|
+
<span class="ruby-identifier">watch</span>(<span class="ruby-regexp">%r{^spec/acceptance/(.+)\.feature$}</span>)
|
167
|
+
<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>
|
168
|
+
<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>
|
169
|
+
<span class="ruby-keyword">end</span>
|
170
|
+
</pre>
|
171
|
+
|
172
|
+
<p>end</p>
|
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
|
+
|