AlimentoSolete 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.rspec_status +46 -0
- data/Alimento.gemspec +40 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +95 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +54 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +224 -0
- data/coverage/.resultset.json.lock +0 -0
- data/doc/ALU0101000756_ALIMENTO.html +133 -0
- data/doc/Alimento.html +1473 -0
- data/doc/AlimentoCategorizable.html +773 -0
- data/doc/GrupoAlimenticio.html +960 -0
- data/doc/Lista.html +1246 -0
- data/doc/Node.html +441 -0
- data/doc/Plato.html +1723 -0
- data/doc/_index.html +169 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +492 -0
- data/doc/file.README.html +162 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +162 -0
- data/doc/js/app.js +248 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +443 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/Alimento.rb +11 -0
- data/lib/alimento/Alimento.rb +79 -0
- data/lib/alimento/AlimentoCategorizable.rb +33 -0
- data/lib/alimento/GrupoAlimenticio.rb +49 -0
- data/lib/alimento/Lista.rb +110 -0
- data/lib/alimento/Plato.rb +157 -0
- data/lib/alimento/version.rb +19 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 042e9107933e426913ec1de8dad6cab17a8a9a0f
|
4
|
+
data.tar.gz: 38bed86b1f803a34b75c9afd5a15d990fee17d58
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 790f0de2bae52075b00d8c6fae3336fb23922429065d02e1f2dbc02d938eb3ec8c5610988cf583e14ff910a95c1260b57c8f7493784d75c4b7035bc48c50e2e5
|
7
|
+
data.tar.gz: 6be5cea56384392a174df601d898731f4e837eb09190ef27b6ceb6eca5d63bb779f76d8d92a7001707963a94c1e0ce5e778dbae029f74be35b7998284fd3c2ef
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.rspec_status
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
example_id | status | run_time |
|
2
|
+
------------------------------------------- | ------ | --------------- |
|
3
|
+
./spec/AlimentoCategorizable_spec.rb[1:1] | passed | 0.00096 seconds |
|
4
|
+
./spec/AlimentoCategorizable_spec.rb[1:2:1] | passed | 0.00194 seconds |
|
5
|
+
./spec/AlimentoCategorizable_spec.rb[1:2:2] | passed | 0.00061 seconds |
|
6
|
+
./spec/AlimentoCategorizable_spec.rb[1:2:3] | passed | 0.00011 seconds |
|
7
|
+
./spec/AlimentoCategorizable_spec.rb[1:2:4] | passed | 0.0001 seconds |
|
8
|
+
./spec/AlimentoCategorizable_spec.rb[1:2:5] | passed | 0.00009 seconds |
|
9
|
+
./spec/AlimentoCategorizable_spec.rb[1:2:6] | passed | 0.00009 seconds |
|
10
|
+
./spec/AlimentoCategorizable_spec.rb[1:3:1] | passed | 0.00009 seconds |
|
11
|
+
./spec/AlimentoCategorizable_spec.rb[1:4:1] | passed | 0.00009 seconds |
|
12
|
+
./spec/AlimentoCategorizable_spec.rb[1:5:1] | passed | 0.00059 seconds |
|
13
|
+
./spec/AlimentoCategorizable_spec.rb[1:5:2] | passed | 0.00053 seconds |
|
14
|
+
./spec/AlimentoCategorizable_spec.rb[1:5:3] | passed | 0.00011 seconds |
|
15
|
+
./spec/AlimentoCategorizable_spec.rb[1:7] | passed | 0.02587 seconds |
|
16
|
+
./spec/Alimento_spec.rb[1:1] | passed | 0.00007 seconds |
|
17
|
+
./spec/Alimento_spec.rb[1:2:1] | passed | 0.00086 seconds |
|
18
|
+
./spec/Alimento_spec.rb[1:2:2] | passed | 0.00012 seconds |
|
19
|
+
./spec/Alimento_spec.rb[1:3:1] | passed | 0.00014 seconds |
|
20
|
+
./spec/Alimento_spec.rb[1:3:2] | passed | 0.00009 seconds |
|
21
|
+
./spec/Alimento_spec.rb[1:3:3] | passed | 0.00007 seconds |
|
22
|
+
./spec/Alimento_spec.rb[1:3:4] | passed | 0.00006 seconds |
|
23
|
+
./spec/Alimento_spec.rb[1:3:5] | passed | 0.00006 seconds |
|
24
|
+
./spec/Alimento_spec.rb[1:3:6] | passed | 0.00006 seconds |
|
25
|
+
./spec/Alimento_spec.rb[1:4:1] | passed | 0.00007 seconds |
|
26
|
+
./spec/Alimento_spec.rb[1:5:1] | passed | 0.00006 seconds |
|
27
|
+
./spec/GrupoAlimenticio_spec.rb[1:1] | passed | 0.00013 seconds |
|
28
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:1] | passed | 0.00012 seconds |
|
29
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:2] | passed | 0.00008 seconds |
|
30
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:3] | passed | 0.00007 seconds |
|
31
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:4] | passed | 0.00008 seconds |
|
32
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:5] | passed | 0.00131 seconds |
|
33
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:6] | passed | 0.00011 seconds |
|
34
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:7] | passed | 0.00017 seconds |
|
35
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:8] | passed | 0.00021 seconds |
|
36
|
+
./spec/GrupoAlimenticio_spec.rb[1:2:9] | passed | 0.00015 seconds |
|
37
|
+
./spec/Lista_spec.rb[1:1] | passed | 0.00008 seconds |
|
38
|
+
./spec/Lista_spec.rb[1:2:1] | passed | 0.00014 seconds |
|
39
|
+
./spec/Lista_spec.rb[1:3:1] | passed | 0.00011 seconds |
|
40
|
+
./spec/Lista_spec.rb[1:3:2] | passed | 0.00008 seconds |
|
41
|
+
./spec/Lista_spec.rb[1:3:3] | passed | 0.00007 seconds |
|
42
|
+
./spec/Lista_spec.rb[1:3:4] | passed | 0.00007 seconds |
|
43
|
+
./spec/Lista_spec.rb[1:3:5] | passed | 0.00012 seconds |
|
44
|
+
./spec/Lista_spec.rb[1:3:6] | passed | 0.00007 seconds |
|
45
|
+
./spec/Lista_spec.rb[1:3:7] | passed | 0.00007 seconds |
|
46
|
+
./spec/Plato_spec.rb[1:1] | passed | 0.00007 seconds |
|
data/Alimento.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "alimento/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "AlimentoSolete"
|
8
|
+
spec.version = Alimento::VERSION
|
9
|
+
spec.authors = ["Eugenio José"]
|
10
|
+
spec.email = ["alu0101000756@ull.edu.es"]
|
11
|
+
|
12
|
+
spec.summary = %q{"Clase para gestionar los glúcidos, lípidos y proteínas de un alimento específico"}
|
13
|
+
spec.homepage = "https://github.com/ULL-ESIT-LPP-1718/tdd-alu0101000756"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = 'https://rubygems.org'
|
20
|
+
else
|
21
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
"public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
f.match(%r{^(test|spec|features)/})
|
27
|
+
end
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
35
|
+
|
36
|
+
spec.add_development_dependency "guard"
|
37
|
+
spec.add_development_dependency "guard-rspec"
|
38
|
+
spec.add_development_dependency "guard-bundler"
|
39
|
+
spec.add_dependency "coveralls"
|
40
|
+
end
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
AlimentoSolete (1.0.0)
|
5
|
+
coveralls
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
coderay (1.1.2)
|
11
|
+
coveralls (0.8.21)
|
12
|
+
json (>= 1.8, < 3)
|
13
|
+
simplecov (~> 0.14.1)
|
14
|
+
term-ansicolor (~> 1.3)
|
15
|
+
thor (~> 0.19.4)
|
16
|
+
tins (~> 1.6)
|
17
|
+
diff-lcs (1.3)
|
18
|
+
docile (1.1.5)
|
19
|
+
ffi (1.9.18)
|
20
|
+
formatador (0.2.5)
|
21
|
+
guard (2.14.1)
|
22
|
+
formatador (>= 0.2.4)
|
23
|
+
listen (>= 2.7, < 4.0)
|
24
|
+
lumberjack (~> 1.0)
|
25
|
+
nenv (~> 0.1)
|
26
|
+
notiffany (~> 0.0)
|
27
|
+
pry (>= 0.9.12)
|
28
|
+
shellany (~> 0.0)
|
29
|
+
thor (>= 0.18.1)
|
30
|
+
guard-bundler (2.1.0)
|
31
|
+
bundler (~> 1.0)
|
32
|
+
guard (~> 2.2)
|
33
|
+
guard-compat (~> 1.1)
|
34
|
+
guard-compat (1.2.1)
|
35
|
+
guard-rspec (4.7.3)
|
36
|
+
guard (~> 2.1)
|
37
|
+
guard-compat (~> 1.1)
|
38
|
+
rspec (>= 2.99.0, < 4.0)
|
39
|
+
json (2.1.0)
|
40
|
+
listen (3.1.5)
|
41
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
42
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
43
|
+
ruby_dep (~> 1.2)
|
44
|
+
lumberjack (1.0.12)
|
45
|
+
method_source (0.9.0)
|
46
|
+
nenv (0.3.0)
|
47
|
+
notiffany (0.1.1)
|
48
|
+
nenv (~> 0.1)
|
49
|
+
shellany (~> 0.0)
|
50
|
+
pry (0.11.3)
|
51
|
+
coderay (~> 1.1.0)
|
52
|
+
method_source (~> 0.9.0)
|
53
|
+
rake (10.5.0)
|
54
|
+
rb-fsevent (0.10.2)
|
55
|
+
rb-inotify (0.9.10)
|
56
|
+
ffi (>= 0.5.0, < 2)
|
57
|
+
rspec (3.7.0)
|
58
|
+
rspec-core (~> 3.7.0)
|
59
|
+
rspec-expectations (~> 3.7.0)
|
60
|
+
rspec-mocks (~> 3.7.0)
|
61
|
+
rspec-core (3.7.0)
|
62
|
+
rspec-support (~> 3.7.0)
|
63
|
+
rspec-expectations (3.7.0)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.7.0)
|
66
|
+
rspec-mocks (3.7.0)
|
67
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
+
rspec-support (~> 3.7.0)
|
69
|
+
rspec-support (3.7.0)
|
70
|
+
ruby_dep (1.5.0)
|
71
|
+
shellany (0.0.1)
|
72
|
+
simplecov (0.14.1)
|
73
|
+
docile (~> 1.1.0)
|
74
|
+
json (>= 1.8, < 3)
|
75
|
+
simplecov-html (~> 0.10.0)
|
76
|
+
simplecov-html (0.10.2)
|
77
|
+
term-ansicolor (1.6.0)
|
78
|
+
tins (~> 1.0)
|
79
|
+
thor (0.19.4)
|
80
|
+
tins (1.15.1)
|
81
|
+
|
82
|
+
PLATFORMS
|
83
|
+
ruby
|
84
|
+
|
85
|
+
DEPENDENCIES
|
86
|
+
AlimentoSolete!
|
87
|
+
bundler (~> 1.15)
|
88
|
+
guard
|
89
|
+
guard-bundler
|
90
|
+
guard-rspec
|
91
|
+
rake (~> 10.0)
|
92
|
+
rspec (~> 3.0)
|
93
|
+
|
94
|
+
BUNDLED WITH
|
95
|
+
1.16.0
|
data/Guardfile
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
guard :bundler do
|
19
|
+
require 'guard/bundler'
|
20
|
+
require 'guard/bundler/verify'
|
21
|
+
helper = Guard::Bundler::Verify.new
|
22
|
+
|
23
|
+
files = ['Gemfile']
|
24
|
+
files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
|
25
|
+
|
26
|
+
# Assume files are symlinked from somewhere
|
27
|
+
files.each { |file| watch(helper.real_path(file)) }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
31
|
+
# rspec may be run, below are examples of the most common uses.
|
32
|
+
# * bundler: 'bundle exec rspec'
|
33
|
+
# * bundler binstubs: 'bin/rspec'
|
34
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
35
|
+
# installed the spring binstubs per the docs)
|
36
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
37
|
+
# * 'just' rspec: 'rspec'
|
38
|
+
|
39
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
40
|
+
require "guard/rspec/dsl"
|
41
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
42
|
+
|
43
|
+
# Feel free to open issues for suggestions and improvements
|
44
|
+
|
45
|
+
# RSpec files
|
46
|
+
rspec = dsl.rspec
|
47
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
48
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
49
|
+
watch(rspec.spec_files)
|
50
|
+
|
51
|
+
# Ruby files
|
52
|
+
ruby = dsl.ruby
|
53
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
54
|
+
|
55
|
+
# Rails files
|
56
|
+
rails = dsl.rails(view_extensions: %w(erb haml slim))
|
57
|
+
dsl.watch_spec_files_for(rails.app_files)
|
58
|
+
dsl.watch_spec_files_for(rails.views)
|
59
|
+
|
60
|
+
watch(rails.controllers) do |m|
|
61
|
+
[
|
62
|
+
rspec.spec.call("routing/#{m[1]}_routing"),
|
63
|
+
rspec.spec.call("controllers/#{m[1]}_controller"),
|
64
|
+
rspec.spec.call("acceptance/#{m[1]}")
|
65
|
+
]
|
66
|
+
end
|
67
|
+
|
68
|
+
# Rails config changes
|
69
|
+
watch(rails.spec_helper) { rspec.spec_dir }
|
70
|
+
watch(rails.routes) { "#{rspec.spec_dir}/routing" }
|
71
|
+
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
|
72
|
+
|
73
|
+
# Capybara features specs
|
74
|
+
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
|
75
|
+
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
|
76
|
+
|
77
|
+
# Turnip features and steps
|
78
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
79
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
80
|
+
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
|
81
|
+
end
|
82
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Sebastian Diaz
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Alimento
|
2
|
+
|
3
|
+
La gema Alimento contiene la clase alimento, la cual permite la creación de un objeto Alimento con un identificador literal y unas componentes
|
4
|
+
basadas en los glúcidos, lípidos y proteínas para gestionar las calorías proporcionadas por este.
|
5
|
+
|
6
|
+
## Instalación
|
7
|
+
|
8
|
+
Añade esta línea a tu documento Gemgfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'Alimento'
|
12
|
+
```
|
13
|
+
|
14
|
+
y ejecuta el comando:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
O realiza una instalación directa con:
|
19
|
+
|
20
|
+
$ gem install Alimento
|
21
|
+
|
22
|
+
## Detalles de las clases
|
23
|
+
|
24
|
+
### Alimento
|
25
|
+
- Creacion de Alimento: Alimento.new(Nombre, gr glúcidos, gr proteínas, gr lípidos).
|
26
|
+
- Tiene métodos para el acceso de lectura a los atributos _nombre_, _glucidos_, _proteinas_ y _lipidos_.
|
27
|
+
- kcal: método para el cálculo. Devuelve el valor energético del alimento en kilocalorías.
|
28
|
+
- Es comparable
|
29
|
+
- calculate_index: Tiene un metodo para calcular el indice glucemico
|
30
|
+
|
31
|
+
### AlimentoCategorizable
|
32
|
+
- Creacion de AlimentoCategorizable: AlimentoCategorizable.new(Nombre, categoria, gr glúcidos, gr proteínas, gr lípidos)
|
33
|
+
- Hereda la funcionalidad de Alimento
|
34
|
+
- Tiene un atributo _categoria_, su grupo alimenticio, y métodos para su acceso de lectura
|
35
|
+
|
36
|
+
### Node
|
37
|
+
- Creacion de Node: Node.new(valor, nodo siguiente, nodo previo).
|
38
|
+
- Tiene métodos de acceso y modificación de los atributos _value_, _next_ y _prev_.
|
39
|
+
|
40
|
+
### Lista
|
41
|
+
- Creacion de Lista: Lista.new()
|
42
|
+
- Tiene métodos de acceso para sus atributos _head_ y _tail_, lo que permite hacer comprobación del contenido previa sustracción o inserción.
|
43
|
+
- Tiene métodos para la extracción (*pop_head*, *pop_tail*) para eliminar un nodo de la lista y obtener su contenido (su valor Node.value).
|
44
|
+
- Tiene métodos para la inserción de elementos (*push_head(x)*, *push_tail*) para la inclusión de un nodo en la lista.
|
45
|
+
- Es enumerable
|
46
|
+
|
47
|
+
### GrupoAlimenticio
|
48
|
+
- Creacion de GrupoAlimenticio: GrupoAlimenticio.new(Categoria).
|
49
|
+
- Hereda su funcionalidad de la lista
|
50
|
+
- Tiene un atributo _categoria_ que define la categoria de los alimentos que se meten en la lista, y su método de lectura
|
51
|
+
|
52
|
+
## Licencia
|
53
|
+
|
54
|
+
La gema está disponible como código abierto bajo los términos de la [Licencia MIT](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "Alimento"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,224 @@
|
|
1
|
+
{
|
2
|
+
"RSpec": {
|
3
|
+
"coverage": {
|
4
|
+
"/home/ubuntu/workspace/prct8/spec/Alimento_spec.rb": [
|
5
|
+
1,
|
6
|
+
null,
|
7
|
+
1,
|
8
|
+
1,
|
9
|
+
1,
|
10
|
+
1,
|
11
|
+
null,
|
12
|
+
null,
|
13
|
+
1,
|
14
|
+
1,
|
15
|
+
null,
|
16
|
+
null,
|
17
|
+
1,
|
18
|
+
1,
|
19
|
+
1,
|
20
|
+
null,
|
21
|
+
1,
|
22
|
+
1,
|
23
|
+
1,
|
24
|
+
1,
|
25
|
+
1,
|
26
|
+
null,
|
27
|
+
null,
|
28
|
+
null,
|
29
|
+
1,
|
30
|
+
1,
|
31
|
+
1,
|
32
|
+
null,
|
33
|
+
1,
|
34
|
+
1,
|
35
|
+
1,
|
36
|
+
1,
|
37
|
+
1,
|
38
|
+
1,
|
39
|
+
null,
|
40
|
+
1,
|
41
|
+
1,
|
42
|
+
null,
|
43
|
+
1,
|
44
|
+
1,
|
45
|
+
null,
|
46
|
+
1,
|
47
|
+
1,
|
48
|
+
null,
|
49
|
+
1,
|
50
|
+
1,
|
51
|
+
null,
|
52
|
+
null,
|
53
|
+
null,
|
54
|
+
1,
|
55
|
+
1,
|
56
|
+
1,
|
57
|
+
null,
|
58
|
+
null,
|
59
|
+
1,
|
60
|
+
1,
|
61
|
+
1,
|
62
|
+
null,
|
63
|
+
null,
|
64
|
+
null
|
65
|
+
],
|
66
|
+
"/home/ubuntu/workspace/prct8/spec/GrupoAlimenticio_spec.rb": [
|
67
|
+
1,
|
68
|
+
null,
|
69
|
+
1,
|
70
|
+
1,
|
71
|
+
10,
|
72
|
+
10,
|
73
|
+
10,
|
74
|
+
null,
|
75
|
+
null,
|
76
|
+
1,
|
77
|
+
1,
|
78
|
+
null,
|
79
|
+
1,
|
80
|
+
1,
|
81
|
+
1,
|
82
|
+
null,
|
83
|
+
null,
|
84
|
+
1,
|
85
|
+
1,
|
86
|
+
1,
|
87
|
+
null,
|
88
|
+
1,
|
89
|
+
1,
|
90
|
+
1,
|
91
|
+
null,
|
92
|
+
null,
|
93
|
+
1,
|
94
|
+
1,
|
95
|
+
1,
|
96
|
+
1,
|
97
|
+
1,
|
98
|
+
null,
|
99
|
+
null,
|
100
|
+
1,
|
101
|
+
1,
|
102
|
+
1,
|
103
|
+
1,
|
104
|
+
null,
|
105
|
+
null,
|
106
|
+
1,
|
107
|
+
1,
|
108
|
+
1,
|
109
|
+
1,
|
110
|
+
null,
|
111
|
+
null,
|
112
|
+
1,
|
113
|
+
1,
|
114
|
+
1,
|
115
|
+
null,
|
116
|
+
null,
|
117
|
+
1,
|
118
|
+
1,
|
119
|
+
1,
|
120
|
+
1,
|
121
|
+
null,
|
122
|
+
null,
|
123
|
+
1,
|
124
|
+
1,
|
125
|
+
1,
|
126
|
+
null,
|
127
|
+
null,
|
128
|
+
null
|
129
|
+
],
|
130
|
+
"/home/ubuntu/workspace/prct8/spec/Lista_spec.rb": [
|
131
|
+
1,
|
132
|
+
null,
|
133
|
+
1,
|
134
|
+
1,
|
135
|
+
9,
|
136
|
+
9,
|
137
|
+
null,
|
138
|
+
1,
|
139
|
+
1,
|
140
|
+
null,
|
141
|
+
null,
|
142
|
+
1,
|
143
|
+
1,
|
144
|
+
1,
|
145
|
+
null,
|
146
|
+
null,
|
147
|
+
null,
|
148
|
+
1,
|
149
|
+
1,
|
150
|
+
1,
|
151
|
+
null,
|
152
|
+
null,
|
153
|
+
1,
|
154
|
+
1,
|
155
|
+
1,
|
156
|
+
1,
|
157
|
+
1,
|
158
|
+
1,
|
159
|
+
2,
|
160
|
+
2,
|
161
|
+
null,
|
162
|
+
null,
|
163
|
+
null,
|
164
|
+
1,
|
165
|
+
1,
|
166
|
+
1,
|
167
|
+
null,
|
168
|
+
1,
|
169
|
+
1,
|
170
|
+
1,
|
171
|
+
null,
|
172
|
+
null,
|
173
|
+
1,
|
174
|
+
1,
|
175
|
+
1,
|
176
|
+
1,
|
177
|
+
1,
|
178
|
+
null,
|
179
|
+
null,
|
180
|
+
1,
|
181
|
+
1,
|
182
|
+
1,
|
183
|
+
1,
|
184
|
+
null,
|
185
|
+
null,
|
186
|
+
1,
|
187
|
+
1,
|
188
|
+
1,
|
189
|
+
1,
|
190
|
+
null,
|
191
|
+
null,
|
192
|
+
null,
|
193
|
+
null
|
194
|
+
],
|
195
|
+
"/home/ubuntu/workspace/prct8/spec/Plato_spec.rb": [
|
196
|
+
1,
|
197
|
+
null,
|
198
|
+
1,
|
199
|
+
1,
|
200
|
+
1,
|
201
|
+
1,
|
202
|
+
null,
|
203
|
+
1,
|
204
|
+
null,
|
205
|
+
1,
|
206
|
+
null,
|
207
|
+
1,
|
208
|
+
null,
|
209
|
+
1,
|
210
|
+
null,
|
211
|
+
1,
|
212
|
+
null,
|
213
|
+
null,
|
214
|
+
null,
|
215
|
+
1,
|
216
|
+
1,
|
217
|
+
1,
|
218
|
+
null,
|
219
|
+
null
|
220
|
+
]
|
221
|
+
},
|
222
|
+
"timestamp": 1513170426
|
223
|
+
}
|
224
|
+
}
|