From a55ff6eba7dad35f869fa9c52ab4ca9c00f6328b Mon Sep 17 00:00:00 2001 From: Carlos Goce Date: Sat, 24 Jan 2015 19:47:48 +0100 Subject: Remove old script --- .gitignore | 3 ++- Rakefile | 5 ----- calendar.rb | 27 --------------------------- output/.gitkeep | 0 4 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 Rakefile delete mode 100644 calendar.rb delete mode 100644 output/.gitkeep diff --git a/.gitignore b/.gitignore index 39d7579..f2aa86b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -output/*.pdf \ No newline at end of file +output/*.pdf +spec/output/*.pdf \ No newline at end of file diff --git a/Rakefile b/Rakefile deleted file mode 100644 index d977090..0000000 --- a/Rakefile +++ /dev/null @@ -1,5 +0,0 @@ -task default: %w[calendar] - -task :calendar do - ruby 'calendar.rb' -end diff --git a/calendar.rb b/calendar.rb deleted file mode 100644 index efb315c..0000000 --- a/calendar.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'rubygems' -require 'bundler/setup' -require 'prawn' -require 'prawn/table' -require 'active_support/core_ext/time' -require 'active_support/core_ext/date' - -locales_folder = 'config/locales' -output_folder = 'output' - -# Para obtener el primer día de la semana -d = Date.today -puts d.beginning_of_week - -I18n.load_path = Dir["#{locales_folder}/*.yml"] -I18n.backend.load_translations -I18n.locale = 'es' || I18n.default_locale - -Prawn::Document.generate("#{output_folder}/calendar.pdf") do - (1..12).each do |month| - text I18n.t('date.month_names')[month] - data = (1..Time.days_in_month(month)).to_a.each_slice(7).to_a - table data, :cell_style => {:align => :center} - end -end - -# `open #{output_folder}/calendar.pdf` \ No newline at end of file diff --git a/output/.gitkeep b/output/.gitkeep deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3