Skip to content

Commit f317368

Browse files
committed
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)
1 parent 6ec4ecb commit f317368

13 files changed

+453
-367
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pkg

CHANGELOG History.txt

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
== Version 1.11.1 ==
2+
* properly wrap buttons if they are too big for the line
3+
* more translations: german (Jonas), Added russian translation (DEkart)
4+
* locale fixes:
5+
* Fix: time doesn't work (using 12 hour instead of 24 hour) in Italian format.
6+
* updated Portuguese translation with the "Clear" action (Daniel Luz)
7+
* Portuguese was missing month of October
8+
* Added a clear button (Hendy Tanata)
9+
* Reverted a change that attempted to fix position in a scrollable div, but caused probles elsewhere
10+
* Added :minute_interval to calendar_date_select_process_options, fixing http://code.google.com/p/calendardateselect/issues/detail?id=81
11+
* Add helpers to give the list of javascripts and stylesheets (calendar_date_select_javascripts and calendar_date_select_stylesheets)
12+
* Converted over to use Hoe (echoe was giving too many problems). Refactored the directory structure to make it more gem-ish.
13+
114
== Version 1.11 ==
215

316
* Calendar Date Select now works as a ruby-gem (thanks, artmotion!)
@@ -197,4 +210,7 @@ June 2, 2007
197210
==Version 1.0==
198211
June 1, 2007
199212

200-
* Initial release!
213+
* Initial release!
214+
215+
216+

Manifest.txt

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
History.txt
2+
init.rb
3+
js_test/functional/cds_test.html
4+
js_test/prototype.js
5+
js_test/test.css
6+
js_test/unit/cds_helper_methods.html
7+
js_test/unittest.js
8+
lib/calendar_date_select/calendar_date_select.rb
9+
lib/calendar_date_select/includes_helper.rb
10+
lib/calendar_date_select.rb
11+
Manifest.txt
12+
MIT-LICENSE
13+
public/blank_iframe.html
14+
public/images/calendar_date_select/calendar.gif
15+
public/javascripts/calendar_date_select/calendar_date_select.js
16+
public/javascripts/calendar_date_select/format_american.js
17+
public/javascripts/calendar_date_select/format_db.js
18+
public/javascripts/calendar_date_select/format_euro_24hr.js
19+
public/javascripts/calendar_date_select/format_euro_24hr_ymd.js
20+
public/javascripts/calendar_date_select/format_finnish.js
21+
public/javascripts/calendar_date_select/format_hyphen_ampm.js
22+
public/javascripts/calendar_date_select/format_iso_date.js
23+
public/javascripts/calendar_date_select/format_italian.js
24+
public/javascripts/calendar_date_select/locale/de.js
25+
public/javascripts/calendar_date_select/locale/fi.js
26+
public/javascripts/calendar_date_select/locale/fr.js
27+
public/javascripts/calendar_date_select/locale/pl.js
28+
public/javascripts/calendar_date_select/locale/pt.js
29+
public/javascripts/calendar_date_select/locale/ru.js
30+
public/stylesheets/calendar_date_select/blue.css
31+
public/stylesheets/calendar_date_select/default.css
32+
public/stylesheets/calendar_date_select/plain.css
33+
public/stylesheets/calendar_date_select/red.css
34+
public/stylesheets/calendar_date_select/silver.css
35+
Rakefile
36+
Readme.txt
37+
test/functional/calendar_date_select_test.rb
38+
test/functional/helper_methods_test.rb
39+
test/test_helper.rb

Rakefile

+29-22
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
require 'echoe'
2-
# try "rake -T" so see the wunderfull tasks generated by the little code below ;-)
1+
# -*- ruby -*-
32

4-
Echoe.new("timcharper-calendar_date_select") do |p|
5-
p.version = "1.11.1"
6-
p.author = "Tim Harper"
7-
p.email = "timcharper@gmail.com"
8-
p.url = "http://github.com/timcharper/calendar_date_select"
9-
p.summary = "A popular and flexible JavaScript DatePicker for RubyOnRails"
10-
p.description = <<-END_OF_DESCRIPTION
11-
CalendarDateSelect is semi-light-weight and easy to use!
12-
It takes full advantage of the prototype.js library, resulting in less code,
13-
but maintaining a great deal of functionality.
14-
Project site: http://code.google.com/p/calendardateselect/
15-
END_OF_DESCRIPTION
16-
p.has_rdoc = false
17-
p.platform = Gem::Platform::RUBY
18-
p.ignore_pattern = Dir.glob("{tmp}/**/*")
19-
p.test_files = [
20-
"test/test_helper.rb",
21-
"test/functional/calendar_date_select_test.rb",
22-
"test/functional/helper_methods_test.rb"
23-
]
3+
require 'rubygems'
4+
require 'hoe'
5+
6+
$: << File.dirname(__FILE__) + "/lib/"
7+
require "activesupport"
8+
require './lib/calendar_date_select.rb'
9+
10+
Hoe.new('calendar_date_select', CalendarDateSelect::VERSION) do |p|
11+
p.rubyforge_name = 'calendar_date_select'
12+
p.developer('Tim Harper', 'tim c harper at gmail dot com')
13+
end
14+
15+
16+
task :set_version do
17+
["lib/calendar_date_select/calendar_date_select.rb", "public/javascripts/calendar_date_select/calendar_date_select.js"].each do |file|
18+
abs_file = File.dirname(__FILE__) + "/" + file
19+
src = File.read(abs_file);
20+
src = src.map do |line|
21+
case line
22+
when /^ *VERSION/ then " VERSION = '#{ENV['VERSION']}'\n"
23+
when /^\/\/ CalendarDateSelect version / then "// CalendarDateSelect version #{ENV['VERSION']} - a prototype based date picker\n"
24+
else
25+
line
26+
end
27+
end.join
28+
File.open(abs_file, "wb") { |f| f << src }
29+
end
2430
end
31+
# vim: syntax=Ruby

README.textile Readme.txt

+16-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
h1. CalendarDateSelect
2-
3-
Author: Tim Harper ( 'tim_see_harperATgmail._see_om'.gsub('_see_', 'c').gsub('AT', '@') )
4-
5-
h2. Examples
6-
7-
"See a demo here":http://electronicholas.com/calendar
8-
9-
h2. Project Site
10-
11-
http://code.google.com/p/calendardateselect/
12-
13-
h2. Submitting patches
14-
15-
Please take care to do the following:
16-
17-
* Clean up your patch (don't send a patch bomb with a hundred features in one)
18-
* Write test cases!
19-
* As a general rule of thumb, think of ways to make things more general purpose than specific.
20-
1+
= CalendarDateSelect
2+
3+
http://code.google.com/p/calendardateselect/
4+
5+
== Examples
6+
7+
"See a demo here":http://electronicholas.com/calendar
8+
9+
== Submitting patches
10+
11+
Please take care to do the following:
12+
13+
* Clean up your patch (don't send a patch bomb with a hundred features in one)
14+
* Write test cases!
15+
* As a general rule of thumb, think of ways to make things more general purpose than specific.
16+

calendar_date_select.gemspec

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Gem::Specification.new do |s|
2+
s.name = %q{calendar_date_select}
3+
s.version = "1.11.1"
4+
5+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6+
s.authors = ["Tim Harper"]
7+
s.date = %q{2008-11-23}
8+
s.description = %q{}
9+
s.email = ["tim c harper at gmail dot com"]
10+
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "Readme.txt"]
11+
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"]
12+
s.has_rdoc = true
13+
s.homepage = %q{http://code.google.com/p/calendardateselect/}
14+
s.rdoc_options = ["--main", "README.txt"]
15+
s.require_paths = ["lib"]
16+
s.rubyforge_project = %q{calendar_date_select}
17+
s.rubygems_version = %q{1.3.0}
18+
s.summary = %q{}
19+
s.test_files = ["test/test_helper.rb"]
20+
21+
if s.respond_to? :specification_version then
22+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23+
s.specification_version = 2
24+
25+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26+
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
27+
else
28+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
29+
end
30+
else
31+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
32+
end
33+
end

init.rb

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
%w[calendar_date_select includes_helper].each { |file|
2-
require File.join( File.dirname(__FILE__), "lib",file)
3-
}
4-
5-
ActionView::Helpers::FormHelper.send(:include, CalendarDateSelect::FormHelper)
6-
ActionView::Base.send(:include, CalendarDateSelect::FormHelper)
7-
ActionView::Base.send(:include, CalendarDateSelect::IncludesHelper)
8-
9-
# install files
10-
unless File.exists?(RAILS_ROOT + '/public/javascripts/calendar_date_select/calendar_date_select.js')
11-
['/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|
12-
source = File.join(File.dirname(__FILE__), dir)
13-
dest = RAILS_ROOT + dir
14-
FileUtils.mkdir_p(dest)
15-
FileUtils.cp(Dir.glob(source+'/*.*'), dest)
16-
end
17-
end
1+
require File.dirname(__FILE__) + "/lib/calendar_date_select.rb"

0 commit comments

Comments
 (0)