#Alumno
Dieta
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/dieta
. To experiment with that
code, run bin/console
for an interactive prompt.
##DSL
Se ha añadido una nueva clase menu.rb el cual tiene implementado un menu dietetico a partir
de DSL (Domain Specific Language)
Installation
Add this line to your application's Gemfile:
gem 'dieta'
And then execute:
$ bundle gem
Or install it yourself as:
$ gem install dieta
##Guard
Se ha añadido ademas la Gema Guard, para ello se ha modificado dieta.Gemspec y se le ha añadido:
spec.add_development_dependency "guard"
spec.add_development_dependency "guard-rspec"
spec.add_development_dependency "guard-bundler"
Posteriormente se ha ejecutado:
$ bin/setup (para descargar Guard)
Y por ultimo:
$ bundle exec guard init (para crear el Guardfile)
Doc
Para ejecutar el DOC tendra que ejecutar en su navegador el archivo 'lib/dieta/docs/index.html'
Para la creacion de este documento se ha tenido que ejecutar:
$ rdoc --all diet.rb lista.rb
- Generates structured HTML documentation from Ruby source.
- Authomatically extracts class, module, method, and attribute definitions. These can be annonated
using inline comments.
- Analyzes method visibility.
- Handles aliasing.
- Uses non-intrusive and implicit markup in the comments. Readers of the original source needn't
know that it is marked up at all.
##Creacion de Gema
Se ha creado una gema gem_diet_kapil donde:
- Se ha tenido que crear un usuario en www.rubygems.org
- Tomamos las credenciales en local a traves de curl -u alu0100883473 https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
- Se le cambia el nombre a la gema y se comentan algunas lineas del gemfile
- rake build
- rake release
- rake install
Development
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.
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.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dieta. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.