alimento-alu0101109251 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b5c4eaabea4720a9c7b771019c07a94acafd265ce5523b65055bdc9e680f62aa
4
+ data.tar.gz: '068e2462b971c9979d897b0d60e2ce0e8c9d8edcd8169159212d50a1a800cf82'
5
+ SHA512:
6
+ metadata.gz: d0192e8468bffc6d8cc28bd99f96b1561d18c638914a7a02b0aed1e530c13ec95557013dcb715b221c761fe6b99037e55432835ad0d62032b107b9197c4157ce
7
+ data.tar.gz: 737e9e1089bed7dda19fae35bd29e0fb02d8c939634403d12b716772b3d110cbed88a895ca14f211fe616b65978cf637739504083e1babecc74066dab2747e60
@@ -0,0 +1,2 @@
1
+ service_name: travis-ci
2
+ repo_token: F4by3PjlfqYo7YK3ryUS4ESpedondccZE
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.idea/
3
+ /.yardoc
4
+ /_yardoc/
5
+ /coverage/
6
+ #/doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Settings><!--This file was automatically generated by Ruby plugin.
3
+ You are allowed to:
4
+ 1. Remove rake task
5
+ 2. Add existing rake tasks
6
+ To add existing rake tasks automatically delete this file and reload the project.
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build alimento-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install alimento-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install alimento-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push alimento-0.1.0.gem to rubygems.org" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
@@ -0,0 +1,7 @@
1
+ build
2
+ clean
3
+ clobber
4
+ install
5
+ install:local
6
+ release[remote]
7
+ spec
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,8 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.3
7
+ before_install: gem install bundler -v 2.0.2
8
+ script: bundle exec rspec spec
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in alimento.gemspec
4
+ gemspec
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ alimento-alu0101109251 (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
+ term-ansicolor (1.7.1)
75
+ tins (~> 1.0)
76
+ thor (0.20.3)
77
+ tins (1.22.2)
78
+ yard (0.9.20)
79
+
80
+ PLATFORMS
81
+ ruby
82
+
83
+ DEPENDENCIES
84
+ alimento-alu0101109251!
85
+ bundler (~> 2.0)
86
+ coveralls
87
+ guard
88
+ guard-bundler
89
+ guard-rspec
90
+ rake (~> 10.0)
91
+ rspec (~> 3.0)
92
+ yard (~> 0.9.20)
93
+
94
+ BUNDLED WITH
95
+ 2.0.2
@@ -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
+ watch(%r{^spec/.+_spec\.rb$})
45
+ watch(%r{^lib/alimento/(.+)\.rb$}) { dsl.rspec.spec_dir }
46
+
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
@@ -0,0 +1,48 @@
1
+ # Practica 10 - Lenguaje de Dominio Específico
2
+
3
+ Esta práctica de laboratorio se ha de realizado utilizando el paradigma de Programación Funcional para definir Lenguajes de Dominio Específico, la herramienta de gestión de dependencias Bundler, la herramienta Guard y la metodología de Desarrollo Dirigido por Pruebas.
4
+
5
+
6
+ ## Alimento
7
+
8
+ ¡Bienvenido a tu nueva gema! En este directorio, encontrarás los archivos necesarios para poder empaquetar tu librería Ruby en una gema. Introduce tu código Ruby en el archivo `lib/alimento`. Para experimentar con el código, ejecuta `bin/console` para lanzarlo de forma interactiva.
9
+
10
+ ### Definición
11
+
12
+ Se representa una clase Alimento la cual queda definida por su nombre, información nutricional (proteínas, lípidos y carbohidratos) y el impacto ambiental que produce (emisiones CO2 y uso de terreno).
13
+
14
+ Además, se incluye una clase List para representar una DLL, así como una clase Plato usando herencia.
15
+
16
+
17
+ ### Instalación
18
+
19
+ Añade la siguiente línea a tu Gemfile:
20
+
21
+ ```ruby
22
+ gem 'alimento'
23
+ ```
24
+
25
+ Y luego ejecuta:
26
+
27
+ $ bundle
28
+
29
+ O instálala tú mismo:
30
+
31
+ $ gem install alimento
32
+
33
+ ### Uso
34
+
35
+ Con esta gema podemos ver los valores nutricionales de distintos alimentos.
36
+
37
+ ### Desarrollo
38
+
39
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
40
+
41
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
42
+
43
+
44
+ ### Autor
45
+
46
+ Javier Alonso Delgado - https://github.com/alu0101109251 [Initial Work]
47
+
48
+ [![Coverage Status](https://coveralls.io/repos/github/alu0101109251/alimento/badge.svg?branch=master)](https://coveralls.io/github/alu0101109251/alimento?branch=master)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+
5
+ require 'rspec/core/rake_task'
6
+ RSpec::Core::RakeTask.new
7
+ task default: :spec
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'alimento/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'alimento-alu0101109251'
9
+ spec.version = Alimento::VERSION
10
+ spec.authors = ['alu0101109251']
11
+ spec.email = ['alu0101109251@ull.edu.es']
12
+
13
+ spec.summary = %q(Clase Ruby para representar un alimento.)
14
+ spec.description = %q(Clase Ruby para la Practica 10 de Lenguajes y Paradigmas de Programacion.)
15
+ spec.homepage = ''
16
+
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ end
22
+ spec.bindir = 'exe'
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.add_development_dependency 'bundler', '~> 2.0'
27
+ spec.add_development_dependency 'coveralls'
28
+ spec.add_development_dependency 'guard'
29
+ spec.add_development_dependency 'guard-bundler'
30
+ spec.add_development_dependency 'guard-rspec'
31
+ spec.add_development_dependency 'rake', '~> 10.0'
32
+ spec.add_development_dependency 'rspec', '~> 3.0'
33
+ spec.add_development_dependency 'yard', '~> 0.9.20'
34
+ end
@@ -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__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,144 @@
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
+ &mdash; 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> &raquo;
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/alimento.rb<span class="defines">,<br />
82
+ lib/alimento.rb,<br /> lib/alimento/version.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>frozen_string_literal: false</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+
104
+
105
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Alimento/Alimento.html" title="Alimento::Alimento (class)">Alimento</a></span>
106
+
107
+
108
+ </p>
109
+
110
+
111
+ <h2>
112
+ Constant Summary
113
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
114
+ </h2>
115
+
116
+ <dl class="constants">
117
+
118
+ <dt id="VERSION-constant" class="">VERSION =
119
+
120
+ </dt>
121
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
122
+
123
+ </dl>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ </div>
135
+
136
+ <div id="footer">
137
+ Generated on Tue Jan 7 11:34:55 2020 by
138
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
139
+ 0.9.20 (ruby-2.6.3).
140
+ </div>
141
+
142
+ </div>
143
+ </body>
144
+ </html>