Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

Commit

Permalink
Cleaning up to prepare for ruby-forge release
Browse files Browse the repository at this point in the history
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
timcharper committed Nov 23, 2008
1 parent 6ec4ecb commit f317368
Show file tree
Hide file tree
Showing 13 changed files with 453 additions and 367 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkg
18 changes: 17 additions & 1 deletion CHANGELOG → History.txt
Original file line number Diff line number Diff line change
@@ -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!)
Expand Down Expand Up @@ -197,4 +210,7 @@ June 2, 2007
==Version 1.0==
June 1, 2007

* Initial release!
* Initial release!



39 changes: 39 additions & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
@@ -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
51 changes: 29 additions & 22 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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
36 changes: 16 additions & 20 deletions README.textile → Readme.txt
Original file line number Diff line number Diff line change
@@ -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.

33 changes: 33 additions & 0 deletions calendar_date_select.gemspec
Original file line number Diff line number Diff line change
@@ -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
18 changes: 1 addition & 17 deletions init.rb
Original file line number Diff line number Diff line change
@@ -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"
Loading

0 comments on commit f317368

Please sign in to comment.