huella 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +11 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +7 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +97 -0
  8. data/Guardfile +82 -0
  9. data/README.md +48 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docs/Alimento.html +627 -0
  14. data/docs/Gemfile.html +98 -0
  15. data/docs/Gemfile_lock.html +179 -0
  16. data/docs/Guardfile.html +165 -0
  17. data/docs/Huella/Error.html +103 -0
  18. data/docs/Huella.html +114 -0
  19. data/docs/Lista.html +981 -0
  20. data/docs/Object.html +337 -0
  21. data/docs/PlatoAmbiental.html +436 -0
  22. data/docs/PlatoNutricional.html +517 -0
  23. data/docs/README_md.html +146 -0
  24. data/docs/Rakefile.html +100 -0
  25. data/docs/bin/setup.html +100 -0
  26. data/docs/created.rid +24 -0
  27. data/docs/css/fonts.css +167 -0
  28. data/docs/css/rdoc.css +590 -0
  29. data/docs/fonts/Lato-Light.ttf +0 -0
  30. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  31. data/docs/fonts/Lato-Regular.ttf +0 -0
  32. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  33. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  34. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  35. data/docs/huella_gemspec.html +133 -0
  36. data/docs/images/add.png +0 -0
  37. data/docs/images/arrow_up.png +0 -0
  38. data/docs/images/brick.png +0 -0
  39. data/docs/images/brick_link.png +0 -0
  40. data/docs/images/bug.png +0 -0
  41. data/docs/images/bullet_black.png +0 -0
  42. data/docs/images/bullet_toggle_minus.png +0 -0
  43. data/docs/images/bullet_toggle_plus.png +0 -0
  44. data/docs/images/date.png +0 -0
  45. data/docs/images/delete.png +0 -0
  46. data/docs/images/find.png +0 -0
  47. data/docs/images/loadingAnimation.gif +0 -0
  48. data/docs/images/macFFBgHack.png +0 -0
  49. data/docs/images/package.png +0 -0
  50. data/docs/images/page_green.png +0 -0
  51. data/docs/images/page_white_text.png +0 -0
  52. data/docs/images/page_white_width.png +0 -0
  53. data/docs/images/plugin.png +0 -0
  54. data/docs/images/ruby.png +0 -0
  55. data/docs/images/tag_blue.png +0 -0
  56. data/docs/images/tag_green.png +0 -0
  57. data/docs/images/transparent.png +0 -0
  58. data/docs/images/wrench.png +0 -0
  59. data/docs/images/wrench_orange.png +0 -0
  60. data/docs/images/zoom.png +0 -0
  61. data/docs/index.html +117 -0
  62. data/docs/js/darkfish.js +161 -0
  63. data/docs/js/jquery.js +4 -0
  64. data/docs/js/navigation.js +141 -0
  65. data/docs/js/navigation.js.gz +0 -0
  66. data/docs/js/search.js +109 -0
  67. data/docs/js/search_index.js +1 -0
  68. data/docs/js/search_index.js.gz +0 -0
  69. data/docs/js/searcher.js +229 -0
  70. data/docs/js/searcher.js.gz +0 -0
  71. data/docs/table_of_contents.html +378 -0
  72. data/huella.gemspec +38 -0
  73. data/lib/huella/alimento.rb +112 -0
  74. data/lib/huella/lista.rb +275 -0
  75. data/lib/huella/menu_dsl.rb +92 -0
  76. data/lib/huella/nodo.rb +7 -0
  77. data/lib/huella/plato_ambiental.rb +100 -0
  78. data/lib/huella/plato_dsl.rb +89 -0
  79. data/lib/huella/plato_nutricional.rb +102 -0
  80. data/lib/huella/version.rb +4 -0
  81. data/lib/huella.rb +14 -0
  82. metadata +238 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: aee035d7855eb9099655403bc0e739d0f7c0a1d22fc3c10e9d5ad2a707f472a0
4
+ data.tar.gz: 7c6cb09c5b4c91c40c0074b6fbcc0c4acd63c65b7afbf62e9b8d93af49d97605
5
+ SHA512:
6
+ metadata.gz: 20e369480dc6971e1a7e5d8d7f075dbf01731a9f2e2a88a5c699856e57f525559a3a2199b5e8d11a0d8cdddc43d0d04ca6226ffd5da4be3c5295a516bfd8e791
7
+ data.tar.gz: 1eaa5ea58555f5635e7cd25a25d3aab303045433190dea6e846e12219185a1ebee97840cdc4da4f8ff8657b956b6920b67f38f4dfefa4ce0eb127a9515751d76
data/.coveralls.yml ADDED
@@ -0,0 +1,2 @@
1
+ service_name: travis-pro
2
+ #repo_token: <token>
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
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
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in huella.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,97 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ huella (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
+ bundler (~> 2.0)
87
+ coveralls
88
+ guard
89
+ guard-bundler
90
+ guard-rspec
91
+ huella!
92
+ rake (~> 10.0)
93
+ rspec (~> 3.0)
94
+ yard
95
+
96
+ BUNDLED WITH
97
+ 2.0.2
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.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
+
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/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Título: Práctica # 6, 7, 8, 9 y 10
2
+
3
+ **Fecha:** 8 de Enero del 2020
4
+ **Alumno:** Miguel Angel Ordoñez
5
+ **Universidad:** Universidad de La Laguna (ULL)
6
+ **Grado:** Ingeniería en Informática
7
+ **Objetivo # 6:** Crear un gema con Bundler y TDD
8
+ **Objetivo # 7:** Utilizar Guard y TDD con listas doblemente enlazadas
9
+ **Objetivo # 8:** Implementar Herencia y Módulos (Comparable y Enumerable)
10
+ **Objetivo # 9:** Paradigma de programación funcional
11
+ **Objetivo # 10:** Diseñar e implementar un DSL
12
+
13
+
14
+ # Huella
15
+
16
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/huella`. To experiment with that code, run `bin/console` for an interactive prompt.
17
+
18
+ TODO: Delete this and the text above, and describe your gem
19
+
20
+ ## Installation
21
+
22
+ Add this line to your application's Gemfile:
23
+
24
+ ```ruby
25
+ gem 'huella'
26
+ ```
27
+
28
+ And then execute:
29
+
30
+ $ bundle
31
+
32
+ Or install it yourself as:
33
+
34
+ $ gem install huella
35
+
36
+ ## Usage
37
+
38
+ TODO: Write usage instructions here
39
+
40
+ ## Development
41
+
42
+ 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.
43
+
44
+ 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).
45
+
46
+ ## Contributing
47
+
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ULL-ESIT-LPP-1920/tdd-miguel141097.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "huella"
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,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