From f7763bd965dbc8e918c4e37d1ea5338a6c6f4e09 Mon Sep 17 00:00:00 2001 From: "D.M.G" Date: Thu, 19 Sep 2013 21:22:53 -0300 Subject: [PATCH] Initial commit. --- Changelog.md | 0 Gemfile | 7 +++++++ Gemfile.lock | 37 +++++++++++++++++++++++++++++++++++++ License.md | 1 + Rakefile | 41 +++++++++++++++++++++++++++++++++++++++++ ReadMe.md | 0 bin/cocot | 1 + features/support/env.rb | 27 +++++++++++++++++++++++++++ lib/cocot.rb | 5 +++++ spec/spec_helper.rb | 3 +++ 10 files changed, 122 insertions(+) create mode 100644 Changelog.md create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 License.md create mode 100644 Rakefile create mode 100644 ReadMe.md create mode 100644 bin/cocot create mode 100644 features/support/env.rb create mode 100644 lib/cocot.rb create mode 100644 spec/spec_helper.rb diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..e69de29 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..43026e9 --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +gem 'rspec' +gem 'cucumber' +gem 'bundler' +gem 'rake' +gem 'rdoc' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..d41ccc2 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,37 @@ +GEM + remote: https://rubygems.org/ + specs: + builder (3.2.2) + cucumber (1.3.8) + builder (>= 2.1.2) + diff-lcs (>= 1.1.3) + gherkin (~> 2.12.1) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.0.2) + diff-lcs (1.2.4) + gherkin (2.12.1-x86-mingw32) + multi_json (~> 1.3) + json (1.8.0) + multi_json (1.8.0) + multi_test (0.0.2) + rake (10.1.0) + rdoc (4.0.1) + json (~> 1.4) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.5) + rspec-expectations (2.14.2) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.3) + +PLATFORMS + x86-mingw32 + +DEPENDENCIES + bundler + cucumber + rake + rdoc + rspec diff --git a/License.md b/License.md new file mode 100644 index 0000000..e307d80 --- /dev/null +++ b/License.md @@ -0,0 +1 @@ + Este software puede ser utilizado sin cargo monetario(gratis) por el usuario. No se puede vender, no se puede obtener dinero de el. En el caso de que se distribuya públicamente por favor mencionarme como autor del mismo, gracias. IgorJorobus. \ No newline at end of file diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..baa10ae --- /dev/null +++ b/Rakefile @@ -0,0 +1,41 @@ +#necesario para ejecutar los tests de minitest +require 'rake/testtask' +#necesario para ejecutar los tests de cucumber +require 'cucumber/rake/task' +#necesario para ejecutar los tests de rspec +require 'rspec/core/rake_task' + +#################TAREAS####################### + +#tarea para ejecutar los tests de minitest con `rake test` +Rake::TestTask.new do |t| + #busca recursivamente bajo la carpeta test por archivos llamados test* + t.pattern = 'test/**/test*.rb' +end + +#tarea para ejecutar los tests de cucumber con `cucumber` +Cucumber::Rake::Task.new do |t| + #opciones de cucumber a correr + t.cucumber_opts = %w{--format pretty --color} +end + +#tarea para ejecutar cucumber wip(work in progress) con 'rake cucumber_wip' +desc 'Ejecuta cucumber wip' +task :cucumber_wip do + Cucumber::Rake::Task.new do |t| + #opciones de rspec a correr + t.rspec_opts = %w{--format pretty --color --wip @wip:3} + end +end + +#tarea para ejecutar todos los tests de rspec con `rake spec` +RSpec::Core::RakeTask.new do |t| + #opciones de rspec a correr + t.rspec_opts = ['--color'] +end + +desc 'Genera documentación en RDoc' +task :rdoc do + system('rdoc --all --tab-width=1 --format=darkfish --op=doc --force-output') +end + diff --git a/ReadMe.md b/ReadMe.md new file mode 100644 index 0000000..e69de29 diff --git a/bin/cocot b/bin/cocot new file mode 100644 index 0000000..49ffd26 --- /dev/null +++ b/bin/cocot @@ -0,0 +1 @@ +#!/usr/bin/env ruby diff --git a/features/support/env.rb b/features/support/env.rb new file mode 100644 index 0000000..11aa432 --- /dev/null +++ b/features/support/env.rb @@ -0,0 +1,27 @@ +#encoding: utf-8 + +#keywords de cucumber en español(para que funcionen poner en la primera línea de cada *.feature "#language: es"): +=begin + "background": "Antecedentes", + "feature": "Característica", + "scenario": "Escenario", + "scenario_outline": "Esquema del escenario", + "examples": "Ejemplos", + "given": "*|Dado|Dada|Dados|Dadas", + "when": "*|Cuando", + "then": "*|Entonces", + "and": "*|Y", + "but": "*|Pero" +=end + +#plantilla para describir una característica: +=begin + En orden de + Como un/a + Quiero +=end + +#si se respeta la convención del esqueleto de un proyecto en Ruby entonces la siguiente línea es fija +$LOAD_PATH << File.expand_path('../../../lib', __FILE__) +#esta es variable. Acá va el nombre del archivo dentro de lib/ que va a requerir a todos los demás del código fuente +require 'cocot' \ No newline at end of file diff --git a/lib/cocot.rb b/lib/cocot.rb new file mode 100644 index 0000000..e03771c --- /dev/null +++ b/lib/cocot.rb @@ -0,0 +1,5 @@ +#encoding: utf-8 + +#acá se requieren todos los archivos del código fuente, por ejemplo una línea podría ser "require 'cocot/archivo.rb'"... + + diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..3f27d97 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,3 @@ +#encoding: utf-8 + +require 'cocot' \ No newline at end of file