From: Tom Hughes Date: Thu, 27 Aug 2015 20:44:44 +0000 (+0100) Subject: Merge remote-tracking branch 'openstreetmap/pull/903' X-Git-Tag: live~5144 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/037585db3933a2954b43bd4b30ea5e30ade00be2?hp=074031d64a53dfb54916ce7307cd8f2bb51ee817 Merge remote-tracking branch 'openstreetmap/pull/903' --- diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 000000000..91600595a --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +service_name: travis-ci diff --git a/.gitignore b/.gitignore index edfd387ab..920ca1120 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ doc .vagrant .ruby-gemset .ruby-version -.idea \ No newline at end of file +.idea +coverage diff --git a/.mailmap b/.mailmap index 683907698..c576a560f 100644 --- a/.mailmap +++ b/.mailmap @@ -1,6 +1,8 @@ Andrzej Zaborowski Andy Allan +Florian Schäfer Grant Slater Harry Wood Kai Krueger +Michael Glanznig Richard Fairhurst diff --git a/.rubocop.yml b/.rubocop.yml index a0533b162..213eb27aa 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,14 +1,24 @@ inherit_from: .rubocop_todo.yml +AllCops: + RunRailsCops: true + Style/BracesAroundHashParameters: EnforcedStyle: context_dependent +Style/ExtraSpacing: + AllowForAlignment: true + Style/FileName: Exclude: - 'script/deliver-message' - 'script/locale/reload-languages' - 'script/update-spam-blocks' +Style/GlobalVars: + Exclude: + - 'lib/quad_tile/extconf.rb' + Style/HashSyntax: EnforcedStyle: hash_rockets Exclude: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e9561cd2d..71d949dae 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,143 +1,204 @@ -# This configuration was generated by `rubocop --auto-gen-config` -# on 2015-02-16 19:20:52 +0000 using RuboCop version 0.29.1. +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2015-08-18 20:27:49 +0100 using RuboCop version 0.33.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 13 +# Offense count: 34 Lint/AmbiguousOperator: - Enabled: false + Exclude: + - 'test/controllers/amf_controller_test.rb' + - 'test/controllers/changeset_controller_test.rb' + - 'test/lib/bounding_box_test.rb' + - 'test/lib/country_test.rb' -# Offense count: 110 +# Offense count: 115 Lint/AmbiguousRegexpLiteral: Enabled: false # Offense count: 29 # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: - Enabled: false + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/controllers/geocoder_controller.rb' + - 'app/controllers/notes_controller.rb' + - 'app/controllers/trace_controller.rb' + - 'app/controllers/user_controller.rb' + - 'app/controllers/user_preference_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/browse_helper.rb' + - 'app/models/client_application.rb' + - 'app/models/notifier.rb' + - 'lib/nominatim.rb' + - 'lib/osm.rb' + - 'script/deliver-message' + +# Offense count: 3 +Lint/FormatParameterMismatch: + Exclude: + - 'app/controllers/swf_controller.rb' # Offense count: 5 Lint/HandleExceptions: - Enabled: false + Exclude: + - 'app/controllers/amf_controller.rb' + - 'app/controllers/user_controller.rb' + - 'config/initializers/session.rb' # Offense count: 8 Lint/ParenthesesAsGroupedExpression: - Enabled: false + Exclude: + - 'test/controllers/amf_controller_test.rb' + - 'test/lib/bounding_box_test.rb' + - 'test/models/user_preference_test.rb' -# Offense count: 546 +# Offense count: 671 Metrics/AbcSize: - Max: 194 + Max: 277 # Offense count: 12 Metrics/BlockNesting: Max: 5 -# Offense count: 60 +# Offense count: 62 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 1515 + Max: 1653 -# Offense count: 68 +# Offense count: 67 Metrics/CyclomaticComplexity: - Max: 21 + Max: 20 -# Offense count: 2112 +# Offense count: 2535 # Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: - Max: 520 + Max: 694 -# Offense count: 520 +# Offense count: 628 # Configuration parameters: CountComments. Metrics/MethodLength: Max: 179 +# Offense count: 1 +# Configuration parameters: CountComments. +Metrics/ModuleLength: + Max: 126 + # Offense count: 4 # Configuration parameters: CountKeywordArgs. Metrics/ParameterLists: Max: 9 -# Offense count: 70 +# Offense count: 69 Metrics/PerceivedComplexity: - Max: 24 + Max: 23 + +# Offense count: 2 +# Configuration parameters: Include. +Rails/HasAndBelongsToMany: + Exclude: + - 'app/models/changeset.rb' + - 'app/models/user.rb' + +# Offense count: 66 +# Configuration parameters: EnforcedStyle, SupportedStyles. +Rails/TimeZone: + Enabled: false # Offense count: 5 Style/AccessorMethodName: - Enabled: false + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/helpers/title_helper.rb' + - 'app/models/old_way.rb' + - 'lib/osm.rb' + - 'lib/potlatch.rb' # Offense count: 1 Style/AsciiComments: - Enabled: false - -# Offense count: 9 -Style/ClassVars: - Enabled: false - -# Offense count: 12 -# Configuration parameters: Keywords. -Style/CommentAnnotation: - Enabled: false + Exclude: + - 'test/models/message_test.rb' -# Offense count: 306 +# Offense count: 310 Style/Documentation: Enabled: false -# Offense count: 8 -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/FormatString: - Enabled: false - -# Offense count: 1 -# Configuration parameters: AllowedVariables. -Style/GlobalVars: - Enabled: false - -# Offense count: 41 +# Offense count: 38 # Configuration parameters: MinBodyLength. Style/GuardClause: - Enabled: false + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/controllers/diary_entry_controller.rb' + - 'app/controllers/message_controller.rb' + - 'app/controllers/notes_controller.rb' + - 'app/controllers/site_controller.rb' + - 'app/controllers/user_blocks_controller.rb' + - 'app/controllers/user_controller.rb' + - 'app/controllers/user_roles_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/models/changeset.rb' + - 'app/models/user.rb' + - 'lib/diff_reader.rb' + - 'lib/object_metadata.rb' # Offense count: 60 # Cop supports --auto-correct. Style/LineEndConcatenation: - Enabled: false - -# Offense count: 53 + Exclude: + - 'db/migrate/008_remove_segments.rb' + - 'db/migrate/020_populate_node_tags_and_remove.rb' + - 'db/migrate/023_add_changesets.rb' + - 'lib/bounding_box.rb' + - 'lib/diff_reader.rb' + - 'lib/osm.rb' + - 'test/controllers/changeset_controller_test.rb' + - 'test/controllers/node_controller_test.rb' + - 'test/controllers/relation_controller_test.rb' + - 'test/controllers/way_controller_test.rb' + +# Offense count: 69 # Cop supports --auto-correct. Style/NumericLiterals: MinDigits: 11 -# Offense count: 44 +# Offense count: 42 # Cop supports --auto-correct. Style/PerlBackrefs: - Enabled: false + Exclude: + - 'app/controllers/amf_controller.rb' + - 'app/controllers/application_controller.rb' + - 'app/helpers/browse_helper.rb' + - 'config/initializers/paperclip.rb' + - 'lib/id.rb' + - 'lib/potlatch.rb' + - 'test/lib/i18n_test.rb' # Offense count: 8 # Configuration parameters: NamePrefix, NamePrefixBlacklist. Style/PredicateName: - Enabled: false - -# Offense count: 95 + Exclude: + - 'app/models/changeset.rb' + - 'app/models/old_node.rb' + - 'app/models/old_relation.rb' + - 'app/models/old_way.rb' + - 'app/models/user.rb' + - 'lib/classic_pagination/pagination.rb' + +# Offense count: 97 # Configuration parameters: EnforcedStyle, SupportedStyles. Style/RaiseArgs: Enabled: false # Offense count: 2 Style/RescueModifier: - Enabled: false + Exclude: + - 'app/helpers/browse_helper.rb' # Offense count: 8 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. Style/StringLiteralsInInterpolation: Enabled: false - -# Offense count: 1 -Style/StructInheritance: - Enabled: false - -# Offense count: 3 -# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist. -Style/TrivialAccessors: - Enabled: false diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e4f739093 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +sudo: false +language: ruby +rvm: + - 1.9.3 +cache: bundler +addons: + postgresql: 9.1 + apt: + packages: + - postgresql-server-dev-9.1 +services: + - memcached +env: + global: + - OSM_MEMCACHE_SERVERS="127.0.0.1" +before_script: + - psql -U postgres -c "CREATE DATABASE openstreetmap" + - psql -U postgres -c "CREATE EXTENSION btree_gist" openstreetmap + - make -C db/functions libpgosm.so + - psql -U postgres -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '${PWD}/db/functions/libpgosm', 'maptile_for_point' LANGUAGE C STRICT" openstreetmap + - psql -U postgres -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '${PWD}/db/functions/libpgosm', 'tile_for_point' LANGUAGE C STRICT" openstreetmap + - psql -U postgres -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '${PWD}/db/functions/libpgosm', 'xid_to_int4' LANGUAGE C STRICT" openstreetmap + - cp config/travis.database.yml config/database.yml + - bundle exec rake db:migrate +script: + - bundle exec rubocop -f fuubar + - bundle exec rake jshint + - bundle exec rake test diff --git a/Gemfile b/Gemfile index b8657bae1..3c8c3548b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,10 @@ source "https://rubygems.org" # Require rails -gem "rails", "4.2.0" +gem "rails", "4.2.4" + +# Sprockets 3 seems to be buggy, so stick with 2 for now +gem "sprockets", "~> 2.12.3" # Require things which have moved to gems in ruby 1.9 gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19 @@ -42,25 +45,25 @@ gem "rails-i18n", "~> 4.0.0" gem "dynamic_form" gem "rinku", ">= 1.2.2", :require => "rails_rinku" gem "oauth-plugin", ">= 0.5.1" -gem "open_id_authentication", ">= 1.1.0" gem "validates_email_format_of", ">= 1.5.1" -gem "composite_primary_keys", "~> 8.0.0" +gem "composite_primary_keys", "~> 8.1.0" gem "http_accept_language", "~> 2.0.0" gem "paperclip", "~> 4.0" gem "deadlock_retry", ">= 1.2.0" -gem "openstreetmap-i18n-js", ">= 3.0.0.rc5.3", :require => "i18n-js" +gem "i18n-js", ">= 3.0.0.rc10" gem "rack-cors" gem "actionpack-page_caching" -# We need ruby-openid 2.2.0 or later for ruby 1.9 support -gem "ruby-openid", ">= 2.2.0" +# Omniauth for authentication +gem "omniauth" +gem "omniauth-openid" +gem "openstreetmap-omniauth-google-oauth2", ">= 0.2.6.1", :require => "omniauth-google-oauth2" +gem "omniauth-facebook" +gem "omniauth-windowslive" # Markdown formatting support gem "redcarpet" -# Character conversion support for ruby 1.8 -gem "iconv", "= 0.1", :platforms => :ruby_18 - # Load libxml support for XML parsing and generation gem "libxml-ruby", ">= 2.0.5", :require => "libxml" @@ -71,6 +74,9 @@ gem "htmlentities" # Load SystemTimer for implementing request timeouts gem "SystemTimer", ">= 1.1.3", :require => "system_timer", :platforms => :ruby_18 +# Load faraday for mockable HTTP client +gem "faraday" + # Load httpclient and soap4r for SOAP support for Quova GeoIP queries gem "httpclient" gem "soap4r-ruby1.9" @@ -79,6 +85,9 @@ gem "soap4r-ruby1.9" gem "dalli" gem "kgio" +# Used to generate logstash friendly log files +gem "logstasher" + # Gems useful for development group :development do gem "vendorer" @@ -86,12 +95,15 @@ end # Gems needed for running tests group :test do + gem "rubocop" gem "timecop" gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20] end # Needed in development as well so rake can see konacha tasks group :development, :test do + gem "jshint" gem "konacha" gem "poltergeist" + gem "coveralls", :require => false end diff --git a/Gemfile.lock b/Gemfile.lock index fee72773e..b65ba33a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,46 +2,50 @@ GEM remote: https://rubygems.org/ specs: SystemTimer (1.2.3) - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) + actionmailer (4.2.4) + actionpack (= 4.2.4) + actionview (= 4.2.4) + activejob (= 4.2.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) + actionpack (4.2.4) + actionview (= 4.2.4) + activesupport (= 4.2.4) + rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) + rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-page_caching (1.0.2) actionpack (>= 4.0.0, < 5) - actionview (4.2.0) - activesupport (= 4.2.0) + actionview (4.2.4) + activesupport (= 4.2.4) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.4) + activesupport (= 4.2.4) globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) + activemodel (4.2.4) + activesupport (= 4.2.4) builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) + activerecord (4.2.4) + activemodel (= 4.2.4) + activesupport (= 4.2.4) arel (~> 6.0) - activesupport (4.2.0) + activesupport (4.2.4) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - arel (6.0.0) - autoprefixer-rails (4.0.2.2) + arel (6.0.3) + ast (2.1.0) + astrolabe (1.3.1) + parser (~> 2.2) + autoprefixer-rails (5.2.1.2) execjs + json bigdecimal (1.1.0) builder (3.2.2) capybara (2.4.4) @@ -53,66 +57,91 @@ GEM climate_control (0.0.3) activesupport (>= 3.0) cliver (0.3.2) - cocaine (0.5.5) + cocaine (0.5.7) climate_control (>= 0.0.3, < 1.0) coffee-rails (4.1.0) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) - coffee-script (2.3.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.8.0) - colorize (0.7.5) - composite_primary_keys (8.0.0) + coffee-script-source (1.9.1.1) + colorize (0.7.7) + composite_primary_keys (8.1.1) activerecord (~> 4.2.0) - crass (1.0.1) - dalli (2.7.2) + coveralls (0.8.2) + json (~> 1.8) + rest-client (>= 1.6.8, < 2) + simplecov (~> 0.10.0) + term-ansicolor (~> 1.3) + thor (~> 0.19.1) + crass (1.0.2) + dalli (2.7.4) deadlock_retry (1.2.0) + docile (1.1.5) + domain_name (0.5.24) + unf (>= 0.0.5, < 1.0.0) dynamic_form (1.1.4) erubis (2.7.0) - execjs (2.2.2) + execjs (2.6.0) faraday (0.9.1) multipart-post (>= 1.2, < 3) - globalid (0.3.0) + globalid (0.3.6) activesupport (>= 4.1.0) + hashie (3.4.2) hike (1.2.3) - htmlentities (4.3.3) - http_accept_language (2.0.2) + htmlentities (4.3.4) + http-cookie (1.0.2) + domain_name (~> 0.5) + http_accept_language (2.0.5) httpclient (2.6.0.1) i18n (0.7.0) - iconv (0.1) - jquery-rails (4.0.3) + i18n-js (3.0.0.rc11) + i18n (~> 0.6) + jquery-rails (4.0.4) rails-dom-testing (~> 1.0) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.2) + jshint (1.4.0) + execjs (>= 1.4.0) + multi_json (~> 1.0) + therubyracer (~> 0.12.1) + json (1.8.3) jsonify (0.3.1) multi_json (~> 1.0) jsonify-rails (0.3.2) actionpack jsonify (< 0.4.0) - jwt (1.2.0) - kgio (2.9.2) - konacha (3.3.0) + jwt (1.5.1) + kgio (2.9.3) + konacha (3.5.1) actionpack (>= 3.1, < 5) capybara colorize railties (>= 3.1, < 5) - sprockets + sprockets (>= 2, < 4) + tilt + libv8 (3.16.14.11) libxml-ruby (2.8.0) - loofah (2.0.1) + logstash-event (1.2.02) + logstasher (0.6.5) + logstash-event (~> 1.2.0) + request_store + loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.3) mime-types (>= 1.16, < 3) - mime-types (2.4.3) + mime-types (2.6.1) + mimemagic (0.3.0) mini_portile (0.6.2) - minitest (5.5.1) - multi_json (1.10.1) + minitest (5.8.0) + multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) - nokogiri (1.6.5) + netrc (0.10.3) + nokogiri (1.6.6.2) mini_portile (~> 0.6.0) - nokogumbo (1.2.0) + nokogumbo (1.4.1) nokogiri oauth (0.4.7) oauth-plugin (0.5.1) @@ -126,97 +155,144 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (~> 1.2) - open_id_authentication (1.2.0) - rack-openid (~> 1.3) - openstreetmap-i18n-js (3.0.0.rc5.3) - i18n - paperclip (4.2.1) - activemodel (>= 3.0.0) - activesupport (>= 3.0.0) - cocaine (~> 0.5.3) + omniauth (1.2.2) + hashie (>= 1.2, < 4) + rack (~> 1.0) + omniauth-facebook (2.0.1) + omniauth-oauth2 (~> 1.2) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-openid (1.0.1) + omniauth (~> 1.0) + rack-openid (~> 1.3.1) + omniauth-windowslive (0.0.9.1) + multi_json (>= 1.0.3) + omniauth-oauth2 (~> 1.0) + openstreetmap-omniauth-google-oauth2 (0.2.6.1) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (>= 1.1.1) + paperclip (4.3.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + cocaine (~> 0.5.5) mime-types - pg (0.18.1) - poltergeist (1.5.1) + mimemagic (= 0.3.0) + parser (2.2.2.6) + ast (>= 1.1, < 3.0) + pg (0.18.2) + poltergeist (1.6.0) capybara (~> 2.1) cliver (~> 0.3.1) multi_json (~> 1.0) websocket-driver (>= 0.2.0) - psych (2.0.9) + powerpack (0.1.1) + psych (2.0.15) r2 (0.2.5) - rack (1.6.0) - rack-cors (0.3.1) - rack-openid (1.4.2) + rack (1.6.4) + rack-cors (0.4.0) + rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) + rails (4.2.4) + actionmailer (= 4.2.4) + actionpack (= 4.2.4) + actionview (= 4.2.4) + activejob (= 4.2.4) + activemodel (= 4.2.4) + activerecord (= 4.2.4) + activesupport (= 4.2.4) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) + railties (= 4.2.4) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.5) + rails-dom-testing (1.0.7) activesupport (>= 4.2.0.beta, < 5.0) nokogiri (~> 1.6.0) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.1) + rails-html-sanitizer (1.0.2) loofah (~> 2.0) - rails-i18n (4.0.3) + rails-i18n (4.0.4) i18n (~> 0.6) railties (~> 4.0) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) + railties (4.2.4) + actionpack (= 4.2.4) + activesupport (= 4.2.4) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) + rainbow (2.0.0) rake (10.4.2) - redcarpet (3.2.2) + redcarpet (3.3.2) + ref (2.0.0) + request_store (1.2.0) + rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 3.0) + netrc (~> 0.7) rinku (1.7.3) - ruby-openid (2.6.0) - sanitize (3.1.0) - crass (~> 1.0.1) + rubocop (0.33.0) + astrolabe (~> 1.3) + parser (>= 2.2.2.5, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.4) + ruby-openid (2.7.0) + ruby-progressbar (1.7.5) + sanitize (4.0.0) + crass (~> 1.0.2) nokogiri (>= 1.4.4) - nokogumbo (= 1.2.0) - sass (3.4.9) - sass-rails (5.0.1) + nokogumbo (= 1.4.1) + sass (3.4.17) + sass-rails (5.0.3) railties (>= 4.0.0, < 5.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (~> 1.1) + simplecov (0.10.0) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) soap4r-ruby1.9 (2.0.5) - sprockets (2.12.3) + sprockets (2.12.4) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.2) + sprockets-rails (2.3.2) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) + term-ansicolor (1.3.2) + tins (~> 1.0) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) + ref thor (0.19.1) - thread_safe (0.3.4) + thread_safe (0.3.5) tilt (1.4.1) - timecop (0.7.1) + timecop (0.8.0) + tins (1.6.0) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (2.7.0) + uglifier (2.7.1) execjs (>= 0.3.0) json (>= 1.8.0) - validates_email_format_of (1.6.1) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.1) + validates_email_format_of (1.6.3) i18n vendorer (0.1.16) - websocket-driver (0.5.1) + websocket-driver (0.6.2) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.1) + websocket-extensions (0.1.2) xpath (2.0.0) nokogiri (~> 1.3) @@ -229,38 +305,46 @@ DEPENDENCIES autoprefixer-rails bigdecimal (~> 1.1.0) coffee-rails (~> 4.1.0) - composite_primary_keys (~> 8.0.0) + composite_primary_keys (~> 8.1.0) + coveralls dalli deadlock_retry (>= 1.2.0) dynamic_form + faraday htmlentities http_accept_language (~> 2.0.0) httpclient - iconv (= 0.1) + i18n-js (>= 3.0.0.rc10) jquery-rails + jshint json jsonify-rails kgio konacha libxml-ruby (>= 2.0.5) + logstasher minitest (~> 5.1) oauth-plugin (>= 0.5.1) - open_id_authentication (>= 1.1.0) - openstreetmap-i18n-js (>= 3.0.0.rc5.3) + omniauth + omniauth-facebook + omniauth-openid + omniauth-windowslive + openstreetmap-omniauth-google-oauth2 (>= 0.2.6.1) paperclip (~> 4.0) pg poltergeist psych r2 rack-cors - rails (= 4.2.0) + rails (= 4.2.4) rails-i18n (~> 4.0.0) redcarpet rinku (>= 1.2.2) - ruby-openid (>= 2.2.0) + rubocop sanitize sass-rails (~> 5.0) soap4r-ruby1.9 + sprockets (~> 2.12.3) timecop uglifier (>= 1.3.0) validates_email_format_of (>= 1.5.1) diff --git a/INSTALL.md b/INSTALL.md index 780ffdf07..09e3b12f7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -3,7 +3,7 @@ These instructions are designed for setting up The Rails Port for development and testing. If you want to deploy the software for your own project, then see the notes at the end. -You can install the software directly on your machine, which is the traditional and probably best-bupported approach. However, there is an alternative which may be easier: Vagrant. This installs the software into a virtual machine, which makes it easier to get a consistent development environment and may avoid installation difficulties. For Vagrant instructions, see [VAGRANT.md](VAGRANT.md). +You can install the software directly on your machine, which is the traditional and probably best-supported approach. However, there is an alternative which may be easier: Vagrant. This installs the software into a virtual machine, which makes it easier to get a consistent development environment and may avoid installation difficulties. For Vagrant instructions, see [VAGRANT.md](VAGRANT.md). These instructions are based on Ubuntu 12.04 LTS, which is the platform used by the OSMF servers. The instructions also work, with only minor amendments, for all other current Ubuntu releases, Fedora and MacOSX diff --git a/README.md b/README.md index 34e3325f0..d53bae157 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # "The Rails Port" +[![Build Status](https://travis-ci.org/openstreetmap/openstreetmap-website.svg?branch=master)](https://travis-ci.org/openstreetmap/openstreetmap-website) +[![Coverage Status](https://coveralls.io/repos/openstreetmap/openstreetmap-website/badge.svg?branch=master)](https://coveralls.io/r/openstreetmap/openstreetmap-website?branch=master) + This is The Rails Port, the [Ruby on Rails](http://rubyonrails.org/) application that powers the [OpenStreetMap](http://www.openstreetmap.org) website and API. The software is also known as "openstreetmap-website". diff --git a/VAGRANT.md b/VAGRANT.md index 0155a3383..d71483569 100644 --- a/VAGRANT.md +++ b/VAGRANT.md @@ -38,7 +38,7 @@ To access the web pages you run the following commands then access the site in y ``` vagrant ssh cd /srv/openstreetmap-website/ -rails server +rails server --binding=0.0.0.0 ``` You edit the code on your computer using the code editor you are used to using, then through shared folders the code is updated on the VM instantly. diff --git a/Vagrantfile b/Vagrantfile index 1986dd1d9..24d62bb7a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,15 +2,33 @@ # vi: set ft=ruby : Vagrant.configure("2") do |config| - config.vm.box = "precise64" - config.vm.box_url = "http://files.vagrantup.com/precise64.box" + # use official ubuntu image for virtualbox + config.vm.provider "virtualbox" do |_, override| + override.vm.box = "ubuntu/trusty64" + override.vm.synced_folder ".", "/srv/openstreetmap-website" + end + + # use third party image and NFS sharing for lxc + config.vm.provider "lxc" do |_, override| + override.vm.box = "sputnik13/trusty64" + override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => "nfs" + end + + # use third party image and NFS sharing for libvirt + config.vm.provider "libvirt" do |_, override| + override.vm.box = "sputnik13/trusty64" + override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => "nfs" + end + + # configure shared package cache if possible + if Vagrant.has_plugin?("vagrant-cachier") + config.cache.enable :apt + config.cache.scope = :box + end # port forward for webrick on 3000 config.vm.network :forwarded_port, :guest => 3000, :host => 3000 - # set up synced folder to source in /srv/openstreetmap-website - config.vm.synced_folder ".", "/srv/openstreetmap-website" - # provision using a simple shell script config.vm.provision :shell, :path => "script/vagrant/setup/provision.sh" end diff --git a/Vendorfile b/Vendorfile index ae46dc171..097f557aa 100644 --- a/Vendorfile +++ b/Vendorfile @@ -6,8 +6,8 @@ folder 'vendor/assets' do end folder 'bootstrap' do - file 'bootstrap.tooltip.js', 'https://raw.githubusercontent.com/twbs/bootstrap/v2.3.2/js/bootstrap-tooltip.js' - file 'bootstrap.dropdown.js', 'https://raw.githubusercontent.com/twbs/bootstrap/v2.3.2/js/bootstrap-dropdown.js' + file 'bootstrap.tooltip.js', 'https://raw.githubusercontent.com/twbs/bootstrap/v3.3.2/js/tooltip.js' + file 'bootstrap.dropdown.js', 'https://raw.githubusercontent.com/twbs/bootstrap/v3.3.2/js/dropdown.js' end folder 'leaflet' do diff --git a/app/assets/favicons/android-chrome-144x144.png b/app/assets/favicons/android-chrome-144x144.png new file mode 100644 index 000000000..5e6552e93 Binary files /dev/null and b/app/assets/favicons/android-chrome-144x144.png differ diff --git a/app/assets/favicons/android-chrome-192x192.png b/app/assets/favicons/android-chrome-192x192.png new file mode 100644 index 000000000..8e02ec989 Binary files /dev/null and b/app/assets/favicons/android-chrome-192x192.png differ diff --git a/app/assets/favicons/android-chrome-36x36.png b/app/assets/favicons/android-chrome-36x36.png new file mode 100644 index 000000000..5d402765e Binary files /dev/null and b/app/assets/favicons/android-chrome-36x36.png differ diff --git a/app/assets/favicons/android-chrome-48x48.png b/app/assets/favicons/android-chrome-48x48.png new file mode 100644 index 000000000..2a8781391 Binary files /dev/null and b/app/assets/favicons/android-chrome-48x48.png differ diff --git a/app/assets/favicons/android-chrome-72x72.png b/app/assets/favicons/android-chrome-72x72.png new file mode 100644 index 000000000..67aeb34d2 Binary files /dev/null and b/app/assets/favicons/android-chrome-72x72.png differ diff --git a/app/assets/favicons/android-chrome-96x96.png b/app/assets/favicons/android-chrome-96x96.png new file mode 100644 index 000000000..37ede1c1c Binary files /dev/null and b/app/assets/favicons/android-chrome-96x96.png differ diff --git a/app/assets/favicons/apple-touch-icon-114x114.png b/app/assets/favicons/apple-touch-icon-114x114.png new file mode 100644 index 000000000..46d11b332 Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-114x114.png differ diff --git a/app/assets/favicons/apple-touch-icon-120x120.png b/app/assets/favicons/apple-touch-icon-120x120.png new file mode 100644 index 000000000..03f32cb6b Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-120x120.png differ diff --git a/app/assets/favicons/apple-touch-icon-144x144.png b/app/assets/favicons/apple-touch-icon-144x144.png new file mode 100644 index 000000000..26c23a3f2 Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-144x144.png differ diff --git a/app/assets/favicons/apple-touch-icon-152x152.png b/app/assets/favicons/apple-touch-icon-152x152.png new file mode 100644 index 000000000..1fc5b8a2a Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-152x152.png differ diff --git a/app/assets/favicons/apple-touch-icon-180x180.png b/app/assets/favicons/apple-touch-icon-180x180.png new file mode 100644 index 000000000..93b1cc977 Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-180x180.png differ diff --git a/app/assets/favicons/apple-touch-icon-57x57.png b/app/assets/favicons/apple-touch-icon-57x57.png new file mode 100644 index 000000000..563e8add6 Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-57x57.png differ diff --git a/app/assets/favicons/apple-touch-icon-60x60.png b/app/assets/favicons/apple-touch-icon-60x60.png new file mode 100644 index 000000000..9d907d9da Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-60x60.png differ diff --git a/app/assets/favicons/apple-touch-icon-72x72.png b/app/assets/favicons/apple-touch-icon-72x72.png new file mode 100644 index 000000000..fbd1c310d Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-72x72.png differ diff --git a/app/assets/favicons/apple-touch-icon-76x76.png b/app/assets/favicons/apple-touch-icon-76x76.png new file mode 100644 index 000000000..e403736c5 Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-76x76.png differ diff --git a/app/assets/favicons/apple-touch-icon-precomposed.png b/app/assets/favicons/apple-touch-icon-precomposed.png new file mode 100644 index 000000000..97927402c Binary files /dev/null and b/app/assets/favicons/apple-touch-icon-precomposed.png differ diff --git a/app/assets/favicons/apple-touch-icon.png b/app/assets/favicons/apple-touch-icon.png new file mode 100644 index 000000000..93b1cc977 Binary files /dev/null and b/app/assets/favicons/apple-touch-icon.png differ diff --git a/app/assets/favicons/browserconfig.xml.erb b/app/assets/favicons/browserconfig.xml.erb new file mode 100644 index 000000000..e0c343e84 --- /dev/null +++ b/app/assets/favicons/browserconfig.xml.erb @@ -0,0 +1,12 @@ + + + + + "/> + "/> + "/> + "/> + #00a300 + + + diff --git a/app/assets/favicons/favicon-16x16.png b/app/assets/favicons/favicon-16x16.png new file mode 100644 index 000000000..2560c7295 Binary files /dev/null and b/app/assets/favicons/favicon-16x16.png differ diff --git a/app/assets/favicons/favicon-194x194.png b/app/assets/favicons/favicon-194x194.png new file mode 100644 index 000000000..779436b90 Binary files /dev/null and b/app/assets/favicons/favicon-194x194.png differ diff --git a/app/assets/favicons/favicon-32x32.png b/app/assets/favicons/favicon-32x32.png new file mode 100644 index 000000000..3a6009deb Binary files /dev/null and b/app/assets/favicons/favicon-32x32.png differ diff --git a/app/assets/favicons/favicon-96x96.png b/app/assets/favicons/favicon-96x96.png new file mode 100644 index 000000000..b60083bc9 Binary files /dev/null and b/app/assets/favicons/favicon-96x96.png differ diff --git a/app/assets/favicons/favicon.ico b/app/assets/favicons/favicon.ico new file mode 100644 index 000000000..0c2f56c2c Binary files /dev/null and b/app/assets/favicons/favicon.ico differ diff --git a/app/assets/favicons/manifest.json.erb b/app/assets/favicons/manifest.json.erb new file mode 100644 index 000000000..8938f2cd9 --- /dev/null +++ b/app/assets/favicons/manifest.json.erb @@ -0,0 +1,41 @@ +{ + "name": "OpenStreetMap", + "icons": [ + { + "src": "<%= image_path("android-chrome-36x36.png").gsub("/", "\\/") %>", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "<%= image_path("android-chrome-48x48.png").gsub("/", "\\/") %>", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "<%= image_path("android-chrome-72x72.png").gsub("/", "\\/") %>", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "<%= image_path("android-chrome-96x96.png").gsub("/", "\\/") %>", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "<%= image_path("android-chrome-144x144.png").gsub("/", "\\/") %>", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "<%= image_path("android-chrome-192x192.png").gsub("/", "\\/") %>", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} diff --git a/app/assets/favicons/mstile-144x144.png b/app/assets/favicons/mstile-144x144.png new file mode 100644 index 000000000..e86a0ab41 Binary files /dev/null and b/app/assets/favicons/mstile-144x144.png differ diff --git a/app/assets/favicons/mstile-150x150.png b/app/assets/favicons/mstile-150x150.png new file mode 100644 index 000000000..a4be2b338 Binary files /dev/null and b/app/assets/favicons/mstile-150x150.png differ diff --git a/app/assets/favicons/mstile-310x150.png b/app/assets/favicons/mstile-310x150.png new file mode 100644 index 000000000..ea907543d Binary files /dev/null and b/app/assets/favicons/mstile-310x150.png differ diff --git a/app/assets/favicons/mstile-310x310.png b/app/assets/favicons/mstile-310x310.png new file mode 100644 index 000000000..59b5a556f Binary files /dev/null and b/app/assets/favicons/mstile-310x310.png differ diff --git a/app/assets/favicons/mstile-70x70.png b/app/assets/favicons/mstile-70x70.png new file mode 100644 index 000000000..938959e48 Binary files /dev/null and b/app/assets/favicons/mstile-70x70.png differ diff --git a/app/assets/images/about/sprite.png b/app/assets/images/about/sprite.png index d38090599..fa0ce2986 100644 Binary files a/app/assets/images/about/sprite.png and b/app/assets/images/about/sprite.png differ diff --git a/app/assets/images/about/sprite.svg b/app/assets/images/about/sprite.svg new file mode 100644 index 000000000..01a80ae16 --- /dev/null +++ b/app/assets/images/about/sprite.svg @@ -0,0 +1,388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/images/about/sprite@2x.png b/app/assets/images/about/sprite@2x.png index 471b31d8f..7560c8773 100644 Binary files a/app/assets/images/about/sprite@2x.png and b/app/assets/images/about/sprite@2x.png differ diff --git a/app/assets/images/browse/amenity_bench.16.png b/app/assets/images/browse/amenity_bench.16.png new file mode 100644 index 000000000..0a2fc0ad4 Binary files /dev/null and b/app/assets/images/browse/amenity_bench.16.png differ diff --git a/app/assets/images/browse/amenity_bicycle_parking.16.png b/app/assets/images/browse/amenity_bicycle_parking.16.png new file mode 100644 index 000000000..855df5b24 Binary files /dev/null and b/app/assets/images/browse/amenity_bicycle_parking.16.png differ diff --git a/app/assets/images/browse/amenity_courthouse.16.png b/app/assets/images/browse/amenity_courthouse.16.png new file mode 100644 index 000000000..e00db54a3 Binary files /dev/null and b/app/assets/images/browse/amenity_courthouse.16.png differ diff --git a/app/assets/images/browse/amenity_fuel.16.png b/app/assets/images/browse/amenity_fuel.16.png new file mode 100644 index 000000000..8287af1ba Binary files /dev/null and b/app/assets/images/browse/amenity_fuel.16.png differ diff --git a/app/assets/images/browse/amenity_nightclub.16.png b/app/assets/images/browse/amenity_nightclub.16.png new file mode 100644 index 000000000..61f880748 Binary files /dev/null and b/app/assets/images/browse/amenity_nightclub.16.png differ diff --git a/app/assets/images/browse/amenity_taxi.16.png b/app/assets/images/browse/amenity_taxi.16.png new file mode 100644 index 000000000..542aab20c Binary files /dev/null and b/app/assets/images/browse/amenity_taxi.16.png differ diff --git a/app/assets/images/browse/amenity_toilets.16.png b/app/assets/images/browse/amenity_toilets.16.png new file mode 100644 index 000000000..cdd0d8856 Binary files /dev/null and b/app/assets/images/browse/amenity_toilets.16.png differ diff --git a/app/assets/images/browse/amenity_waste_basket.16.png b/app/assets/images/browse/amenity_waste_basket.16.png new file mode 100644 index 000000000..499bcebd5 Binary files /dev/null and b/app/assets/images/browse/amenity_waste_basket.16.png differ diff --git a/app/assets/images/browse/bus_stop.p.16.png b/app/assets/images/browse/bus_stop.p.16.png deleted file mode 100644 index d50858deb..000000000 Binary files a/app/assets/images/browse/bus_stop.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/caravan_park.n.16.png b/app/assets/images/browse/caravan_park.n.16.png deleted file mode 100644 index b605f4059..000000000 Binary files a/app/assets/images/browse/caravan_park.n.16.png and /dev/null differ diff --git a/app/assets/images/browse/fuel.p.16.png b/app/assets/images/browse/fuel.p.16.png deleted file mode 100644 index ba0b37e7e..000000000 Binary files a/app/assets/images/browse/fuel.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/health_opticians.p.16.png b/app/assets/images/browse/health_opticians.p.16.png deleted file mode 100644 index e27633daf..000000000 Binary files a/app/assets/images/browse/health_opticians.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/highway_bus_stop.16.png b/app/assets/images/browse/highway_bus_stop.16.png new file mode 100644 index 000000000..df2b58d0c Binary files /dev/null and b/app/assets/images/browse/highway_bus_stop.16.png differ diff --git a/app/assets/images/browse/historic_archaeological_site.16.png b/app/assets/images/browse/historic_archaeological_site.16.png new file mode 100644 index 000000000..9a07bb63d Binary files /dev/null and b/app/assets/images/browse/historic_archaeological_site.16.png differ diff --git a/app/assets/images/browse/historic_monument.16.png b/app/assets/images/browse/historic_monument.16.png new file mode 100644 index 000000000..82f7e4b1e Binary files /dev/null and b/app/assets/images/browse/historic_monument.16.png differ diff --git a/app/assets/images/browse/hostel.p.16.png b/app/assets/images/browse/hostel.p.16.png deleted file mode 100644 index 936269272..000000000 Binary files a/app/assets/images/browse/hostel.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/hotel.p.16.png b/app/assets/images/browse/hotel.p.16.png deleted file mode 100644 index 3133a89b1..000000000 Binary files a/app/assets/images/browse/hotel.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/leisure_water_park.16.png b/app/assets/images/browse/leisure_water_park.16.png new file mode 100644 index 000000000..a9c12095f Binary files /dev/null and b/app/assets/images/browse/leisure_water_park.16.png differ diff --git a/app/assets/images/browse/lighthouse.p.16.png b/app/assets/images/browse/lighthouse.p.16.png deleted file mode 100644 index d5dc99f79..000000000 Binary files a/app/assets/images/browse/lighthouse.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/man_made_lighthouse.16.png b/app/assets/images/browse/man_made_lighthouse.16.png new file mode 100644 index 000000000..3f49c3965 Binary files /dev/null and b/app/assets/images/browse/man_made_lighthouse.16.png differ diff --git a/app/assets/images/browse/man_made_water_tower.16.png b/app/assets/images/browse/man_made_water_tower.16.png new file mode 100644 index 000000000..d90088796 Binary files /dev/null and b/app/assets/images/browse/man_made_water_tower.16.png differ diff --git a/app/assets/images/browse/man_made_windmill.16.png b/app/assets/images/browse/man_made_windmill.16.png new file mode 100644 index 000000000..676c3c6cc Binary files /dev/null and b/app/assets/images/browse/man_made_windmill.16.png differ diff --git a/app/assets/images/browse/place_of_worship.png b/app/assets/images/browse/place_of_worship.png deleted file mode 100644 index a45cd9ca0..000000000 Binary files a/app/assets/images/browse/place_of_worship.png and /dev/null differ diff --git a/app/assets/images/browse/shop_alcohol.16.png b/app/assets/images/browse/shop_alcohol.16.png new file mode 100644 index 000000000..620b85e02 Binary files /dev/null and b/app/assets/images/browse/shop_alcohol.16.png differ diff --git a/app/assets/images/browse/shop_bicycle.16.png b/app/assets/images/browse/shop_bicycle.16.png new file mode 100644 index 000000000..4c1f2b78c Binary files /dev/null and b/app/assets/images/browse/shop_bicycle.16.png differ diff --git a/app/assets/images/browse/shop_bicycle.p.16.png b/app/assets/images/browse/shop_bicycle.p.16.png deleted file mode 100644 index 5bb99b9c8..000000000 Binary files a/app/assets/images/browse/shop_bicycle.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_books.16.png b/app/assets/images/browse/shop_books.16.png new file mode 100644 index 000000000..1de0d90d4 Binary files /dev/null and b/app/assets/images/browse/shop_books.16.png differ diff --git a/app/assets/images/browse/shop_books.p.16.png b/app/assets/images/browse/shop_books.p.16.png deleted file mode 100644 index 46e9b363d..000000000 Binary files a/app/assets/images/browse/shop_books.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_car_repair.16.png b/app/assets/images/browse/shop_car_repair.16.png new file mode 100644 index 000000000..437f42be4 Binary files /dev/null and b/app/assets/images/browse/shop_car_repair.16.png differ diff --git a/app/assets/images/browse/shop_clothes.16.png b/app/assets/images/browse/shop_clothes.16.png new file mode 100644 index 000000000..404172a6b Binary files /dev/null and b/app/assets/images/browse/shop_clothes.16.png differ diff --git a/app/assets/images/browse/shop_clothes.p.16.png b/app/assets/images/browse/shop_clothes.p.16.png deleted file mode 100644 index 973b6178f..000000000 Binary files a/app/assets/images/browse/shop_clothes.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_diy.p.16.png b/app/assets/images/browse/shop_diy.p.16.png deleted file mode 100644 index 7cd1af6f8..000000000 Binary files a/app/assets/images/browse/shop_diy.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_doityourself.16.png b/app/assets/images/browse/shop_doityourself.16.png new file mode 100644 index 000000000..b1f854deb Binary files /dev/null and b/app/assets/images/browse/shop_doityourself.16.png differ diff --git a/app/assets/images/browse/shop_electronics.16.png b/app/assets/images/browse/shop_electronics.16.png new file mode 100644 index 000000000..8d8dbbaa0 Binary files /dev/null and b/app/assets/images/browse/shop_electronics.16.png differ diff --git a/app/assets/images/browse/shop_florist.16.png b/app/assets/images/browse/shop_florist.16.png new file mode 100644 index 000000000..a7252eec4 Binary files /dev/null and b/app/assets/images/browse/shop_florist.16.png differ diff --git a/app/assets/images/browse/shop_furniture.16.png b/app/assets/images/browse/shop_furniture.16.png new file mode 100644 index 000000000..2957dd671 Binary files /dev/null and b/app/assets/images/browse/shop_furniture.16.png differ diff --git a/app/assets/images/browse/shop_garden_centre.p.16.png b/app/assets/images/browse/shop_garden_centre.p.16.png deleted file mode 100644 index 897455532..000000000 Binary files a/app/assets/images/browse/shop_garden_centre.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_gift.16.png b/app/assets/images/browse/shop_gift.16.png new file mode 100644 index 000000000..bbb433627 Binary files /dev/null and b/app/assets/images/browse/shop_gift.16.png differ diff --git a/app/assets/images/browse/shop_gift.p.16.png b/app/assets/images/browse/shop_gift.p.16.png deleted file mode 100644 index 35b38f5a8..000000000 Binary files a/app/assets/images/browse/shop_gift.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_hairdresser.16.png b/app/assets/images/browse/shop_hairdresser.16.png new file mode 100644 index 000000000..bc94a0d8d Binary files /dev/null and b/app/assets/images/browse/shop_hairdresser.16.png differ diff --git a/app/assets/images/browse/shop_hairdresser.p.16.png b/app/assets/images/browse/shop_hairdresser.p.16.png deleted file mode 100644 index 799c004b9..000000000 Binary files a/app/assets/images/browse/shop_hairdresser.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_jewellery.16.png b/app/assets/images/browse/shop_jewellery.16.png new file mode 100644 index 000000000..ea2896607 Binary files /dev/null and b/app/assets/images/browse/shop_jewellery.16.png differ diff --git a/app/assets/images/browse/shop_jewelry.p.16.png b/app/assets/images/browse/shop_jewelry.p.16.png deleted file mode 100644 index 5b0405ec2..000000000 Binary files a/app/assets/images/browse/shop_jewelry.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/shop_mobile_phone.16.png b/app/assets/images/browse/shop_mobile_phone.16.png new file mode 100644 index 000000000..7766a85de Binary files /dev/null and b/app/assets/images/browse/shop_mobile_phone.16.png differ diff --git a/app/assets/images/browse/shop_optician.16.png b/app/assets/images/browse/shop_optician.16.png new file mode 100644 index 000000000..a80a1763c Binary files /dev/null and b/app/assets/images/browse/shop_optician.16.png differ diff --git a/app/assets/images/browse/shop_pet.16.png b/app/assets/images/browse/shop_pet.16.png new file mode 100644 index 000000000..bfb202db8 Binary files /dev/null and b/app/assets/images/browse/shop_pet.16.png differ diff --git a/app/assets/images/browse/shop_shoes.16.png b/app/assets/images/browse/shop_shoes.16.png new file mode 100644 index 000000000..526035896 Binary files /dev/null and b/app/assets/images/browse/shop_shoes.16.png differ diff --git a/app/assets/images/browse/toilets.p.16.png b/app/assets/images/browse/toilets.p.16.png deleted file mode 100644 index 25cdb3d04..000000000 Binary files a/app/assets/images/browse/toilets.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/tourism_caravan_site.16.png b/app/assets/images/browse/tourism_caravan_site.16.png new file mode 100644 index 000000000..1b1eb1d72 Binary files /dev/null and b/app/assets/images/browse/tourism_caravan_site.16.png differ diff --git a/app/assets/images/browse/tourism_hostel.16.png b/app/assets/images/browse/tourism_hostel.16.png new file mode 100644 index 000000000..ab558d2f1 Binary files /dev/null and b/app/assets/images/browse/tourism_hostel.16.png differ diff --git a/app/assets/images/browse/tourism_hotel.16.png b/app/assets/images/browse/tourism_hotel.16.png new file mode 100644 index 000000000..2836d9613 Binary files /dev/null and b/app/assets/images/browse/tourism_hotel.16.png differ diff --git a/app/assets/images/browse/tourism_motel.16.png b/app/assets/images/browse/tourism_motel.16.png new file mode 100644 index 000000000..a1a786822 Binary files /dev/null and b/app/assets/images/browse/tourism_motel.16.png differ diff --git a/app/assets/images/browse/tourist_monument.p.16.png b/app/assets/images/browse/tourist_monument.p.16.png deleted file mode 100644 index d41ea997c..000000000 Binary files a/app/assets/images/browse/tourist_monument.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/tourist_windmill.p.16.png b/app/assets/images/browse/tourist_windmill.p.16.png deleted file mode 100644 index ea000cfae..000000000 Binary files a/app/assets/images/browse/tourist_windmill.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/transport_parking_bicycle.p.16.png b/app/assets/images/browse/transport_parking_bicycle.p.16.png deleted file mode 100644 index 85b706f65..000000000 Binary files a/app/assets/images/browse/transport_parking_bicycle.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/transport_rental_bicycle.16.png b/app/assets/images/browse/transport_rental_bicycle.16.png new file mode 100644 index 000000000..8ee7009f1 Binary files /dev/null and b/app/assets/images/browse/transport_rental_bicycle.16.png differ diff --git a/app/assets/images/browse/transport_rental_bicycle.p.16.png b/app/assets/images/browse/transport_rental_bicycle.p.16.png deleted file mode 100644 index 1a46fba70..000000000 Binary files a/app/assets/images/browse/transport_rental_bicycle.p.16.png and /dev/null differ diff --git a/app/assets/images/browse/transport_rental_car.16.png b/app/assets/images/browse/transport_rental_car.16.png new file mode 100644 index 000000000..9979562bf Binary files /dev/null and b/app/assets/images/browse/transport_rental_car.16.png differ diff --git a/app/assets/images/browse/transport_rental_car.p.16.png b/app/assets/images/browse/transport_rental_car.p.16.png deleted file mode 100644 index 7874729a7..000000000 Binary files a/app/assets/images/browse/transport_rental_car.p.16.png and /dev/null differ diff --git a/app/assets/images/facebook.png b/app/assets/images/facebook.png new file mode 100644 index 000000000..8a9efc970 Binary files /dev/null and b/app/assets/images/facebook.png differ diff --git a/app/assets/images/favicon.ico b/app/assets/images/favicon.ico deleted file mode 100644 index 4448dd6f6..000000000 Binary files a/app/assets/images/favicon.ico and /dev/null differ diff --git a/app/assets/images/key/mapnik/byway.png b/app/assets/images/key/mapnik/byway.png deleted file mode 100644 index 3b696ef24..000000000 Binary files a/app/assets/images/key/mapnik/byway.png and /dev/null differ diff --git a/app/assets/images/key/mapnik/permissive.png b/app/assets/images/key/mapnik/permissive.png deleted file mode 100644 index d8239f128..000000000 Binary files a/app/assets/images/key/mapnik/permissive.png and /dev/null differ diff --git a/app/assets/images/key/mapnik/tourist.png b/app/assets/images/key/mapnik/tourist.png deleted file mode 100644 index bb3cf3686..000000000 Binary files a/app/assets/images/key/mapnik/tourist.png and /dev/null differ diff --git a/app/assets/images/key/mapnik/unsurfaced.png b/app/assets/images/key/mapnik/unsurfaced.png deleted file mode 100644 index 25c215049..000000000 Binary files a/app/assets/images/key/mapnik/unsurfaced.png and /dev/null differ diff --git a/app/assets/images/osm_logo_114.png b/app/assets/images/osm_logo_114.png deleted file mode 100644 index 67c4b21cc..000000000 Binary files a/app/assets/images/osm_logo_114.png and /dev/null differ diff --git a/app/assets/images/osm_logo_144.png b/app/assets/images/osm_logo_144.png deleted file mode 100644 index b24fb1c3a..000000000 Binary files a/app/assets/images/osm_logo_144.png and /dev/null differ diff --git a/app/assets/images/osm_logo_228.png b/app/assets/images/osm_logo_228.png deleted file mode 100644 index d387ad25d..000000000 Binary files a/app/assets/images/osm_logo_228.png and /dev/null differ diff --git a/app/assets/images/osm_logo_57.png b/app/assets/images/osm_logo_57.png deleted file mode 100644 index 94893c7e2..000000000 Binary files a/app/assets/images/osm_logo_57.png and /dev/null differ diff --git a/app/assets/images/osm_logo_72.png b/app/assets/images/osm_logo_72.png deleted file mode 100644 index 2bb1f30e6..000000000 Binary files a/app/assets/images/osm_logo_72.png and /dev/null differ diff --git a/app/assets/images/sotm-birmingham-ad.png b/app/assets/images/sotm-birmingham-ad.png deleted file mode 100644 index a6c5449fd..000000000 Binary files a/app/assets/images/sotm-birmingham-ad.png and /dev/null differ diff --git a/app/assets/images/sotm-us-ad.png b/app/assets/images/sotm-us-ad.png deleted file mode 100644 index c775396c0..000000000 Binary files a/app/assets/images/sotm-us-ad.png and /dev/null differ diff --git a/app/assets/images/sprite.png b/app/assets/images/sprite.png index d5577d4b7..c511bd90f 100644 Binary files a/app/assets/images/sprite.png and b/app/assets/images/sprite.png differ diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg index b50b969e9..92350301d 100644 --- a/app/assets/images/sprite.svg +++ b/app/assets/images/sprite.svg @@ -13,7 +13,7 @@ height="200" id="svg2" version="1.1" - inkscape:version="0.48.4 r9939" + inkscape:version="0.91 r13725" inkscape:export-filename="/home/tom/rails/app/assets/images/sprite.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" @@ -280,5 +280,11 @@ id="tspan3023" x="264.8125" y="869.62622">? + diff --git a/app/assets/images/welcome-sprite.png b/app/assets/images/welcome-sprite.png index f904f00cd..30d93d7e1 100644 Binary files a/app/assets/images/welcome-sprite.png and b/app/assets/images/welcome-sprite.png differ diff --git a/app/assets/images/welcome-sprite.svg b/app/assets/images/welcome-sprite.svg index 0151c5ced..4af03a213 100644 --- a/app/assets/images/welcome-sprite.svg +++ b/app/assets/images/welcome-sprite.svg @@ -13,9 +13,9 @@ height="500" id="svg2" version="1.1" - inkscape:version="0.48.2 r9819" + inkscape:version="0.48.4 r9939" sodipodi:docname="welcome-sprite.svg" - inkscape:export-filename="/Users/saman/work_repos/openstreetmap-website/app/assets/images/welcome-sprite.png" + inkscape:export-filename="C:\Users\simon\Downloads\welcome-sprite.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> + inkscape:object-nodes="true" + inkscape:snap-grids="true" + inkscape:snap-global="false"> + @@ -125,7 +131,7 @@ sodipodi:cy="42.5" sodipodi:rx="42.5" sodipodi:ry="42.5" - d="m 85,42.5 a 42.5,42.5 0 1 1 -85,0 42.5,42.5 0 1 1 85,0 z" + d="M 85,42.5 C 85,65.972102 65.972102,85 42.5,85 19.027898,85 0,65.972102 0,42.5 0,19.027898 19.027898,0 42.5,0 65.972102,0 85,19.027898 85,42.5 z" transform="matrix(1.0588235,0,0,1.0588235,5,557.36218)" /> + + § diff --git a/app/assets/images/windowslive.png b/app/assets/images/windowslive.png new file mode 100644 index 000000000..8df253c2b Binary files /dev/null and b/app/assets/images/windowslive.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 09ae367f4..5064d115b 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -20,53 +20,20 @@ var querystring = require('querystring-component'); -function remoteEditHandler(bbox, object) { - var loaded = false, - url = document.location.protocol === "https:" ? - "https://127.0.0.1:8112/load_and_zoom?" : - "http://127.0.0.1:8111/load_and_zoom?", - query = { - left: bbox.getWest() - 0.0001, - top: bbox.getNorth() + 0.0001, - right: bbox.getEast() + 0.0001, - bottom: bbox.getSouth() - 0.0001 - }; - - if (object) query.select = object.type + object.id; - - var iframe = $('