alimento-alu0101132907 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/.coveralls.yml +2 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +8 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +97 -0
- data/Guardfile +84 -0
- data/README.md +27 -0
- data/Rakefile +6 -0
- data/alimento.gemspec +35 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Alimento.html +133 -0
- data/docs/Alimento/Comida.html +1129 -0
- data/docs/Alimento/Error.html +124 -0
- data/docs/Dll.html +1762 -0
- data/docs/Dll/Node.html +410 -0
- data/docs/Gemfile.html +100 -0
- data/docs/Gemfile_lock.html +178 -0
- data/docs/Guardfile.html +182 -0
- data/docs/Plato.html +1002 -0
- data/docs/PlatoEfi.html +561 -0
- data/docs/README_md.html +135 -0
- data/docs/Rakefile.html +101 -0
- data/docs/_index.html +183 -0
- data/docs/alimento_gemspec.html +132 -0
- data/docs/bin/setup.html +101 -0
- data/docs/class_list.html +51 -0
- data/docs/created.rid +16 -0
- data/docs/css/common.css +1 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/rdoc.css +611 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +102 -0
- data/docs/file_list.html +56 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/frames.html +17 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +102 -0
- data/docs/js/app.js +303 -0
- data/docs/js/darkfish.js +84 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/js/navigation.js +106 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/method_list.html +411 -0
- data/docs/table_of_contents.html +259 -0
- data/docs/top-level-namespace.html +112 -0
- data/lib/alimento.rb +46 -0
- data/lib/alimento/alimento.rb +70 -0
- data/lib/alimento/dll.rb +164 -0
- data/lib/alimento/plato.rb +173 -0
- data/lib/alimento/version.rb +3 -0
- metadata +243 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4beb860f1c3394f3038a530ceb245f3dcce0105938a6e5638c06279faa308067
|
4
|
+
data.tar.gz: 753b667bf6298b834b3ae8eb992dba7c244023d0be1b91bccf67a559a376d766
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3c31a4f77d75f371f22d3cfcbf093d4618efe06694bf5375466211f76bba2b0dd5c6a326dc823166ab3f71fbfe85d81830848b04bb06c61fdba9565f030a4aec
|
7
|
+
data.tar.gz: b5428a9c72135c422193ce5729e30bf790e4b89fea49ec22755293271409e3cb9a5bf0f6c9ce18e38784cc25f39196f1fa859eb062240bdfb4c8b304d0c434ef
|
data/.coveralls.yml
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
alimento-alu0101132907 (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
coderay (1.1.2)
|
10
|
+
coveralls (0.8.23)
|
11
|
+
json (>= 1.8, < 3)
|
12
|
+
simplecov (~> 0.16.1)
|
13
|
+
term-ansicolor (~> 1.3)
|
14
|
+
thor (>= 0.19.4, < 2.0)
|
15
|
+
tins (~> 1.6)
|
16
|
+
diff-lcs (1.3)
|
17
|
+
docile (1.3.2)
|
18
|
+
ffi (1.11.2)
|
19
|
+
formatador (0.2.5)
|
20
|
+
guard (2.16.1)
|
21
|
+
formatador (>= 0.2.4)
|
22
|
+
listen (>= 2.7, < 4.0)
|
23
|
+
lumberjack (>= 1.0.12, < 2.0)
|
24
|
+
nenv (~> 0.1)
|
25
|
+
notiffany (~> 0.0)
|
26
|
+
pry (>= 0.9.12)
|
27
|
+
shellany (~> 0.0)
|
28
|
+
thor (>= 0.18.1)
|
29
|
+
guard-bundler (2.2.1)
|
30
|
+
bundler (>= 1.3.0, < 3)
|
31
|
+
guard (~> 2.2)
|
32
|
+
guard-compat (~> 1.1)
|
33
|
+
guard-compat (1.2.1)
|
34
|
+
guard-rspec (4.7.3)
|
35
|
+
guard (~> 2.1)
|
36
|
+
guard-compat (~> 1.1)
|
37
|
+
rspec (>= 2.99.0, < 4.0)
|
38
|
+
json (2.3.0)
|
39
|
+
listen (3.2.0)
|
40
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
41
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
42
|
+
lumberjack (1.0.13)
|
43
|
+
method_source (0.9.2)
|
44
|
+
nenv (0.3.0)
|
45
|
+
notiffany (0.1.3)
|
46
|
+
nenv (~> 0.1)
|
47
|
+
shellany (~> 0.0)
|
48
|
+
pry (0.12.2)
|
49
|
+
coderay (~> 1.1.0)
|
50
|
+
method_source (~> 0.9.0)
|
51
|
+
rake (10.5.0)
|
52
|
+
rb-fsevent (0.10.3)
|
53
|
+
rb-inotify (0.10.0)
|
54
|
+
ffi (~> 1.0)
|
55
|
+
rspec (3.9.0)
|
56
|
+
rspec-core (~> 3.9.0)
|
57
|
+
rspec-expectations (~> 3.9.0)
|
58
|
+
rspec-mocks (~> 3.9.0)
|
59
|
+
rspec-core (3.9.0)
|
60
|
+
rspec-support (~> 3.9.0)
|
61
|
+
rspec-expectations (3.9.0)
|
62
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
63
|
+
rspec-support (~> 3.9.0)
|
64
|
+
rspec-mocks (3.9.0)
|
65
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
66
|
+
rspec-support (~> 3.9.0)
|
67
|
+
rspec-support (3.9.0)
|
68
|
+
shellany (0.0.1)
|
69
|
+
simplecov (0.16.1)
|
70
|
+
docile (~> 1.1)
|
71
|
+
json (>= 1.8, < 3)
|
72
|
+
simplecov-html (~> 0.10.0)
|
73
|
+
simplecov-html (0.10.2)
|
74
|
+
sync (0.5.0)
|
75
|
+
term-ansicolor (1.7.1)
|
76
|
+
tins (~> 1.0)
|
77
|
+
thor (0.20.3)
|
78
|
+
tins (1.23.0)
|
79
|
+
sync
|
80
|
+
yard (0.9.20)
|
81
|
+
|
82
|
+
PLATFORMS
|
83
|
+
ruby
|
84
|
+
|
85
|
+
DEPENDENCIES
|
86
|
+
alimento-alu0101132907!
|
87
|
+
bundler (~> 2.0)
|
88
|
+
coveralls
|
89
|
+
guard
|
90
|
+
guard-bundler
|
91
|
+
guard-rspec
|
92
|
+
rake (~> 10.0)
|
93
|
+
rspec (~> 3.0)
|
94
|
+
yard (~> 0.9.20)
|
95
|
+
|
96
|
+
BUNDLED WITH
|
97
|
+
2.0.2
|
data/Guardfile
ADDED
@@ -0,0 +1,84 @@
|
|
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.exist?(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
|
+
# Ruby source files
|
45
|
+
watch(%r{^lib/alimento/(.+)\.rb$}) { dsl.rspec.spec_dir }
|
46
|
+
watch(%r{'lib/gema.rb'})
|
47
|
+
# RSpec files
|
48
|
+
rspec = dsl.rspec
|
49
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
50
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
51
|
+
watch(rspec.spec_files)
|
52
|
+
|
53
|
+
# Ruby files
|
54
|
+
ruby = dsl.ruby
|
55
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
56
|
+
|
57
|
+
# Rails files
|
58
|
+
rails = dsl.rails(view_extensions: %w(erb haml slim))
|
59
|
+
dsl.watch_spec_files_for(rails.app_files)
|
60
|
+
dsl.watch_spec_files_for(rails.views)
|
61
|
+
|
62
|
+
watch(rails.controllers) do |m|
|
63
|
+
[
|
64
|
+
rspec.spec.call("routing/#{m[1]}_routing"),
|
65
|
+
rspec.spec.call("controllers/#{m[1]}_controller"),
|
66
|
+
rspec.spec.call("acceptance/#{m[1]}")
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
# Rails config changes
|
71
|
+
watch(rails.spec_helper) { rspec.spec_dir }
|
72
|
+
watch(rails.routes) { "#{rspec.spec_dir}/routing" }
|
73
|
+
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
|
74
|
+
|
75
|
+
# Capybara features specs
|
76
|
+
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
|
77
|
+
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
|
78
|
+
|
79
|
+
# Turnip features and steps
|
80
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
81
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
82
|
+
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
|
83
|
+
end
|
84
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Alimento
|
2
|
+
|
3
|
+
Con esta gema podrás crear alimentos y comrpobar distintas caracteristicas de estos
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Agrega esta linea a tu gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'alimento'
|
11
|
+
```
|
12
|
+
|
13
|
+
Y ejecuta:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
O instálalo tú mismo usando:
|
18
|
+
|
19
|
+
$ gem install alimento
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Para usar la clase comida simplemente hay que llamar al constructor de la siguiente forma:
|
24
|
+
```Alimento::Comida.new("Nombre", [array con los valores nutricionales], [array con impacto ambientar])
|
25
|
+
```
|
26
|
+
|
27
|
+
Para obtener el valor de un nutriente o de un indicador de impacto ambiental, podemos usar nutriente o impacto respectivamente. Estos nos devolverán un Hash.
|
data/Rakefile
ADDED
data/alimento.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "alimento/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "alimento-alu0101132907"
|
7
|
+
spec.version = Alimento::VERSION
|
8
|
+
spec.authors = ["Alejandro Perez Moreno"]
|
9
|
+
spec.email = ["alu0101132907@ull.edu.es"]
|
10
|
+
|
11
|
+
spec.summary = %q{Representa alimentos}
|
12
|
+
|
13
|
+
#spec.metadata["allowed_push_host"] = "http://mygemserver.com"
|
14
|
+
|
15
|
+
#spec.metadata["homepage_uri"] = spec.homepage
|
16
|
+
#spec.metadata["source_code_uri"] = "http://x.com"
|
17
|
+
#spec.metadata["changelog_uri"] = ": Put your gem's CHANGELOG.md URL here."
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
|
+
spec.require_paths = ["lib"]
|
27
|
+
spec.add_development_dependency "coveralls"
|
28
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
29
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
31
|
+
spec.add_development_dependency "guard"
|
32
|
+
spec.add_development_dependency "guard-rspec"
|
33
|
+
spec.add_development_dependency "guard-bundler"
|
34
|
+
spec.add_development_dependency "yard", "~> 0.9.20"
|
35
|
+
end
|
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
data/docs/Alimento.html
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: Alimento
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Alimento";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (A)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Alimento</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: Alimento
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/alimento.rb<span class="defines">,<br />
|
82
|
+
lib/alimento/version.rb,<br /> lib/alimento/alimento.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Defined Under Namespace</h2>
|
89
|
+
<p class="children">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Alimento/Comida.html" title="Alimento::Comida (class)">Comida</a></span>, <span class='object_link'><a href="Alimento/Error.html" title="Alimento::Error (class)">Error</a></span>
|
95
|
+
|
96
|
+
|
97
|
+
</p>
|
98
|
+
|
99
|
+
|
100
|
+
<h2>
|
101
|
+
Constant Summary
|
102
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
103
|
+
</h2>
|
104
|
+
|
105
|
+
<dl class="constants">
|
106
|
+
|
107
|
+
<dt id="VERSION-constant" class="">VERSION =
|
108
|
+
|
109
|
+
</dt>
|
110
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>"</span></span></pre></dd>
|
111
|
+
|
112
|
+
</dl>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div id="footer">
|
126
|
+
Generated on Thu Dec 19 15:40:30 2019 by
|
127
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
128
|
+
0.9.20 (ruby-2.5.7).
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
</body>
|
133
|
+
</html>
|