<NME> .gitignore
<BEF> ADDFILE
<MSG> Merge branch 'master' of github.com:jywarren/cartagen

<DFF> @@ -0,0 +1,8 @@
+.DS_Store
+log/
+tmp/*
+tmp/**/*
+coverage*
+public/warpables/*
+config/database.yml
+config/amazon_s3.yml
\ No newline at end of file

{'commit': 'diff --git a/.gitignore b/.gitignore\nnew file mode 100644\nindex 0000000..1bf09d7\n--- /dev/null\n+++ b/.gitignore\n@@ -0,0 +1,8 @@\n+.DS_Store\n+log/\n+tmp/*\n+tmp/**/*\n+coverage*\n+public/warpables/*\n+config/database.yml\n+config/amazon_s3.yml\n\\ No newline at end of file\ndiff --git a/app/controllers/map_controller.rb b/app/controllers/map_controller.rb\nindex 48c4ee5..09ca00c 100644\n--- a/app/controllers/map_controller.rb\n+++ b/app/controllers/map_controller.rb\n@@ -32,18 +32,21 @@ class MapController < ApplicationController\n       index\n       render :action=>"index", :controller=>"map"\n     else\n-      unless params[:latitude] && params[:longitude]\n+      if params[:latitude] == \'\' && params[:longitude] == \'\'\n+\tlocation = \'\'\n+\tputs \'geocoding\'\n         begin\n           location = GeoKit::GeoLoc.geocode(params[:location])\n-        rescue\n-          flash[:error] = \'Cartagen could not find that location. Try entering a latitude and longitude as well.\'\n-          redirect_to \'/maps\'\n-        end\n-        @map = Map.new({:lat => location.lat,\n+\t  @map = Map.new({:lat => location.lat,\n             :lon => location.lng,\n             :name => params[:name],\n             :location => params[:location]})\n+        rescue\n+\t  @map = Map.new({\n+            :name => params[:name]})\n+\tend\n       else\n+\tputs \'nogeocoding\'\n         @map = Map.new({:lat => params[:latitude],\n             :lon => params[:longitude],\n             :name => params[:name],\ndiff --git a/app/models/map.rb b/app/models/map.rb\nindex 9a1b278..6316964 100644\n--- a/app/models/map.rb\n+++ b/app/models/map.rb\n@@ -1,10 +1,16 @@\n class Map < ActiveRecord::Base\n-  validates_presence_of :name,:author,:location\n+  before_validation :update_name\n+  validates_presence_of :name,:author\n+  validates_presence_of :location, :message => \' cannot be found. Try entering a latitude and longitude if this problem persists.\'\n   validates_format_of       :name,\n-                            :with => /^(\\w)+$/,#/([a-zA-Z0-9_-])$/,  \n+                            :with => /[a-zA-Z0-9_-]/,  \n                             :message => " must not include spaces and must be alphanumeric, as it\'ll be used in the URL of your map, like: http://cartagen.org/maps/your-map-name. You may use dashes and underscores.",\n                             :on => :create                  \n \n+  def update_name\n+    self.name = self.name.gsub(/\\W/, \'-\').downcase\n+  end\n+\n   def validate\n     self.name != \'untitled\'\n   end\ndiff --git a/app/models/warpable.rb b/app/models/warpable.rb\nindex f4c743f..4dc641f 100644\n--- a/app/models/warpable.rb\n+++ b/app/models/warpable.rb\n@@ -5,7 +5,7 @@ class Warpable < ActiveRecord::Base\n                  :storage => :s3, \n                  :max_size => 5.megabytes,\n                  # :resize_to => \'320x200>\',\n-\t\t:processor => :MiniMagick,\n+\t\t:processor => :image_science,\n                  :thumbnails => { :medium => \'500x375\', :small => \'240x180\', :thumb => \'100x100>\' }\n \n   # validates_as_attachment\ndiff --git a/app/views/map/_new.html.erb b/app/views/map/_new.html.erb\nindex baa8f18..be49cc0 100644\n--- a/app/views/map/_new.html.erb\n+++ b/app/views/map/_new.html.erb\n@@ -3,9 +3,9 @@\n \t<% form_for :map, @map, :url => { :controller => "map", :action => "create" }, :html => {:id => "new_map", :class => "map"} do |f| %>\n \t\t<%= error_messages_for \'map\' %>\t\n \t\t<label for="name">Name</label><br />\n-\t\t<input class="text" type="text" name="name" value="" id="name"><br />\n+\t\t<input class="text" type="text" name="name" value="<%= params[:name] %>" id="name"><br />\n \t\t<label for="location">Place (to enter lat/lon, <a href="javascript:void(0);" onClick="$(\'#lat_lon\').toggle()">click here</a>)</label><br />\n-\t\t<input class="text" type="text" name="location" value="Paris, France" id="new_map_place"><br />\n+\t\t<input class="text" type="text" name="location" value="<%= params[:location] || \'Paris, France\' %>" id="new_map_place"><br />\n \t\t<div id="geocode_results">\n \t\t\t\n \t\t</div>\n@@ -48,7 +48,7 @@\n \t\t\t<input type="text" name="longitude" /><br />\n \t\t</div>\n \t\t<label for="author">Author</label><br />\n-\t\t<input class="text" type="text" name="author" value="your name" id="author"><br />\n+\t\t<input class="text" type="text" name="author" value="<%= params[:author] || \'anonymous\' %>" id="author"><br />\n \t\t<label for="description">Description</label><br />\n \t\t<textarea name="description" rows="8" cols="24"></textarea>\n \t\t\ndiff --git a/app/views/map/show.html.erb b/app/views/map/show.html.erb\nindex 133ddee..e9b6141 100644\n--- a/app/views/map/show.html.erb\n+++ b/app/views/map/show.html.erb\n@@ -97,7 +97,7 @@\n </div>\n \n <div id="header">\n-\t<a style="float:left;" href="http://cartagen.org/maps"><img src="/images/cartagen-dark.png"/></a>\n+\t<a style="float:left;" href="/maps"><img src="/images/cartagen-dark.png"/></a>\n \t<script type="text/javascript" charset="utf-8">\n \t\tfunction find(q) {\n \t\t\tq = q.replace(\' \',\'-\')\ndiff --git a/config/environment.rb b/config/environment.rb\nindex 1e127a8..41788b0 100644\n--- a/config/environment.rb\n+++ b/config/environment.rb\n@@ -31,6 +31,10 @@ Rails::Initializer.run do |config|\n   config.gem "json"\n   config.gem "httparty"\n   config.gem "geokit"\n+  config.gem "RubyInline"\n+  config.gem "image_science"\n+  # you also need to install \'freeimage\':\n+  ##### sudo port install freeimage\n   # config.gem "davetroy-geohash", :source => "http://gems.github.com"\n \n   # Only load the plugins named here, in the order given. By default, all plugins \n', 'commit_subject': "Merge branch 'master' of github.com:jywarren/cartagen", 'repo_name': 'jywarren/cartagen', 'committer': {'name': 'jywarren', 'email': '555d01dd6a3cfa120592c8119636372ed95158e4@mit.edu', 'time_sec': '1272052967', 'tz_offset': '-240', 'date': {'seconds': '1272052967'}}, 'commit_tree': '7ecfc4e5cecc89a952901997ec5be6d1e1c432bf', 'commit_message': "Merge branch 'master' of github.com:jywarren/cartagen\n", 'language_name': 'Ruby', 'license': 'mit', 'hunks': '@@ -0,0 +1,8 @@\n+.DS_Store\n+log/\n+tmp/*\n+tmp/**/*\n+coverage*\n+public/warpables/*\n+config/database.yml\n+config/amazon_s3.yml\n\\ No newline at end of file\n', 'addition_count': 8, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/.gitignore', 'file_extension': '', 'before_file': 'ADDFILE', 'message': "Merge branch 'master' of github.com:jywarren/cartagen\n", 'author_name': 'jywarren', 'lang': 'gitignore'}