[24405] users/jberry/mpwa

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 23 21:33:30 PDT 2007


Revision: 24405
          http://trac.macosforge.org/projects/macports/changeset/24405
Author:   jberry at macports.org
Date:     2007-04-23 21:33:29 -0700 (Mon, 23 Apr 2007)

Log Message:
-----------
mpwa: bit o progress

Modified Paths:
--------------
    users/jberry/mpwa/app/controllers/port_pkg_controller.rb
    users/jberry/mpwa/app/models/person.rb
    users/jberry/mpwa/app/models/port.rb
    users/jberry/mpwa/app/models/port_pkg.rb
    users/jberry/mpwa/config/routes.rb
    users/jberry/mpwa/doc/design.txt

Modified: users/jberry/mpwa/app/controllers/port_pkg_controller.rb
===================================================================
--- users/jberry/mpwa/app/controllers/port_pkg_controller.rb	2007-04-24 04:18:07 UTC (rev 24404)
+++ users/jberry/mpwa/app/controllers/port_pkg_controller.rb	2007-04-24 04:33:29 UTC (rev 24405)
@@ -66,7 +66,7 @@
   
   def emit_portpkg_path
     port_pkg = PortPkg.find(params[:id])
-    send_file(port_pkg.file_by_path(params[:path].join '/'))
+    send_file(port_pkg.file_by_path(params[:path].join, '/'))
   end
   
   def send_file(file)

Modified: users/jberry/mpwa/app/models/person.rb
===================================================================
--- users/jberry/mpwa/app/models/person.rb	2007-04-24 04:18:07 UTC (rev 24404)
+++ users/jberry/mpwa/app/models/person.rb	2007-04-24 04:33:29 UTC (rev 24405)
@@ -19,6 +19,7 @@
             # Save the person
             person.save
         end
+        
         return person
     end
 end

Modified: users/jberry/mpwa/app/models/port.rb
===================================================================
--- users/jberry/mpwa/app/models/port.rb	2007-04-24 04:18:07 UTC (rev 24404)
+++ users/jberry/mpwa/app/models/port.rb	2007-04-24 04:33:29 UTC (rev 24405)
@@ -1,3 +1,6 @@
+require 'person'
+require 'tag'
+
 class Port < ActiveRecord::Base
     has_many :port_pkgs
     has_and_belongs_to_many :tags

Modified: users/jberry/mpwa/app/models/port_pkg.rb
===================================================================
--- users/jberry/mpwa/app/models/port_pkg.rb	2007-04-24 04:18:07 UTC (rev 24404)
+++ users/jberry/mpwa/app/models/port_pkg.rb	2007-04-24 04:33:29 UTC (rev 24405)
@@ -16,7 +16,7 @@
         tempDirPath = TempDirectories.makeTempDir
         
         # Write the portpkg file to the temporary directory
-        pkgPath = tempDirPath + "portpkg.xar"
+        pkgPath = tempDirPath + "portpkg.portpkg"
         expandedPkgPath = tempDirPath + "portpkg"
         File.open(pkgPath, "w") { |f| f.write(file.read) }
 

Modified: users/jberry/mpwa/config/routes.rb
===================================================================
--- users/jberry/mpwa/config/routes.rb	2007-04-24 04:18:07 UTC (rev 24404)
+++ users/jberry/mpwa/config/routes.rb	2007-04-24 04:33:29 UTC (rev 24405)
@@ -15,11 +15,14 @@
 
   # Pretty urls
   # ===========
+  # portpkg submittion
+  map.portpkgsubmit 'submit', :controller => 'port_pkg', :action => 'submit'
+  
   # portpkg by pkgid
   map.portpkg 'portpkg/:id', :controller => 'port_pkg', :action => 'emit_portpkg', :id => /\d+/
   
   # portpkg file by pkgid
-  map.portpkg 'portpkg/:id/*path', :controller => 'port_pkg', :action => 'emit_portpkg_path', :id => /\d+/
+  map.connect 'portpkg/:id/*path', :controller => 'port_pkg', :action => 'emit_portpkg_path', :id => /\d+/
 
   # portpkg by named selector (unimplemented)
   map.connect 'portpkg/:selector/:portname', :controller => 'port_pkg', :action => 'byselector'

Modified: users/jberry/mpwa/doc/design.txt
===================================================================
--- users/jberry/mpwa/doc/design.txt	2007-04-24 04:18:07 UTC (rev 24404)
+++ users/jberry/mpwa/doc/design.txt	2007-04-24 04:33:29 UTC (rev 24405)
@@ -146,6 +146,10 @@
 			// Access to portpkg files
 		http://db.macports.org/portpkg/<pkgid>/<path_to_file>
 		
+			// Submittal url
+			// Form to submit a portpkg
+		http://db.macports.org/submit
+		
 			// A portpkg defined by a query instead of a pkgid
 			// (will 301 redirect to http://db.macports.org/portpkg/<pkgid>)
 		http://db.macports.org/portpkg/latest/<portname>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070423/76a9b5a4/attachment.html


More information about the macports-changes mailing list