Alimento 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f19fbde28d7c91bb4d0a60553499e16220d3110c
4
+ data.tar.gz: a751863ab407feb73d7652705d41d430bb6a6531
5
+ SHA512:
6
+ metadata.gz: c107d3cfab4939864de4bd366585ebcd32ed10b9dddc61904fbbc120255d3ce12fcfa0de21d7c7feb12632ffa51edaf45cbd5f2a42d54d4d18075d05551d79a6
7
+ data.tar.gz: 7aeda51203ba4d8b7781b626174422bc46f5ac870f5ea94be1d12704f63681e7355545df09890c3ac7d5aba0382a42b6b738aa9af5cf6d58fd4f275201e0ce26
data/.coveralls.yml ADDED
@@ -0,0 +1,6 @@
1
+ service_name: travis-ci
2
+ #cosa rara
3
+ #raro
4
+ # service_name: travis-pro
5
+ # repo_token: SsslJ0YGlAfssbe9h9zGSTV68ONIHM85a
6
+ #raro
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rake_tasks~ ADDED
@@ -0,0 +1,8 @@
1
+ build
2
+ clean
3
+ clobber
4
+ install
5
+ install:local
6
+ lista
7
+ release[remote]
8
+ spec
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ before_install: gem install bundler -v 1.15.4
data/Alimento.gemspec ADDED
@@ -0,0 +1,39 @@
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 = "Alimento"
8
+ spec.version = Alimento::VERSION
9
+ spec.authors = ["Miguel Parra"]
10
+ spec.email = ["alu0100200393@ull.edu.es"]
11
+
12
+ spec.summary = %q{clase con alimentos y tipo de alimentos}
13
+ spec.description = %q{una clase con herencia y una lista doblemente enlazada}
14
+ spec.homepage = "https://github.com/ULL-ESIT-LPP-1718/tdd-miguelpe83"
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"] = "TODO: Set to 'http://mygemserver.com'"
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
+ spec.add_development_dependency "guard"
36
+ spec.add_development_dependency "guard-rspec"
37
+ spec.add_development_dependency "guard-bundler"
38
+ spec.add_development_dependency "coveralls"
39
+ end
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in Alimento.gemspec
6
+ gemspec
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/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Alimento
2
+
3
+ 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/Alimento`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'Alimento'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install Alimento
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ 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.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/Alimento.
data/Rakefile ADDED
@@ -0,0 +1,78 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
8
+ desc "Ejecutar las espectativas de la clase tipo_alimento"
9
+ task :ali do
10
+ sh "rspec -I. spec/Alimento_spec.rb"
11
+ end
12
+
13
+
14
+ desc "Ejecutar las espectativas de la clase tipo_alimento"
15
+ task :tipo do
16
+ sh "rspec -I. spec/Tipo_ali_spec.rb"
17
+ end
18
+
19
+ desc "Ejecutar las espectativas de la clase lista"
20
+ task :lista do
21
+ sh "rspec -I. spec/Lista_spec.rb"
22
+ end
23
+
24
+ desc "Ejecutar las espectativas de la clase lista"
25
+ task :gluce do
26
+ sh "rspec -I. spec/glucemico_spec.rb"
27
+ end
28
+
29
+ desc "Ejecutar las espectativas para la ordenacion"
30
+ task :orde do
31
+ sh "rspec -I. spec/Ordenacion_spec.rb"
32
+ end
33
+
34
+ desc "Ejecutar las espectativas para la ordenacion"
35
+ task :dsl do
36
+ sh "rspec -I. spec/dsl_spec.rb"
37
+ end
38
+
39
+ desc "Ejecutar las espectativas de la clase tipo_alimento"
40
+ task :desaali do
41
+ sh "ruby lib/Alimento/alimentos.rb"
42
+ end
43
+
44
+ desc "Ejecutar las espectativas de la clase tipo_alimento"
45
+ task :desalista do
46
+ sh "ruby lib/Alimento/lista_doble.rb"
47
+ end
48
+
49
+ desc "Ejecutar las espectativas de la clase tipo_alimento"
50
+ task :desagluce do
51
+ sh "ruby lib/Alimento/glucemico.rb"
52
+ end
53
+ desc "Ejecutar las espectativas de la clase tipo_alimento"
54
+ task :desaorde do
55
+ sh "ruby lib/Alimento/ordenacion.rb"
56
+ end
57
+
58
+ desc "Ejecutar fichero de dsl"
59
+ task :desadsl do
60
+ sh "ruby lib/Alimento/dsl.rb"
61
+ end
62
+
63
+
64
+ desc "Ejecutar la documentacion"
65
+ task :docu do
66
+ sh "yardoc --output-dir ./docs 'lib/Alimento/alimentos.rb' 'lib/Alimento/lista_doble.rb' - README LICENSE FAQ"
67
+ end
68
+
69
+ #
70
+ # desc "Ejecutar con documentacion"
71
+ # task :doc do
72
+ # sh "rspec -I. spec/Alimento_spec.rb --format documentation"
73
+ # end
74
+ #
75
+ # desc "Ejecutar clase"
76
+ # task :simple do
77
+ # sh "ruby lib/Alimento/Alimentos.rb"
78
+ # 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
@@ -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