<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[116892] branches/gsoc11-statistics/stats-server/app</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/116892">116892</a></dd>
<dt>Author</dt> <dd>cal@macports.org</dd>
<dt>Date</dt> <dd>2014-02-09 08:57:56 -0800 (Sun, 09 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>macports stats: re-indent helpers, models, sweepers</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesgsoc11statisticsstatsserverapphelpersapplication_helperrb">branches/gsoc11-statistics/stats-server/app/helpers/application_helper.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverapphelpersports_helperrb">branches/gsoc11-statistics/stats-server/app/helpers/ports_helper.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappmodelscategoryrb">branches/gsoc11-statistics/stats-server/app/models/category.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappmodelsinstalled_portrb">branches/gsoc11-statistics/stats-server/app/models/installed_port.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappmodelsos_statisticrb">branches/gsoc11-statistics/stats-server/app/models/os_statistic.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappmodelsportrb">branches/gsoc11-statistics/stats-server/app/models/port.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappmodelssubmissionrb">branches/gsoc11-statistics/stats-server/app/models/submission.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappmodelsuserrb">branches/gsoc11-statistics/stats-server/app/models/user.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappsweeperscategory_sweeperrb">branches/gsoc11-statistics/stats-server/app/sweepers/category_sweeper.rb</a></li>
<li><a href="#branchesgsoc11statisticsstatsserverappsweepersport_sweeperrb">branches/gsoc11-statistics/stats-server/app/sweepers/port_sweeper.rb</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesgsoc11statisticsstatsserverapphelpersapplication_helperrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/helpers/application_helper.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/helpers/application_helper.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/helpers/application_helper.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><span class="cx"> module ApplicationHelper
</span><del>-  include GoogleVisualization
</del><ins>+        include GoogleVisualization
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverapphelpersports_helperrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/helpers/ports_helper.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/helpers/ports_helper.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/helpers/ports_helper.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,14 +1,14 @@
</span><span class="cx"> module PortsHelper
</span><del>-  def print_search_links(port, member)
-    links = String.new
-    vals = port[member.to_sym]
-    unless vals.nil?
-      vals.split(&quot; &quot;).each do |val|
-        links += &quot;#{link_to val, search_path(member, val)} &quot;
-      end
-      return raw(links)
-    else
-      return nil
-    end
-  end
</del><ins>+        def print_search_links(port, member)
+                links = String.new
+                vals = port[member.to_sym]
+                unless vals.nil?
+                        vals.split(&quot; &quot;).each do |val|
+                                links += &quot;#{link_to val, search_path(member, val)} &quot;
+                        end
+                        return raw(links)
+                else
+                        return nil
+                end
+        end
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappmodelscategoryrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/models/category.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/models/category.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/models/category.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> class Category &lt; ActiveRecord::Base
</span><del>-  has_many :ports
-  
-  validates_presence_of :name
</del><ins>+        has_many :ports
+
+        validates_presence_of :name
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappmodelsinstalled_portrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/models/installed_port.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/models/installed_port.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/models/installed_port.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,55 +1,55 @@
</span><span class="cx"> class InstalledPort &lt; ActiveRecord::Base
</span><del>-  belongs_to :port
-  has_one    :user
-  
-  validates_presence_of :user_id, :port_id, :version
-  
-  # Populate InstalledPort rows based on submitted JSON data
-  def self.add_installed_ports(uuid, installed_ports)
-    logger.debug &quot;In add_installed_ports&quot;
-    
-    if installed_ports.nil?
-      return
-    end
-    
-    current_time = Time.now
-    month = current_time.month
-    year = current_time.year
-    
-    installed_ports.each do |installed_port|
-      # Find the reported port in the MacPorts repository
-      macports_port = Port.find_by_name(installed_port['name'])
</del><ins>+        belongs_to :port
+        has_one    :user
</ins><span class="cx"> 
</span><del>-      if macports_port.nil?
-        logger.debug {&quot;Skipping unknown port #{installed_port['name']} - Not in MacPorts repository&quot;}
-        next
-      end
-      
-      # Update installed port information
-      InstalledPort.add_port(uuid, macports_port, installed_port, month, year)
-    end
-  end
-  
-  def self.add_port(user, macports_port, installed_port, month, year)
-    logger.debug {&quot;Adding installed port #{installed_port['name']}&quot;}
-    
-    # Update any ports found for this user if they have already been submitted this month  
-    port_entrys = user.installed_ports.where(:created_at =&gt; (Date.today.at_beginning_of_month)..(Date.today.at_end_of_month))
-    port_entry = port_entrys.find_by_port_id(macports_port.id)
</del><ins>+        validates_presence_of :user_id, :port_id, :version
</ins><span class="cx"> 
</span><del>-    # No existing entry was found - create a new one                
-    if port_entry.nil?
-      port_entry = InstalledPort.new
-    end
-    
-    port_entry[:user_id]  = user.id
-    port_entry[:port_id]  = macports_port.id
-    port_entry[:version]  = installed_port['version']
-    port_entry[:variants] = installed_port['variants']
-                            
-    if not port_entry.save
-     logger.debug &quot;Unable to save port #{installed_port['name']}&quot;
-     logger.debug &quot;Reason: #{port_entry.errors.full_messages}&quot;
-   end
- end
</del><ins>+        # Populate InstalledPort rows based on submitted JSON data
+        def self.add_installed_ports(uuid, installed_ports)
+                logger.debug &quot;In add_installed_ports&quot;
+
+                if installed_ports.nil?
+                        return
+                end
+
+                current_time = Time.now
+                month = current_time.month
+                year = current_time.year
+
+                installed_ports.each do |installed_port|
+                        # Find the reported port in the MacPorts repository
+                        macports_port = Port.find_by_name(installed_port['name'])
+
+                        if macports_port.nil?
+                                logger.debug {&quot;Skipping unknown port #{installed_port['name']} - Not in MacPorts repository&quot;}
+                                next
+                        end
+
+                        # Update installed port information
+                        InstalledPort.add_port(uuid, macports_port, installed_port, month, year)
+                end
+        end
+
+        def self.add_port(user, macports_port, installed_port, month, year)
+                logger.debug {&quot;Adding installed port #{installed_port['name']}&quot;}
+
+                # Update any ports found for this user if they have already been submitted this month
+                port_entrys = user.installed_ports.where(:created_at =&gt; (Date.today.at_beginning_of_month)..(Date.today.at_end_of_month))
+                port_entry = port_entrys.find_by_port_id(macports_port.id)
+
+                # No existing entry was found - create a new one
+                if port_entry.nil?
+                        port_entry = InstalledPort.new
+                end
+
+                port_entry[:user_id]  = user.id
+                port_entry[:port_id]  = macports_port.id
+                port_entry[:version]  = installed_port['version']
+                port_entry[:variants] = installed_port['variants']
+
+                if not port_entry.save
+                        logger.debug &quot;Unable to save port #{installed_port['name']}&quot;
+                        logger.debug &quot;Reason: #{port_entry.errors.full_messages}&quot;
+                end
+        end
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappmodelsos_statisticrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/models/os_statistic.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/models/os_statistic.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/models/os_statistic.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,83 +1,83 @@
</span><span class="cx"> class OsStatistic &lt; ActiveRecord::Base
</span><del>-  belongs_to :user, :validate =&gt; true
</del><ins>+        belongs_to :user, :validate =&gt; true
</ins><span class="cx"> 
</span><del>-  attr_accessible :macports_version
-  attr_accessible :osx_version
-  attr_accessible :os_arch
-  attr_accessible :os_platform
-  attr_accessible :build_arch
-  attr_accessible :gcc_version
-  attr_accessible :xcode_version
</del><ins>+        attr_accessible :macports_version
+        attr_accessible :osx_version
+        attr_accessible :os_arch
+        attr_accessible :os_platform
+        attr_accessible :build_arch
+        attr_accessible :gcc_version
+        attr_accessible :xcode_version
</ins><span class="cx"> 
</span><del>-  validates :macports_version,  :presence =&gt; true
-  validates :osx_version,       :presence =&gt; true
-  validates :os_arch,           :presence =&gt; true
-  validates :os_platform,       :presence =&gt; true
-  validates :build_arch,        :presence =&gt; true
-  validates :gcc_version,       :presence =&gt; true
-  validates :xcode_version,     :presence =&gt; true
</del><ins>+        validates :macports_version,  :presence =&gt; true
+        validates :osx_version,       :presence =&gt; true
+        validates :os_arch,           :presence =&gt; true
+        validates :os_platform,       :presence =&gt; true
+        validates :build_arch,        :presence =&gt; true
+        validates :gcc_version,       :presence =&gt; true
+        validates :xcode_version,     :presence =&gt; true
</ins><span class="cx"> 
</span><del>-  # Populate an OsStatistics row with data
-  def self.add_os_data(user, os)
-    # os and user must not be nil
-    # Also, user must not be a new record (i.e. it should be in the database)
-    if os.nil? || user.nil? || user.new_record?
-      return false
-    end
-    
-    macports_version = os['macports_version']
-    osx_version      = os['osx_version']
-    os_arch          = os['os_arch']
-    os_platform      = os['os_platform']
-    build_arch       = os['build_arch']
-    gcc_version      = os['gcc_version']
-    xcode_version    = os['xcode_version']
-   
-    # Try to find an existing entry
-    os_stats = user.os_statistic
-     
-    if os_stats.nil?
-      # No entry for this user - create a new one
-      os_stats = OsStatistic.new()
-    end
-    
-    os_stats[:user_id]          = user.id
-    os_stats[:macports_version] = macports_version
-    os_stats[:osx_version]      = osx_version
-    os_stats[:os_arch]          = os_arch
-    os_stats[:os_platform]      = os_platform
-    os_stats[:build_arch]       = build_arch
-    os_stats[:gcc_version]      = gcc_version
-    os_stats[:xcode_version]    = xcode_version
-    
-    return os_stats.save
-  end
</del><ins>+        # Populate an OsStatistics row with data
+        def self.add_os_data(user, os)
+                # os and user must not be nil
+                # Also, user must not be a new record (i.e. it should be in the database)
+                if os.nil? || user.nil? || user.new_record?
+                        return false
+                end
</ins><span class="cx"> 
</span><del>-  # Returns a hash of frequency hashes with a key for each column
-  # The frequency hash contains counts of the number of times a value has 
-  # appeared in its column.
-  # e.g. If &quot;2.0.0&quot; appears 8 times in the &quot;macports_version&quot; column then
-  # frequencies[&quot;macports_version&quot;][&quot;2.0.0&quot;] == 8
-  def self.frequencies
-                           
-    columns = { &quot;macports_version&quot; =&gt; Hash.new(0),
-                &quot;osx_version&quot; =&gt; Hash.new(0),
-                &quot;os_arch&quot; =&gt; Hash.new(0),
-                &quot;os_platform&quot; =&gt; Hash.new(0),
-                &quot;build_arch&quot; =&gt; Hash.new(0),
-                &quot;gcc_version&quot; =&gt; Hash.new(0),
-                &quot;xcode_version&quot; =&gt; Hash.new(0)
-              }
-    
-    OsStatistic.find_each do |os_stat|
-      # For each column in OsStatistics count the number of occurrences of a particular value
-      columns.each do |column, hash|
-        value = os_stat.attributes[column]
-        hash[value] = hash[value] + 1
-      end
-    end
-    
-    return columns
-  end
</del><ins>+                macports_version = os['macports_version']
+                osx_version      = os['osx_version']
+                os_arch          = os['os_arch']
+                os_platform      = os['os_platform']
+                build_arch       = os['build_arch']
+                gcc_version      = os['gcc_version']
+                xcode_version    = os['xcode_version']
</ins><span class="cx"> 
</span><ins>+                # Try to find an existing entry
+                os_stats = user.os_statistic
+
+                if os_stats.nil?
+                        # No entry for this user - create a new one
+                        os_stats = OsStatistic.new()
+                end
+
+                os_stats[:user_id]          = user.id
+                os_stats[:macports_version] = macports_version
+                os_stats[:osx_version]      = osx_version
+                os_stats[:os_arch]          = os_arch
+                os_stats[:os_platform]      = os_platform
+                os_stats[:build_arch]       = build_arch
+                os_stats[:gcc_version]      = gcc_version
+                os_stats[:xcode_version]    = xcode_version
+
+                return os_stats.save
+        end
+
+        # Returns a hash of frequency hashes with a key for each column
+        # The frequency hash contains counts of the number of times a value has
+        # appeared in its column.
+        # e.g. If &quot;2.0.0&quot; appears 8 times in the &quot;macports_version&quot; column then
+        # frequencies[&quot;macports_version&quot;][&quot;2.0.0&quot;] == 8
+        def self.frequencies
+
+                columns = { &quot;macports_version&quot; =&gt; Hash.new(0),
+                          &quot;osx_version&quot; =&gt; Hash.new(0),
+                          &quot;os_arch&quot; =&gt; Hash.new(0),
+                          &quot;os_platform&quot; =&gt; Hash.new(0),
+                          &quot;build_arch&quot; =&gt; Hash.new(0),
+                          &quot;gcc_version&quot; =&gt; Hash.new(0),
+                          &quot;xcode_version&quot; =&gt; Hash.new(0)
+                }
+
+                OsStatistic.find_each do |os_stat|
+                        # For each column in OsStatistics count the number of occurrences of a particular value
+                        columns.each do |column, hash|
+                                value = os_stat.attributes[column]
+                                hash[value] = hash[value] + 1
+                        end
+                end
+
+                return columns
+        end
+
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappmodelsportrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/models/port.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/models/port.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/models/port.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> class Port &lt; ActiveRecord::Base
</span><del>-  belongs_to :category
-  has_many :installed_ports
</del><ins>+        belongs_to :category
+        has_many :installed_ports
</ins><span class="cx"> 
</span><del>-  validates_presence_of :name, :version
</del><ins>+        validates_presence_of :name, :version
</ins><span class="cx"> 
</span><del>-  def self.search(criteria, val, page)
-    paginate :per_page =&gt; 50, :page =&gt; page, :conditions =&gt; [&quot;#{self.columns_hash[criteria].name} like ?&quot;, &quot;%#{val}%&quot;], :order =&gt; 'name ASC'
-  end
</del><ins>+        def self.search(criteria, val, page)
+                paginate :per_page =&gt; 50, :page =&gt; page, :conditions =&gt; [&quot;#{self.columns_hash[criteria].name} like ?&quot;, &quot;%#{val}%&quot;], :order =&gt; 'name ASC'
+        end
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappmodelssubmissionrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/models/submission.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/models/submission.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/models/submission.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> class Submission &lt; ActiveRecord::Base
</span><del>-    
-  def save_data
-    json = ActiveSupport::JSON.decode(data) 
-    os = json['os']
-    active_ports = json['active_ports']
-    #inactive_ports = json['inactive_ports']
-    
-    user = User.find_or_create_by_uuid(json['id'])
-    
-    OsStatistic.add_os_data(user, os)
-    InstalledPort.add_installed_ports(user, active_ports)
-  end
-  
</del><ins>+
+        def save_data
+                json = ActiveSupport::JSON.decode(data) 
+                os = json['os']
+                active_ports = json['active_ports']
+                #inactive_ports = json['inactive_ports']
+
+                user = User.find_or_create_by_uuid(json['id'])
+
+                OsStatistic.add_os_data(user, os)
+                InstalledPort.add_installed_ports(user, active_ports)
+        end
+
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappmodelsuserrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/models/user.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/models/user.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/models/user.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,13 +1,13 @@
</span><span class="cx"> class User &lt; ActiveRecord::Base
</span><del>-  has_one  :os_statistic
-  has_many :installed_ports
-  
-  validates_presence_of :uuid
-  validate :uuid_cannot_be_invalid
-  
-  def uuid_cannot_be_invalid
-    if !UUID.validate(uuid)
-      errors.add(:uuid, &quot;uuid must be a valid universally unique identifier&quot;)
-    end
-  end
</del><ins>+        has_one  :os_statistic
+        has_many :installed_ports
+
+        validates_presence_of :uuid
+        validate :uuid_cannot_be_invalid
+
+        def uuid_cannot_be_invalid
+                if !UUID.validate(uuid)
+                        errors.add(:uuid, &quot;uuid must be a valid universally unique identifier&quot;)
+                end
+        end
</ins><span class="cx"> end
</span></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappsweeperscategory_sweeperrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/sweepers/category_sweeper.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/sweepers/category_sweeper.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/sweepers/category_sweeper.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,21 +1,21 @@
</span><span class="cx"> class CategorySweeper &lt; ActionController::Caching::Sweeper
</span><del>-  observe Category
</del><ins>+        observe Category
</ins><span class="cx"> 
</span><del>-  def after_create(category)
-    expire_cache_for category
-  end
</del><ins>+        def after_create(category)
+                expire_cache_for category
+        end
</ins><span class="cx"> 
</span><del>-  def after_update(category)
-    expire_cache_for category
-  end
</del><ins>+        def after_update(category)
+                expire_cache_for category
+        end
</ins><span class="cx"> 
</span><del>-  def after_destroy(category)
-    expire_cache_for category
-  end
</del><ins>+        def after_destroy(category)
+                expire_cache_for category
+        end
</ins><span class="cx"> 
</span><del>-private
-  def expire_cache_for(category)
-    expire_page categories_path
-    expire_page category_path(category)
-  end
-end
</del><span class="cx">\ No newline at end of file
</span><ins>+        private
+        def expire_cache_for(category)
+                expire_page categories_path
+                expire_page category_path(category)
+        end
+end
</ins></span></pre></div>
<a id="branchesgsoc11statisticsstatsserverappsweepersport_sweeperrb"></a>
<div class="modfile"><h4>Modified: branches/gsoc11-statistics/stats-server/app/sweepers/port_sweeper.rb (116891 => 116892)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc11-statistics/stats-server/app/sweepers/port_sweeper.rb        2014-02-09 16:56:48 UTC (rev 116891)
+++ branches/gsoc11-statistics/stats-server/app/sweepers/port_sweeper.rb        2014-02-09 16:57:56 UTC (rev 116892)
</span><span class="lines">@@ -1,21 +1,21 @@
</span><span class="cx"> class PortSweeper &lt; ActionController::Caching::Sweeper
</span><del>-  observe Port
</del><ins>+        observe Port
</ins><span class="cx"> 
</span><del>-  def after_create(port)
-    expire_cache_for port
-  end
</del><ins>+        def after_create(port)
+                expire_cache_for port
+        end
</ins><span class="cx"> 
</span><del>-  def after_update(port)
-    expire_cache_for port
-  end
</del><ins>+        def after_update(port)
+                expire_cache_for port
+        end
</ins><span class="cx"> 
</span><del>-  def after_destroy(port)
-    expire_cache_for port
-  end
</del><ins>+        def after_destroy(port)
+                expire_cache_for port
+        end
</ins><span class="cx"> 
</span><del>-private
-  def expire_cache_for(port)
-    expire_page category_ports_path(port.category)
-    expire_page category_port_path(port.category, port)
-  end
-end
</del><span class="cx">\ No newline at end of file
</span><ins>+        private
+        def expire_cache_for(port)
+                expire_page category_ports_path(port.category)
+                expire_page category_port_path(port.category, port)
+        end
+end
</ins></span></pre>
</div>
</div>

</body>
</html>