This repository has been archived by the owner on Jun 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 f317368
Showing
13 changed files
with
453 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.