alimento-0100905144 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +12 -0
  4. data/.travis.yml +6 -0
  5. data/Gemfile +10 -0
  6. data/Guardfile +82 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +39 -0
  9. data/Rakefile +6 -0
  10. data/alimento.gemspec +40 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docs/Alimento.html +133 -0
  14. data/docs/Alimento/Alimento.html +347 -0
  15. data/docs/Alimento/GrupoAlimento.html +236 -0
  16. data/docs/Alimento/Lista.html +410 -0
  17. data/docs/Gemfile.html +102 -0
  18. data/docs/Gemfile_lock.html +177 -0
  19. data/docs/Guardfile.html +179 -0
  20. data/docs/LICENSE_txt.html +116 -0
  21. data/docs/README_md.html +159 -0
  22. data/docs/Rakefile.html +100 -0
  23. data/docs/alimento_gemspec.html +134 -0
  24. data/docs/bin/setup.html +100 -0
  25. data/docs/created.rid +16 -0
  26. data/docs/css/fonts.css +167 -0
  27. data/docs/css/rdoc.css +590 -0
  28. data/docs/fonts/Lato-Light.ttf +0 -0
  29. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  30. data/docs/fonts/Lato-Regular.ttf +0 -0
  31. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  32. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  33. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  34. data/docs/images/add.png +0 -0
  35. data/docs/images/arrow_up.png +0 -0
  36. data/docs/images/brick.png +0 -0
  37. data/docs/images/brick_link.png +0 -0
  38. data/docs/images/bug.png +0 -0
  39. data/docs/images/bullet_black.png +0 -0
  40. data/docs/images/bullet_toggle_minus.png +0 -0
  41. data/docs/images/bullet_toggle_plus.png +0 -0
  42. data/docs/images/date.png +0 -0
  43. data/docs/images/delete.png +0 -0
  44. data/docs/images/find.png +0 -0
  45. data/docs/images/loadingAnimation.gif +0 -0
  46. data/docs/images/macFFBgHack.png +0 -0
  47. data/docs/images/package.png +0 -0
  48. data/docs/images/page_green.png +0 -0
  49. data/docs/images/page_white_text.png +0 -0
  50. data/docs/images/page_white_width.png +0 -0
  51. data/docs/images/plugin.png +0 -0
  52. data/docs/images/ruby.png +0 -0
  53. data/docs/images/tag_blue.png +0 -0
  54. data/docs/images/tag_green.png +0 -0
  55. data/docs/images/transparent.png +0 -0
  56. data/docs/images/wrench.png +0 -0
  57. data/docs/images/wrench_orange.png +0 -0
  58. data/docs/images/zoom.png +0 -0
  59. data/docs/index.html +110 -0
  60. data/docs/js/darkfish.js +161 -0
  61. data/docs/js/jquery.js +4 -0
  62. data/docs/js/navigation.js +142 -0
  63. data/docs/js/navigation.js.gz +0 -0
  64. data/docs/js/search.js +109 -0
  65. data/docs/js/search_index.js +1 -0
  66. data/docs/js/search_index.js.gz +0 -0
  67. data/docs/js/searcher.js +229 -0
  68. data/docs/js/searcher.js.gz +0 -0
  69. data/docs/table_of_contents.html +151 -0
  70. data/lib/alimento.rb +8 -0
  71. data/lib/alimento/alimento.rb +97 -0
  72. data/lib/alimento/lista.rb +69 -0
  73. data/lib/alimento/ordenacion.rb +42 -0
  74. data/lib/alimento/plato.rb +133 -0
  75. data/lib/alimento/version.rb +3 -0
  76. metadata +218 -0
@@ -0,0 +1,116 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>LICENSE - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="file">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="project-metadata">
57
+ <div id="fileindex-section" class="nav-section">
58
+ <h3>Pages</h3>
59
+
60
+ <ul class="link-list">
61
+
62
+ <li><a href="./Gemfile.html">Gemfile</a>
63
+
64
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
65
+
66
+ <li><a href="./Guardfile.html">Guardfile</a>
67
+
68
+ <li><a href="./LICENSE_txt.html">LICENSE</a>
69
+
70
+ <li><a href="./README_md.html">README</a>
71
+
72
+ <li><a href="./Rakefile.html">Rakefile</a>
73
+
74
+ <li><a href="./alimento_gemspec.html">alimento.gemspec</a>
75
+
76
+ <li><a href="./bin/setup.html">setup</a>
77
+
78
+ </ul>
79
+ </div>
80
+
81
+ </div>
82
+ </nav>
83
+
84
+ <main role="main" aria-label="Page LICENSE.txt">
85
+
86
+ <p>The MIT License (MIT)</p>
87
+
88
+ <p>Copyright © 2017 Mireia Scholz</p>
89
+
90
+ <p>Permission is hereby granted, free of charge, to any person obtaining a
91
+ copy of this software and associated documentation files (the “Software”),
92
+ to deal in the Software without restriction, including without limitation
93
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
94
+ and/or sell copies of the Software, and to permit persons to whom the
95
+ Software is furnished to do so, subject to the following conditions:</p>
96
+
97
+ <p>The above copyright notice and this permission notice shall be included in
98
+ all copies or substantial portions of the Software.</p>
99
+
100
+ <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
103
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
104
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
105
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
106
+ DEALINGS IN THE SOFTWARE.</p>
107
+ </main>
108
+
109
+
110
+
111
+ <footer id="validator-badges" role="contentinfo">
112
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
113
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
114
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
115
+ </footer>
116
+
@@ -0,0 +1,159 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>README - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="file">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+ <div class="nav-section">
56
+ <h3>Table of Contents</h3>
57
+
58
+ <ul class="link-list" role="directory">
59
+ <li><a href="#label-Alimento">Alimento</a>
60
+ <li><a href="#label-Installation">Installation</a>
61
+ <li><a href="#label-Usage">Usage</a>
62
+ <li><a href="#label-Development">Development</a>
63
+ <li><a href="#label-Contributing">Contributing</a>
64
+ <li><a href="#label-License">License</a>
65
+ </ul>
66
+ </div>
67
+
68
+
69
+ <div id="project-metadata">
70
+ <div id="fileindex-section" class="nav-section">
71
+ <h3>Pages</h3>
72
+
73
+ <ul class="link-list">
74
+
75
+ <li><a href="./Gemfile.html">Gemfile</a>
76
+
77
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
78
+
79
+ <li><a href="./Guardfile.html">Guardfile</a>
80
+
81
+ <li><a href="./LICENSE_txt.html">LICENSE</a>
82
+
83
+ <li><a href="./README_md.html">README</a>
84
+
85
+ <li><a href="./Rakefile.html">Rakefile</a>
86
+
87
+ <li><a href="./alimento_gemspec.html">alimento.gemspec</a>
88
+
89
+ <li><a href="./bin/setup.html">setup</a>
90
+
91
+ </ul>
92
+ </div>
93
+
94
+ </div>
95
+ </nav>
96
+
97
+ <main role="main" aria-label="Page README.md">
98
+
99
+ <h1 id="label-Alimento"><a href="Alimento.html">Alimento</a><span><a href="#label-Alimento">&para;</a> <a href="#top">&uarr;</a></span></h1>
100
+
101
+ <p>Welcome to your new gem! In this directory, you&#39;ll find the files you
102
+ need to be able to package up your Ruby library into a gem. Put your Ruby
103
+ code in the file <code>lib/alimento</code>. To experiment with that code,
104
+ run <code>bin/console</code> for an interactive prompt.</p>
105
+
106
+ <p>TODO: Delete this and the text above, and describe your gem</p>
107
+
108
+ <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
109
+
110
+ <p>Add this line to your application&#39;s Gemfile:</p>
111
+
112
+ <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">&#39;alimento&#39;</span>
113
+ </pre>
114
+
115
+ <p>And then execute:</p>
116
+
117
+ <pre>$ bundle</pre>
118
+
119
+ <p>Or install it yourself as:</p>
120
+
121
+ <pre>$ gem install alimento</pre>
122
+
123
+ <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
124
+
125
+ <p>TODO: Write usage instructions here</p>
126
+
127
+ <h2 id="label-Development">Development<span><a href="#label-Development">&para;</a> <a href="#top">&uarr;</a></span></h2>
128
+
129
+ <p>After checking out the repo, run <code>bin/setup</code> to install
130
+ dependencies. Then, run <code>rake spec</code> to run the tests. You can
131
+ also run <code>bin/console</code> for an interactive prompt that will allow
132
+ you to experiment.</p>
133
+
134
+ <p>To install this gem onto your local machine, run <code>bundle exec rake
135
+ install</code>. To release a new version, update the version number in
136
+ <code>version.rb</code>, and then run <code>bundle exec rake
137
+ release</code>, which will create a git tag for the version, push git
138
+ commits and tags, and push the <code>.gem</code> file to <a
139
+ href="https://rubygems.org">rubygems.org</a>.</p>
140
+
141
+ <h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">&para;</a> <a href="#top">&uarr;</a></span></h2>
142
+
143
+ <p>Bug reports and pull requests are welcome on GitHub at <a
144
+ href="https://github.com/[USERNAME]/alimento">github.com/[USERNAME]/alimento</a>.</p>
145
+
146
+ <h2 id="label-License">License<span><a href="#label-License">&para;</a> <a href="#top">&uarr;</a></span></h2>
147
+
148
+ <p>The gem is available as open source under the terms of the <a
149
+ href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
150
+ </main>
151
+
152
+
153
+
154
+ <footer id="validator-badges" role="contentinfo">
155
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
156
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
157
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
158
+ </footer>
159
+
@@ -0,0 +1,100 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>Rakefile - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="file">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="project-metadata">
57
+ <div id="fileindex-section" class="nav-section">
58
+ <h3>Pages</h3>
59
+
60
+ <ul class="link-list">
61
+
62
+ <li><a href="./Gemfile.html">Gemfile</a>
63
+
64
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
65
+
66
+ <li><a href="./Guardfile.html">Guardfile</a>
67
+
68
+ <li><a href="./LICENSE_txt.html">LICENSE</a>
69
+
70
+ <li><a href="./README_md.html">README</a>
71
+
72
+ <li><a href="./Rakefile.html">Rakefile</a>
73
+
74
+ <li><a href="./alimento_gemspec.html">alimento.gemspec</a>
75
+
76
+ <li><a href="./bin/setup.html">setup</a>
77
+
78
+ </ul>
79
+ </div>
80
+
81
+ </div>
82
+ </nav>
83
+
84
+ <main role="main" aria-label="Page Rakefile">
85
+
86
+ <p>require “bundler/gem_tasks” require “rspec/core/rake_task”</p>
87
+
88
+ <p>RSpec::Core::RakeTask.new(:spec)</p>
89
+
90
+ <p>task :default =&gt; :spec</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="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
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,134 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>alimento.gemspec - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="file">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="project-metadata">
57
+ <div id="fileindex-section" class="nav-section">
58
+ <h3>Pages</h3>
59
+
60
+ <ul class="link-list">
61
+
62
+ <li><a href="./Gemfile.html">Gemfile</a>
63
+
64
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
65
+
66
+ <li><a href="./Guardfile.html">Guardfile</a>
67
+
68
+ <li><a href="./LICENSE_txt.html">LICENSE</a>
69
+
70
+ <li><a href="./README_md.html">README</a>
71
+
72
+ <li><a href="./Rakefile.html">Rakefile</a>
73
+
74
+ <li><a href="./alimento_gemspec.html">alimento.gemspec</a>
75
+
76
+ <li><a href="./bin/setup.html">setup</a>
77
+
78
+ </ul>
79
+ </div>
80
+
81
+ </div>
82
+ </nav>
83
+
84
+ <main role="main" aria-label="Page alimento.gemspec">
85
+
86
+ <p>lib = File.expand_path(“../lib”, __FILE__) $LOAD_PATH.unshift(lib) unless
87
+ $LOAD_PATH.include?(lib) require “alimento/version”</p>
88
+
89
+ <p>Gem::Specification.new do |spec|</p>
90
+
91
+ <pre class="ruby"><span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">&quot;alimento&quot;</span>
92
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> = <span class="ruby-constant">Alimento</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
93
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">authors</span> = [<span class="ruby-string">&quot;Mireia Scholz&quot;</span>]
94
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">email</span> = [<span class="ruby-string">&quot;alu0100905144@ull.edu.es&quot;</span>]
95
+
96
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">summary</span> = <span class="ruby-string">%q{Desarrollo de la clase Alimento usando TDD.}</span>
97
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">description</span> = <span class="ruby-string">%q{Desarrollo de la clase Alimento para calcular su valor energético usando TDD.}</span>
98
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">homepage</span> = <span class="ruby-string">&quot;https://github.com/ULL-ESIT-LPP-1718/tdd-alu0100905144.git&quot;</span>
99
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">license</span> = <span class="ruby-string">&quot;MIT&quot;</span>
100
+
101
+ <span class="ruby-comment"># Prevent pushing this gem to RubyGems.org. To allow pushes either set the &#39;allowed_push_host&#39;</span>
102
+ <span class="ruby-comment"># to allow pushing to a single host or delete this section to allow pushing to any host.</span>
103
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(:<span class="ruby-identifier">metadata</span>)
104
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">metadata</span>[<span class="ruby-string">&quot;allowed_push_host&quot;</span>] = <span class="ruby-string">&quot;TODO: Set to &#39;http://mygemserver.com&#39;&quot;</span>
105
+ <span class="ruby-keyword">else</span>
106
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&quot;RubyGems 2.0 or newer is required to protect against &quot;</span> <span class="ruby-string">&quot;public gem pushes.&quot;</span>
107
+ <span class="ruby-keyword">end</span>
108
+
109
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span> = <span class="ruby-value">%x`git ls-files -z`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;\x0&quot;</span>).<span class="ruby-identifier">reject</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
110
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r{^(test|spec|features)/}</span>)
111
+ <span class="ruby-keyword">end</span>
112
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">bindir</span> = <span class="ruby-string">&quot;exe&quot;</span>
113
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">grep</span>(<span class="ruby-regexp">%r{^exe/}</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">f</span>) }
114
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">require_paths</span> = [<span class="ruby-string">&quot;lib&quot;</span>]
115
+
116
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">&quot;bundler&quot;</span>, <span class="ruby-string">&quot;~&gt; 1.15&quot;</span>
117
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">&quot;rake&quot;</span>, <span class="ruby-string">&quot;~&gt; 10.0&quot;</span>
118
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">&quot;rspec&quot;</span>, <span class="ruby-string">&quot;~&gt; 3.0&quot;</span>
119
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">&quot;guard&quot;</span>
120
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">&quot;guard-rspec&quot;</span>
121
+ <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">&quot;guard-bundler&quot;</span>
122
+ </pre>
123
+
124
+ <p>end</p>
125
+ </main>
126
+
127
+
128
+
129
+ <footer id="validator-badges" role="contentinfo">
130
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
131
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
132
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
133
+ </footer>
134
+