<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1 @@
-test/test/
\ No newline at end of file
+test/output/
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,184 +1,181 @@
 require 'date'
 
-module CuteCalendar
+module CalendarHelper
 
-  # CalendarHelper allows you to draw a databound calendar with fine-grained CSS formatting
-  module CalendarHelper
+  VERSION = '0.2.2'
 
-    VERSION = '0.2.2'
+  # Returns an HTML calendar. In its simplest form, this method generates a plain
+  # calendar (which can then be customized using CSS) for a given month and year.
+  # However, this may be customized in a variety of ways -- changing the default CSS
+  # classes, generating the individual day entries yourself, and so on.
+  # 
+  # The following options are required:
+  #  :year  # The  year number to show the calendar for.
+  #  :month # The month number to show the calendar for.
+  # 
+  # The following are optional, available for customizing the default behaviour:
+  #   :table_class       =&gt; &quot;calendar&quot;        # The class for the &lt;table&gt; tag.
+  #   :month_name_class  =&gt; &quot;monthName&quot;       # The class for the name of the month, at the top of the table.
+  #   :other_month_class =&gt; &quot;otherMonth&quot; # Not implemented yet.
+  #   :day_name_class    =&gt; &quot;dayName&quot;         # The class is for the names of the weekdays, at the top.
+  #   :day_class         =&gt; &quot;day&quot;             # The class for the individual day number cells.
+  #                                             This may or may not be used if you specify a block (see below).
+  #   :abbrev            =&gt; (0..2)            # This option specifies how the day names should be abbreviated.
+  #                                             Use (0..2) for the first three letters, (0..0) for the first, and
+  #                                             (0..-1) for the entire name.
+  #   :first_day_of_week =&gt; 0                 # Renders calendar starting on Sunday. Use 1 for Monday, and so on.
+  #   :accessible        =&gt; true              # Turns on accessibility mode. This suffixes dates within the
+  #                                           # calendar that are outside the range defined in the &lt;caption&gt; with 
+  #                                           # &lt;span class=&quot;hidden&quot;&gt; MonthName&lt;/span&gt;
+  #                                           # Defaults to false.
+  #                                           # You'll need to define an appropriate style in order to make this disappear. 
+  #                                           # Choose your own method of hiding content appropriately.
+  #
+  #   :show_today        =&gt; false             # Highlights today on the calendar using the CSS class 'today'. 
+  #                                           # Defaults to true.
+  #   :previous_month_text   =&gt; nil           # Displayed left of the month name if set
+  #   :next_month_text   =&gt; nil               # Displayed right of the month name if set
+  #
+  # For more customization, you can pass a code block to this method, that will get one argument, a Date object,
+  # and return a values for the individual table cells. The block can return an array, [cell_text, cell_attrs],
+  # cell_text being the text that is displayed and cell_attrs a hash containing the attributes for the &lt;td&gt; tag
+  # (this can be used to change the &lt;td&gt;'s class for customization with CSS).
+  # This block can also return the cell_text only, in which case the &lt;td&gt;'s class defaults to the value given in
+  # +:day_class+. If the block returns nil, the default options are used.
+  # 
+  # Example usage:
+  #   calendar(:year =&gt; 2005, :month =&gt; 6) # This generates the simplest possible calendar.
+  #   calendar({:year =&gt; 2005, :month =&gt; 6, :table_class =&gt; &quot;calendar_helper&quot;}) # This generates a calendar, as
+  #                                                                             # before, but the &lt;table&gt;'s class
+  #                                                                             # is set to &quot;calendar_helper&quot;.
+  #   calendar(:year =&gt; 2005, :month =&gt; 6, :abbrev =&gt; (0..-1)) # This generates a simple calendar but shows the
+  #                                                            # entire day name (&quot;Sunday&quot;, &quot;Monday&quot;, etc.) instead
+  #                                                            # of only the first three letters.
+  #   calendar(:year =&gt; 2005, :month =&gt; 5) do |d| # This generates a simple calendar, but gives special days
+  #     if listOfSpecialDays.include?(d)          # (days that are in the array listOfSpecialDays) one CSS class,
+  #       [d.mday, {:class =&gt; &quot;specialDay&quot;}]      # &quot;specialDay&quot;, and gives the rest of the days another CSS class,
+  #     else                                      # &quot;normalDay&quot;. You can also use this highlight today differently
+  #       [d.mday, {:class =&gt; &quot;normalDay&quot;}]       # from the rest of the days, etc.
+  #     end
+  #   end
+  #
+  # An additional 'weekend' class is applied to weekend days. 
+  #
+  # For consistency with the themes provided in the calendar_styles generator, use &quot;specialDay&quot; as the CSS class for marked days.
+  # 
+  def calendar(options = {}, &amp;block)
+    raise(ArgumentError, &quot;No year given&quot;)  unless options.has_key?(:year)
+    raise(ArgumentError, &quot;No month given&quot;) unless options.has_key?(:month)
 
-    # Returns an HTML calendar. In its simplest form, this method generates a plain
-    # calendar (which can then be customized using CSS) for a given month and year.
-    # However, this may be customized in a variety of ways -- changing the default CSS
-    # classes, generating the individual day entries yourself, and so on.
-    # 
-    # The following options are required:
-    #  :year  # The  year number to show the calendar for.
-    #  :month # The month number to show the calendar for.
-    # 
-    # The following are optional, available for customizing the default behaviour:
-    #   :table_class       =&gt; &quot;calendar&quot;        # The class for the &lt;table&gt; tag.
-    #   :month_name_class  =&gt; &quot;monthName&quot;       # The class for the name of the month, at the top of the table.
-    #   :other_month_class =&gt; &quot;otherMonth&quot; # Not implemented yet.
-    #   :day_name_class    =&gt; &quot;dayName&quot;         # The class is for the names of the weekdays, at the top.
-    #   :day_class         =&gt; &quot;day&quot;             # The class for the individual day number cells.
-    #                                             This may or may not be used if you specify a block (see below).
-    #   :abbrev            =&gt; (0..2)            # This option specifies how the day names should be abbreviated.
-    #                                             Use (0..2) for the first three letters, (0..0) for the first, and
-    #                                             (0..-1) for the entire name.
-    #   :first_day_of_week =&gt; 0                 # Renders calendar starting on Sunday. Use 1 for Monday, and so on.
-    #   :accessible        =&gt; true              # Turns on accessibility mode. This suffixes dates within the
-    #                                           # calendar that are outside the range defined in the &lt;caption&gt; with 
-    #                                           # &lt;span class=&quot;hidden&quot;&gt; MonthName&lt;/span&gt;
-    #                                           # Defaults to false.
-    #                                           # You'll need to define an appropriate style in order to make this disappear. 
-    #                                           # Choose your own method of hiding content appropriately.
-    #
-    #   :show_today        =&gt; false             # Highlights today on the calendar using the CSS class 'today'. 
-    #                                           # Defaults to true.
-    #   :previous_month_text   =&gt; nil           # Displayed left of the month name if set
-    #   :next_month_text   =&gt; nil               # Displayed right of the month name if set
-    #
-    # For more customization, you can pass a code block to this method, that will get one argument, a Date object,
-    # and return a values for the individual table cells. The block can return an array, [cell_text, cell_attrs],
-    # cell_text being the text that is displayed and cell_attrs a hash containing the attributes for the &lt;td&gt; tag
-    # (this can be used to change the &lt;td&gt;'s class for customization with CSS).
-    # This block can also return the cell_text only, in which case the &lt;td&gt;'s class defaults to the value given in
-    # +:day_class+. If the block returns nil, the default options are used.
-    # 
-    # Example usage:
-    #   calendar(:year =&gt; 2005, :month =&gt; 6) # This generates the simplest possible calendar.
-    #   calendar({:year =&gt; 2005, :month =&gt; 6, :table_class =&gt; &quot;calendar_helper&quot;}) # This generates a calendar, as
-    #                                                                             # before, but the &lt;table&gt;'s class
-    #                                                                             # is set to &quot;calendar_helper&quot;.
-    #   calendar(:year =&gt; 2005, :month =&gt; 6, :abbrev =&gt; (0..-1)) # This generates a simple calendar but shows the
-    #                                                            # entire day name (&quot;Sunday&quot;, &quot;Monday&quot;, etc.) instead
-    #                                                            # of only the first three letters.
-    #   calendar(:year =&gt; 2005, :month =&gt; 5) do |d| # This generates a simple calendar, but gives special days
-    #     if listOfSpecialDays.include?(d)          # (days that are in the array listOfSpecialDays) one CSS class,
-    #       [d.mday, {:class =&gt; &quot;specialDay&quot;}]      # &quot;specialDay&quot;, and gives the rest of the days another CSS class,
-    #     else                                      # &quot;normalDay&quot;. You can also use this highlight today differently
-    #       [d.mday, {:class =&gt; &quot;normalDay&quot;}]       # from the rest of the days, etc.
-    #     end
-    #   end
-    #
-    # An additional 'weekend' class is applied to weekend days. 
-    #
-    # For consistency with the themes provided in the calendar_styles generator, use &quot;specialDay&quot; as the CSS class for marked days.
-    # 
-    def calendar(options = {}, &amp;block)
-      raise(ArgumentError, &quot;No year given&quot;)  unless options.has_key?(:year)
-      raise(ArgumentError, &quot;No month given&quot;) unless options.has_key?(:month)
+    block                        ||= Proc.new {|d| nil}
 
-      block                        ||= Proc.new {|d| nil}
+    defaults = {
+      :table_class =&gt; 'calendar',
+      :month_name_class =&gt; 'monthName',
+      :other_month_class =&gt; 'otherMonth',
+      :day_name_class =&gt; 'dayName',
+      :day_class =&gt; 'day',
+      :abbrev =&gt; (0..2),
+      :first_day_of_week =&gt; 0,
+      :accessible =&gt; false,
+      :show_today =&gt; true,
+      :previous_month_text =&gt; nil,
+      :next_month_text =&gt; nil
+    }
+    options = defaults.merge options
 
-      defaults = {
-        :table_class =&gt; 'calendar',
-        :month_name_class =&gt; 'monthName',
-        :other_month_class =&gt; 'otherMonth',
-        :day_name_class =&gt; 'dayName',
-        :day_class =&gt; 'day',
-        :abbrev =&gt; (0..2),
-        :first_day_of_week =&gt; 0,
-        :accessible =&gt; false,
-        :show_today =&gt; true,
-        :previous_month_text =&gt; nil,
-        :next_month_text =&gt; nil
-      }
-      options = defaults.merge options
+    first = Date.civil(options[:year], options[:month], 1)
+    last = Date.civil(options[:year], options[:month], -1)
 
-      first = Date.civil(options[:year], options[:month], 1)
-      last = Date.civil(options[:year], options[:month], -1)
-
-      first_weekday = first_day_of_week(options[:first_day_of_week])
-      last_weekday = last_day_of_week(options[:first_day_of_week])
-      
-      day_names = Date::DAYNAMES.dup
-      first_weekday.times do
-        day_names.push(day_names.shift)
-      end
+    first_weekday = first_day_of_week(options[:first_day_of_week])
+    last_weekday = last_day_of_week(options[:first_day_of_week])
+    
+    day_names = Date::DAYNAMES.dup
+    first_weekday.times do
+      day_names.push(day_names.shift)
+    end
 
-      # TODO Use some kind of builder instead of straight HTML
-      cal = %(&lt;table class=&quot;#{options[:table_class]}&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;)
-      cal &lt;&lt; %(&lt;thead&gt;&lt;tr&gt;)
-      if options[:previous_month_text] or options[:next_month_text]
-        cal &lt;&lt; %(&lt;th colspan=&quot;2&quot;&gt;#{options[:previous_month_text]}&lt;/th&gt;)
-        colspan=3
+    # TODO Use some kind of builder instead of straight HTML
+    cal = %(&lt;table class=&quot;#{options[:table_class]}&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;)
+    cal &lt;&lt; %(&lt;thead&gt;&lt;tr&gt;)
+    if options[:previous_month_text] or options[:next_month_text]
+      cal &lt;&lt; %(&lt;th colspan=&quot;2&quot;&gt;#{options[:previous_month_text]}&lt;/th&gt;)
+      colspan=3
+    else
+      colspan=7
+    end
+    cal &lt;&lt; %(&lt;th colspan=&quot;#{colspan}&quot; class=&quot;#{options[:month_name_class]}&quot;&gt;#{Date::MONTHNAMES[options[:month]]}&lt;/th&gt;)
+    cal &lt;&lt; %(&lt;th colspan=&quot;2&quot;&gt;#{options[:next_month_text]}&lt;/th&gt;) if options[:next_month_text]
+    cal &lt;&lt; %(&lt;/tr&gt;&lt;tr class=&quot;#{options[:day_name_class]}&quot;&gt;)
+    day_names.each do |d|
+      unless d[options[:abbrev]].eql? d
+        cal &lt;&lt; &quot;&lt;th scope='col'&gt;&lt;abbr title='#{d}'&gt;#{d[options[:abbrev]]}&lt;/abbr&gt;&lt;/th&gt;&quot;
       else
-        colspan=7
-      end
-      cal &lt;&lt; %(&lt;th colspan=&quot;#{colspan}&quot; class=&quot;#{options[:month_name_class]}&quot;&gt;#{Date::MONTHNAMES[options[:month]]}&lt;/th&gt;)
-      cal &lt;&lt; %(&lt;th colspan=&quot;2&quot;&gt;#{options[:next_month_text]}&lt;/th&gt;) if options[:next_month_text]
-      cal &lt;&lt; %(&lt;/tr&gt;&lt;tr class=&quot;#{options[:day_name_class]}&quot;&gt;)
-      day_names.each do |d|
-        unless d[options[:abbrev]].eql? d
-          cal &lt;&lt; &quot;&lt;th scope='col'&gt;&lt;abbr title='#{d}'&gt;#{d[options[:abbrev]]}&lt;/abbr&gt;&lt;/th&gt;&quot;
-        else
-          cal &lt;&lt; &quot;&lt;th scope='col'&gt;#{d[options[:abbrev]]}&lt;/th&gt;&quot;
-        end
+        cal &lt;&lt; &quot;&lt;th scope='col'&gt;#{d[options[:abbrev]]}&lt;/th&gt;&quot;
       end
-      cal &lt;&lt; &quot;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&quot;
-      beginning_of_week(first, first_weekday).upto(first - 1) do |d|
-        cal &lt;&lt; %(&lt;td class=&quot;#{options[:other_month_class]})
-        cal &lt;&lt; &quot; weekendDay&quot; if weekend?(d)
-        if options[:accessible]
-          cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;span class=&quot;hidden&quot;&gt; #{Date::MONTHNAMES[d.month]}&lt;/span&gt;&lt;/td&gt;)
-        else
-          cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;/td&gt;)
-        end
-      end unless first.wday == first_weekday
-      first.upto(last) do |cur|
-        cell_text, cell_attrs = block.call(cur)
-        cell_text  ||= cur.mday
-        cell_attrs ||= {:class =&gt; options[:day_class]}
-        cell_attrs[:class] += &quot; weekendDay&quot; if [0, 6].include?(cur.wday) 
-        cell_attrs[:class] += &quot; today&quot; if (cur == Date.today) and options[:show_today]  
-        cell_attrs = cell_attrs.map {|k, v| %(#{k}=&quot;#{v}&quot;) }.join(&quot; &quot;)
-        cal &lt;&lt; &quot;&lt;td #{cell_attrs}&gt;#{cell_text}&lt;/td&gt;&quot;
-        cal &lt;&lt; &quot;&lt;/tr&gt;&lt;tr&gt;&quot; if cur.wday == last_weekday
-      end
-      (last + 1).upto(beginning_of_week(last + 7, first_weekday) - 1)  do |d|
-        cal &lt;&lt; %(&lt;td class=&quot;#{options[:other_month_class]})
-        cal &lt;&lt; &quot; weekendDay&quot; if weekend?(d)
-        if options[:accessible]
-          cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;span class='hidden'&gt; #{Date::MONTHNAMES[d.mon]}&lt;/span&gt;&lt;/td&gt;)
-        else
-          cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;/td&gt;)        
-        end
-      end unless last.wday == last_weekday
-      cal &lt;&lt; &quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;
     end
-    
-    private
-    
-    def first_day_of_week(day)
-      day
-    end
-    
-    def last_day_of_week(day)
-      if day &gt; 0
-        day - 1
+    cal &lt;&lt; &quot;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&quot;
+    beginning_of_week(first, first_weekday).upto(first - 1) do |d|
+      cal &lt;&lt; %(&lt;td class=&quot;#{options[:other_month_class]})
+      cal &lt;&lt; &quot; weekendDay&quot; if weekend?(d)
+      if options[:accessible]
+        cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;span class=&quot;hidden&quot;&gt; #{Date::MONTHNAMES[d.month]}&lt;/span&gt;&lt;/td&gt;)
       else
-        6
+        cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;/td&gt;)
       end
+    end unless first.wday == first_weekday
+    first.upto(last) do |cur|
+      cell_text, cell_attrs = block.call(cur)
+      cell_text  ||= cur.mday
+      cell_attrs ||= {:class =&gt; options[:day_class]}
+      cell_attrs[:class] += &quot; weekendDay&quot; if [0, 6].include?(cur.wday) 
+      cell_attrs[:class] += &quot; today&quot; if (cur == Date.today) and options[:show_today]  
+      cell_attrs = cell_attrs.map {|k, v| %(#{k}=&quot;#{v}&quot;) }.join(&quot; &quot;)
+      cal &lt;&lt; &quot;&lt;td #{cell_attrs}&gt;#{cell_text}&lt;/td&gt;&quot;
+      cal &lt;&lt; &quot;&lt;/tr&gt;&lt;tr&gt;&quot; if cur.wday == last_weekday
     end
-    
-    def days_between(first, second)
-      if first &gt; second
-        second + (7 - first)
+    (last + 1).upto(beginning_of_week(last + 7, first_weekday) - 1)  do |d|
+      cal &lt;&lt; %(&lt;td class=&quot;#{options[:other_month_class]})
+      cal &lt;&lt; &quot; weekendDay&quot; if weekend?(d)
+      if options[:accessible]
+        cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;span class='hidden'&gt; #{Date::MONTHNAMES[d.mon]}&lt;/span&gt;&lt;/td&gt;)
       else
-        second - first
+        cal &lt;&lt; %(&quot;&gt;#{d.day}&lt;/td&gt;)        
       end
+    end unless last.wday == last_weekday
+    cal &lt;&lt; &quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;
+  end
+  
+  private
+  
+  def first_day_of_week(day)
+    day
+  end
+  
+  def last_day_of_week(day)
+    if day &gt; 0
+      day - 1
+    else
+      6
     end
-    
-    def beginning_of_week(date, start = 1)
-      days_to_beg = days_between(start, date.wday)
-      date - days_to_beg
-    end
-    
-    def weekend?(date)
-      [0, 6].include?(date.wday)
+  end
+  
+  def days_between(first, second)
+    if first &gt; second
+      second + (7 - first)
+    else
+      second - first
     end
-    
   end
+  
+  def beginning_of_week(date, start = 1)
+    days_to_beg = days_between(start, date.wday)
+    date - days_to_beg
+  end
+  
+  def weekend?(date)
+    [0, 6].include?(date.wday)
+  end
+  
+
 end</diff>
      <filename>lib/calendar_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1,3 @@
-# CuteCalendar
+module CuteCalendar
+  
+end</diff>
      <filename>lib/cute_calendar.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ class CalendarHelperTest &lt; Test::Unit::TestCase
 
   # include Inflector
   # include ActionController::Assertions::SelectorAssertions
-  include CuteCalendar::CalendarHelper
+  include CalendarHelper
 
 
   def test_with_output</diff>
      <filename>test/test_calendar_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/cute_calendar_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>11881c43b7011da76128dc94ffa4d89c0ce706b7</id>
    </parent>
  </parents>
  <author>
    <name>Federico Builes</name>
    <email>federico.builes@gmail.com</email>
  </author>
  <url>http://github.com/febuiles/cute_calendar/commit/e55c69055e535484d931e3699693d58745d4110c</url>
  <id>e55c69055e535484d931e3699693d58745d4110c</id>
  <committed-date>2008-12-02T08:31:09-08:00</committed-date>
  <authored-date>2008-12-02T08:31:09-08:00</authored-date>
  <message>No need to scope this under a module so far.</message>
  <tree>3bcff97857fbe6497a5dc6c6cc9199e9ccb0264b</tree>
  <committer>
    <name>Federico Builes</name>
    <email>federico.builes@gmail.com</email>
  </committer>
</commit>
