]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into openid
authorTom Hughes <tom@compton.nu>
Wed, 16 Jun 2010 20:18:44 +0000 (21:18 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 16 Jun 2010 20:18:44 +0000 (21:18 +0100)
45 files changed:
app/controllers/diary_entry_controller.rb
app/controllers/trace_controller.rb
app/controllers/user_controller.rb
app/helpers/browse_helper.rb
app/views/layouts/site.html.erb
config/environment.rb
config/initializers/abstract_adapter.rb
config/initializers/postgresql_adapter.rb [new file with mode: 0644]
config/initializers/query_cache.rb
config/initializers/sql_session_store.rb
config/locales/en.yml
public/images/browse/education_nursery.p.16.png [new file with mode: 0644]
public/images/browse/education_school.p.16.png [new file with mode: 0644]
public/images/browse/education_university.p.16.png [new file with mode: 0644]
public/images/browse/health_dentist.p.16.png [new file with mode: 0644]
public/images/browse/health_doctors.p.16.png [new file with mode: 0644]
public/images/browse/health_opticians.p.16.png [new file with mode: 0644]
public/images/browse/health_veterinary.p.16.png [new file with mode: 0644]
public/images/browse/place_of_worship_unknown3.p.16.png [new file with mode: 0644]
public/images/browse/rental_bicycle.p.20.png [deleted file]
public/images/browse/service.20.png [new file with mode: 0644]
public/images/browse/shop_bicycle.p.16.png [new file with mode: 0644]
public/images/browse/shop_books.p.16.png [new file with mode: 0644]
public/images/browse/shop_butcher.p.16.png [new file with mode: 0644]
public/images/browse/shop_estateagent2.p.16.png [new file with mode: 0644]
public/images/browse/shop_fish.p.16.png [new file with mode: 0644]
public/images/browse/shop_garden_centre.p.16.png [new file with mode: 0644]
public/images/browse/shop_gift.p.16.png [new file with mode: 0644]
public/images/browse/shop_greengrocer.p.16.png [new file with mode: 0644]
public/images/browse/shop_jewelry.p.16.png [new file with mode: 0644]
public/images/browse/tourist_castle.p.16.png [new file with mode: 0644]
public/images/browse/tourist_memorial.p.16.png [new file with mode: 0644]
public/images/browse/tourist_monument.p.16.png [new file with mode: 0644]
public/images/browse/tourist_picnic.p.16.png [new file with mode: 0644]
public/images/browse/tourist_ruin.p.16.png [new file with mode: 0644]
public/images/browse/tourist_windmill.p.16.png [new file with mode: 0644]
public/images/browse/tourist_wreck.p.16.png [new file with mode: 0644]
public/images/browse/transport_parking_bicycle.p.16.png [new file with mode: 0644]
public/images/browse/transport_rental_bicycle.p.16.png [new file with mode: 0644]
public/images/browse/transport_rental_car.p.16.png [new file with mode: 0644]
public/images/sotm.png [new file with mode: 0644]
public/stylesheets/browse.css
vendor/plugins/deadlock_retry/init.rb
vendor/plugins/file_column/init.rb
vendor/plugins/validates_email_format_of/rails/init.rb

index 52ce742bfddf08870ae441e653e7855adb2e9458..320f3d029de3e7416de519f99150dc2a97e95445 100644 (file)
@@ -10,7 +10,7 @@ class DiaryEntryController < ApplicationController
 
   caches_action :list, :view, :layout => false
   caches_action :rss, :layout => true
-  cache_sweeper :diary_sweeper, :only => [:new, :edit, :comment, :hide, :hidecomment]
+  cache_sweeper :diary_sweeper, :only => [:new, :edit, :comment, :hide, :hidecomment], :unless => OSM_STATUS == :database_offline
 
   def new
     @title = t 'diary_entry.new.title'
index f8ce29abaaa972fff209b37189daff2f623189cb..c51f54c5e713b13899e2bb606b1875c5e6c8037b 100644 (file)
@@ -18,8 +18,8 @@ class TraceController < ApplicationController
   caches_action :list, :unless => :logged_in?, :layout => false
   caches_action :view, :layout => false
   caches_action :georss, :layout => true
-  cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create]
-  cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create]
+  cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create], :unless => OSM_STATUS == :database_offline
+  cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create], :unless => OSM_STATUS == :database_offline
 
   # Counts and selects pages of GPX traces for various criteria (by user, tags, public etc.).
   #  target_user - if set, specifies the user to fetch traces for.  if not set will fetch all traces
index 57881881a56f6edee7fb92570d126be4df0cc9c6..aae059252242d292e083dfc3066f752cdfa0d181 100644 (file)
@@ -16,7 +16,7 @@ class UserController < ApplicationController
 
   filter_parameter_logging :password, :pass_crypt, :pass_crypt_confirmation
 
-  cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete]
+  cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete], :unless => OSM_STATUS == :database_offline
 
   def terms
     @title = t 'user.new.title'
index f121f2f0bb3cd61a5e0ea9c89e29e7f13340cdc4..090d1e9c3a13cd7c275bef2dfa4b20ab2ab16e22 100644 (file)
@@ -17,7 +17,7 @@ module BrowseHelper
   end
 
   def link_class(type, object)
-    return type + " " + h(icon_tags(object).join(' '))
+    return type + " " + h(icon_tags(object).join(' ')) + (object.visible == false ? ' deleted' : '')
   end
 
   def link_title(object)
@@ -45,7 +45,7 @@ module BrowseHelper
 private
 
   ICON_TAGS = [ 
-    "aeroway", "amenity", "barrier", "building", "highway", "landuse",
+    "aeroway", "amenity", "barrier", "building", "highway", "historic", "landuse",
     "leisure", "man_made", "natural", "railway", "shop", "tourism", "waterway"
   ]
 
index c17255709171508eb4fe470294807211f3fb93b2..cecf5acc21d95d60491fde13b505c7117fbcc60c 100644 (file)
         <%= yield :left_menu %>
       </div>
 
+      <div id="sotm" class="notice">
+        <%= link_to image_tag("sotm.png", :alt => t('layouts.sotm2010'), :title => t('layouts.sotm2010'), :border => "0"), "http://www.stateofthemap.org/register/" %>
+      </div>
+
       <%= yield :optionals %>
 
       <center>
index 0a67be745582228590a6461f86282118558e8d5d..de5852fc4316d857707b4984e34a62ac2aeb992a 100644 (file)
@@ -44,6 +44,7 @@ Rails::Initializer.run do |config|
   # To use Rails without a database, you must remove the Active Record framework
   if OSM_STATUS == :database_offline
     config.frameworks -= [ :active_record ]
+    config.eager_load_paths = []
   end
 
   # Specify gems that this application depends on.
@@ -51,7 +52,9 @@ Rails::Initializer.run do |config|
   # config.gem "bj"
   # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
   # config.gem "aws-s3", :lib => "aws/s3"
-  config.gem 'composite_primary_keys', :version => '2.2.2'
+  unless  OSM_STATUS == :database_offline
+    config.gem 'composite_primary_keys', :version => '2.2.2'
+  end
   config.gem 'libxml-ruby', :version => '>= 1.1.1', :lib => 'libxml'
   config.gem 'rmagick', :lib => 'RMagick'
   config.gem 'oauth', :version => '>= 0.3.6'
@@ -86,7 +89,9 @@ Rails::Initializer.run do |config|
   # Use the database for sessions instead of the cookie-based default,
   # which shouldn't be used to store highly confidential information
   # (create the session table with 'rake db:sessions:create')
-  config.action_controller.session_store = :sql_session_store
+  unless  OSM_STATUS == :database_offline
+    config.action_controller.session_store = :sql_session_store
+  end
 
   # Use SQL instead of Active Record's schema dumper when creating the test database.
   # This is necessary if your schema can't be completely dumped by the schema dumper,
index 5cc24d25c38489183a869661f7f3c68db3227a83..d96742ee50e9494e5e2759b145e46c6340ff5ad6 100644 (file)
@@ -1,24 +1,26 @@
-module ActiveRecord
-  module ConnectionAdapters
-    class AbstractAdapter
-    protected
-      alias_method :old_log, :log
-
-      def log(sql, name)
-        if block_given?
-          old_log(sql, name) do
-            yield
+if defined?(ActiveRecord::ConnectionAdaptors::AbstractAdaptor)
+  module ActiveRecord
+    module ConnectionAdapters
+      class AbstractAdapter
+      protected
+        alias_method :old_log, :log
+  
+        def log(sql, name)
+          if block_given?
+            old_log(sql, name) do
+              yield
+            end
+          else
+            old_log(sql, name)
+          end
+        rescue ActiveRecord::StatementInvalid => ex
+          if ex.message =~ /^OSM::APITimeoutError: /
+            raise OSM::APITimeoutError.new
+          elsif ex.message =~ /^Timeout::Error: /
+            raise Timeout::Error.new("time's up!")
+          else
+            raise
           end
-        else
-          old_log(sql, name)
-        end
-      rescue ActiveRecord::StatementInvalid => ex
-        if ex.message =~ /^OSM::APITimeoutError: /
-          raise OSM::APITimeoutError.new
-        elsif ex.message =~ /^Timeout::Error: /
-          raise Timeout::Error.new("time's up!")
-        else
-          raise
         end
       end
     end
diff --git a/config/initializers/postgresql_adapter.rb b/config/initializers/postgresql_adapter.rb
new file mode 100644 (file)
index 0000000..d8f8495
--- /dev/null
@@ -0,0 +1,57 @@
+if defined?(ActiveRecord::ConnectionAdaptors::PostgreSQLAdaptor)
+  module ActiveRecord
+    module ConnectionAdapters
+      class PostgreSQLAdapter
+        def pk_and_sequence_for(table)
+          # First try looking for a sequence with a dependency on the
+          # given table's primary key.
+          result = query(<<-end_sql, 'PK and serial sequence')[0]
+            SELECT attr.attname, seq.relname
+            FROM pg_class      seq,
+                 pg_attribute  attr,
+                 pg_depend     dep,
+                 pg_namespace  name,
+                 pg_constraint cons
+            WHERE seq.oid           = dep.objid
+              AND seq.relkind       = 'S'
+              AND attr.attrelid     = dep.refobjid
+              AND attr.attnum       = dep.refobjsubid
+              AND attr.attrelid     = cons.conrelid
+              AND attr.attnum       = cons.conkey[1]
+              AND cons.contype      = 'p'
+              AND dep.classid       = '"pg_class"'::regclass
+              AND dep.refclassid    = '"pg_class"'::regclass
+              AND dep.refobjid      = '#{quote_table_name(table)}'::regclass
+          end_sql
+  
+          if result.nil? or result.empty?
+            # If that fails, try parsing the primary key's default value.
+            # Support the 7.x and 8.0 nextval('foo'::text) as well as
+            # the 8.1+ nextval('foo'::regclass).
+            result = query(<<-end_sql, 'PK and custom sequence')[0]
+              SELECT attr.attname,
+                CASE
+                  WHEN split_part(def.adsrc, '''', 2) ~ '.' THEN
+                    substr(split_part(def.adsrc, '''', 2),
+                           strpos(split_part(def.adsrc, '''', 2), '.')+1)
+                  ELSE split_part(def.adsrc, '''', 2)
+                END
+              FROM pg_class       t
+              JOIN pg_attribute   attr ON (t.oid = attrelid)
+              JOIN pg_attrdef     def  ON (adrelid = attrelid AND adnum = attnum)
+              JOIN pg_constraint  cons ON (conrelid = adrelid AND adnum = conkey[1])
+              WHERE t.oid = '#{quote_table_name(table)}'::regclass
+                AND cons.contype = 'p'
+                AND def.adsrc ~* 'nextval'
+            end_sql
+          end
+  
+          # [primary_key, sequence]
+          [result.first, result.last]
+        rescue
+          nil
+        end
+      end
+    end
+  end
+end
index 83d42feecc29b941e25c0a4f9f7d269a400a5623..61a618bca7d7b6656533b7a60700c3f4e9e1cec6 100644 (file)
@@ -1,10 +1,12 @@
-module ActiveRecord
-  module ConnectionAdapters
-    module QueryCache
-      private
-        def cache_sql(sql)
-         yield
-        end
+if defined?(ActiveRecord::ConnectionAdaptors::QueryCache)
+  module ActiveRecord
+    module ConnectionAdapters
+      module QueryCache
+        private
+          def cache_sql(sql)
+         yield
+          end
+      end
     end
   end
 end
index 986037afe3d107d047be03a5c192c57e24b345d0..2b9543fc2f2f9800e9556b9110e5efd273bca6c1 100644 (file)
@@ -4,4 +4,6 @@ adapter = Rails.configuration.database_configuration[environment]["adapter"]
 session_class = adapter + "_session"
 
 # Configure SqlSessionStore
-SqlSessionStore.session_class = session_class.camelize.constantize
+unless  OSM_STATUS == :database_offline
+  SqlSessionStore.session_class = session_class.camelize.constantize
+end
index 5b6924f5cf10f19ae45b2642c3a574cff88d9b04..832610d606b8099e77e3a1cc3fd478909a182c85 100644 (file)
@@ -933,7 +933,7 @@ en:
     shop: Shop
     shop_tooltip: Shop with branded OpenStreetMap merchandise
     shop_url: http://wiki.openstreetmap.org/wiki/Merchandise
-    sotm: 'Come to the 2009 OpenStreetMap Conference, The State of the Map, July 10-12 in Amsterdam!'
+    sotm2010: 'Come to the 2010 OpenStreetMap Conference, The State of the Map, July 9-11 in Girona!'
     license:
       alt: CC by-sa 2.0
       title: OpenStreetMap data is licensed under the Creative Commons Attribution-Share Alike 2.0 Generic License
diff --git a/public/images/browse/education_nursery.p.16.png b/public/images/browse/education_nursery.p.16.png
new file mode 100644 (file)
index 0000000..63651ef
Binary files /dev/null and b/public/images/browse/education_nursery.p.16.png differ
diff --git a/public/images/browse/education_school.p.16.png b/public/images/browse/education_school.p.16.png
new file mode 100644 (file)
index 0000000..95744bf
Binary files /dev/null and b/public/images/browse/education_school.p.16.png differ
diff --git a/public/images/browse/education_university.p.16.png b/public/images/browse/education_university.p.16.png
new file mode 100644 (file)
index 0000000..57c92c3
Binary files /dev/null and b/public/images/browse/education_university.p.16.png differ
diff --git a/public/images/browse/health_dentist.p.16.png b/public/images/browse/health_dentist.p.16.png
new file mode 100644 (file)
index 0000000..e3219f7
Binary files /dev/null and b/public/images/browse/health_dentist.p.16.png differ
diff --git a/public/images/browse/health_doctors.p.16.png b/public/images/browse/health_doctors.p.16.png
new file mode 100644 (file)
index 0000000..9cdc469
Binary files /dev/null and b/public/images/browse/health_doctors.p.16.png differ
diff --git a/public/images/browse/health_opticians.p.16.png b/public/images/browse/health_opticians.p.16.png
new file mode 100644 (file)
index 0000000..d89ff56
Binary files /dev/null and b/public/images/browse/health_opticians.p.16.png differ
diff --git a/public/images/browse/health_veterinary.p.16.png b/public/images/browse/health_veterinary.p.16.png
new file mode 100644 (file)
index 0000000..dd8ee16
Binary files /dev/null and b/public/images/browse/health_veterinary.p.16.png differ
diff --git a/public/images/browse/place_of_worship_unknown3.p.16.png b/public/images/browse/place_of_worship_unknown3.p.16.png
new file mode 100644 (file)
index 0000000..08b8329
Binary files /dev/null and b/public/images/browse/place_of_worship_unknown3.p.16.png differ
diff --git a/public/images/browse/rental_bicycle.p.20.png b/public/images/browse/rental_bicycle.p.20.png
deleted file mode 100644 (file)
index 4bb10e0..0000000
Binary files a/public/images/browse/rental_bicycle.p.20.png and /dev/null differ
diff --git a/public/images/browse/service.20.png b/public/images/browse/service.20.png
new file mode 100644 (file)
index 0000000..b28d744
Binary files /dev/null and b/public/images/browse/service.20.png differ
diff --git a/public/images/browse/shop_bicycle.p.16.png b/public/images/browse/shop_bicycle.p.16.png
new file mode 100644 (file)
index 0000000..d0b3680
Binary files /dev/null and b/public/images/browse/shop_bicycle.p.16.png differ
diff --git a/public/images/browse/shop_books.p.16.png b/public/images/browse/shop_books.p.16.png
new file mode 100644 (file)
index 0000000..dc241d2
Binary files /dev/null and b/public/images/browse/shop_books.p.16.png differ
diff --git a/public/images/browse/shop_butcher.p.16.png b/public/images/browse/shop_butcher.p.16.png
new file mode 100644 (file)
index 0000000..8ff5740
Binary files /dev/null and b/public/images/browse/shop_butcher.p.16.png differ
diff --git a/public/images/browse/shop_estateagent2.p.16.png b/public/images/browse/shop_estateagent2.p.16.png
new file mode 100644 (file)
index 0000000..fc2cecf
Binary files /dev/null and b/public/images/browse/shop_estateagent2.p.16.png differ
diff --git a/public/images/browse/shop_fish.p.16.png b/public/images/browse/shop_fish.p.16.png
new file mode 100644 (file)
index 0000000..7e0eabb
Binary files /dev/null and b/public/images/browse/shop_fish.p.16.png differ
diff --git a/public/images/browse/shop_garden_centre.p.16.png b/public/images/browse/shop_garden_centre.p.16.png
new file mode 100644 (file)
index 0000000..ca07d43
Binary files /dev/null and b/public/images/browse/shop_garden_centre.p.16.png differ
diff --git a/public/images/browse/shop_gift.p.16.png b/public/images/browse/shop_gift.p.16.png
new file mode 100644 (file)
index 0000000..ac084f5
Binary files /dev/null and b/public/images/browse/shop_gift.p.16.png differ
diff --git a/public/images/browse/shop_greengrocer.p.16.png b/public/images/browse/shop_greengrocer.p.16.png
new file mode 100644 (file)
index 0000000..abb2c52
Binary files /dev/null and b/public/images/browse/shop_greengrocer.p.16.png differ
diff --git a/public/images/browse/shop_jewelry.p.16.png b/public/images/browse/shop_jewelry.p.16.png
new file mode 100644 (file)
index 0000000..bb98255
Binary files /dev/null and b/public/images/browse/shop_jewelry.p.16.png differ
diff --git a/public/images/browse/tourist_castle.p.16.png b/public/images/browse/tourist_castle.p.16.png
new file mode 100644 (file)
index 0000000..4771667
Binary files /dev/null and b/public/images/browse/tourist_castle.p.16.png differ
diff --git a/public/images/browse/tourist_memorial.p.16.png b/public/images/browse/tourist_memorial.p.16.png
new file mode 100644 (file)
index 0000000..0db93d7
Binary files /dev/null and b/public/images/browse/tourist_memorial.p.16.png differ
diff --git a/public/images/browse/tourist_monument.p.16.png b/public/images/browse/tourist_monument.p.16.png
new file mode 100644 (file)
index 0000000..5c468aa
Binary files /dev/null and b/public/images/browse/tourist_monument.p.16.png differ
diff --git a/public/images/browse/tourist_picnic.p.16.png b/public/images/browse/tourist_picnic.p.16.png
new file mode 100644 (file)
index 0000000..0eff097
Binary files /dev/null and b/public/images/browse/tourist_picnic.p.16.png differ
diff --git a/public/images/browse/tourist_ruin.p.16.png b/public/images/browse/tourist_ruin.p.16.png
new file mode 100644 (file)
index 0000000..804672e
Binary files /dev/null and b/public/images/browse/tourist_ruin.p.16.png differ
diff --git a/public/images/browse/tourist_windmill.p.16.png b/public/images/browse/tourist_windmill.p.16.png
new file mode 100644 (file)
index 0000000..9ec568c
Binary files /dev/null and b/public/images/browse/tourist_windmill.p.16.png differ
diff --git a/public/images/browse/tourist_wreck.p.16.png b/public/images/browse/tourist_wreck.p.16.png
new file mode 100644 (file)
index 0000000..eb190e2
Binary files /dev/null and b/public/images/browse/tourist_wreck.p.16.png differ
diff --git a/public/images/browse/transport_parking_bicycle.p.16.png b/public/images/browse/transport_parking_bicycle.p.16.png
new file mode 100644 (file)
index 0000000..ff988ba
Binary files /dev/null and b/public/images/browse/transport_parking_bicycle.p.16.png differ
diff --git a/public/images/browse/transport_rental_bicycle.p.16.png b/public/images/browse/transport_rental_bicycle.p.16.png
new file mode 100644 (file)
index 0000000..edf986c
Binary files /dev/null and b/public/images/browse/transport_rental_bicycle.p.16.png differ
diff --git a/public/images/browse/transport_rental_car.p.16.png b/public/images/browse/transport_rental_car.p.16.png
new file mode 100644 (file)
index 0000000..b5fc399
Binary files /dev/null and b/public/images/browse/transport_rental_car.p.16.png differ
diff --git a/public/images/sotm.png b/public/images/sotm.png
new file mode 100644 (file)
index 0000000..af2d049
Binary files /dev/null and b/public/images/sotm.png differ
index 2ca44bcd1e1a4a4e66a4757f6f4d9819a9df0387..68bef6cc51c1887df1a6c2f276eb58f7ba443aa9 100644 (file)
@@ -1,27 +1,34 @@
 .node { padding-left: 25px; }
 .way { padding-left: 25px; }
 
-/* Nodes */
+.deleted { text-decoration: line-through; }
+
+/* Nodes (and ways as areas) */
 
 .aeroway.aerodrome { background: url(/images/browse/aerodrome.p.16.png) no-repeat center left; }
 
 .amenity.atm { background: url(/images/browse/atm2.p.16.png) no-repeat center left; }
 .amenity.bank { background: url(/images/browse/bank2.p.16.png) no-repeat center left; }
 .amenity.bar { background: url(/images/browse/bar.p.16.png) no-repeat center left; }
-.amenity.bicycle_rental { background: url(/images/browse/rental_bicycle.p.20.png) no-repeat center left; }
+.amenity.bicycle_parking { background: url(/images/browse/transport_parking_bicycle.p.16.png) no-repeat center left; }
+.amenity.bicycle_rental { background: url(/images/browse/transport_rental_bicycle.p.16.png) no-repeat center left; }
 .amenity.bus_station { background: url(/images/browse/bus_station.n.16.png) no-repeat center left; }
 .amenity.cafe { background: url(/images/browse/cafe.p.16.png) no-repeat center left; }
+.amenity.car_rental { background: url(/images/browse/transport_rental_car.p.16.png) no-repeat center left; }
 .amenity.car_sharing { background: url(/images/browse/car_share.p.16.png) no-repeat center left; }
 .amenity.cinema { background: url(/images/browse/cinema.p.16.png) no-repeat center left; }
+.amenity.dentist { background: url(/images/browse/health_dentist.p.16.png) no-repeat center left; }
+.amenity.doctors { background: url(/images/browse/health_doctors.p.16.png) no-repeat center left; }
 .amenity.drinking_water { background: url(/images/browse/drinkingtap.p.16.png) no-repeat center left; }
 .amenity.fast_food { background: url(/images/browse/fast_food.p.16.png) no-repeat center left; }
 .amenity.fire_station { background: url(/images/browse/firestation.p.16.png) no-repeat center left; }
 .amenity.fuel { background: url(/images/browse/fuel.p.16.png) no-repeat center left; }
 .amenity.hospital { background: url(/images/browse/hospital.p.16.png) no-repeat center left; }
 .amenity.library { background: url(/images/browse/library.p.16.png) no-repeat center left; }
+.amenity.nursery { background: url(/images/browse/education_nursery.p.16.png) no-repeat center left; }
 .amenity.parking { background: url(/images/browse/parking.p.16.png) no-repeat center left; }
 .amenity.pharmacy { background: url(/images/browse/pharmacy.p.16.png) no-repeat center left; }
-.amenity.place_of_worship { background: url(/images/browse/place_of_worship.png) no-repeat center left; }
+.amenity.place_of_worship { background: url(/images/browse/place_of_worship_unknown3.p.16.png) no-repeat center left; }
 .amenity.police { background: url(/images/browse/police.p.16.png) no-repeat center left; }
 .amenity.post_box { background: url(/images/browse/post_box.p.16.png) no-repeat center left; }
 .amenity.post_office { background: url(/images/browse/post_office.p.16.png) no-repeat center left; }
 .amenity.pub { background: url(/images/browse/pub.p.16.png) no-repeat center left; }
 .amenity.restaurant { background: url(/images/browse/restaurant.p.16.png) no-repeat center left; }
 .amenity.recycling { background: url(/images/browse/recycling.p.16.png) no-repeat center left; }
+.amenity.school { background: url(/images/browse/education_school.p.16.png) no-repeat center left; }
 .amenity.shelter { background: url(/images/browse/shelter2.p.16.png) no-repeat center left; }
 .amenity.telephone { background: url(/images/browse/telephone.p.16.png) no-repeat center left; }
 .amenity.theatre { background: url(/images/browse/theatre.p.16.png) no-repeat center left; }
 .amenity.toilets { background: url(/images/browse/toilets.p.16.png) no-repeat center left; }
+.amenity.university { background: url(/images/browse/education_university.p.16.png) no-repeat center left; }
+.amenity.veterinary { background: url(/images/browse/health_veterinary.p.16.png) no-repeat center left; }
 
 .barrier.gate { background: url(/images/browse/gate2.p.16.png) no-repeat center left; }
 
 .highway.traffic_signals { background: url(/images/browse/traffic_light.png) no-repeat center left; }
 .highway.turning_circle { background: url(/images/browse/turning_circle.p.16.png) no-repeat center left; }
 
+.historic.castle { background: url(/images/browse/tourist_castle.p.16.png) no-repeat center left; }
+.historic.memorial { background: url(/images/browse/tourist_memorial.p.16.png) no-repeat center left; }
+.historic.monument { background: url(/images/browse/tourist_monument.p.16.png) no-repeat center left; }
+.historic.ruins { background: url(/images/browse/tourist_ruins.p.16.png) no-repeat center left; }
+.historic.wreck { background: url(/images/browse/tourist_wreck.p.16.png) no-repeat center left; }
+
 .man_made.lighthouse { background: url(/images/browse/lighthouse.p.16.png) no-repeat center left; }
+.man_made.windmill { background: url(/images/browse/tourist_windmill.p.16.png) no-repeat center left; }
 
 .natural.tree { background: url(/images/browse/tree.p.16.png) no-repeat center left; }
 
 
 .shop { background: url(/images/browse/shop_convenience.p.16.png) no-repeat center left; }
 .shop.bakery { background: url(/images/browse/shop_bakery.p.16.png) no-repeat center left; }
+.shop.bicycle { background: url(/images/browse/shop_bicycle.p.16.png) no-repeat center left; }
+.shop.books { background: url(/images/browse/shop_books.p.16.png) no-repeat center left; }
+.shop.butcher { background: url(/images/browse/shop_butcher.p.16.png) no-repeat center left; }
 .shop.clothes { background: url(/images/browse/shop_clothes.p.16.png) no-repeat center left; }
 .shop.convenience { background: url(/images/browse/shop_convenience.p.16.png) no-repeat center left; }
 .shop.diy { background: url(/images/browse/shop_diy.p.16.png) no-repeat center left; }
+.shop.estate_agent { background: url(/images/browse/shop_estateagent2.p.16.png) no-repeat center left; }
+.shop.fish { background: url(/images/browse/shop_fish.p.16.png) no-repeat center left; }
+.shop.garden_centre { background: url(/images/browse/shop_garden_centre.p.16.png) no-repeat center left; }
+.shop.gift { background: url(/images/browse/shop_gift.p.16.png) no-repeat center left; }
+.shop.greengrocer { background: url(/images/browse/shop_greengrocer.p.16.png) no-repeat center left; }
 .shop.hairdresser { background: url(/images/browse/shop_hairdresser.p.16.png) no-repeat center left; }
+.shop.jewelry { background: url(/images/browse/shop_jewelry.p.16.png) no-repeat center left; }
 .shop.supermarket { background: url(/images/browse/shop_supermarket.p.16.png) no-repeat center left; }
 
 .tourism.alpine_hut { background: url(/images/browse/alpinehut.p.16.png) no-repeat center left; }
@@ -63,6 +89,7 @@
 .tourism.hostel { background: url(/images/browse/hostel.p.16.png) no-repeat center left; }
 .tourism.hotel { background: url(/images/browse/hotel.p.16.png) no-repeat center left; }
 .tourism.museum { background: url(/images/browse/museum.p.16.png) no-repeat center left; }
+.tourism.picnic_site { background: url(/images/browse/tourist_picnic.p.16.png) no-repeat center left; }
 .tourism.viewpoint { background: url(/images/browse/view_point.p.16.png) no-repeat center left; }
 
 /* Ways */
 .highway.cycleway { background: url(/images/browse/cycleway.20.png) no-repeat center left; }
 .highway.footway { background: url(/images/browse/footway.20.png) no-repeat center left; }
 .highway.motorway { background: url(/images/browse/motorway.20.png) no-repeat center left; }
+.highway.motorway_link { background: url(/images/browse/motorway.20.png) no-repeat center left; }
+.highway.pedestrian { background: url(/images/browse/service.20.png) no-repeat center left; }
 .highway.primary { background: url(/images/browse/primary.20.png) no-repeat center left; }
+.highway.primary_link { background: url(/images/browse/primary.20.png) no-repeat center left; }
 .highway.residential { background: url(/images/browse/unclassified.20.png) no-repeat center left; }
 .highway.secondary { background: url(/images/browse/secondary.20.png) no-repeat center left; }
+.highway.service { background: url(/images/browse/service.20.png) no-repeat center left; }
 .highway.trunk { background: url(/images/browse/trunk.20.png) no-repeat center left; }
+.highway.trunk_link { background: url(/images/browse/trunk.20.png) no-repeat center left; }
 .highway.unclassified { background: url(/images/browse/unclassified.20.png) no-repeat center left; }
 
 .landuse.brownfield { background: url(/images/browse/brownfield.png) no-repeat center left; }
index e090f68aff88265c275c6b5d6df1270b620e01af..2d7c5f36e0246244b40a16b37a9fe179415dd5f9 100644 (file)
@@ -1,2 +1,5 @@
 require 'deadlock_retry'
-ActiveRecord::Base.send :include, DeadlockRetry
+
+if defined?(ActiveRecord::Base)
+  ActiveRecord::Base.send :include, DeadlockRetry
+end
index d31ef1b9c109244d1610258598b4e8a1b9053d3f..0610d486c80968ff115d298d5c74c13978bfef02 100644 (file)
@@ -8,6 +8,11 @@ require 'file_column_helper'
 require 'validations'
 require 'test_case'
 
-ActiveRecord::Base.send(:include, FileColumn)
-ActionView::Base.send(:include, FileColumnHelper)
-ActiveRecord::Base.send(:include, FileColumn::Validations)
\ No newline at end of file
+if defined?(ActiveRecord::Base)
+  ActiveRecord::Base.send(:include, FileColumn)
+  ActiveRecord::Base.send(:include, FileColumn::Validations)
+end
+
+if defined?(ActionView::Base)
+  ActionView::Base.send(:include, FileColumnHelper)
+end
index bdc8b5794f7ea71f62917ac8e0df6c380730a3b8..bf0e943700f35fabe542152db0d37f969269b539 100644 (file)
@@ -1 +1,3 @@
-require 'validates_email_format_of'
+if defined?(ActiveRecord::Base)
+  require 'validates_email_format_of'
+end