Permalink
Browse files

Cleaning up to prepare for ruby-forge release

Got rid of all dos line endings (ugh.. I hate those things)
Refactored directory structure to get ready for Hoe transition
Rake helper to set the version (in javascript and in ruby)
  • Loading branch information...
1 parent 6ec4ecb commit f31736821bf21dfeaf46ccaaa87e2373fda10644 @timcharper committed Nov 23, 2008
View
@@ -0,0 +1 @@
+pkg
@@ -1,3 +1,16 @@
+== Version 1.11.1 ==
+ * properly wrap buttons if they are too big for the line
+ * more translations: german (Jonas), Added russian translation (DEkart)
+ * locale fixes:
+ * Fix: time doesn't work (using 12 hour instead of 24 hour) in Italian format.
+ * updated Portuguese translation with the "Clear" action (Daniel Luz)
+ * Portuguese was missing month of October
+ * Added a clear button (Hendy Tanata)
+ * Reverted a change that attempted to fix position in a scrollable div, but caused probles elsewhere
+ * Added :minute_interval to calendar_date_select_process_options, fixing http://code.google.com/p/calendardateselect/issues/detail?id=81
+ * Add helpers to give the list of javascripts and stylesheets (calendar_date_select_javascripts and calendar_date_select_stylesheets)
+ * Converted over to use Hoe (echoe was giving too many problems). Refactored the directory structure to make it more gem-ish.
+
== Version 1.11 ==
* Calendar Date Select now works as a ruby-gem (thanks, artmotion!)
@@ -197,4 +210,7 @@ June 2, 2007
==Version 1.0==
June 1, 2007
- * Initial release!
+ * Initial release!
+
+
+
View
@@ -0,0 +1,39 @@
+History.txt
+init.rb
+js_test/functional/cds_test.html
+js_test/prototype.js
+js_test/test.css
+js_test/unit/cds_helper_methods.html
+js_test/unittest.js
+lib/calendar_date_select/calendar_date_select.rb
+lib/calendar_date_select/includes_helper.rb
+lib/calendar_date_select.rb
+Manifest.txt
+MIT-LICENSE
+public/blank_iframe.html
+public/images/calendar_date_select/calendar.gif
+public/javascripts/calendar_date_select/calendar_date_select.js
+public/javascripts/calendar_date_select/format_american.js
+public/javascripts/calendar_date_select/format_db.js
+public/javascripts/calendar_date_select/format_euro_24hr.js
+public/javascripts/calendar_date_select/format_euro_24hr_ymd.js
+public/javascripts/calendar_date_select/format_finnish.js
+public/javascripts/calendar_date_select/format_hyphen_ampm.js
+public/javascripts/calendar_date_select/format_iso_date.js
+public/javascripts/calendar_date_select/format_italian.js
+public/javascripts/calendar_date_select/locale/de.js
+public/javascripts/calendar_date_select/locale/fi.js
+public/javascripts/calendar_date_select/locale/fr.js
+public/javascripts/calendar_date_select/locale/pl.js
+public/javascripts/calendar_date_select/locale/pt.js
+public/javascripts/calendar_date_select/locale/ru.js
+public/stylesheets/calendar_date_select/blue.css
+public/stylesheets/calendar_date_select/default.css
+public/stylesheets/calendar_date_select/plain.css
+public/stylesheets/calendar_date_select/red.css
+public/stylesheets/calendar_date_select/silver.css
+Rakefile
+Readme.txt
+test/functional/calendar_date_select_test.rb
+test/functional/helper_methods_test.rb
+test/test_helper.rb
View
@@ -1,24 +1,31 @@
-require 'echoe'
-# try "rake -T" so see the wunderfull tasks generated by the little code below ;-)
+# -*- ruby -*-
-Echoe.new("timcharper-calendar_date_select") do |p|
- p.version = "1.11.1"
- p.author = "Tim Harper"
- p.email = "timcharper@gmail.com"
- p.url = "http://github.com/timcharper/calendar_date_select"
- p.summary = "A popular and flexible JavaScript DatePicker for RubyOnRails"
- p.description = <<-END_OF_DESCRIPTION
- CalendarDateSelect is semi-light-weight and easy to use!
- It takes full advantage of the prototype.js library, resulting in less code,
- but maintaining a great deal of functionality.
- Project site: http://code.google.com/p/calendardateselect/
- END_OF_DESCRIPTION
- p.has_rdoc = false
- p.platform = Gem::Platform::RUBY
- p.ignore_pattern = Dir.glob("{tmp}/**/*")
- p.test_files = [
- "test/test_helper.rb",
- "test/functional/calendar_date_select_test.rb",
- "test/functional/helper_methods_test.rb"
- ]
+require 'rubygems'
+require 'hoe'
+
+$: << File.dirname(__FILE__) + "/lib/"
+require "activesupport"
+require './lib/calendar_date_select.rb'
+
+Hoe.new('calendar_date_select', CalendarDateSelect::VERSION) do |p|
+ p.rubyforge_name = 'calendar_date_select'
+ p.developer('Tim Harper', 'tim c harper at gmail dot com')
+end
+
+
+task :set_version do
+ ["lib/calendar_date_select/calendar_date_select.rb", "public/javascripts/calendar_date_select/calendar_date_select.js"].each do |file|
+ abs_file = File.dirname(__FILE__) + "/" + file
+ src = File.read(abs_file);
+ src = src.map do |line|
+ case line
+ when /^ *VERSION/ then " VERSION = '#{ENV['VERSION']}'\n"
+ when /^\/\/ CalendarDateSelect version / then "// CalendarDateSelect version #{ENV['VERSION']} - a prototype based date picker\n"
+ else
+ line
+ end
+ end.join
+ File.open(abs_file, "wb") { |f| f << src }
+ end
end
+# vim: syntax=Ruby
@@ -1,20 +1,16 @@
-h1. CalendarDateSelect
-
-Author: Tim Harper ( 'tim_see_harperATgmail._see_om'.gsub('_see_', 'c').gsub('AT', '@') )
-
-h2. Examples
-
-"See a demo here":http://electronicholas.com/calendar
-
-h2. Project Site
-
-http://code.google.com/p/calendardateselect/
-
-h2. Submitting patches
-
-Please take care to do the following:
-
-* Clean up your patch (don't send a patch bomb with a hundred features in one)
-* Write test cases!
-* As a general rule of thumb, think of ways to make things more general purpose than specific.
-
+= CalendarDateSelect
+
+http://code.google.com/p/calendardateselect/
+
+== Examples
+
+"See a demo here":http://electronicholas.com/calendar
+
+== Submitting patches
+
+Please take care to do the following:
+
+* Clean up your patch (don't send a patch bomb with a hundred features in one)
+* Write test cases!
+* As a general rule of thumb, think of ways to make things more general purpose than specific.
+
@@ -0,0 +1,33 @@
+Gem::Specification.new do |s|
+ s.name = %q{calendar_date_select}
+ s.version = "1.11.1"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Tim Harper"]
+ s.date = %q{2008-11-23}
+ s.description = %q{}
+ s.email = ["tim c harper at gmail dot com"]
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "Readme.txt"]
+ s.files = ["History.txt", "init.rb", "js_test/functional/cds_test.html", "js_test/prototype.js", "js_test/test.css", "js_test/unit/cds_helper_methods.html", "js_test/unittest.js", "lib/calendar_date_select/calendar_date_select.rb", "lib/calendar_date_select/includes_helper.rb", "lib/calendar_date_select.rb", "Manifest.txt", "MIT-LICENSE", "public/blank_iframe.html", "public/images/calendar_date_select/calendar.gif", "public/javascripts/calendar_date_select/calendar_date_select.js", "public/javascripts/calendar_date_select/format_american.js", "public/javascripts/calendar_date_select/format_db.js", "public/javascripts/calendar_date_select/format_euro_24hr.js", "public/javascripts/calendar_date_select/format_euro_24hr_ymd.js", "public/javascripts/calendar_date_select/format_finnish.js", "public/javascripts/calendar_date_select/format_hyphen_ampm.js", "public/javascripts/calendar_date_select/format_iso_date.js", "public/javascripts/calendar_date_select/format_italian.js", "public/javascripts/calendar_date_select/locale/de.js", "public/javascripts/calendar_date_select/locale/fi.js", "public/javascripts/calendar_date_select/locale/fr.js", "public/javascripts/calendar_date_select/locale/pl.js", "public/javascripts/calendar_date_select/locale/pt.js", "public/javascripts/calendar_date_select/locale/ru.js", "public/stylesheets/calendar_date_select/blue.css", "public/stylesheets/calendar_date_select/default.css", "public/stylesheets/calendar_date_select/plain.css", "public/stylesheets/calendar_date_select/red.css", "public/stylesheets/calendar_date_select/silver.css", "Rakefile", "Readme.txt", "test/functional/calendar_date_select_test.rb", "test/functional/helper_methods_test.rb", "test/test_helper.rb"]
+ s.has_rdoc = true
+ s.homepage = %q{http://code.google.com/p/calendardateselect/}
+ s.rdoc_options = ["--main", "README.txt"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{calendar_date_select}
+ s.rubygems_version = %q{1.3.0}
+ s.summary = %q{}
+ s.test_files = ["test/test_helper.rb"]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 2
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
+ else
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
+ end
+ else
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
+ end
+end
View
@@ -1,17 +1 @@
-%w[calendar_date_select includes_helper].each { |file|
- require File.join( File.dirname(__FILE__), "lib",file)
-}
-
-ActionView::Helpers::FormHelper.send(:include, CalendarDateSelect::FormHelper)
-ActionView::Base.send(:include, CalendarDateSelect::FormHelper)
-ActionView::Base.send(:include, CalendarDateSelect::IncludesHelper)
-
-# install files
-unless File.exists?(RAILS_ROOT + '/public/javascripts/calendar_date_select/calendar_date_select.js')
- ['/public', '/public/javascripts/calendar_date_select', '/public/stylesheets/calendar_date_select', '/public/images/calendar_date_select', '/public/javascripts/calendar_date_select/locale'].each do |dir|
- source = File.join(File.dirname(__FILE__), dir)
- dest = RAILS_ROOT + dir
- FileUtils.mkdir_p(dest)
- FileUtils.cp(Dir.glob(source+'/*.*'), dest)
- end
-end
+require File.dirname(__FILE__) + "/lib/calendar_date_select.rb"
Oops, something went wrong.

0 comments on commit f317368

Please sign in to comment.