Skip to content

Commit

Permalink
Version 1.1.3
Browse files Browse the repository at this point in the history
* ReadMe.md is no longer an empty file. Now it contains a title: the
project name upcased.
* ReadMe.md is now README.md to get adapted to VCS conventions.
* Changelog.md is no longer an empty file. Now it has references to
"Keep a CHANGELOG" file conventions and you're expected to get adapted
to write good and consistent CHANGELOG files following that guideline.
* Changelog.md is now CHANGELOG.md to get adapted to VCS conventions.
* License.md is now LICENSE.md to get adapted to VCS conventions.
* RDoc is pretty much dead and ugly compared to Yard on these days. Yard
is supposed to be used now as documenting system. Because of that, it's
now included inside any Gemfile as a :development dependency. The RDoc
main rake task is now replaced by yard's main rake task.
* The Gemfile got updated to separate what is :development dependencies
from the :production dependencies. It also replaced rdoc for yard as
documenting system dependency.
* Better in-code comments. Before everything looked like #comment, now
it contains a space before the first comment character, such as the Ruby
conventions suggest.
  • Loading branch information
damian-m-g committed Sep 27, 2018
1 parent 46964d4 commit bb6af8c
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 121 deletions.
12 changes: 12 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
1.1.3
-----

* ReadMe.md is no longer an empty file. Now it contains a title: the project name upcased.
* ReadMe.md is now README.md to get adapted to VCS conventions.
* Changelog.md is no longer an empty file. Now it has references to "Keep a CHANGELOG" file conventions and you're expected to get adapted to write good and consistent CHANGELOG files following that guideline.
* Changelog.md is now CHANGELOG.md to get adapted to VCS conventions.
* License.md is now LICENSE.md to get adapted to VCS conventions.
* RDoc is pretty much dead and ugly compared to Yard on these days. Yard is supposed to be used now as documenting system. Because of that, it's now included inside any Gemfile as a :development dependency. The RDoc main rake task is now replaced by yard's main rake task.
* The Gemfile got updated to separate what is :development dependencies from the :production dependencies. It also replaced rdoc for yard as documenting system dependency.
* Better in-code comments. Before everything looked like #comment, now it contains a space before the first comment character, such as the Ruby conventions suggest.

1.1.2
-----

Expand Down
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ desc 'Genera data/contenido_de_archivos.cocot'
task :generar_contenido_de_archivos do
require_relative('lib/cocot/salvador_de_contenidos')
SalvadorDeContenidos.new.salvar_contenido_de_archivos
end

desc 'Build gem'
task :build_gem do
system('gem build cocot.gemspec')
end
18 changes: 6 additions & 12 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Rakefile
* `rake cucumber_wip` : same like `cucumber --format progress --color --wip --tags @wip:3`, specially for order
* `rake spec` : same like `spec --color`
* `rake test` : run minitest tests
* `rake rdoc` : same like `rdoc --all --tab-width=1 --format=darkfish --op=doc --force-output`, create a doc folder with **RDoc** documentation
* `rake yard` : same like `yardoc`, create a doc folder with **Yard** documentation

If you pass some option(see below) to the program, the rake task list may be reduced.

Options
-------

Version 1.1.0 introduces few nice options:
Version 1.1.0 introduced few nice options:

* **--full** Builds these extra-folders: "share", "ext" and "data". If your project is kind of big, you may use them for order.

Expand Down Expand Up @@ -69,26 +69,20 @@ Standard skeleton
spec\
| proyect*\
| spec_helper.rb
Changelog.md
CHANGELOG.md
Gemfile
Gemfile.lock
License.md
LICENSE.md
Rakefile
ReadMe.md
README.md
</pre>

*proyect is replaced by the name of your proyect


Notes
-----

Only tested on Windows. Should work in most operative systems.

License
-------

Copyright (c) 2015 cocot
Copyright (c) 2018 cocot

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
158 changes: 109 additions & 49 deletions data/contenido_de_archivos.cocot
Original file line number Diff line number Diff line change
@@ -1,108 +1,168 @@
{:bin/proyectI"H#!/usr/bin/env ruby
{:bin/proyectI"H#!/usr/bin/env ruby

require_relative '../lib/name_of_the_proyect'
:ET:features/support/env.rbI"�#if you respect the convention of a Ruby proyect layout then the next lines are fixed
:ET:features/support/env.rbI"�# if you respect the convention of a Ruby proyect layout then the next lines are fixed
$LOAD_PATH << File.expand_path('../../../lib', __FILE__)
require 'name_of_the_proyect'
;T:lib/proyect.rbI"
;T:spec/spec_helper.rbI"%require 'name_of_the_proyect'


;T: GemfileI"csource 'https://rubygems.org'
;T: gemfileI"�# ruby '~>2.0'

gem 'rspec'
gem 'cucumber'
gem 'rake'
gem 'rdoc'
gem 'bundler'
;T:rakefileI"C#necessary for minitest tests
source 'https://rubygems.org'

group :development do
gem 'rspec'
gem 'cucumber'
gem 'rake'
gem 'bundler'
gem 'yard'
end

group :production do

end
;T:gemfile_rspec_onlyI"�# ruby '~>2.0'

source 'https://rubygems.org'

group :development do
gem 'rspec'
gem 'rake'
gem 'bundler'
gem 'yard'
end

group :production do

end
;T:gemfile_cucumber_onlyI"�# ruby '~>2.0'

source 'https://rubygems.org'

group :development do
gem 'cucumber'
gem 'rake'
gem 'bundler'
gem 'yard'
end

group :production do

end
;T:gemfile_cleanI"�# ruby '~>2.0'

source 'https://rubygems.org'

group :development do
gem 'rake'
gem 'bundler'
gem 'yard'
end

group :production do

end
;T:rakefileI"]# necessary for minitest tests
require 'rake/testtask'
#necessary for cucumber tests
# necessary for cucumber tests
require 'cucumber/rake/task'
#necessary for rspec tests
# necessary for rspec tests
require 'rspec/core/rake_task'
# necessary for yardoc task
require 'yard'

#################TASKS#######################

#to execute minitest tests with `rake test`
# to execute minitest tests with `rake test`
Rake::TestTask.new do |t|
#search recursively under the folder test for files called test*. You may have to create the folder manually.
# search recursively under the folder test for files called test*. You may have to create the folder manually.
t.pattern = 'test/**/test*.rb'
end

#to execute cucumber tests with `rake cucumber`
# to execute cucumber tests with `rake cucumber`
Cucumber::Rake::Task.new

#to execute cucumber wip(work in progress) with 'rake cucumber_wip'. It will kick you if you are working in more than 3 scenarios
#remember to tag each wip scenarios with @wip above the Scenario keyword in the implicit *.feature
# to execute cucumber wip(work in progress) with 'rake cucumber_wip'. It will kick you if you are working in more than 3 scenarios
# remember to tag each wip scenarios with @wip above the Scenario keyword in the implicit *.feature
desc 'Executes cucumber wip'
task :cucumber_wip do
system('cucumber --format progress --color --wip --tags @wip:3')
end

#to execute all RSpec tests with `rake spec`
# to execute all RSpec tests with `rake spec`
RSpec::Core::RakeTask.new do |t|
#opciones de rspec a correr
# rspec options to run
t.rspec_opts = ['--color']
end

desc 'to generate RDoc documentation'
task :rdoc do
system('rdoc --all --tab-width=1 --force-output --main="ReadMe.md" --exclude="bin" --exclude="data" --exclude="ext" --exclude="share" --exclude="doc" --exclude="features" --exclude="spec" --exclude="cocot.gemspec" --exclude="Gemfile" --exclude="Gemfile.lock" --exclude="Rakefile"')
end
;T:rakefile_rspec_onlyI"7#necessary for rspec tests
# generate yard documentation
YARD::Rake::YardocTask.new {|t|}
;T:rakefile_rspec_onlyI"_# necessary for rspec tests
require 'rspec/core/rake_task'
# necessary for yardoc task
require 'yard'

#################TASKS#######################

#to execute all RSpec tests with `rake spec`
# to execute all RSpec tests with `rake spec`
RSpec::Core::RakeTask.new do |t|
#opciones de rspec a correr
# rspec options to run
t.rspec_opts = ['--color']
end

desc 'to generate RDoc documentation'
task :rdoc do
system('rdoc --all --tab-width=1 --force-output --main="ReadMe.md" --exclude="bin" --exclude="data" --exclude="ext" --exclude="share" --exclude="doc" --exclude="spec" --exclude="cocot.gemspec" --exclude="Gemfile" --exclude="Gemfile.lock" --exclude="Rakefile"')
end
;T:rakefile_cucumber_onlyI"X#necessary for cucumber tests
# generate yard documentation
YARD::Rake::YardocTask.new {|t|}
;T:rakefile_cucumber_onlyI"�# necessary for cucumber tests
require 'cucumber/rake/task'
# necessary for yardoc task
require 'yard'

#################TASKS#######################

#to execute cucumber tests with `rake cucumber`
# to execute cucumber tests with `rake cucumber`
Cucumber::Rake::Task.new

#to execute cucumber wip(work in progress) with 'rake cucumber_wip'. It will kick you if you are working in more than 3 scenarios
#remember to tag each wip scenarios with @wip above the Scenario keyword in the implicit *.feature
# to execute cucumber wip(work in progress) with 'rake cucumber_wip'. It will kick you if you are working in more than 3 scenarios
# remember to tag each wip scenarios with @wip above the Scenario keyword in the implicit *.feature
desc 'Executes cucumber wip'
task :cucumber_wip do
system('cucumber --format progress --color --wip --tags @wip:3')
end

desc 'to generate RDoc documentation'
task :rdoc do
system('rdoc --all --tab-width=1 --force-output --main="ReadMe.md" --exclude="bin" --exclude="data" --exclude="ext" --exclude="share" --exclude="doc" --exclude="features" --exclude="cocot.gemspec" --exclude="Gemfile" --exclude="Gemfile.lock" --exclude="Rakefile"')
end
;T:rakefile_minitest_onlyI"�#necessary for minitest tests
# generate yard documentation
YARD::Rake::YardocTask.new {|t|}
;T:rakefile_minitest_onlyI"�# necessary for minitest tests
require 'rake/testtask'
# necessary for yardoc task
require 'yard'

#################TASKS#######################

#to execute minitest tests with `rake test`
# to execute minitest tests with `rake test`
Rake::TestTask.new do |t|
#search recursively under the folder test for files called test*. You may have to create the folder manually.
# search recursively under the folder test for files called test*. You may have to create the folder manually.
t.pattern = 'test/**/test*.rb'
end

desc 'to generate RDoc documentation'
task :rdoc do
system('rdoc --all --tab-width=1 --force-output --main="ReadMe.md" --exclude="bin" --exclude="data" --exclude="ext" --exclude="share" --exclude="doc" --exclude="test" --exclude="cocot.gemspec" --exclude="Gemfile" --exclude="Gemfile.lock" --exclude="Rakefile"')
end
;T:rakefile_cleanI"]#################TASKS#######################
# generate yard documentation
YARD::Rake::YardocTask.new {|t|}
;T:rakefile_cleanI"�# necessary for yardoc task
require 'yard'

desc 'to generate RDoc documentation'
task :rdoc do
system('rdoc --all --tab-width=1 --force-output --main="ReadMe.md" --exclude="bin" --exclude="data" --exclude="ext" --exclude="share" --exclude="doc" --exclude="cocot.gemspec" --exclude="Gemfile" --exclude="Gemfile.lock" --exclude="Rakefile"')
end
#################TASKS#######################

# generate yard documentation
YARD::Rake::YardocTask.new {|t|}
;TI"README.md;TI"## name_of_the_project_upcased
;TI"CHANGELOG.md;TI"D# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - current_date
### Added
- Pristine version.
;T
Expand Down
8 changes: 5 additions & 3 deletions lib/cocot/constructor_de_esqueleto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ConstructorDeEsqueleto
SUBCARPETAS_CUCUMBER = %w{features features/support features/step_definitions}
SUBCARPETAS_MINITEST = %w{test}
SUBCARPETAS_FULL = %w{data share ext}
ARCHIVOS = %w{Changelog.md Gemfile Gemfile.lock License.md Rakefile ReadMe.md bin/proyect lib/proyect.rb}
ARCHIVOS = %w{CHANGELOG.md Gemfile Gemfile.lock LICENSE.md Rakefile README.md bin/proyect lib/proyect.rb}
ARCHIVOS_RSPEC = %w{spec/spec_helper.rb}
ARCHIVOS_CUCUMBER = %w{features/support/env.rb}

Expand Down Expand Up @@ -58,7 +58,6 @@ def crear_subcarpetas
when nil
crear_subcarpetas!(SUBCARPETAS_RSPEC)
crear_subcarpetas!(SUBCARPETAS_CUCUMBER)
else
end
# chequeo si el usuario quiere las carpetas extras
if ::COCOT.juzgador_de_argumentos.full then crear_subcarpetas!(SUBCARPETAS_FULL) end
Expand Down Expand Up @@ -103,7 +102,10 @@ def escribir_archivos
if(File.exist?(_nombre_del_archivo))
# existe, lo escribo
File.open(_nombre_del_archivo, 'w+') do |archivo|
archivo.write(contenido.gsub('name_of_the_proyect', @nombre_del_proyecto))
content_to_write = contenido.gsub('name_of_the_proyect', @nombre_del_proyecto)
content_to_write.gsub!('name_of_the_project_upcased', @nombre_del_proyecto.upcase)
content_to_write.gsub!('current_date', Time.now.strftime('%Y-%m-%d'))
archivo.write(content_to_write)
end
end
end
Expand Down
Loading

0 comments on commit bb6af8c

Please sign in to comment.