Skip to content

Commit

Permalink
Fix for Cappuccino sometimes failing to build on Mac OS X.
Browse files Browse the repository at this point in the history
Thanks to Josh Wilson for tracking this down!

Closes #6.

Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed Apr 30, 2009
1 parent f887aca commit 0f357c2
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions Rake/lib/objective-j/bundletask.rb
Expand Up @@ -186,8 +186,7 @@ def self.attribute_alias_singular(singular, plural)

required_attribute :name
required_attribute :version
#required_attribute :date
attribute :date

required_attribute :summary
required_attribute :identifier
required_attribute :platforms, [Platform::ObjJ]
Expand Down Expand Up @@ -228,30 +227,6 @@ def self.attribute_alias_singular(singular, plural)
attr_accessor :loaded_from

# ------------------------- Special accessor behaviours (overwriting default).

# overwrite_accessor :version= do |version|
# @version = Version.create(version)
# end

overwrite_accessor :date= do |date|
# We want to end up with a Time object with one-day resolution. This is
# the cleanest, most-readable, faster-than-using-Date way to do it.
case date
when String then
@date = Time.parse date
when Time then
@date = Time.parse date.strftime("%Y-%m-%d")
when Date then
@date = Time.parse date.to_s
else
@date = Time.today
end
end

overwrite_accessor :date do
self.date = nil if @date.nil? # HACK Sets the default value for date
@date
end

overwrite_accessor :summary= do |str|
if str
Expand Down

0 comments on commit 0f357c2

Please sign in to comment.