Merge remote-tracking branch 'openstreetmap/pull/1030' into next
authorTom Hughes <tom@compton.nu>
Sun, 12 Feb 2017 15:04:50 +0000 (15:04 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 12 Feb 2017 15:04:50 +0000 (15:04 +0000)
787 files changed:
.mailmap
.rubocop.yml
.rubocop_todo.yml
.travis.yml
Gemfile
Gemfile.lock
INSTALL.md
README.md
VAGRANT.md
Vagrantfile
Vendorfile
app/assets/images/banners/.keep [moved from db/MAKE_MIGRATIONS_AND_TEST_THEM_DONT_PUT_SQL_HERE_ANY_MORE with 100% similarity]
app/assets/images/banners/donate-2016.jpg [new file with mode: 0644]
app/assets/images/banners/sotmasia-2016.jpg [new file with mode: 0644]
app/assets/images/banners/sotmlatam-2016.jpg [new file with mode: 0644]
app/assets/images/browse/motorway.20.png
app/assets/images/browse/primary.20.png
app/assets/images/browse/secondary.20.png
app/assets/images/browse/shop_car_parts.16.png [new file with mode: 0644]
app/assets/images/browse/tertiary.20.png
app/assets/images/browse/trunk.20.png
app/assets/images/github.png [new file with mode: 0644]
app/assets/images/google.png
app/assets/images/key/cyclemap/bicycle_parking.png [new file with mode: 0644]
app/assets/images/key/cyclemap/bicycle_shop.png [new file with mode: 0644]
app/assets/images/key/cyclemap/common.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_local.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_local13.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_national.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_national13.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_regional.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_regional13.png [new file with mode: 0644]
app/assets/images/key/cyclemap/footway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/forest.png [new file with mode: 0644]
app/assets/images/key/cyclemap/lake.png [new file with mode: 0644]
app/assets/images/key/cyclemap/motorway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/motorway12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/primary.png [new file with mode: 0644]
app/assets/images/key/cyclemap/primary12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/rail.png [new file with mode: 0644]
app/assets/images/key/cyclemap/rail14.png [new file with mode: 0644]
app/assets/images/key/cyclemap/secondary.png [new file with mode: 0644]
app/assets/images/key/cyclemap/secondary12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/toilets.png [new file with mode: 0644]
app/assets/images/key/cyclemap/track.png [new file with mode: 0644]
app/assets/images/key/cyclemap/trunk.png [new file with mode: 0644]
app/assets/images/key/cyclemap/trunk12.png [new file with mode: 0644]
app/assets/images/key/mapnik/construction.png
app/assets/images/key/mapnik/mainroad.png [new file with mode: 0644]
app/assets/images/key/mapnik/mainroad12.png [new file with mode: 0644]
app/assets/images/key/mapnik/mainroad7.png [new file with mode: 0644]
app/assets/images/key/mapnik/mainroad9.png [new file with mode: 0644]
app/assets/images/key/mapnik/motorway.png
app/assets/images/key/mapnik/primary.png [deleted file]
app/assets/images/key/mapnik/primary12.png [deleted file]
app/assets/images/key/mapnik/secondary.png [deleted file]
app/assets/images/key/mapnik/secondary12.png [deleted file]
app/assets/images/key/mapnik/trunk.png [deleted file]
app/assets/images/key/mapnik/trunk12.png [deleted file]
app/assets/images/osm_logo_256.png [new file with mode: 0644]
app/assets/images/osm_logo_30.png [new file with mode: 0644]
app/assets/images/osm_logo_512.png [new file with mode: 0644]
app/assets/images/routing-sprite.png
app/assets/images/routing-sprite.svg [new file with mode: 0644]
app/assets/images/sprite.png
app/assets/images/sprite.svg
app/assets/images/tab-icon.svg [new file with mode: 0644]
app/assets/images/wikipedia.png [new file with mode: 0644]
app/assets/images/wordpress.png
app/assets/javascripts/embed.js.erb
app/assets/javascripts/id.js
app/assets/javascripts/index.js
app/assets/javascripts/index/directions.js
app/assets/javascripts/index/directions/graphhopper.js
app/assets/javascripts/index/directions/mapquest.js
app/assets/javascripts/index/directions/mapzen.js [new file with mode: 0644]
app/assets/javascripts/index/directions/osrm.js
app/assets/javascripts/index/new_note.js
app/assets/javascripts/index/notes.js
app/assets/javascripts/index/query.js
app/assets/javascripts/index/search.js
app/assets/javascripts/leaflet.key.js
app/assets/javascripts/leaflet.layers.js
app/assets/javascripts/leaflet.map.js
app/assets/javascripts/leaflet.share.js
app/assets/javascripts/login.js [new file with mode: 0644]
app/assets/javascripts/osm.js.erb
app/assets/javascripts/user.js
app/assets/stylesheets/browse.scss
app/assets/stylesheets/common.scss
app/assets/stylesheets/parameters.scss
app/assets/stylesheets/small.scss
app/controllers/amf_controller.rb
app/controllers/api_controller.rb
app/controllers/application_controller.rb
app/controllers/browse_controller.rb
app/controllers/changeset_controller.rb
app/controllers/diary_entry_controller.rb
app/controllers/export_controller.rb
app/controllers/geocoder_controller.rb
app/controllers/message_controller.rb
app/controllers/node_controller.rb
app/controllers/notes_controller.rb
app/controllers/oauth_controller.rb
app/controllers/old_controller.rb
app/controllers/redactions_controller.rb
app/controllers/relation_controller.rb
app/controllers/site_controller.rb
app/controllers/swf_controller.rb
app/controllers/trace_controller.rb
app/controllers/user_controller.rb
app/controllers/user_preference_controller.rb
app/controllers/way_controller.rb
app/helpers/asset_helper.rb
app/helpers/banner_helper.rb [new file with mode: 0644]
app/helpers/browse_helper.rb
app/helpers/changeset_helper.rb
app/helpers/geocoder_helper.rb
app/helpers/note_helper.rb
app/helpers/notifier_helper.rb
app/helpers/open_graph_helper.rb [new file with mode: 0644]
app/helpers/title_helper.rb
app/helpers/trace_helper.rb
app/helpers/user_roles_helper.rb
app/models/acl.rb
app/models/changeset.rb
app/models/changeset_comment.rb
app/models/client_application.rb
app/models/diary_entry.rb
app/models/diary_entry_subscription.rb [new file with mode: 0644]
app/models/language.rb
app/models/node.rb
app/models/note.rb
app/models/notifier.rb
app/models/oauth_nonce.rb
app/models/old_node.rb
app/models/relation.rb
app/models/request_token.rb
app/models/trace.rb
app/models/user.rb
app/models/user_role.rb
app/models/way.rb
app/views/api/permissions.builder
app/views/browse/_relation_member.html.erb
app/views/browse/_way.html.erb
app/views/browse/changeset.html.erb
app/views/browse/note.html.erb
app/views/browse/timeout.html.erb
app/views/changeset/_changeset.html.erb
app/views/changeset/_comments.rss.builder
app/views/changeset/comments_feed.rss.builder
app/views/changeset/history.html.erb
app/views/changeset/list.atom.builder
app/views/changeset/timeout.atom.builder
app/views/diary_entry/edit.html.erb
app/views/diary_entry/rss.rss.builder
app/views/diary_entry/view.html.erb
app/views/layouts/_banner.html.erb [new file with mode: 0644]
app/views/layouts/_flash.html.erb
app/views/layouts/_head.html.erb
app/views/layouts/_header.html.erb
app/views/layouts/map.html.erb
app/views/layouts/notifier.html.erb [new file with mode: 0644]
app/views/layouts/site.rss.builder [deleted file]
app/views/notes/_note.gpx.builder
app/views/notes/_note.json.jsonify
app/views/notes/_note.rss.builder
app/views/notes/_note.xml.builder
app/views/notes/feed.rss.builder
app/views/notes/index.gpx.builder
app/views/notes/index.rss.builder
app/views/notes/show.gpx.builder
app/views/notes/show.rss.builder
app/views/notifier/_gpx_description.html.erb
app/views/notifier/_message_body.html.erb [new file with mode: 0644]
app/views/notifier/changeset_comment_notification.html.erb
app/views/notifier/changeset_comment_notification.text.erb
app/views/notifier/diary_comment_notification.html.erb
app/views/notifier/email_confirm.html.erb
app/views/notifier/friend_notification.html.erb
app/views/notifier/gpx_failure.html.erb
app/views/notifier/gpx_success.html.erb
app/views/notifier/message_notification.html.erb
app/views/notifier/note_comment_notification.html.erb
app/views/notifier/note_comment_notification.text.erb
app/views/notifier/signup_confirm.html.erb
app/views/oauth/authorize.html.erb
app/views/site/_id.html.erb
app/views/site/_potlatch2.html.erb
app/views/site/export.html.erb
app/views/site/id.html.erb
app/views/site/key.html.erb
app/views/trace/georss.rss.builder
app/views/user/_auth_association.html.erb [new file with mode: 0644]
app/views/user/api_read.builder
app/views/user/blocked.html.erb
app/views/user/login.html.erb
app/views/user/suspended.html.erb
config/application.rb
config/banners.yml [new file with mode: 0644]
config/example.application.yml
config/image_optim.yml [new file with mode: 0644]
config/initializers/abstract_adapter.rb
config/initializers/assets.rb
config/initializers/banners.rb [new file with mode: 0644]
config/initializers/http_accept_language.rb [deleted file]
config/initializers/i18n.rb
config/initializers/konacha.rb
config/initializers/libxml.rb
config/initializers/omniauth.rb
config/initializers/paperclip.rb
config/initializers/r2.rb
config/initializers/streaming.rb
config/initializers/uri_sanitizer.rb [new file with mode: 0644]
config/initializers/wiki_pages.rb
config/key.yml
config/lighttpd-host-blocks.sh [deleted file]
config/lighttpd.conf [deleted file]
config/locales/af.yml
config/locales/aln.yml
config/locales/ar.yml
config/locales/arz.yml
config/locales/ast.yml
config/locales/az.yml
config/locales/be-Tarask.yml
config/locales/be.yml
config/locales/bg.yml
config/locales/bn.yml [new file with mode: 0644]
config/locales/br.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/cy.yml
config/locales/da.yml
config/locales/de.yml
config/locales/diq.yml
config/locales/dsb.yml
config/locales/el.yml
config/locales/en-GB.yml
config/locales/en.yml
config/locales/eo.yml
config/locales/es.yml
config/locales/et.yml
config/locales/eu.yml
config/locales/fa.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/fur.yml
config/locales/ga.yml [new file with mode: 0644]
config/locales/gd.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.yml
config/locales/hsb.yml
config/locales/hu.yml
config/locales/ia.yml
config/locales/id.yml
config/locales/is.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ka.yml
config/locales/ko.yml
config/locales/lb.yml
config/locales/lt.yml
config/locales/lv.yml
config/locales/mk.yml
config/locales/mr.yml
config/locales/ms.yml
config/locales/nb.yml
config/locales/nl.yml
config/locales/nn.yml
config/locales/oc.yml
config/locales/pa.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt-PT.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/scn.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sq.yml
config/locales/sr-Latn.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/te.yml
config/locales/tl.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-CN.yml
config/locales/zh-TW.yml
config/nginx.conf [deleted file]
config/preinitializer.rb
config/routes.rb
db/README [deleted file]
db/functions/Makefile
db/migrate/001_create_osm_db.rb
db/migrate/008_remove_segments.rb
db/migrate/020_populate_node_tags_and_remove.rb
db/migrate/021_move_to_innodb.rb
db/migrate/022_key_constraints.rb
db/migrate/023_add_changesets.rb
db/migrate/030_add_foreign_keys.rb
db/migrate/034_create_languages.rb
db/migrate/040_create_oauth_tables.rb
db/migrate/041_add_fine_o_auth_permissions.rb
db/migrate/044_create_user_roles.rb
db/migrate/045_create_user_blocks.rb
db/migrate/20120318201948_create_redactions.rb
db/migrate/20140117185510_drop_countries.rb
db/migrate/20140507110937_create_changeset_comments.rb
db/migrate/20150111192335_subscribe_old_changesets.rb
db/migrate/20150818224516_set_default_gravatar_to_false_for_privacy.rb [new file with mode: 0644]
db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb [new file with mode: 0644]
db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb [new file with mode: 0644]
db/structure.sql
lib/auth.rb
lib/bounding_box.rb
lib/classic_pagination/pagination.rb
lib/classic_pagination/pagination_helper.rb
lib/consistency_validations.rb
lib/country.rb
lib/daemons/gpx_import_ctl
lib/diff_reader.rb
lib/editors.rb
lib/gpx.rb
lib/id.rb
lib/locale.rb [new file with mode: 0644]
lib/migrate.rb
lib/not_redactable.rb
lib/osm.rb
lib/password_hash.rb
lib/potlatch.rb
lib/potlatch2.rb
lib/quad_tile.rb
lib/quad_tile/quad_tile.h
lib/quova.rb [deleted file]
lib/redactable.rb
lib/rich_text.rb
lib/session_persistence.rb
lib/short_link.rb
lib/tasks/add_version_to_nodes.rake
public/robots.txt
script/cleanup
script/deliver-message
script/gravatar [new file with mode: 0755]
script/rails
script/vagrant/setup/provision.sh
test/controllers/amf_controller_test.rb
test/controllers/api_controller_test.rb
test/controllers/browse_controller_test.rb
test/controllers/changeset_controller_test.rb
test/controllers/diary_entry_controller_test.rb
test/controllers/geocoder_controller_test.rb
test/controllers/message_controller_test.rb
test/controllers/node_controller_test.rb
test/controllers/notes_controller_test.rb
test/controllers/oauth_clients_controller_test.rb
test/controllers/old_node_controller_test.rb
test/controllers/old_way_controller_test.rb
test/controllers/redactions_controller_test.rb
test/controllers/relation_controller_test.rb
test/controllers/search_controller_test.rb
test/controllers/site_controller_test.rb
test/controllers/swf_controller_test.rb
test/controllers/trace_controller_test.rb
test/controllers/user_blocks_controller_test.rb
test/controllers/user_controller_test.rb
test/controllers/user_preference_controller_test.rb
test/controllers/way_controller_test.rb
test/factories/acls.rb [new file with mode: 0644]
test/factories/changeset_comments.rb [new file with mode: 0644]
test/factories/changeset_tags.rb [new file with mode: 0644]
test/factories/client_applications.rb [new file with mode: 0644]
test/factories/diary_comments.rb [new file with mode: 0644]
test/factories/diary_entries.rb [new file with mode: 0644]
test/factories/friends.rb [new file with mode: 0644]
test/factories/languages.rb [new file with mode: 0644]
test/factories/messages.rb [new file with mode: 0644]
test/factories/node_tags.rb [new file with mode: 0644]
test/factories/note_comments.rb [new file with mode: 0644]
test/factories/notes.rb [new file with mode: 0644]
test/factories/old_node_tags.rb [new file with mode: 0644]
test/factories/old_relation_tags.rb [new file with mode: 0644]
test/factories/old_way_tags.rb [new file with mode: 0644]
test/factories/relation_tags.rb [new file with mode: 0644]
test/factories/tracepoints.rb [new file with mode: 0644]
test/factories/traces.rb [new file with mode: 0644]
test/factories/tracetags.rb [new file with mode: 0644]
test/factories/user.rb [new file with mode: 0644]
test/factories/user_blocks.rb [new file with mode: 0644]
test/factories/user_preferences.rb [new file with mode: 0644]
test/factories/user_role.rb [new file with mode: 0644]
test/factories/way_tags.rb [new file with mode: 0644]
test/fixtures/acls.yml [deleted file]
test/fixtures/changeset_comments.yml [deleted file]
test/fixtures/changeset_tags.yml [deleted file]
test/fixtures/changesets.yml
test/fixtures/changesets_subscribers.yml [deleted file]
test/fixtures/client_applications.yml [deleted file]
test/fixtures/countries.yml [deleted file]
test/fixtures/current_node_tags.yml [deleted file]
test/fixtures/current_nodes.yml
test/fixtures/current_relation_tags.yml [deleted file]
test/fixtures/current_way_tags.yml [deleted file]
test/fixtures/diary_comments.yml [deleted file]
test/fixtures/diary_entries.yml [deleted file]
test/fixtures/friends.yml [deleted file]
test/fixtures/gps_points.yml [deleted file]
test/fixtures/gpx_file_tags.yml [deleted file]
test/fixtures/gpx_files.yml [deleted file]
test/fixtures/languages.yml [deleted file]
test/fixtures/messages.yml [deleted file]
test/fixtures/node_tags.yml [deleted file]
test/fixtures/note_comments.yml [deleted file]
test/fixtures/notes.yml [deleted file]
test/fixtures/relation_tags.yml [deleted file]
test/fixtures/user_blocks.yml [deleted file]
test/fixtures/user_preferences.yml [deleted file]
test/fixtures/users.yml
test/fixtures/way_tags.yml [deleted file]
test/gpx/fixtures/a.gif [moved from test/traces/1.gif with 100% similarity]
test/gpx/fixtures/a.gpx [moved from test/traces/1.gpx with 100% similarity]
test/gpx/fixtures/a_icon.gif [moved from test/traces/1_icon.gif with 100% similarity]
test/gpx/fixtures/b.gif [moved from test/traces/2.gif with 100% similarity]
test/gpx/fixtures/b.gpx [moved from test/traces/10.gpx with 100% similarity]
test/gpx/fixtures/b_icon.gif [moved from test/traces/2_icon.gif with 100% similarity]
test/gpx/fixtures/c.gif [moved from test/traces/3.gif with 100% similarity]
test/gpx/fixtures/c.gpx [moved from test/traces/3.gpx with 100% similarity]
test/gpx/fixtures/c_icon.gif [moved from test/traces/3_icon.gif with 100% similarity]
test/gpx/fixtures/d.gif [moved from test/traces/4.gif with 100% similarity]
test/gpx/fixtures/d.gpx [moved from test/traces/4.gpx with 100% similarity]
test/gpx/fixtures/d_icon.gif [moved from test/traces/4_icon.gif with 100% similarity]
test/gpx/fixtures/f.gif [moved from test/traces/6.gif with 100% similarity]
test/gpx/fixtures/f.gpx [moved from test/traces/6.gpx with 100% similarity]
test/gpx/fixtures/f_icon.gif [moved from test/traces/6_icon.gif with 100% similarity]
test/gpx/fixtures/g.gif [moved from test/traces/7.gif with 100% similarity]
test/gpx/fixtures/g.gpx [moved from test/traces/7.gpx with 100% similarity]
test/gpx/fixtures/g_icon.gif [moved from test/traces/7_icon.gif with 100% similarity]
test/gpx/fixtures/h.gif [moved from test/traces/8.gif with 100% similarity]
test/gpx/fixtures/h.gpx [moved from test/traces/8.gpx with 100% similarity]
test/gpx/fixtures/h_icon.gif [moved from test/traces/8_icon.gif with 100% similarity]
test/gpx/fixtures/i.gif [moved from test/traces/9.gif with 100% similarity]
test/gpx/fixtures/i.gpx [moved from test/traces/9.gpx with 100% similarity]
test/gpx/fixtures/i_icon.gif [moved from test/traces/9_icon.gif with 100% similarity]
test/gpx/fixtures/j.gpx [moved from test/traces/2.gpx with 100% similarity]
test/gpx/images/.gitkeep [moved from test/fixtures/user_tokens.yml with 100% similarity]
test/gpx/traces/.gitkeep [new file with mode: 0644]
test/helpers/application_helper_test.rb
test/helpers/browse_helper_test.rb
test/helpers/changeset_helper_test.rb
test/helpers/note_helper_test.rb
test/helpers/title_helper_test.rb
test/helpers/user_roles_helper_test.rb
test/http/geocoder_ca.yml
test/http/geocoder_us.yml
test/http/geonames.yml
test/http/nominatim.yml
test/http/npemap.yml
test/integration/client_applications_test.rb
test/integration/oauth_test.rb
test/integration/page_locale_test.rb [moved from test/integration/locale_test.rb with 85% similarity]
test/integration/user_blocks_test.rb
test/integration/user_changeset_comments_test.rb
test/integration/user_creation_test.rb
test/integration/user_diaries_test.rb
test/integration/user_login_test.rb
test/integration/user_roles_test.rb
test/integration/user_terms_seen_test.rb
test/lib/bounding_box_test.rb
test/lib/country_test.rb
test/lib/i18n_test.rb
test/lib/locale_test.rb [new file with mode: 0644]
test/lib/password_hash_test.rb
test/models/acl_test.rb
test/models/changeset_comment_test.rb
test/models/changeset_tag_test.rb
test/models/changeset_test.rb
test/models/client_application_test.rb
test/models/diary_comment_test.rb
test/models/diary_entry_test.rb
test/models/friend_test.rb
test/models/language_test.rb
test/models/message_test.rb
test/models/node_tag_test.rb
test/models/node_test.rb
test/models/note_comment_test.rb
test/models/note_test.rb
test/models/oauth_nonce_test.rb
test/models/oauth_token_test.rb
test/models/old_node_tag_test.rb
test/models/old_node_test.rb
test/models/old_relation_tag_test.rb
test/models/old_relation_test.rb
test/models/old_way_tag_test.rb
test/models/old_way_test.rb
test/models/relation_tag_test.rb
test/models/relation_test.rb
test/models/request_token_test.rb [new file with mode: 0644]
test/models/trace_test.rb
test/models/tracepoint_test.rb
test/models/tracetag_test.rb
test/models/user_preference_test.rb
test/models/user_test.rb
test/models/user_token_test.rb
test/models/way_tag_test.rb
test/models/way_test.rb
test/test_helper.rb
vendor/assets/iD/iD.css.erb
vendor/assets/iD/iD.js
vendor/assets/iD/iD/img/iD-sprite.svg [new file with mode: 0644]
vendor/assets/iD/iD/img/line-presets.png [deleted file]
vendor/assets/iD/iD/img/maki-sprite.png [deleted file]
vendor/assets/iD/iD/img/maki-sprite.svg [new file with mode: 0644]
vendor/assets/iD/iD/img/relation-presets.png [deleted file]
vendor/assets/iD/iD/img/sprite.svg [deleted file]
vendor/assets/iD/iD/locales/af.json
vendor/assets/iD/iD/locales/ar-AA.json
vendor/assets/iD/iD/locales/ar.json
vendor/assets/iD/iD/locales/ast.json
vendor/assets/iD/iD/locales/bg-BG.json
vendor/assets/iD/iD/locales/bn.json
vendor/assets/iD/iD/locales/bs.json
vendor/assets/iD/iD/locales/ca.json
vendor/assets/iD/iD/locales/cs.json
vendor/assets/iD/iD/locales/da.json
vendor/assets/iD/iD/locales/de.json
vendor/assets/iD/iD/locales/el.json
vendor/assets/iD/iD/locales/en-GB.json
vendor/assets/iD/iD/locales/en.json
vendor/assets/iD/iD/locales/eo.json
vendor/assets/iD/iD/locales/es.json
vendor/assets/iD/iD/locales/et.json
vendor/assets/iD/iD/locales/fa.json
vendor/assets/iD/iD/locales/fi.json
vendor/assets/iD/iD/locales/fil.json [deleted file]
vendor/assets/iD/iD/locales/fr.json
vendor/assets/iD/iD/locales/gl.json
vendor/assets/iD/iD/locales/gu.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/hi-IN.json [deleted file]
vendor/assets/iD/iD/locales/hi.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/hr.json
vendor/assets/iD/iD/locales/hu.json
vendor/assets/iD/iD/locales/hy.json
vendor/assets/iD/iD/locales/id.json
vendor/assets/iD/iD/locales/is.json
vendor/assets/iD/iD/locales/it.json
vendor/assets/iD/iD/locales/ja.json
vendor/assets/iD/iD/locales/kn.json
vendor/assets/iD/iD/locales/ko-KR.json [deleted file]
vendor/assets/iD/iD/locales/ko.json
vendor/assets/iD/iD/locales/ku.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/lij.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/lt.json
vendor/assets/iD/iD/locales/lv.json
vendor/assets/iD/iD/locales/mk.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/ml.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/nl.json
vendor/assets/iD/iD/locales/no.json
vendor/assets/iD/iD/locales/pl.json
vendor/assets/iD/iD/locales/pt-BR.json
vendor/assets/iD/iD/locales/pt.json
vendor/assets/iD/iD/locales/ro-RO.json [deleted file]
vendor/assets/iD/iD/locales/ro.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/ru.json
vendor/assets/iD/iD/locales/sc.json
vendor/assets/iD/iD/locales/si.json
vendor/assets/iD/iD/locales/sk.json
vendor/assets/iD/iD/locales/sl.json
vendor/assets/iD/iD/locales/sq.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/sr.json
vendor/assets/iD/iD/locales/sv.json
vendor/assets/iD/iD/locales/ta.json
vendor/assets/iD/iD/locales/te.json
vendor/assets/iD/iD/locales/th.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/tl.json
vendor/assets/iD/iD/locales/tr.json
vendor/assets/iD/iD/locales/uk.json
vendor/assets/iD/iD/locales/vi.json
vendor/assets/iD/iD/locales/yue.json
vendor/assets/iD/iD/locales/zh-CN.json
vendor/assets/iD/iD/locales/zh-HK.json
vendor/assets/iD/iD/locales/zh-TW.json
vendor/assets/iD/iD/locales/zh.json
vendor/assets/iD/iD/mapillary-js/arrow-up-white.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/cover-logo.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.js [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.js.map [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.min.css [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.min.js [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/pano-indicator.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/pano.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/pointer-wheat.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/pointer-white.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/spinner.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-left.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-play.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-right.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-stop.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/turn-around.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/turn.svg [new file with mode: 0755]
vendor/assets/iD/iD/traffico/LICENSE [new file with mode: 0644]
vendor/assets/iD/iD/traffico/README.md [new file with mode: 0644]
vendor/assets/iD/iD/traffico/bower.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/fonts/traffico-preview.html [new file with mode: 0644]
vendor/assets/iD/iD/traffico/fonts/traffico_d596ae6150aa5c55ac14b1e060efc523.eot [new file with mode: 0644]
vendor/assets/iD/iD/traffico/fonts/traffico_d596ae6150aa5c55ac14b1e060efc523.svg [new file with mode: 0644]
vendor/assets/iD/iD/traffico/fonts/traffico_d596ae6150aa5c55ac14b1e060efc523.ttf [new file with mode: 0644]
vendor/assets/iD/iD/traffico/fonts/traffico_d596ae6150aa5c55ac14b1e060efc523.woff [new file with mode: 0644]
vendor/assets/iD/iD/traffico/global.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/glyphs.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/mapillary-mappings/au.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/mapillary-mappings/br.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/mapillary-mappings/ca.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/mapillary-mappings/eu.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/mapillary-mappings/us.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/at.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/au.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/be.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/br.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/ca.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/ch.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/cz.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/de.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/dk.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/ee.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/es.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/fi.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/fr.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/gr.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/hu.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/it.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/lt.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/lu.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/lv.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/nl.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/no.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/pl.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/se.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/si.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/sk.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/uk.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/signs/us.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/at-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/au-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/be-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/br-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/ca-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/ch-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/cz-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/de-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/dk-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/ee-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/es-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/fi-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/fr-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/gr-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/hu-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/it-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/lt-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/lu-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/lv-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/nl-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/no-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/pl-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/se-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/si-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/sk-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/uk-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/string-maps/us-map.json [new file with mode: 0644]
vendor/assets/iD/iD/traffico/stylesheets/examples.css [new file with mode: 0644]
vendor/assets/iD/iD/traffico/stylesheets/traffico.css.erb [new file with mode: 0644]
vendor/assets/iD/iD/traffico/transformations.json [new file with mode: 0644]
vendor/assets/iD/imagery.js [deleted file]
vendor/assets/iD/presets.js [deleted file]
vendor/assets/javascripts/html5shiv.js
vendor/assets/jquery/jquery.cookie.js
vendor/assets/leaflet/images/layers-2x.png
vendor/assets/leaflet/images/layers.png
vendor/assets/leaflet/images/marker-icon-2x.png
vendor/assets/leaflet/images/marker-icon.png
vendor/assets/leaflet/images/marker-shadow.png
vendor/assets/leaflet/leaflet.css
vendor/assets/leaflet/leaflet.js
vendor/assets/leaflet/leaflet.locate.js
vendor/assets/leaflet/leaflet.locationfilter.js
vendor/assets/leaflet/leaflet.osm.js
vendor/assets/leaflet/leaflet.polyline.js
vendor/assets/potlatch2/potlatch2.swf
vendor/assets/potlatch2/potlatch2/assets.zip
vendor/assets/potlatch2/potlatch2/locales/af.swf
vendor/assets/potlatch2/potlatch2/locales/ar.swf
vendor/assets/potlatch2/potlatch2/locales/arc.swf
vendor/assets/potlatch2/potlatch2/locales/ast.swf
vendor/assets/potlatch2/potlatch2/locales/az.swf
vendor/assets/potlatch2/potlatch2/locales/ba.swf
vendor/assets/potlatch2/potlatch2/locales/be-tarask.swf
vendor/assets/potlatch2/potlatch2/locales/be.swf
vendor/assets/potlatch2/potlatch2/locales/bg.swf
vendor/assets/potlatch2/potlatch2/locales/bn.swf
vendor/assets/potlatch2/potlatch2/locales/br.swf
vendor/assets/potlatch2/potlatch2/locales/bs.swf
vendor/assets/potlatch2/potlatch2/locales/ca.swf
vendor/assets/potlatch2/potlatch2/locales/ce.swf
vendor/assets/potlatch2/potlatch2/locales/cs_CZ.swf
vendor/assets/potlatch2/potlatch2/locales/cy.swf [new file with mode: 0644]
vendor/assets/potlatch2/potlatch2/locales/da.swf
vendor/assets/potlatch2/potlatch2/locales/de-formal.swf
vendor/assets/potlatch2/potlatch2/locales/de_DE.swf
vendor/assets/potlatch2/potlatch2/locales/diq.swf
vendor/assets/potlatch2/potlatch2/locales/dsb.swf
vendor/assets/potlatch2/potlatch2/locales/el.swf
vendor/assets/potlatch2/potlatch2/locales/en_GB.swf
vendor/assets/potlatch2/potlatch2/locales/en_US.swf
vendor/assets/potlatch2/potlatch2/locales/eo.swf
vendor/assets/potlatch2/potlatch2/locales/es_ES.swf
vendor/assets/potlatch2/potlatch2/locales/et.swf
vendor/assets/potlatch2/potlatch2/locales/eu.swf
vendor/assets/potlatch2/potlatch2/locales/fa.swf
vendor/assets/potlatch2/potlatch2/locales/fi.swf
vendor/assets/potlatch2/potlatch2/locales/fo.swf
vendor/assets/potlatch2/potlatch2/locales/fr_FR.swf
vendor/assets/potlatch2/potlatch2/locales/fur.swf
vendor/assets/potlatch2/potlatch2/locales/ga.swf
vendor/assets/potlatch2/potlatch2/locales/gd.swf
vendor/assets/potlatch2/potlatch2/locales/gl.swf
vendor/assets/potlatch2/potlatch2/locales/grc.swf
vendor/assets/potlatch2/potlatch2/locales/he.swf
vendor/assets/potlatch2/potlatch2/locales/hr.swf
vendor/assets/potlatch2/potlatch2/locales/hsb.swf
vendor/assets/potlatch2/potlatch2/locales/hu.swf
vendor/assets/potlatch2/potlatch2/locales/ia.swf
vendor/assets/potlatch2/potlatch2/locales/id.swf
vendor/assets/potlatch2/potlatch2/locales/is.swf [new file with mode: 0644]
vendor/assets/potlatch2/potlatch2/locales/it_IT.swf
vendor/assets/potlatch2/potlatch2/locales/ja_JP.swf
vendor/assets/potlatch2/potlatch2/locales/ka.swf
vendor/assets/potlatch2/potlatch2/locales/km.swf
vendor/assets/potlatch2/potlatch2/locales/kn.swf
vendor/assets/potlatch2/potlatch2/locales/ko.swf
vendor/assets/potlatch2/potlatch2/locales/krc.swf
vendor/assets/potlatch2/potlatch2/locales/ksh.swf
vendor/assets/potlatch2/potlatch2/locales/ku-latn.swf
vendor/assets/potlatch2/potlatch2/locales/ky.swf
vendor/assets/potlatch2/potlatch2/locales/lb.swf
vendor/assets/potlatch2/potlatch2/locales/lez.swf
vendor/assets/potlatch2/potlatch2/locales/lt.swf
vendor/assets/potlatch2/potlatch2/locales/lv.swf
vendor/assets/potlatch2/potlatch2/locales/lzz.swf
vendor/assets/potlatch2/potlatch2/locales/mk.swf
vendor/assets/potlatch2/potlatch2/locales/mr.swf
vendor/assets/potlatch2/potlatch2/locales/ms.swf
vendor/assets/potlatch2/potlatch2/locales/nb_NO.swf
vendor/assets/potlatch2/potlatch2/locales/nl_NL.swf
vendor/assets/potlatch2/potlatch2/locales/nn_NO.swf
vendor/assets/potlatch2/potlatch2/locales/oc.swf
vendor/assets/potlatch2/potlatch2/locales/pa.swf
vendor/assets/potlatch2/potlatch2/locales/pl_PL.swf
vendor/assets/potlatch2/potlatch2/locales/ps.swf
vendor/assets/potlatch2/potlatch2/locales/pt_BR.swf
vendor/assets/potlatch2/potlatch2/locales/pt_PT.swf
vendor/assets/potlatch2/potlatch2/locales/ro.swf
vendor/assets/potlatch2/potlatch2/locales/ru.swf
vendor/assets/potlatch2/potlatch2/locales/rue.swf
vendor/assets/potlatch2/potlatch2/locales/sah.swf
vendor/assets/potlatch2/potlatch2/locales/scn.swf [new file with mode: 0644]
vendor/assets/potlatch2/potlatch2/locales/sk.swf
vendor/assets/potlatch2/potlatch2/locales/sl.swf
vendor/assets/potlatch2/potlatch2/locales/sq.swf
vendor/assets/potlatch2/potlatch2/locales/sr-ec.swf
vendor/assets/potlatch2/potlatch2/locales/sr-el.swf
vendor/assets/potlatch2/potlatch2/locales/sv_SE.swf
vendor/assets/potlatch2/potlatch2/locales/ta.swf
vendor/assets/potlatch2/potlatch2/locales/te.swf
vendor/assets/potlatch2/potlatch2/locales/tl.swf
vendor/assets/potlatch2/potlatch2/locales/tly.swf
vendor/assets/potlatch2/potlatch2/locales/tr.swf
vendor/assets/potlatch2/potlatch2/locales/tyv.swf
vendor/assets/potlatch2/potlatch2/locales/tzm.swf
vendor/assets/potlatch2/potlatch2/locales/uk.swf
vendor/assets/potlatch2/potlatch2/locales/vi_VN.swf
vendor/assets/potlatch2/potlatch2/locales/vo.swf
vendor/assets/potlatch2/potlatch2/locales/yi.swf
vendor/assets/potlatch2/potlatch2/locales/zh_CN.swf
vendor/assets/potlatch2/potlatch2/locales/zh_TW.swf

index c576a560fbb160af75b4765a82cc7b427cc1a837..e4c19a34cf5bc39fe643d544de30527476191dc5 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -5,4 +5,5 @@ Grant Slater <openstreetmap@firefishy.com> <github@firefishy.com>
 Harry Wood <git@harrywood.co.uk> <mail@harrywood.co.uk> <github@onlineanimals.co.uk>
 Kai Krueger <kakrueger@gmail.com> <kai@aiputerlx.(none)>
 Michael Glanznig <nebulon42@yandex.com>
+Petr Kadlec <mormegil@centrum.cz>
 Richard Fairhurst <richard@systemeD.net> <richard@systemed.net>
index 19403fed526ffc558d9646825fa322a9b4e56a9d..477b2ab02c152e3af3488a62eb8c0b79040d1db3 100644 (file)
@@ -1,21 +1,51 @@
 inherit_from: .rubocop_todo.yml
 
 AllCops:
-   RunRailsCops: true
+  Include:
+    - '**/*.gemspec'
+    - '**/*.podspec'
+    - '**/*.jbuilder'
+    - '**/*.rake'
+    - '**/*.opal'
+    - '**/config.ru'
+    - '**/Gemfile'
+    - '**/Rakefile'
+    - '**/Capfile'
+    - '**/Guardfile'
+    - '**/Podfile'
+    - '**/Thorfile'
+    - '**/Vagrantfile'
+    - '**/Berksfile'
+    - '**/Cheffile'
+    - '**/Vagabondfile'
+    - '**/Fastfile'
+    - '**/*.builder'
+
+Rails:
+  Enabled: 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/IfInsideElse:
+  Enabled: false
+
 Style/GlobalVars:
   Exclude:
     - 'lib/quad_tile/extconf.rb'
-    
+
+Style/GuardClause:
+  Enabled: false
+
 Style/HashSyntax:
   EnforcedStyle: hash_rockets
   Exclude:
@@ -24,3 +54,11 @@ Style/HashSyntax:
 
 Style/StringLiterals:
   EnforcedStyle: double_quotes
+
+Rails/HttpPositionalArguments:
+  Enabled: false
+
+Rails/SkipsModelValidations:
+  Exclude:
+    - 'db/migrate/*.rb'
+    - 'app/controllers/user_controller.rb'
index e1b70a2d8f60553de3e1f787c412d01b262e33f0..a7b456aec43f5031f88cfa8d28b508aaaeeb61f9 100644 (file)
@@ -1,5 +1,6 @@
-# This configuration was generated by `rubocop --auto-gen-config`
-# on 2015-06-08 15:55:30 +0100 using RuboCop version 0.32.0.
+# This configuration was generated by
+# `rubocop --auto-gen-config`
+# on 2016-10-20 21:45:27 +0100 using RuboCop version 0.44.1.
 # 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
@@ -7,28 +8,54 @@
 
 # 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: 115
+# Offense count: 117
 Lint/AmbiguousRegexpLiteral:
   Enabled: false
 
 # Offense count: 30
 # 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: 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
+# Offense count: 2
+Lint/ShadowingOuterLocalVariable:
+  Exclude:
+    - 'app/views/changeset/list.atom.builder'
 
-# Offense count: 669
+# Offense count: 630
 Metrics/AbcSize:
-  Max: 277
+  Max: 271
+
+# Offense count: 35
+# Configuration parameters: CountComments.
+Metrics/BlockLength:
+  Max: 295
 
 # Offense count: 12
 Metrics/BlockNesting:
@@ -37,18 +64,19 @@ Metrics/BlockNesting:
 # Offense count: 62
 # Configuration parameters: CountComments.
 Metrics/ClassLength:
-  Max: 1653
+  Max: 1660
 
-# Offense count: 67
+# Offense count: 69
 Metrics/CyclomaticComplexity:
   Max: 20
 
-# Offense count: 2537
-# Configuration parameters: AllowURI, URISchemes.
+# Offense count: 2826
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
+# URISchemes: http, https
 Metrics/LineLength:
-  Max: 694
+  Max: 962
 
-# Offense count: 623
+# Offense count: 612
 # Configuration parameters: CountComments.
 Metrics/MethodLength:
   Max: 179
@@ -56,81 +84,133 @@ Metrics/MethodLength:
 # Offense count: 1
 # Configuration parameters: CountComments.
 Metrics/ModuleLength:
-  Max: 126
+  Max: 147
 
 # Offense count: 4
 # Configuration parameters: CountKeywordArgs.
 Metrics/ParameterLists:
   Max: 9
 
-# Offense count: 69
+# Offense count: 71
 Metrics/PerceivedComplexity:
   Max: 23
 
 # Offense count: 2
 # Configuration parameters: Include.
+# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
+Rails/Exit:
+  Exclude:
+    - 'lib/**/*.rake'
+    - 'lib/daemons/gpx_import.rb'
+
+# Offense count: 2
+# Configuration parameters: Include.
+# Include: app/models/**/*.rb
 Rails/HasAndBelongsToMany:
-  Enabled: false
+  Exclude:
+    - 'app/models/changeset.rb'
+    - 'app/models/user.rb'
 
-# Offense count: 67
+# Offense count: 5
+# Configuration parameters: Include.
+# Include: db/migrate/*.rb
+Rails/NotNullColumn:
+  Exclude:
+    - 'db/migrate/002_cleanup_osm_db.rb'
+    - 'db/migrate/020_populate_node_tags_and_remove.rb'
+    - 'db/migrate/021_move_to_innodb.rb'
+    - 'db/migrate/025_add_end_time_to_changesets.rb'
+    - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
+
+# Offense count: 17
+Rails/OutputSafety:
+  Exclude:
+    - 'app/controllers/user_controller.rb'
+    - 'app/helpers/application_helper.rb'
+    - 'app/helpers/changeset_helper.rb'
+    - 'app/helpers/geocoder_helper.rb'
+    - 'app/helpers/note_helper.rb'
+    - 'app/helpers/open_graph_helper.rb'
+    - 'app/helpers/user_blocks_helper.rb'
+    - 'app/helpers/user_roles_helper.rb'
+    - 'lib/rich_text.rb'
+    - 'test/helpers/application_helper_test.rb'
+
+# Offense count: 74
 # Configuration parameters: EnforcedStyle, SupportedStyles.
+# SupportedStyles: strict, flexible
 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
+  Exclude:
+    - 'test/models/message_test.rb'
 
-# Offense count: 308
+# Offense count: 220
 Style/Documentation:
   Enabled: false
 
-# Offense count: 38
-# Configuration parameters: MinBodyLength.
-Style/GuardClause:
-  Enabled: false
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: MaxLineLength.
+Style/IfUnlessModifier:
+  Exclude:
+    - 'app/controllers/way_controller.rb'
 
 # Offense count: 60
 # Cop supports --auto-correct.
 Style/LineEndConcatenation:
-  Enabled: false
-
-# Offense count: 69
+  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: 71
 # Cop supports --auto-correct.
 Style/NumericLiterals:
   MinDigits: 11
 
-# Offense count: 42
-# Cop supports --auto-correct.
-Style/PerlBackrefs:
-  Enabled: false
-
 # Offense count: 8
-# Configuration parameters: NamePrefix, NamePrefixBlacklist.
+# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
+# NamePrefix: is_, has_, have_
+# NamePrefixBlacklist: is_, has_, have_
+# NameWhitelist: is_a?
 Style/PredicateName:
-  Enabled: false
+  Exclude:
+    - 'spec/**/*'
+    - '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
-
-# Offense count: 8
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/StringLiteralsInInterpolation:
+# SupportedStyles: compact, exploded
+Style/RaiseArgs:
   Enabled: false
 
 # Offense count: 2
 # Cop supports --auto-correct.
-# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
-Style/TrivialAccessors:
-  Enabled: false
+Style/RescueModifier:
+  Exclude:
+    - 'app/helpers/browse_helper.rb'
index e4f7390936762ad0c41a3abd09aa2350f2d6393f..ad8f7e599ea42dff4504becf9e0aaa15625a942d 100644 (file)
@@ -1,7 +1,7 @@
 sudo: false
 language: ruby
 rvm:
-  - 1.9.3
+  - 2.3.1
 cache: bundler
 addons:
   postgresql: 9.1
@@ -14,6 +14,7 @@ env:
   global:
     - OSM_MEMCACHE_SERVERS="127.0.0.1"
 before_script:
+  - cp config/example.application.yml config/application.yml
   - psql -U postgres -c "CREATE DATABASE openstreetmap"
   - psql -U postgres -c "CREATE EXTENSION btree_gist" openstreetmap
   - make -C db/functions libpgosm.so
@@ -25,4 +26,4 @@ before_script:
 script:
   - bundle exec rubocop -f fuubar
   - bundle exec rake jshint
-  - bundle exec rake test
+  - bundle exec rake test:db
diff --git a/Gemfile b/Gemfile
index e36912e735f64cacd56eef0a036971db1e4c50c2..34768095f3ca07c2c7037df8fff3d531b992f8d5 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,10 +1,7 @@
 source "https://rubygems.org"
 
 # Require rails
-gem "rails", "4.2.3"
-
-# Sprockets 3 seems to be buggy, so stick with 2 for now
-gem "sprockets", "~> 2.12.3"
+gem "rails", "4.2.7.1"
 
 # Require things which have moved to gems in ruby 1.9
 gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19
@@ -40,25 +37,33 @@ gem "r2"
 # Use autoprefixer to generate CSS prefixes
 gem "autoprefixer-rails"
 
+# Use image_optim to optimise images
+gem "image_optim_rails"
+
 # Load rails plugins
-gem "rails-i18n", "~> 4.0.0"
-gem "dynamic_form"
-gem "rinku", ">= 1.2.2", :require => "rails_rinku"
-gem "oauth-plugin", ">= 0.5.1"
-gem "validates_email_format_of", ">= 1.5.1"
+gem "actionpack-page_caching"
 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 "dynamic_form"
+gem "http_accept_language", "~> 2.0.0"
 gem "i18n-js", ">= 3.0.0.rc10"
+gem "oauth-plugin", ">= 0.5.1"
+gem "paperclip", "~> 4.0"
 gem "rack-cors"
-gem "actionpack-page_caching"
+gem "rails-i18n", "~> 4.0.0"
+gem "rinku", ">= 1.2.2", :require => "rails_rinku"
+gem "validates_email_format_of", ">= 1.5.1"
+
+# Sanitise URIs
+gem "rack-uri_sanitizer"
 
 # 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-github"
+gem "omniauth-google-oauth2", ">= 0.2.7"
+gem "omniauth-mediawiki", ">= 0.0.3"
+gem "omniauth-openid"
 gem "omniauth-windowslive"
 
 # Markdown formatting support
@@ -68,8 +73,8 @@ gem "redcarpet"
 gem "libxml-ruby", ">= 2.0.5", :require => "libxml"
 
 # Use for HTML sanitisation
-gem "sanitize"
 gem "htmlentities"
+gem "sanitize"
 
 # Load SystemTimer for implementing request timeouts
 gem "SystemTimer", ">= 1.1.3", :require => "system_timer", :platforms => :ruby_18
@@ -77,9 +82,11 @@ gem "SystemTimer", ">= 1.1.3", :require => "system_timer", :platforms => :ruby_1
 # 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"
+# Load geoip for querying Maxmind GeoIP database
+gem "geoip"
+
+# Load rotp to generate TOTP tokens
+gem "rotp"
 
 # Load memcache client in case we are using it
 gem "dalli"
@@ -95,15 +102,17 @@ end
 
 # Gems needed for running tests
 group :test do
+  gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
   gem "rubocop"
   gem "timecop"
-  gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
+  gem "webmock"
 end
 
 # Needed in development as well so rake can see konacha tasks
 group :development, :test do
+  gem "coveralls", :require => false
+  gem "factory_girl_rails"
   gem "jshint"
   gem "konacha"
   gem "poltergeist"
-  gem "coveralls", :require => false
 end
index 341e95ccfede061a02d8674fee71edf1c2b716aa..a8c91f460cffcc1d140e492f806bd5c64541a473 100644 (file)
@@ -2,146 +2,167 @@ GEM
   remote: https://rubygems.org/
   specs:
     SystemTimer (1.2.3)
-    actionmailer (4.2.3)
-      actionpack (= 4.2.3)
-      actionview (= 4.2.3)
-      activejob (= 4.2.3)
+    actionmailer (4.2.7.1)
+      actionpack (= 4.2.7.1)
+      actionview (= 4.2.7.1)
+      activejob (= 4.2.7.1)
       mail (~> 2.5, >= 2.5.4)
       rails-dom-testing (~> 1.0, >= 1.0.5)
-    actionpack (4.2.3)
-      actionview (= 4.2.3)
-      activesupport (= 4.2.3)
+    actionpack (4.2.7.1)
+      actionview (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
       rack (~> 1.6)
       rack-test (~> 0.6.2)
       rails-dom-testing (~> 1.0, >= 1.0.5)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    actionpack-page_caching (1.0.2)
-      actionpack (>= 4.0.0, < 5)
-    actionview (4.2.3)
-      activesupport (= 4.2.3)
+    actionpack-page_caching (1.1.0)
+      actionpack (>= 4.0.0, < 6)
+    actionview (4.2.7.1)
+      activesupport (= 4.2.7.1)
       builder (~> 3.1)
       erubis (~> 2.7.0)
       rails-dom-testing (~> 1.0, >= 1.0.5)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    activejob (4.2.3)
-      activesupport (= 4.2.3)
+    activejob (4.2.7.1)
+      activesupport (= 4.2.7.1)
       globalid (>= 0.3.0)
-    activemodel (4.2.3)
-      activesupport (= 4.2.3)
+    activemodel (4.2.7.1)
+      activesupport (= 4.2.7.1)
       builder (~> 3.1)
-    activerecord (4.2.3)
-      activemodel (= 4.2.3)
-      activesupport (= 4.2.3)
+    activerecord (4.2.7.1)
+      activemodel (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
       arel (~> 6.0)
-    activesupport (4.2.3)
+    activesupport (4.2.7.1)
       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.2)
-    ast (2.0.0)
-    astrolabe (1.3.1)
-      parser (~> 2.2)
-    autoprefixer-rails (5.2.1.1)
+    addressable (2.5.0)
+      public_suffix (~> 2.0, >= 2.0.2)
+    arel (6.0.4)
+    ast (2.3.0)
+    autoprefixer-rails (6.7.2)
       execjs
-      json
     bigdecimal (1.1.0)
-    builder (3.2.2)
-    capybara (2.4.4)
+    builder (3.2.3)
+    capybara (2.12.0)
+      addressable
       mime-types (>= 1.16)
       nokogiri (>= 1.3.3)
       rack (>= 1.0.0)
       rack-test (>= 0.5.4)
       xpath (~> 2.0)
-    climate_control (0.0.3)
-      activesupport (>= 3.0)
+    climate_control (0.1.0)
     cliver (0.3.2)
-    cocaine (0.5.7)
+    cocaine (0.5.8)
       climate_control (>= 0.0.3, < 1.0)
-    coffee-rails (4.1.0)
+    coffee-rails (4.1.1)
       coffee-script (>= 2.2.0)
-      railties (>= 4.0.0, < 5.0)
+      railties (>= 4.0.0, < 5.1.x)
     coffee-script (2.4.1)
       coffee-script-source
       execjs
-    coffee-script-source (1.9.1.1)
-    colorize (0.7.7)
-    composite_primary_keys (8.1.0)
+    coffee-script-source (1.12.2)
+    colorize (0.8.1)
+    composite_primary_keys (8.1.4)
       activerecord (~> 4.2.0)
-    coveralls (0.8.2)
-      json (~> 1.8)
-      rest-client (>= 1.6.8, < 2)
-      simplecov (~> 0.10.0)
+    concurrent-ruby (1.0.4)
+    coveralls (0.8.19)
+      json (>= 1.8, < 3)
+      simplecov (~> 0.12.0)
       term-ansicolor (~> 1.3)
       thor (~> 0.19.1)
+      tins (~> 1.6)
+    crack (0.4.3)
+      safe_yaml (~> 1.0.0)
     crass (1.0.2)
-    dalli (2.7.4)
+    dalli (2.7.6)
     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.5.2)
-    faraday (0.9.1)
+    execjs (2.7.0)
+    exifr (1.2.5)
+    factory_girl (4.8.0)
+      activesupport (>= 3.0.0)
+    factory_girl_rails (4.8.0)
+      factory_girl (~> 4.8.0)
+      railties (>= 3.0.0)
+    faraday (0.10.1)
       multipart-post (>= 1.2, < 3)
-    globalid (0.3.5)
+    fspath (3.0.1)
+    geoip (1.6.3)
+    globalid (0.3.7)
       activesupport (>= 4.1.0)
-    hashie (3.4.2)
-    hike (1.2.3)
+    hashdiff (0.3.2)
+    hashie (3.4.6)
     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)
-    i18n-js (3.0.0.rc11)
-      i18n (~> 0.6)
-    jquery-rails (4.0.4)
-      rails-dom-testing (~> 1.0)
+    i18n (0.8.0)
+    i18n-js (3.0.0.rc15)
+      i18n (~> 0.6, >= 0.6.6)
+    image_optim (0.24.1)
+      exifr (~> 1.2, >= 1.2.2)
+      fspath (~> 3.0)
+      image_size (~> 1.5)
+      in_threads (~> 1.3)
+      progress (~> 3.0, >= 3.0.1)
+    image_optim_rails (0.2.0)
+      image_optim (~> 0.24.0)
+      rails
+      sprockets
+    image_size (1.5.0)
+    in_threads (1.3.1)
+    jquery-rails (4.2.2)
+      rails-dom-testing (>= 1, < 3)
       railties (>= 4.2.0)
       thor (>= 0.14, < 2.0)
-    jshint (1.3.1)
+    jshint (1.5.0)
       execjs (>= 1.4.0)
       multi_json (~> 1.0)
       therubyracer (~> 0.12.1)
-    json (1.8.3)
+    json (1.8.6)
     jsonify (0.3.1)
       multi_json (~> 1.0)
     jsonify-rails (0.3.2)
       actionpack
       jsonify (< 0.4.0)
-    jwt (1.5.1)
-    kgio (2.9.3)
-    konacha (3.5.1)
-      actionpack (>= 3.1, < 5)
+    jwt (1.5.6)
+    kgio (2.11.0)
+    konacha (4.0.0)
+      actionpack (>= 4.1, < 5)
       capybara
       colorize
-      railties (>= 3.1, < 5)
+      railties (>= 4.1, < 5)
       sprockets (>= 2, < 4)
+      sprockets-rails (>= 2, < 4)
       tilt
-    libv8 (3.16.14.11)
-    libxml-ruby (2.8.0)
+    libv8 (3.16.14.17)
+    libxml-ruby (2.9.0)
     logstash-event (1.2.02)
-    logstasher (0.6.5)
+    logstasher (1.1.1)
+      activerecord (>= 4.0)
+      activesupport (>= 4.0)
       logstash-event (~> 1.2.0)
       request_store
-    loofah (2.0.2)
+    loofah (2.0.3)
       nokogiri (>= 1.5.9)
-    mail (2.6.3)
-      mime-types (>= 1.16, < 3)
-    mime-types (2.6.1)
+    mail (2.6.4)
+      mime-types (>= 1.16, < 4)
+    mime-types (3.1)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2016.0521)
     mimemagic (0.3.0)
-    mini_portile (0.6.2)
-    minitest (5.7.0)
-    multi_json (1.11.2)
-    multi_xml (0.5.5)
+    mini_portile2 (2.1.0)
+    minitest (5.10.1)
+    multi_json (1.12.1)
+    multi_xml (0.6.0)
     multipart-post (2.0.0)
-    netrc (0.10.3)
-    nokogiri (1.6.6.2)
-      mini_portile (~> 0.6.0)
-    nokogumbo (1.4.1)
+    nokogiri (1.7.0.1)
+      mini_portile2 (~> 2.1.0)
+    nokogumbo (1.4.10)
       nokogiri
     oauth (0.4.7)
     oauth-plugin (0.5.1)
@@ -149,148 +170,155 @@ GEM
       oauth (~> 0.4.4)
       oauth2 (>= 0.5.0)
       rack
-    oauth2 (1.0.0)
-      faraday (>= 0.8, < 0.10)
+    oauth2 (1.3.0)
+      faraday (>= 0.8, < 0.11)
       jwt (~> 1.0)
       multi_json (~> 1.3)
       multi_xml (~> 0.5)
-      rack (~> 1.2)
-    omniauth (1.2.2)
+      rack (>= 1.2, < 3)
+    omniauth (1.3.2)
       hashie (>= 1.2, < 4)
-      rack (~> 1.0)
-    omniauth-facebook (2.0.1)
+      rack (>= 1.0, < 3)
+    omniauth-facebook (4.0.0)
       omniauth-oauth2 (~> 1.2)
-    omniauth-oauth2 (1.3.1)
+    omniauth-github (1.2.0)
+      omniauth (~> 1.3.2)
+      omniauth-oauth2 (>= 1.4.0, < 2.0)
+    omniauth-google-oauth2 (0.4.1)
+      jwt (~> 1.5.2)
+      multi_json (~> 1.3)
+      omniauth (>= 1.1.1)
+      omniauth-oauth2 (>= 1.3.1)
+    omniauth-mediawiki (0.0.3)
+      jwt (~> 1.0)
+      omniauth-oauth (~> 1.0)
+    omniauth-oauth (1.1.0)
+      oauth
+      omniauth (~> 1.0)
+    omniauth-oauth2 (1.4.0)
       oauth2 (~> 1.0)
       omniauth (~> 1.2)
     omniauth-openid (1.0.1)
       omniauth (~> 1.0)
       rack-openid (~> 1.3.1)
-    omniauth-windowslive (0.0.9)
+    omniauth-windowslive (0.0.11)
       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)
+      omniauth-oauth2 (~> 1.4)
+    paperclip (4.3.7)
       activemodel (>= 3.2.0)
       activesupport (>= 3.2.0)
       cocaine (~> 0.5.5)
       mime-types
       mimemagic (= 0.3.0)
-    parser (2.2.2.6)
-      ast (>= 1.1, < 3.0)
-    pg (0.18.2)
-    poltergeist (1.6.0)
+    parser (2.3.3.1)
+      ast (~> 2.2)
+    pg (0.19.0)
+    poltergeist (1.13.0)
       capybara (~> 2.1)
       cliver (~> 0.3.1)
-      multi_json (~> 1.0)
       websocket-driver (>= 0.2.0)
     powerpack (0.1.1)
-    psych (2.0.13)
-    r2 (0.2.5)
-    rack (1.6.4)
-    rack-cors (0.4.0)
+    progress (3.3.0)
+    psych (2.2.2)
+    public_suffix (2.0.5)
+    r2 (0.2.6)
+    rack (1.6.5)
+    rack-cors (0.4.1)
     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.3)
-      actionmailer (= 4.2.3)
-      actionpack (= 4.2.3)
-      actionview (= 4.2.3)
-      activejob (= 4.2.3)
-      activemodel (= 4.2.3)
-      activerecord (= 4.2.3)
-      activesupport (= 4.2.3)
+    rack-uri_sanitizer (0.0.2)
+    rails (4.2.7.1)
+      actionmailer (= 4.2.7.1)
+      actionpack (= 4.2.7.1)
+      actionview (= 4.2.7.1)
+      activejob (= 4.2.7.1)
+      activemodel (= 4.2.7.1)
+      activerecord (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
       bundler (>= 1.3.0, < 2.0)
-      railties (= 4.2.3)
+      railties (= 4.2.7.1)
       sprockets-rails
     rails-deprecated_sanitizer (1.0.3)
       activesupport (>= 4.2.0.alpha)
-    rails-dom-testing (1.0.6)
+    rails-dom-testing (1.0.8)
       activesupport (>= 4.2.0.beta, < 5.0)
-      nokogiri (~> 1.6.0)
+      nokogiri (~> 1.6)
       rails-deprecated_sanitizer (>= 1.0.1)
-    rails-html-sanitizer (1.0.2)
+    rails-html-sanitizer (1.0.3)
       loofah (~> 2.0)
-    rails-i18n (4.0.4)
-      i18n (~> 0.6)
+    rails-i18n (4.0.9)
+      i18n (~> 0.7)
       railties (~> 4.0)
-    railties (4.2.3)
-      actionpack (= 4.2.3)
-      activesupport (= 4.2.3)
+    railties (4.2.7.1)
+      actionpack (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
-    rainbow (2.0.0)
-    rake (10.4.2)
-    redcarpet (3.3.2)
+    rainbow (2.2.1)
+    rake (12.0.0)
+    redcarpet (3.4.0)
     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)
-    rubocop (0.32.1)
-      astrolabe (~> 1.3)
-      parser (>= 2.2.2.5, < 3.0)
+    request_store (1.3.2)
+    rinku (2.0.2)
+    rotp (3.3.0)
+    rubocop (0.47.1)
+      parser (>= 2.3.3.1, < 3.0)
       powerpack (~> 0.1)
       rainbow (>= 1.99.1, < 3.0)
-      ruby-progressbar (~> 1.4)
+      ruby-progressbar (~> 1.7)
+      unicode-display_width (~> 1.0, >= 1.0.1)
     ruby-openid (2.7.0)
-    ruby-progressbar (1.7.5)
-    sanitize (4.0.0)
+    ruby-progressbar (1.8.1)
+    safe_yaml (1.0.4)
+    sanitize (4.4.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.4.4)
-      nokogumbo (= 1.4.1)
-    sass (3.4.16)
-    sass-rails (5.0.3)
-      railties (>= 4.0.0, < 5.0)
+      nokogumbo (~> 1.4.1)
+    sass (3.4.23)
+    sass-rails (5.0.6)
+      railties (>= 4.0.0, < 6)
       sass (~> 3.1)
       sprockets (>= 2.8, < 4.0)
       sprockets-rails (>= 2.0, < 4.0)
-      tilt (~> 1.1)
-    simplecov (0.10.0)
+      tilt (>= 1.1, < 3)
+    simplecov (0.12.0)
       docile (~> 1.1.0)
-      json (~> 1.8)
+      json (>= 1.8, < 3)
       simplecov-html (~> 0.10.0)
     simplecov-html (0.10.0)
-    soap4r-ruby1.9 (2.0.5)
-    sprockets (2.12.4)
-      hike (~> 1.2)
-      multi_json (~> 1.0)
-      rack (~> 1.0)
-      tilt (~> 1.1, != 1.3.0)
-    sprockets-rails (2.3.2)
-      actionpack (>= 3.0)
-      activesupport (>= 3.0)
-      sprockets (>= 2.8, < 4.0)
-    term-ansicolor (1.3.2)
+    sprockets (3.7.1)
+      concurrent-ruby (~> 1.0)
+      rack (> 1, < 3)
+    sprockets-rails (3.2.0)
+      actionpack (>= 4.0)
+      activesupport (>= 4.0)
+      sprockets (>= 3.0.0)
+    term-ansicolor (1.4.0)
       tins (~> 1.0)
-    therubyracer (0.12.2)
-      libv8 (~> 3.16.14.0)
+    therubyracer (0.12.3)
+      libv8 (~> 3.16.14.15)
       ref
-    thor (0.19.1)
+    thor (0.19.4)
     thread_safe (0.3.5)
-    tilt (1.4.1)
-    timecop (0.7.4)
-    tins (1.5.4)
+    tilt (2.0.6)
+    timecop (0.8.1)
+    tins (1.13.2)
     tzinfo (1.2.2)
       thread_safe (~> 0.1)
-    uglifier (2.7.1)
-      execjs (>= 0.3.0)
-      json (>= 1.8.0)
-    unf (0.1.4)
-      unf_ext
-    unf_ext (0.0.7.1)
-    validates_email_format_of (1.6.2)
+    uglifier (3.0.4)
+      execjs (>= 0.3.0, < 3)
+    unicode-display_width (1.1.3)
+    validates_email_format_of (1.6.3)
       i18n
     vendorer (0.1.16)
-    websocket-driver (0.6.2)
+    webmock (2.3.2)
+      addressable (>= 2.3.6)
+      crack (>= 0.3.2)
+      hashdiff
+    websocket-driver (0.6.5)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.2)
     xpath (2.0.0)
@@ -310,11 +338,13 @@ DEPENDENCIES
   dalli
   deadlock_retry (>= 1.2.0)
   dynamic_form
+  factory_girl_rails
   faraday
+  geoip
   htmlentities
   http_accept_language (~> 2.0.0)
-  httpclient
   i18n-js (>= 3.0.0.rc10)
+  image_optim_rails
   jquery-rails
   jshint
   json
@@ -327,25 +357,31 @@ DEPENDENCIES
   oauth-plugin (>= 0.5.1)
   omniauth
   omniauth-facebook
+  omniauth-github
+  omniauth-google-oauth2 (>= 0.2.7)
+  omniauth-mediawiki (>= 0.0.3)
   omniauth-openid
   omniauth-windowslive
-  openstreetmap-omniauth-google-oauth2 (>= 0.2.6.1)
   paperclip (~> 4.0)
   pg
   poltergeist
   psych
   r2
   rack-cors
-  rails (= 4.2.3)
+  rack-uri_sanitizer
+  rails (= 4.2.7.1)
   rails-i18n (~> 4.0.0)
   redcarpet
   rinku (>= 1.2.2)
+  rotp
   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)
   vendorer
+  webmock
+
+BUNDLED WITH
+   1.12.5
index 09e3b12f7827a92971c129dd4ef49dd6aa4449a5..d036673b1ee1923bdffcdb8dfc36ab7cbd5cde15 100644 (file)
@@ -8,7 +8,7 @@ You can install the software directly on your machine, which is the traditional
 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
 
-We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then try developing this sofware using Ubuntu in a virtual machine, or use [Vagrant](VAGRANT.md).
+We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then try developing this software using Ubuntu in a virtual machine, or use [Vagrant](VAGRANT.md).
 
 ## Dependencies
 
@@ -18,26 +18,24 @@ of packages required before you can get the various gems installed.
 
 ## Minimum requirements
 
-* Ruby 1.9.3
+* Ruby 2.3
 * RubyGems 1.3.1+
-* Postgres 8.3+
+* PostgreSQL 9.1+
 * ImageMagick
 * Bundler
 * Javascript Runtime
 
-These can be installed on Ubuntu 10.10 or later with:
+These can be installed on Ubuntu 16.04 or later with:
 
 ```
-sudo apt-get install ruby1.9.1 libruby1.9.1 ruby1.9.1-dev ri1.9.1 \
+sudo apt-get install ruby2.3 libruby2.3 ruby2.3-dev \
                      libmagickwand-dev libxml2-dev libxslt1-dev nodejs \
-                     apache2 apache2-threaded-dev build-essential git-core \
+                     apache2 apache2-dev build-essential git-core \
                      postgresql postgresql-contrib libpq-dev postgresql-server-dev-all \
-                     libsasl2-dev
-sudo gem1.9.1 install bundler
+                     libsasl2-dev imagemagick
+sudo gem2.3 install bundler
 ```
 
-Note that the "1.9.1" Ubuntu packages do in fact contain ruby 1.9.3.
-
 ### Alternative platforms
 
 #### Fedora
@@ -49,17 +47,17 @@ sudo yum install ruby ruby-devel rubygem-rdoc rubygem-bundler rubygems \
                  libxml2-devel js \
                  gcc gcc-c++ git \
                  postgresql postgresql-server postgresql-contrib postgresql-devel \
-                 perl-podlators
+                 perl-podlators ImageMagick
 ```
 
-If you didn't already have Postgres installed then create a Postgres instance and start the server:
+If you didn't already have PostgreSQL installed then create a PostgreSQL instance and start the server:
 
 ```
 sudo postgresql-setup initdb
 sudo systemctl start postgresql.service
 ```
 
-Optionally set Postgres to start on boot:
+Optionally set PostgreSQL to start on boot:
 
 ```
 sudo systemctl enable postgresql.service
@@ -69,10 +67,10 @@ sudo systemctl enable postgresql.service
 
 For MacOSX, you will need XCode installed from the Mac App Store; OS X 10.7 (Lion) or later; and some familiarity with Unix development via the Terminal.
 
-Installing Postgres:
+Installing PostgreSQL:
 
 * Install Postgres.app from http://postgresapp.com/
-* Add Postgres to your path, by editing your profile:
+* Add PostgreSQL to your path, by editing your profile:
 
 `nano ~/.profile`
 
@@ -83,9 +81,9 @@ and adding:
 Installing other dependencies:
 
 * Install Homebrew from http://mxcl.github.io/homebrew/
-* Install the latest version of Ruby: brew install ruby
-* Install ImageMagick: brew install imagemagick
-* Install Bundler: gem install bundler
+* Install the latest version of Ruby: `brew install ruby`
+* Install ImageMagick: `brew install imagemagick`
+* Install Bundler: `gem install bundler`
 
 Note that OS X does not have a /home directory by default, so if you are using the GPX functions, you will need to change the directories specified in config/application.yml.
 
@@ -140,7 +138,7 @@ instructions below as appropriate.
 
 ### PostgreSQL account setup
 
-We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more database.
+We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more databases.
 
 ```
 sudo -u postgres -i
@@ -158,15 +156,7 @@ bundle exec rake db:create
 
 ### PostgreSQL Btree-gist Extension
 
-We need to load the btree-gist extension, which is needed for showing changesets on the history tab.
-
-For PostgreSQL < 9.1 (change the version number in the path as necessary):
-
-```
-psql -d openstreetmap < /usr/share/postgresql/9.0/contrib/btree_gist.sql
-```
-
-For PostgreSQL >= 9.1:
+We need to load the `btree-gist` extension, which is needed for showing changesets on the history tab.
 
 ```
 psql -d openstreetmap -c "CREATE EXTENSION btree_gist"
@@ -174,7 +164,7 @@ psql -d openstreetmap -c "CREATE EXTENSION btree_gist"
 
 ### PostgreSQL Functions
 
-We need to install special functions into the postgresql databases, and these are provided by a library that needs compiling first.
+We need to install special functions into the PostgreSQL databases, and these are provided by a library that needs compiling first.
 
 ```
 cd db/functions
@@ -203,7 +193,7 @@ bundle exec rake db:migrate
 To ensure that everything is set up properly, you should now run:
 
 ```
-bundle exec rake test
+bundle exec rake test:db
 ```
 
 This test will take a few minutes, reporting tests run, assertions, and any errors. If you receive no errors, then your installation is successful.
index d53bae1577d56071ad0ce0250dea7153fc871476..5b909454f0f4b538f118d0b0d335cbdc6ac12fa5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -38,6 +38,5 @@ We're always keen to have more developers! Pull requests are very welcome.
 * Translation is managed by [Translatewiki](https://translatewiki.net/wiki/Translating:OpenStreetMap)
 * There is a [rails-dev@openstreetmap.org](http://lists.openstreetmap.org/listinfo/rails-dev) mailing list for development discussion.
 * IRC - there is the #osm-dev channel on irc.oftc.net.
-* There are also weekly meetings of the OpenStreetMap Foundation Engineering Working Group (EWG) on Mondays at 1700 UTC on the #osm-ewg channel.
 
 More details on contributing to the code are in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
index d71483569df2b443cda3228cd2cfdb9d0511e1fb..549e06687f66216bd8d311e44833b2e5ffccbffe 100644 (file)
@@ -8,7 +8,7 @@ sudo apt-get install vagrant
 
 Other Linux distributions should have similar installation instructions using `yum` or similar.
 
-Installers are available for Mac OS X and Windows, please see the [Vagrant project download page](http://www.vagrantup.com/downloads) for more information.
+Installers are available for Mac OS X and Windows, please see the [Vagrant project download page](http://www.vagrantup.com/downloads.html) for more information.
 
 # Setting up openstreetmap-website
 
index 24d62bb7a4a95e56a4d2ad01526c6cce533061d2..f41f9676c7e4bf55510499a7803f493f1b9d5dd8 100644 (file)
@@ -3,9 +3,11 @@
 
 Vagrant.configure("2") do |config|
   # use official ubuntu image for virtualbox
-  config.vm.provider "virtualbox" do |_, override|
-    override.vm.box = "ubuntu/trusty64"
+  config.vm.provider "virtualbox" do |vb, override|
+    override.vm.box = "ubuntu/xenial64"
     override.vm.synced_folder ".", "/srv/openstreetmap-website"
+    vb.customize ["modifyvm", :id, "--memory", "1024"]
+    vb.customize ["modifyvm", :id, "--cpus", "2"]
   end
 
   # use third party image and NFS sharing for lxc
index 6826e8e16a175fd29d16272bab139c13e957d420..93ad74c7bc43101142722791f27b18863da8baae 100644 (file)
@@ -11,13 +11,13 @@ folder 'vendor/assets' do
   end
 
   folder 'leaflet' do
-    file 'leaflet.js', 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet-src.js'
-    file 'leaflet.css', 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css'
+    file 'leaflet.js', 'https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js'
+    file 'leaflet.css', 'https://unpkg.com/leaflet@1.0.3/dist/leaflet.css'
 
     [ 'layers.png', 'layers-2x.png',
       'marker-icon.png', 'marker-icon-2x.png',
       'marker-shadow.png' ].each do |image|
-      file "images/#{image}", "http://cdn.leafletjs.com/leaflet-0.7.3/images/#{image}"
+      file "images/#{image}", "https://unpkg.com/leaflet@1.0.3/dist/images/#{image}"
     end
 
     from 'git://github.com/aratcliffe/Leaflet.contextmenu.git' do
@@ -31,7 +31,7 @@ folder 'vendor/assets' do
       folder 'img', 'src/img'
     end
 
-    from 'git://github.com/domoritz/leaflet-locatecontrol.git' do
+    from 'git://github.com/domoritz/leaflet-locatecontrol.git', :tag => 'v0.54.0' do
       file 'leaflet.locate.js', 'src/L.Control.Locate.js'
     end
 
@@ -39,7 +39,7 @@ folder 'vendor/assets' do
       file 'leaflet.osm.js', 'leaflet-osm.js'
     end
 
-    from 'git://github.com/jieter/Leaflet.encoded.git' do
+    from 'git://github.com/jieter/Leaflet.encoded.git', :tag => '0.0.8' do
       file 'leaflet.polyline.js', 'Polyline.encoded.js'
     end
   end
@@ -54,12 +54,24 @@ folder 'vendor/assets' do
     from 'git://github.com/openstreetmap/iD', :branch => 'release' do
       folder 'iD/img', 'dist/img'
       folder 'iD/locales', 'dist/locales'
+      folder 'iD/traffico', 'dist/traffico'
+      folder 'iD/mapillary-js', 'dist/mapillary-js'
+
       file 'iD.css.erb', 'dist/iD.css' do |path|
-        rewrite(path) { |content| content.gsub(/url\('?(img\/[^')]+)'?\)/, 'url(<%= asset_path("iD/\1") %>)') }
+        rewrite(path) do |content|
+          content.gsub(/url\('?(img\/[^')]+)'?\)/, 'url(<%= asset_path("iD/\1") %>)')
+        end
+      end
+
+      file 'iD/traffico/stylesheets/traffico.css.erb', 'dist/traffico/stylesheets/traffico.css' do |path|
+        rewrite(path) do |content|
+          content.gsub(/url\("?\.\.\/([^#?")]+)([^"]*)"?\)/, 'url(<%= asset_path("iD/traffico/\1") %>\2)')
+        end
       end
+
+      File.delete('vendor/assets/iD/iD/traffico/stylesheets/traffico.css')
+
       file 'iD.js', 'dist/iD.js'
-      file 'presets.js', 'dist/presets.js'
-      file 'imagery.js', 'dist/imagery.js'
     end
   end
 
diff --git a/app/assets/images/banners/donate-2016.jpg b/app/assets/images/banners/donate-2016.jpg
new file mode 100644 (file)
index 0000000..7e2e6eb
Binary files /dev/null and b/app/assets/images/banners/donate-2016.jpg differ
diff --git a/app/assets/images/banners/sotmasia-2016.jpg b/app/assets/images/banners/sotmasia-2016.jpg
new file mode 100644 (file)
index 0000000..fa5f1f0
Binary files /dev/null and b/app/assets/images/banners/sotmasia-2016.jpg differ
diff --git a/app/assets/images/banners/sotmlatam-2016.jpg b/app/assets/images/banners/sotmlatam-2016.jpg
new file mode 100644 (file)
index 0000000..97efa75
Binary files /dev/null and b/app/assets/images/banners/sotmlatam-2016.jpg differ
index 183c7941167501914e2335c029ef69480483ca01..4528ad560f5e4adf647776b19ec3bcfb5eec0cb9 100644 (file)
Binary files a/app/assets/images/browse/motorway.20.png and b/app/assets/images/browse/motorway.20.png differ
index 7a6efb4c8ea66dceb637509a373b6ea31df6334e..91204ac6afede772a4af9f7c6963735e02e3122e 100644 (file)
Binary files a/app/assets/images/browse/primary.20.png and b/app/assets/images/browse/primary.20.png differ
index dfdfd1bfbee16226013df291ee95ec5294a1eb77..13e0aa6a40fa60e15f1bba4ffdb9071132b7bf4a 100644 (file)
Binary files a/app/assets/images/browse/secondary.20.png and b/app/assets/images/browse/secondary.20.png differ
diff --git a/app/assets/images/browse/shop_car_parts.16.png b/app/assets/images/browse/shop_car_parts.16.png
new file mode 100644 (file)
index 0000000..6c07e4d
Binary files /dev/null and b/app/assets/images/browse/shop_car_parts.16.png differ
index 49a51f113e405755c9689dbe271dc49fe2a52141..bccaa7e0e6f00ad2822870d6d30becd79e9f6b2b 100644 (file)
Binary files a/app/assets/images/browse/tertiary.20.png and b/app/assets/images/browse/tertiary.20.png differ
index 930de64e7724883bac5f4cc3c8a24cd93c35ee5c..c753a3189416d1f7a62f698626cf8b5bbb120503 100644 (file)
Binary files a/app/assets/images/browse/trunk.20.png and b/app/assets/images/browse/trunk.20.png differ
diff --git a/app/assets/images/github.png b/app/assets/images/github.png
new file mode 100644 (file)
index 0000000..b797e24
Binary files /dev/null and b/app/assets/images/github.png differ
index 39f6bc2080a21f9264799f610dfcff5c45270c81..b273b6b6ef21e633019cf486c05657a83ffdc4ce 100644 (file)
Binary files a/app/assets/images/google.png and b/app/assets/images/google.png differ
diff --git a/app/assets/images/key/cyclemap/bicycle_parking.png b/app/assets/images/key/cyclemap/bicycle_parking.png
new file mode 100644 (file)
index 0000000..c900a44
Binary files /dev/null and b/app/assets/images/key/cyclemap/bicycle_parking.png differ
diff --git a/app/assets/images/key/cyclemap/bicycle_shop.png b/app/assets/images/key/cyclemap/bicycle_shop.png
new file mode 100644 (file)
index 0000000..5ccf714
Binary files /dev/null and b/app/assets/images/key/cyclemap/bicycle_shop.png differ
diff --git a/app/assets/images/key/cyclemap/common.png b/app/assets/images/key/cyclemap/common.png
new file mode 100644 (file)
index 0000000..7c10815
Binary files /dev/null and b/app/assets/images/key/cyclemap/common.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway.png b/app/assets/images/key/cyclemap/cycleway.png
new file mode 100644 (file)
index 0000000..13bed4a
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_local.png b/app/assets/images/key/cyclemap/cycleway_local.png
new file mode 100644 (file)
index 0000000..2a29331
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_local.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_local13.png b/app/assets/images/key/cyclemap/cycleway_local13.png
new file mode 100644 (file)
index 0000000..3f2c535
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_local13.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_national.png b/app/assets/images/key/cyclemap/cycleway_national.png
new file mode 100644 (file)
index 0000000..0f5455f
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_national.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_national13.png b/app/assets/images/key/cyclemap/cycleway_national13.png
new file mode 100644 (file)
index 0000000..252b07a
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_national13.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_regional.png b/app/assets/images/key/cyclemap/cycleway_regional.png
new file mode 100644 (file)
index 0000000..7e3306e
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_regional.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_regional13.png b/app/assets/images/key/cyclemap/cycleway_regional13.png
new file mode 100644 (file)
index 0000000..9b3409f
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_regional13.png differ
diff --git a/app/assets/images/key/cyclemap/footway.png b/app/assets/images/key/cyclemap/footway.png
new file mode 100644 (file)
index 0000000..c78756f
Binary files /dev/null and b/app/assets/images/key/cyclemap/footway.png differ
diff --git a/app/assets/images/key/cyclemap/forest.png b/app/assets/images/key/cyclemap/forest.png
new file mode 100644 (file)
index 0000000..a7ebe8e
Binary files /dev/null and b/app/assets/images/key/cyclemap/forest.png differ
diff --git a/app/assets/images/key/cyclemap/lake.png b/app/assets/images/key/cyclemap/lake.png
new file mode 100644 (file)
index 0000000..918d496
Binary files /dev/null and b/app/assets/images/key/cyclemap/lake.png differ
diff --git a/app/assets/images/key/cyclemap/motorway.png b/app/assets/images/key/cyclemap/motorway.png
new file mode 100644 (file)
index 0000000..296f176
Binary files /dev/null and b/app/assets/images/key/cyclemap/motorway.png differ
diff --git a/app/assets/images/key/cyclemap/motorway12.png b/app/assets/images/key/cyclemap/motorway12.png
new file mode 100644 (file)
index 0000000..749493a
Binary files /dev/null and b/app/assets/images/key/cyclemap/motorway12.png differ
diff --git a/app/assets/images/key/cyclemap/primary.png b/app/assets/images/key/cyclemap/primary.png
new file mode 100644 (file)
index 0000000..78ae0e4
Binary files /dev/null and b/app/assets/images/key/cyclemap/primary.png differ
diff --git a/app/assets/images/key/cyclemap/primary12.png b/app/assets/images/key/cyclemap/primary12.png
new file mode 100644 (file)
index 0000000..fed37d0
Binary files /dev/null and b/app/assets/images/key/cyclemap/primary12.png differ
diff --git a/app/assets/images/key/cyclemap/rail.png b/app/assets/images/key/cyclemap/rail.png
new file mode 100644 (file)
index 0000000..0abf0c1
Binary files /dev/null and b/app/assets/images/key/cyclemap/rail.png differ
diff --git a/app/assets/images/key/cyclemap/rail14.png b/app/assets/images/key/cyclemap/rail14.png
new file mode 100644 (file)
index 0000000..957f17c
Binary files /dev/null and b/app/assets/images/key/cyclemap/rail14.png differ
diff --git a/app/assets/images/key/cyclemap/secondary.png b/app/assets/images/key/cyclemap/secondary.png
new file mode 100644 (file)
index 0000000..7928b18
Binary files /dev/null and b/app/assets/images/key/cyclemap/secondary.png differ
diff --git a/app/assets/images/key/cyclemap/secondary12.png b/app/assets/images/key/cyclemap/secondary12.png
new file mode 100644 (file)
index 0000000..cde0085
Binary files /dev/null and b/app/assets/images/key/cyclemap/secondary12.png differ
diff --git a/app/assets/images/key/cyclemap/toilets.png b/app/assets/images/key/cyclemap/toilets.png
new file mode 100644 (file)
index 0000000..d1c7a00
Binary files /dev/null and b/app/assets/images/key/cyclemap/toilets.png differ
diff --git a/app/assets/images/key/cyclemap/track.png b/app/assets/images/key/cyclemap/track.png
new file mode 100644 (file)
index 0000000..f294edc
Binary files /dev/null and b/app/assets/images/key/cyclemap/track.png differ
diff --git a/app/assets/images/key/cyclemap/trunk.png b/app/assets/images/key/cyclemap/trunk.png
new file mode 100644 (file)
index 0000000..d312a65
Binary files /dev/null and b/app/assets/images/key/cyclemap/trunk.png differ
diff --git a/app/assets/images/key/cyclemap/trunk12.png b/app/assets/images/key/cyclemap/trunk12.png
new file mode 100644 (file)
index 0000000..51230a0
Binary files /dev/null and b/app/assets/images/key/cyclemap/trunk12.png differ
index bec836d7e4c367e42fa0baf3f21ebd0eca9998ce..5ce63ded239eed97cb60ac2a4dda43a146fe5964 100644 (file)
Binary files a/app/assets/images/key/mapnik/construction.png and b/app/assets/images/key/mapnik/construction.png differ
diff --git a/app/assets/images/key/mapnik/mainroad.png b/app/assets/images/key/mapnik/mainroad.png
new file mode 100644 (file)
index 0000000..269959b
Binary files /dev/null and b/app/assets/images/key/mapnik/mainroad.png differ
diff --git a/app/assets/images/key/mapnik/mainroad12.png b/app/assets/images/key/mapnik/mainroad12.png
new file mode 100644 (file)
index 0000000..c289a3f
Binary files /dev/null and b/app/assets/images/key/mapnik/mainroad12.png differ
diff --git a/app/assets/images/key/mapnik/mainroad7.png b/app/assets/images/key/mapnik/mainroad7.png
new file mode 100644 (file)
index 0000000..05b4dac
Binary files /dev/null and b/app/assets/images/key/mapnik/mainroad7.png differ
diff --git a/app/assets/images/key/mapnik/mainroad9.png b/app/assets/images/key/mapnik/mainroad9.png
new file mode 100644 (file)
index 0000000..334f8fc
Binary files /dev/null and b/app/assets/images/key/mapnik/mainroad9.png differ
index 3940c83d2da2b40f304d136c3ecd5ac47bb99a3d..484fc9daa3bbae3d126a4810ac83de738a462ac9 100644 (file)
Binary files a/app/assets/images/key/mapnik/motorway.png and b/app/assets/images/key/mapnik/motorway.png differ
diff --git a/app/assets/images/key/mapnik/primary.png b/app/assets/images/key/mapnik/primary.png
deleted file mode 100644 (file)
index a51703c..0000000
Binary files a/app/assets/images/key/mapnik/primary.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/primary12.png b/app/assets/images/key/mapnik/primary12.png
deleted file mode 100644 (file)
index 741b138..0000000
Binary files a/app/assets/images/key/mapnik/primary12.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/secondary.png b/app/assets/images/key/mapnik/secondary.png
deleted file mode 100644 (file)
index cbd4578..0000000
Binary files a/app/assets/images/key/mapnik/secondary.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/secondary12.png b/app/assets/images/key/mapnik/secondary12.png
deleted file mode 100644 (file)
index b95b188..0000000
Binary files a/app/assets/images/key/mapnik/secondary12.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/trunk.png b/app/assets/images/key/mapnik/trunk.png
deleted file mode 100644 (file)
index 93611ef..0000000
Binary files a/app/assets/images/key/mapnik/trunk.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/trunk12.png b/app/assets/images/key/mapnik/trunk12.png
deleted file mode 100644 (file)
index d8becf0..0000000
Binary files a/app/assets/images/key/mapnik/trunk12.png and /dev/null differ
diff --git a/app/assets/images/osm_logo_256.png b/app/assets/images/osm_logo_256.png
new file mode 100644 (file)
index 0000000..5388bc5
Binary files /dev/null and b/app/assets/images/osm_logo_256.png differ
diff --git a/app/assets/images/osm_logo_30.png b/app/assets/images/osm_logo_30.png
new file mode 100644 (file)
index 0000000..c963f4f
Binary files /dev/null and b/app/assets/images/osm_logo_30.png differ
diff --git a/app/assets/images/osm_logo_512.png b/app/assets/images/osm_logo_512.png
new file mode 100644 (file)
index 0000000..c54f416
Binary files /dev/null and b/app/assets/images/osm_logo_512.png differ
index 37d94886ddf07ea4074f92c01584394761984983..079f4dd7fe229513f8c48a85d9d79df8adc5823c 100644 (file)
Binary files a/app/assets/images/routing-sprite.png and b/app/assets/images/routing-sprite.png differ
diff --git a/app/assets/images/routing-sprite.svg b/app/assets/images/routing-sprite.svg
new file mode 100644 (file)
index 0000000..15aa57b
--- /dev/null
@@ -0,0 +1,573 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="520"
+   height="20"
+   viewBox="0 0 520.00001 20"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="routing-sprite.svg"
+   inkscape:export-filename="/home/patrick/Code/openstreetmap-website/app/assets/images/routing-sprite.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568542"
+     inkscape:cx="131.24519"
+     inkscape:cy="13.736603"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     showguides="false"
+     inkscape:guide-bbox="true"
+     units="px">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4224" />
+    <sodipodi:guide
+       position="20.000001,31"
+       orientation="1,0"
+       id="guide4226" />
+    <sodipodi:guide
+       position="40.000001,19"
+       orientation="1,0"
+       id="guide4245" />
+    <sodipodi:guide
+       position="60.000002,29"
+       orientation="1,0"
+       id="guide4299" />
+    <sodipodi:guide
+       position="80.000002,35"
+       orientation="1,0"
+       id="guide4388" />
+    <sodipodi:guide
+       position="71.000002,10"
+       orientation="-0.7193398,-0.69465837"
+       id="guide4432"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="100,15"
+       orientation="1,0"
+       id="guide4499" />
+    <sodipodi:guide
+       position="120,15"
+       orientation="1,0"
+       id="guide4578" />
+    <sodipodi:guide
+       position="140,16"
+       orientation="1,0"
+       id="guide4580" />
+    <sodipodi:guide
+       position="160,21"
+       orientation="1,0"
+       id="guide4582" />
+    <sodipodi:guide
+       position="180,15"
+       orientation="1,0"
+       id="guide4729" />
+    <sodipodi:guide
+       position="200.00001,15"
+       orientation="1,0"
+       id="guide4731" />
+    <sodipodi:guide
+       position="220.00001,11"
+       orientation="1,0"
+       id="guide4747" />
+    <sodipodi:guide
+       position="78.000002,12"
+       orientation="-0.70710678,0.70710678"
+       id="guide4212"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="240.00001,19"
+       orientation="1,0"
+       id="guide4264" />
+    <sodipodi:guide
+       position="260.00001,19"
+       orientation="1,0"
+       id="guide4266" />
+    <sodipodi:guide
+       position="280.00001,5"
+       orientation="1,0"
+       id="guide4280" />
+    <sodipodi:guide
+       position="300.00001,10"
+       orientation="1,0"
+       id="guide4297" />
+    <sodipodi:guide
+       position="320.00001,24"
+       orientation="1,0"
+       id="guide4305" />
+    <sodipodi:guide
+       position="340.00001,28"
+       orientation="1,0"
+       id="guide4335" />
+    <sodipodi:guide
+       position="360.00001,30"
+       orientation="1,0"
+       id="guide4337" />
+    <sodipodi:guide
+       position="380.00001,19"
+       orientation="1,0"
+       id="guide4376" />
+    <sodipodi:guide
+       position="400.00001,19"
+       orientation="1,0"
+       id="guide4382" />
+    <sodipodi:guide
+       position="420.00001,36"
+       orientation="1,0"
+       id="guide4394" />
+    <sodipodi:guide
+       position="440.00001,20"
+       orientation="1,0"
+       id="guide4449" />
+    <sodipodi:guide
+       position="460.00001,22"
+       orientation="1,0"
+       id="guide4451" />
+    <sodipodi:guide
+       position="480.00001,20"
+       orientation="1,0"
+       id="guide4485" />
+    <sodipodi:guide
+       position="500.00001,40"
+       orientation="1,0"
+       id="guide4487" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1032.3622)">
+    <image
+       y="1002.3622"
+       x="1.7763568e-15"
+       id="image4217"
+       xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAAUCAMAAACXrFfpAAABOFBMVEUAAAB/f39/f39/f39/f396 enoAAAB7e3t7e3t4eHh5eXl5eXl6enp3d3d4eHgAAAB3d3d1dXVzc3MAAABwcHBvb29ubm4AAABt bW1sbGxsbGxsbGxra2tra2toaGhoaGhqamoAAABmZmZoaGgAAABnZ2dkZGQAAABiYmJXV1dXV1cA AAAAAABMTEwAAAAAAABDQ0MAAAA1NTU1NTUxMTEAAAAxMTEAAAAAAAAmJiYlJSUkJCQjIyMiIiIA AAAcHBwAAAAAAAAAAAAAAAAUFBQAAAAAAAAQEBAPDw8AAAAPDw8AAAAAAAANDQ0MDAwAAAAAAAAM DAwKCgoAAAAAAAAICAgICAgAAAAHBwcAAAAHBwcGBgYAAAAAAAAAAAAAAAADAwMAAAAAAAAAAAAA AAAAAAAAAAAAAABULW3yAAAAZ3RSTlMAAQIGCw4QEBIUFhcZGh0gICItMDQ5PEBAQUJERUZHSEhK SkxMTU9QUFZXWGBgZGZpcHl6f4CAiJCRk5SXmaCmrLC1uLzAxMXIyMrM0NDT09TU29zg4OLk5ebm 6fDx8/T09vf4+/z9ttm2NwAABH9JREFUeF7tV+9zFTUUzQOMFZUAiwZbkB9bXYEU3UI0FVhcNQVx rQpbsBopFuX8//+BMy/vvd3k7mRnio8PHc/HOyc35545yWbZkYOQtKYSvDeOgg/Xs4JR8OI/kDnc Q6jX02wqqtZlKR7tN47MWtNfOMRZOZ/n+fmVuNwMD6hRhDmQSlcNXCCpJAKVtbYiRnIViAVspQsp w9Wo0+OmNXMHQWeoUjzabxwSsP1mNDMn1/KHAB7ma+9EK9uhfi1CPdxgijJMggtjnzWeZViSVnmW jqaF0yyBtGYNVNRTiEEe7Xc4oxXtxS78Co+fVoO6BSTpZgEgKt78GyCCHGxvFN5iBh12a6kD+OsK C2EBtCqR6pRm8SdI0QCwMQ8AsvF+FGLA6HkcpV64cOwz5B7Iw3B492gsXVgtp0XVXRFTPANQyX5S jSya/iyyBvDMs1WfCFeQrNGqrOFqyRjRTL0CGh7SDnAANcQb7Uf3FS01ugRQe+kL6uRT5Jfu/nb3 UmR04++DENmTOAu8jszXmKMbUMxa8WZxPHmDHnSQK8AQo1+uswDKExUb0VyUN4B1VQSBLixspnnI W/c82m9k3woqMtofTMjI6E9waxfA7i3kE5IiQcYLjc5aAO0VmCGj3fzclPOsyO48CO0GjGa1KxyA RgRG/wPU8UH3EGxM8w3gJovQ4BdvM+Wl+9F9BdDGRvvwtbxv9MnVTcyxufruwkBX/Qh8VTfkCq2t DZ4JQM1ZkwXfFCnlE7guMvUiFw5YULl2aKSUVd9oVTHRRPeTdp8DCEMJdNlPajYziXE6XMEor2Is 3Y/ua19iX4dGq9YAKJuqb/SFB+jwYG2RmNmHQPDoUeA4r8NLrAzf/3pqm0AtyDeFfF2EhfArupKc jdM3WjILOHKjzo5XUrMGtrcBE8Zl77s9H0rKS/aj+4pCY12FRgvGpgOIvtFn76HDvbPpL64F1HQ9 edPERpeK0ValySywrqquQ1lGRnuERnN/ZAeNrkdeCQ5qKrNnVjk91DUqwisATvsl9/VeclNIwApT BAPw5gd8Y33L41efYo6nV48nRJNSyujhdRYHwD6K0RUA0pUSM5RpgZk/CE2/rOGPuiUPZs8j/ZL7 +tAW2Aeew0ZyZe+ZdeY25rh9hi3XaOH8RXhYo+nDvB1JIPcZbUOjDWNMBcqF/7N1yGi/9L7eaP/9 cyKWa7tpJznmyCdLNdp7CscPazR90zfZiEDWoBa8ggtFl0y68DC0nteO9aP7ash5hjSRK3tfgouP XuHF9y/w6tFFtmyjufNqDmd0iELrgrFRYzBFwKww8BPT8Ui/9L7KZrMpHKdyy0WgT63lG1vX8+tb G/naqcmSjWYajr+e0RRpzdm3wM9RUe/hueGUt50cOA3uoFNyz23uPL6zcf+P+xt3Hu9snluC0ZEc zZZvdKxRUp5lKR7tNw7jeEpujp3Z1YHd35Ev22hmxFE1Wpik3MubH324sXXtg2tff7H68ZeX2dFD Zm1G0mdNgrcUrLw/YW+dPsFOnH6bHXtvhb0p/I9/AQmEF7Y+Eo3CAAAAAElFTkSuQmCC "
+       preserveAspectRatio="none"
+       height="20.000017"
+       width="360" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 9,1039.3309 3.6e-5,10.0313 1.999964,0 -3.5e-5,-10.0313 z"
+       id="path4446"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       sodipodi:nodetypes="cccc"
+       inkscape:connector-curvature="0"
+       id="path4448"
+       d="m 15,1039.3466 -5,-4.9844 -5,5 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 87.125,4.984375 87.125,5 86,5 86,12.005859 82,12 l 5,5 5,-4.984375 -4,-0.0059 0,-5.025391 7,0 L 95,17 l 2,0 0,-12 -0.46875,0 0,-0.015625 -9.40625,0 z"
+       transform="translate(0,1032.3622)"
+       id="path4509"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 28,3.9882812 2.814453,2.8203126 -4.777344,4.7460942 0,0.04297 -0.03711,0 L 26,17 28,17 28,12.423828 32.228516,8.2226562 35,11 35,4 28,3.9882812 Z"
+       transform="translate(0,1032.3622)"
+       id="path4450"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 53,4 0.0059,3.984375 -6.005859,0 0,2 L 47,17 l 2,0 0,-7.015625 4.009766,0 L 53.015625,14 58,9 53,4 Z"
+       transform="translate(0,1032.3622)"
+       id="path4208"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 67.025391,4.4101562 67.003906,17 l 2,0 0,-7.5527344 3.685547,3.8710934 -2.683114,2.694508 6.989812,0.05505 0.01101,-7.0846724 -2.854816,2.9210504 z"
+       transform="translate(0,1032.3622)"
+       id="path4424"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 170,1035.3622 -4,5 3,0 0,5 2,0 0,-5 3,0 z"
+       id="path4735"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccc" />
+    <g
+       id="g4237">
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+         id="path4233"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         inkscape:connector-curvature="0"
+         id="path4235"
+         d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <path
+       id="path4221"
+       d="m 112.00001,1036.3505 -2.81445,2.8203 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 -2.77148,2.7773 0,-7 7,-0.012 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path4223"
+       d="m 128.00028,1036.3622 -0.006,3.9844 6.00586,0 0,2 0,7.0156 -2,0 0,-7.0156 -4.00977,0 -0.006,4.0156 -4.98437,-5 5,-5 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:nodetypes="cccccccccc"
+       inkscape:connector-curvature="0"
+       id="path4225"
+       d="m 153.98575,1036.7724 0.0215,12.5898 -2,0 0,-7.5527 -3.68555,3.8711 2.68312,2.6945 -6.98982,0.055 -0.011,-7.0847 2.85482,2.9211 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <g
+       id="g4254"
+       transform="translate(-2.0000461,0)">
+      <circle
+         r="3"
+         transform="scale(1,-1)"
+         cy="-1044.3622"
+         cx="210.04105"
+         id="path4231"
+         style="opacity:1;fill:none;fill-opacity:0.43824702;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <path
+         id="path4247"
+         transform="translate(0,1032.3622)"
+         d="m 211,3.9882812 2.81445,2.8203126 -1.76562,1.7539062 c 0.58436,0.3442274 1.07073,0.8277607 1.41797,1.4101562 l 1.76172,-1.75 L 218,11 218,4 211,3.9882812 Z M 209,15.84375 209,17 l 2,0 0,-1.130859 C 210.69097,15.946541 210.3729,16 210.04102,16 209.67912,16 209.3342,15.935262 209,15.84375 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="translate(17.999954,0)"
+       id="g4258">
+      <circle
+         style="opacity:1;fill:none;fill-opacity:0.43824702;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         id="circle4260"
+         cx="210.04105"
+         cy="-1044.3622"
+         transform="scale(1,-1)"
+         r="3" />
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 211,3.9882812 2.81445,2.8203126 -1.76562,1.7539062 c 0.58436,0.3442274 1.07073,0.8277607 1.41797,1.4101562 l 1.76172,-1.75 L 218,11 218,4 211,3.9882812 Z M 209,15.84375 209,17 l 2,0 0,-1.130859 C 210.69097,15.946541 210.3729,16 210.04102,16 209.67912,16 209.3342,15.935262 209,15.84375 Z"
+         transform="translate(0,1032.3622)"
+         id="path4262" />
+    </g>
+    <g
+       id="g4268"
+       transform="translate(37.999954,0)">
+      <circle
+         r="3"
+         transform="scale(1,-1)"
+         cy="-1044.3622"
+         cx="210.04105"
+         id="circle4270"
+         style="opacity:1;fill:none;fill-opacity:0.43824702;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <path
+         id="path4272"
+         transform="translate(0,1032.3622)"
+         d="m 211,3.9882812 2.81445,2.8203126 -1.76562,1.7539062 c 0.58436,0.3442274 1.07073,0.8277607 1.41797,1.4101562 l 1.76172,-1.75 L 218,11 218,4 211,3.9882812 Z M 209,15.84375 209,17 l 2,0 0,-1.130859 C 210.69097,15.946541 210.3729,16 210.04102,16 209.67912,16 209.3342,15.935262 209,15.84375 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       id="g4274"
+       transform="translate(80,0)">
+      <path
+         sodipodi:nodetypes="ccccc"
+         inkscape:connector-curvature="0"
+         id="path4276"
+         d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+         id="path4278"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <path
+       id="path4295"
+       d="m 290,1035.3622 a 2,2 0 0 0 -2,2 2,2 0 0 0 2,2 2,2 0 0 0 2,-2 2,2 0 0 0 -2,-2 z m 0,4 -4,5 3,0 0,5 2,0 0,-5 3,0 -4,-5 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       inkscape:connector-curvature="0" />
+    <g
+       id="g4313">
+      <g
+         id="g4299"
+         transform="translate(115.01146,2)">
+        <path
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0"
+           id="path4301"
+           d="m 189,1037.3422 4e-5,7.9763 1.99996,0 -3e-5,-7.9763 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 192.99451,1037.3474 190,1034.3622 l -3.01146,3.0115 z"
+           id="path4303"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cccc" />
+      </g>
+      <g
+         transform="matrix(1,0,0,-1,123.01146,2083.7244)"
+         id="g4307">
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+           id="path4309"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           sodipodi:nodetypes="cccc"
+           inkscape:connector-curvature="0"
+           id="path4311"
+           d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      </g>
+    </g>
+    <g
+       id="g4321"
+       transform="matrix(-1,0,0,-1,640.01146,2083.7244)">
+      <g
+         transform="translate(115.01146,2)"
+         id="g4323">
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 189,1037.3422 4e-5,7.9763 1.99996,0 -3e-5,-7.9763 z"
+           id="path4325"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           sodipodi:nodetypes="cccc"
+           inkscape:connector-curvature="0"
+           id="path4327"
+           d="M 192.99451,1037.3474 190,1034.3622 l -3.01146,3.0115 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      </g>
+      <g
+         id="g4329"
+         transform="matrix(1,0,0,-1,123.01146,2083.7244)">
+        <path
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0"
+           id="path4331"
+           d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+           id="path4333"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cccc" />
+      </g>
+    </g>
+    <path
+       style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 349,3 0,1 -3,0 0,5.2265625 L 343.95508,10 347,13 l 0,0.904297 1.61133,1.425781 1.88867,-1.671875 1.89062,1.671875 L 354,13.90625 354,13 357.04492,10.044922 355,9.2617188 355,4 l -3,0 0,-1 -3,0 z m -2,2 7,0 0,3.8769531 L 350.48633,7.53125 347,8.8496094 347,5 Z m -0.2793,9.992188 -2.2207,1.966796 0.66211,0.748047 1.55859,-1.378906 L 348.61133,18 350.5,16.328125 352.39062,18 l 1.88868,-1.671875 1.55859,1.378906 0.66211,-0.748047 -2.2207,-1.966796 -1.88868,1.673828 -1.89062,-1.673828 -1.88867,1.673828 -1.89063,-1.673828 z"
+       transform="translate(0,1032.3622)"
+       id="path4341"
+       inkscape:connector-curvature="0" />
+    <g
+       id="g4384">
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 370,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+         id="path4374"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccc"
+         inkscape:connector-curvature="0"
+         id="path4378"
+         d="m 365.18556,1039.1708 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 z"
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <g
+       id="g4388"
+       transform="matrix(-1,0,0,1,760.00001,0)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4390"
+         d="m 370,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 365.18556,1039.1708 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 z"
+         id="path4392"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccccc" />
+    </g>
+    <g
+       id="g4438">
+      <path
+         id="path4421"
+         transform="translate(0,1032.3622)"
+         d="m 407.0293,3.9882812 0,5.4023438 0.0371,0 0,0.042969 1.95117,1.9375 0,5.638672 2.8164,-2.820313 2.72657,2.796875 1.44531,-1.382812 -2.76758,-2.837891 0.0195,-0.02148 2.75977,-2.7460939 -5.5293,0.00977 -1.45898,-1.4433584 0,-4.5761719 -2,0 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccc"
+         inkscape:connector-curvature="0"
+         id="path4423"
+         d="m 404.21408,1046.5416 4.77734,-4.7461 0,-0.043 0.0371,0 0,-5.4023 -2,0 0,4.5762 -4.22852,4.2011 z"
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <g
+       id="g4442"
+       transform="matrix(-1,0,0,1,840.01754,0)">
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 407.0293,3.9882812 0,5.4023438 0.0371,0 0,0.042969 1.95117,1.9375 0,5.638672 2.8164,-2.820313 2.72657,2.796875 1.44531,-1.382812 -2.76758,-2.837891 0.0195,-0.02148 2.75977,-2.7460939 -5.5293,0.00977 -1.45898,-1.4433557 0,-4.5761719 -2,0 z"
+         transform="translate(0,1032.3622)"
+         id="path4444"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 404.21408,1046.5416 4.77734,-4.7461 0,-0.043 0.0371,0 0,-5.4023 -2,0 0,4.5762 -4.22852,4.2011 z"
+         id="path4447"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccccc" />
+    </g>
+    <g
+       id="g4465"
+       transform="translate(-0.99975,0)">
+      <path
+         sodipodi:nodetypes="ccccc"
+         inkscape:connector-curvature="0"
+         id="path4455"
+         d="m 449,1041.3622 4e-5,8 1.99996,0 -3e-5,-8 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 454.0156,1045.3622 4.9844,-5 -5,-5 z"
+         id="path4457"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 455,1039.3466 -6,0 0,2 6,-10e-5 z"
+         id="path4461"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccc" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         inkscape:connector-curvature="0"
+         id="path4463"
+         d="m 451.01565,1039.3466 -7.9629,0 0,2 7.9629,-10e-5 z"
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path4473"
+       d="m 472.053,1041.3622 -4e-5,8 -1.99996,0 3e-5,-8 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 467.0374,1045.3622 -4.9844,-5 5,-5 z"
+       id="path4475"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 466.053,1039.3466 6,0 0,2 -6,-10e-5 z"
+       id="path4477"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path4479"
+       d="m 470.03735,1039.3466 7.9629,0 0,2 -7.9629,-10e-5 z"
+       style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 490,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+       id="path4491"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:0.50980392;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 490,1038.3622 -4e-5,11 -1.99996,0 3e-5,-11 z"
+       id="path4505"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path4510"
+       d="m 490,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path4514"
+       d="m 510.00001,1036.3505 -2.81445,2.8203 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 -2.77148,2.7773 0,-7 7,-0.012 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path4516"
+       d="m 510.00001,1038.3622 4e-5,11 1.99996,0 -3e-5,-11 z"
+       style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 510.00001,1036.3505 -2.81445,2.8203 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 -2.77148,2.7773 0,-7 7,-0.012 z"
+       id="path4518"
+       inkscape:connector-curvature="0" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:125%;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="7.5"
+       y="1065.3622"
+       id="text4238"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4240"
+         x="7.5"
+         y="1065.3622">0    1     2     3    4     5     6     7    8     9   10  11   12    13   14  15   16  17   18  19   20   21   22  23   24  25</tspan></text>
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 170,1045.3622 c -1.10457,0 -2,0.8954 -2,2 0,1.1046 0.89543,2 2,2 1.10457,0 2,-0.8954 2,-2 0,-1.1046 -0.89543,-2 -2,-2 z"
+       id="path3440"
+       sodipodi:nodetypes="sssss" />
+  </g>
+</svg>
index d5577d4b7121a50486799d697e50f189dcfc835f..c511bd90fbc7db6e940d6abce045033eca31df44 100644 (file)
Binary files a/app/assets/images/sprite.png and b/app/assets/images/sprite.png differ
index b50b969e909620ce71400c28d5c54c4dc409e1f4..df8e3e3d58c9cf6342bfb0f1f9e2071f57bc513e 100644 (file)
@@ -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"
        sodipodi:nodetypes="cccccccccccccccccc"
        d="m 129,855.3622 -1.00001,1 0,2 1.00001,1 2.00002,0 1,-1 0,-2 -1.00002,-1 z m 2e-5,6 -1.00001,1 0,6 1.00001,1 1.99998,0 1.00004,-1 -3e-5,-6 -1,-1 z"
        id="path6912"
-       style="font-size:16.71258354000000068px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:100%;letter-spacing:0px;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate;font-family:Helvetica Neue"
+       style="font-size:16.71258354000000068px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:100%;letter-spacing:0px;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Helvetica Neue"
        inkscape:connector-curvature="0" />
     <path
        inkscape:export-ydpi="90"
        inkscape:connector-curvature="0"
        id="path6914"
        d="m 57,861.36216 -1,-1 -4,0 0,-4 -1,-0.99999 -1,0 -1,1 0,4 -4,0 -1,0.99999 0,1 1,1 4,0 0,3.99999 1,1.00002 1,0 1,-1.00001 0,-3.99999 4,-10e-6 1,-0.99998 0,-1.00002 z"
-       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate" />
+       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
     <path
-       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate"
+       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
        d="m 65,860.36216 11,-2e-5 1,1.00002 0,1.00002 -1,0.99997 -11,3e-5 -1,-1.00003 0,-1 z"
        id="path6916"
        inkscape:connector-curvature="0"
        inkscape:connector-curvature="0"
        id="path6918"
        d="m 84,862.36218 0,-2.00001 10,-3.99999 2,1e-5 0,1.99998 -4,10 -2,10e-6 0,-6 z"
-       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate" />
+       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
     <path
        inkscape:export-ydpi="90"
        inkscape:export-xdpi="90"
        inkscape:export-filename="/Users/saman/work_repos/osm-redesign/renders/share-1.png"
        id="path6920"
        d="m 155,854.3622 -1,1 0,2 -2,0 c -6,0 -6,7 -6,7 0,0 2,-4 6,-4 0.66667,0 1.33333,0 2,0 l 0,2 1,1 4,-4.5 -4,-4.5 z m -13,4 -1,1 0,9 1,1 10,0 1,-1 0,-2 0,-3 0,-1 -1,0 c -0.3202,-10e-5 -0.6603,0.073 -1,0.1875 l 0,2.8125 0,2 -5.5625,0 a 2.0002,2.0002 0 0 1 -0.90625,0 l -1.53125,0 0,-1.625 a 2.0002,2.0002 0 0 1 0,-0.625 l 0,-2.75 0,-2 1.53125,0 c 0.3433,-0.6691 0.79175,-1.3477 1.34375,-2 l -0.875,0 -3,0 z"
-       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate"
+       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
        inkscape:connector-curvature="0" />
     <path
        inkscape:export-ydpi="90"
        inkscape:export-xdpi="90"
        inkscape:export-filename="/Users/saman/work_repos/osm-redesign/renders/share-1.png"
-       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate"
+       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
        d="m 109.50003,855.3622 -6.50002,3 1e-5,1 6.49998,3 1.00002,0 6.49999,-3 1e-5,-1 -6.50001,-3 -0.99998,0 z m -5.40621,6.5 -1.09377,0.5 -3e-5,1 6.49999,3 1,0 6.50001,-3 0,-1 -1.0937,-0.5 -5.40631,2.5 -0.99998,0 -5.40621,-2.5 z m 0,4 -1.09379,0.5 -2e-5,1 6.50001,3 1.00001,0 6.5,-3 -10e-6,-1 -1.0937,-0.5 -5.40631,2.5 -0.99999,0 -5.4062,-2.5 z"
        id="path6922"
        inkscape:connector-curvature="0" />
        inkscape:connector-curvature="0"
        id="path10739"
        d="m 11.5,855.36218 c 3.0376,0 5.5,2.46243 5.5,5.5 0,3.03757 -2.4624,5.5 -5.5,5.5 -1.0061,0 -1.9387,-0.27827 -2.75,-0.75 l -3.75,3.75 -1,0 -1,-1 0,-1 3.75,-3.75 C 6.2783,862.80084 6,861.86831 6,860.86218 c 0,-3.03757 2.4624,-5.5 5.5,-5.5 z m 0.5,2 -1,0 -2,1 -1,2 0,1 1,2 2,1 1,0 2,-1 1,-2 0,-1 -1,-2 -2,-1 z"
-       style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate" />
+       style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
     <path
        inkscape:export-ydpi="90"
        inkscape:export-xdpi="90"
        inkscape:connector-curvature="0"
        id="path6918-2"
        d="m 84,882.36218 0,-2.00001 10,-3.99999 2,1e-5 0,1.99998 -4,10 -2,10e-6 0,-6 z"
-       style="color:#000000;fill:#70cd8f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6591-2);enable-background:accumulate" />
+       style="color:#000000;fill:#70cd8f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
     <path
        style="color:#000000;fill:#0000ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
        d="M 185 6 L 183 8 L 183 12 L 185 14 L 187 14 L 185 12 L 185 8 L 190 8 L 190 11 L 192 11 L 192 8 L 190 6 L 187 6 L 185 6 z M 192 6 L 194 8 L 194 12 L 189 12 L 189 9 L 187 9 L 187 12 L 189 14 L 194 14 L 196 12 L 196 8 L 194 6 L 192 6 z "
        inkscape:export-ydpi="90" />
     <text
        xml:space="preserve"
-       style="font-size:20px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
+       style="font-size:20px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:'DejaVu Sans', Sans, sans-serif"
        x="264.8125"
        y="869.62622"
        id="text3021"
          id="tspan3023"
          x="264.8125"
          y="869.62622">?</tspan></text>
+    <path
+       sodipodi:nodetypes="cccccccccccc"
+       inkscape:connector-curvature="0"
+       id="path3386"
+       d="m 244,884.36218 0,-7 1,-1 10,0 1,1 0,7 -1,1 -3,0 -2,3 -2,-3 -3,0 z"
+       style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;enable-background:accumulate" />
   </g>
 </svg>
diff --git a/app/assets/images/tab-icon.svg b/app/assets/images/tab-icon.svg
new file mode 100644 (file)
index 0000000..5e8bb31
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+        <g id="Logo_simple" fill="black">
+            <g id="layer1" transform="translate(0.234847, 0.091766)">
+                <path d="M1.75809857,15.5864714 C1.53259286,15.5296771 1.41476714,15.4360657 0.812798571,14.8354114 C0.0965871429,14.1207686 0.0506614286,14.0509914 0.05179,13.6792257 C0.0529328571,13.2638686 -0.0724585714,13.4124171 2.21577,11.1180486 C4.52671571,8.80090286 4.40771571,8.90189143 4.82581857,8.90298 C5.01909286,8.90355143 5.06773,8.91449429 5.22358143,8.99300286 L5.40114714,9.08244857 L5.96119286,8.5224 L6.52124143,7.96235429 L6.38092714,7.74361714 C6.10788714,7.31797429 5.85054429,6.69690286 5.73492714,6.18456286 C5.40852143,4.73815714 5.76038429,3.20801714 6.68624429,2.04756857 C8.28345857,0.0456714286 11.1528186,-0.398394286 13.27489,1.02790857 C14.4393671,1.81058286 15.1962414,3.01958 15.41179,4.44129714 C15.4573557,4.74184571 15.4576157,5.45568571 15.4123614,5.77276857 C15.2546157,6.87590286 14.7850586,7.81346 13.9961871,8.60042571 C13.5897757,9.00585143 13.2639443,9.24073714 12.7466671,9.50116857 C12.1308443,9.81121714 11.6083871,9.95670571 10.8984843,10.0158286 C9.88698143,10.1000686 8.76552714,9.82031714 7.90698143,9.26958571 L7.68824429,9.12927143 L7.12819857,9.68931714 L6.56815,10.2493657 L6.65759857,10.4269286 C6.73610714,10.58278 6.74711571,10.6314171 6.74761857,10.8246943 C6.74876143,11.2423057 6.84782429,11.1252714 4.54627857,13.4239743 C2.77385857,15.1942057 2.50102143,15.4561657 2.36526714,15.5180457 C2.19138714,15.5973029 1.92182714,15.6276857 1.75818714,15.5864714 L1.75809857,15.5864714 Z M11.2712243,9.15195429 C12.5502929,8.91782286 13.6672814,8.06622571 14.2271586,6.89834 C15.11979,5.03633714 14.5194471,2.84804286 12.7986071,1.69118857 C12.3880957,1.41521714 11.81485,1.18257714 11.27685,1.07362 C10.9041357,0.998134286 10.1154929,1.00585429 9.72675286,1.08879143 C9.14647571,1.21259143 8.61371286,1.44346 8.15203571,1.77118 C7.86672714,1.97370571 7.39628429,2.44395714 7.19702143,2.72580286 C6.09283,4.28761714 6.19273,6.36339429 7.44143,7.80428857 C8.08152143,8.54289714 8.96678714,9.02773714 9.94637571,9.17618571 C10.2716957,9.22548571 10.9358843,9.21333714 11.2712243,9.15195714 L11.2712243,9.15195429 Z M8.87038714,13.8891629 C8.10495286,13.6680029 7.47133,13.47936 7.46233286,13.4699514 C7.44547571,13.4523229 8.23654429,10.6468171 8.26791,10.6130286 C8.28353857,10.5962 10.9920157,11.3547 11.1029871,11.4069886 C11.1422157,11.4254743 11.1007014,11.5927571 10.7663043,12.7595514 C10.55651,13.49186 10.3722014,14.1373486 10.35673,14.1939686 C10.3412443,14.2505914 10.3136357,14.2956486 10.2953443,14.2940943 C10.2770586,14.2926657 9.63582143,14.1103229 8.87038714,13.8891629 Z M10.7425129,14.2243971 C10.7425129,14.1901514 11.5295357,11.4412371 11.5420243,11.43186 C11.57051,11.41046 14.31823,10.6433514 14.3287386,10.65386 C14.3411671,10.6662886 13.5606443,13.4390343 13.5401471,13.4552829 C13.5261471,13.4663686 10.8885243,14.2190457 10.8042814,14.2359886 C10.77031,14.2428171 10.7425129,14.2377029 10.7425129,14.2243886 L10.7425129,14.2243971 Z M6.17704429,12.99702 C6.72003857,12.4511857 7.20394143,11.9528 7.25238429,11.8894971 C7.36159286,11.7467771 7.51339,11.4185714 7.55467,11.2359114 C7.57172714,11.1604143 7.58871857,11.00994 7.59241857,10.9015229 L7.59916143,10.7043971 L7.71662429,10.6712457 C7.78122714,10.6530171 7.83903571,10.6430457 7.84508714,10.6491029 C7.86014429,10.66416 7.07001857,13.4236343 7.04369571,13.44788 C7.03212429,13.4585371 6.61025571,13.58476 6.10621857,13.72836 L5.18979,13.9894514 L6.17705857,12.9970257 L6.17704429,12.99702 Z M11.4998186,11.0334343 C11.4942186,11.0240914 11.4770471,10.9704486 11.4616586,10.91426 L11.4336871,10.8121 L11.5342043,10.7951 C12.3954786,10.6493829 13.3179014,10.245 14.0444586,9.69462571 C14.1482557,9.61599714 14.2070786,9.58646 14.2147129,9.60913429 C14.24993,9.71374571 14.3901814,10.2192829 14.38533,10.2241314 C14.3635014,10.24596 11.5078643,11.0468829 11.4998071,11.03344 L11.4998186,11.0334343 Z M1.81592714,10.1996943 C1.78271,10.1727514 1.05799286,7.71489143 1.00331,7.44372286 C0.992367143,7.38943143 1.09760429,7.41535143 2.39921571,7.78740286 C3.76114143,8.17670571 3.80759857,8.19218571 3.82654429,8.26301714 C3.84343,8.32619429 3.83240143,8.34579143 3.74602143,8.40596857 C3.69096429,8.44432571 3.25066714,8.87132571 2.76758143,9.35486 C2.28449857,9.83839429 1.88227,10.2340114 1.87374429,10.2340114 C1.86523,10.2340114 1.83919857,10.2185543 1.81592714,10.1996943 L1.81592714,10.1996943 Z M2.34190143,7.38647714 C1.57939286,7.16728 0.953287143,6.98616 0.950555714,6.98398857 C0.941012857,6.97641714 1.75870714,4.13697714 1.77517286,4.12051143 C1.78951571,4.10616857 4.61573,4.89800571 4.64506714,4.92457429 C4.65103857,4.92997429 4.47244429,5.57706 4.24821,6.36254286 C3.87799286,7.65939714 3.83535,7.79043429 3.78439286,7.78785714 C3.75353,7.78642857 3.10440714,7.60567714 2.34190143,7.38647714 L2.34190143,7.38647714 Z M4.24206143,7.73209429 C4.24986143,7.71146571 4.37809571,7.26840286 4.52699571,6.74748286 L4.79772429,5.80035429 L4.83301571,6.00625143 C4.89416429,6.36299429 5.00259571,6.76962857 5.13113857,7.12424286 C5.19946714,7.31273714 5.25150429,7.47034286 5.24677857,7.47448286 C5.24206429,7.47862571 5.03435286,7.53969143 4.78521571,7.61019429 C4.53607857,7.6807 4.30875286,7.74540286 4.28004714,7.75398 C4.24341857,7.76492286 4.23209,7.75840857 4.24206143,7.73209429 L4.24206143,7.73209429 Z M3.19294143,4.11930571 C2.43043571,3.89996 1.79997286,3.71025429 1.79191,3.69773714 C1.76571,3.65706286 0.991552857,0.923451429 1.00299286,0.912011429 C1.01907857,0.895925714 3.76999,1.68537143 3.79624714,1.71360286 C3.82569571,1.74526571 4.61754429,4.52458857 4.59607857,4.52095429 C4.58685,4.51952571 3.95545,4.33865143 3.19294143,4.11930571 Z M4.57080143,3.01922286 C4.41709,2.48026286 4.26802429,1.95798571 4.23954429,1.85860286 L4.18776429,1.67791143 L5.27576429,1.36771429 C5.87416143,1.19710571 6.38229286,1.05058571 6.40494143,1.04211143 C6.42759857,1.03362571 6.35263286,1.13099714 6.23837,1.25846857 C5.63074143,1.93633143 5.23238143,2.66270571 4.98042143,3.55221714 C4.93345571,3.71803143 4.89502714,3.8802 4.89502714,3.91259429 C4.89502714,4.10048857 4.82103571,3.89659429 4.57080143,3.01922286 Z" id="path3940"></path>
+            </g>
+        </g>
+</svg>
\ No newline at end of file
diff --git a/app/assets/images/wikipedia.png b/app/assets/images/wikipedia.png
new file mode 100644 (file)
index 0000000..784c184
Binary files /dev/null and b/app/assets/images/wikipedia.png differ
index 6f63efc2c95ac736b2676badb256ac1a73081c86..dd7147c74e1ad91ffb33d0f9ed0c4c6fd73ad031 100644 (file)
Binary files a/app/assets/images/wordpress.png and b/app/assets/images/wordpress.png differ
index ca5594459101720b3e95d297c40411e9a21ba1b8..15839a2ecbc4af23102a608c0804a4b988d92916 100644 (file)
@@ -1,7 +1,14 @@
 //= require leaflet
 //= require leaflet.osm
+//= require i18n/translations
 
 window.onload = function () {
+  if (navigator.languages) {
+    I18n.locale = navigator.languages[0];
+  } else if (navigator.language) {
+    I18n.locale = navigator.language;
+  }
+
   var query = (window.location.search || '?').substr(1),
       args  = {};
 
@@ -11,18 +18,22 @@ window.onload = function () {
     args[parts[0]] = decodeURIComponent(parts[1] || '');
   }
 
+  var thunderforestOptions = {
+<% if defined?(THUNDERFOREST_KEY) %>
+    apikey: <%= THUNDERFOREST_KEY.to_json %>
+<% end %>
+  };
+
   var map = L.map("map");
   map.attributionControl.setPrefix('');
   map.removeControl(map.attributionControl);
 
-  if (!args.layer || args.layer === "mapnik" || args.layer === "osmarender") {
+  if (!args.layer || args.layer === "mapnik" || args.layer === "osmarender" || args.layer === "mapquest") {
     new L.OSM.Mapnik().addTo(map);
   } else if (args.layer === "cyclemap" || args.layer === "cycle map") {
-    new L.OSM.CycleMap().addTo(map);
+    new L.OSM.CycleMap(thunderforestOptions).addTo(map);
   } else if (args.layer === "transportmap") {
-    new L.OSM.TransportMap().addTo(map);
-  } else if (args.layer === "mapquest") {
-    new L.OSM.MapQuestOpen().addTo(map);
+    new L.OSM.TransportMap(thunderforestOptions).addTo(map);
   } else if (args.layer === "hot") {
     new L.OSM.HOT().addTo(map);
   }
@@ -51,7 +62,7 @@ window.onload = function () {
 L.Control.OSMReportAProblem = L.Control.Attribution.extend({
   options: {
     position: 'bottomright',
-    prefix: '<a href="http://www.openstreetmap.org/fixthemap?lat={x}&lon={y}&zoom={z}">Report a problem</a>'
+    prefix: '<a href="http://www.openstreetmap.org/fixthemap?lat={x}&lon={y}&zoom={z}" target="_blank">'+I18n.t('javascripts.embed.report_problem')+'</a>'
   },
 
   onAdd: function (map) {
index 86d2df7e402683a52d9d01cd63f7ee0bb004c590..185717b32681e887476d8cff8614c588b84a6e76 100644 (file)
@@ -1,3 +1 @@
 //= require iD
-//= require presets
-//= require imagery
index 684685d51d9680d30d5dc93c132230cc81e0f8e0..0962908064ba7c1bae8797f3a8aa7f5306577e75 100644 (file)
@@ -130,14 +130,25 @@ $(document).ready(function () {
   L.OSM.zoom({position: position})
     .addTo(map);
 
-  L.control.locate({
+  var locate = L.control.locate({
     position: position,
+    icon: 'icon geolocate',
+    iconLoading: 'icon geolocate',
     strings: {
       title: I18n.t('javascripts.map.locate.title'),
       popup: I18n.t('javascripts.map.locate.popup')
     }
   }).addTo(map);
 
+  var locateContainer = locate.getContainer();
+
+  $(locateContainer)
+    .removeClass('leaflet-control-locate leaflet-bar')
+    .addClass('control-locate')
+    .children("a")
+    .removeClass('leaflet-bar-part leaflet-bar-part-single')
+    .addClass('control-button');
+
   var sidebar = L.OSM.sidebar('#map-ui')
     .addTo(map);
 
@@ -181,6 +192,10 @@ $(document).ready(function () {
     if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
       map.addLayer(map.dataLayer);
     }
+
+    if (params.layers.indexOf(map.gpsLayer.options.code) >= 0) {
+      map.addLayer(map.gpsLayer);
+    }
   }
 
   var placement = $('html').attr('dir') === 'rtl' ? 'right' : 'left';
@@ -196,17 +211,29 @@ $(document).ready(function () {
       map.getLayersCode(),
       map._object);
 
-    $.removeCookie("_osm_location");
-    $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
+    $.removeCookie('_osm_location');
+    $.cookie('_osm_location', OSM.locationCookie(map), { expires: expiry, path: '/' });
   });
 
   if ($.cookie('_osm_welcome') === 'hide') {
     $('.welcome').hide();
   }
 
-  $('.welcome .close').on('click', function() {
+  $('.welcome .close-wrap').on('click', function() {
     $('.welcome').hide();
-    $.cookie("_osm_welcome", 'hide', { expires: expiry });
+    $.cookie('_osm_welcome', 'hide', { expires: expiry, path: '/' });
+  });
+
+  var bannerExpiry = new Date();
+  bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
+
+  $('#banner .close-wrap').on('click', function(e) {
+    var cookieId = e.target.id;
+    $('#banner').hide();
+    e.preventDefault();
+    if (cookieId) {
+      $.cookie(cookieId, 'hide', { expires: bannerExpiry, path: '/' });
+    }
   });
 
   if (OSM.PIWIK) {
@@ -227,10 +254,8 @@ $(document).ready(function () {
     map.setView([params.lat, params.lon], params.zoom);
   }
 
-  var marker = L.marker([0, 0], {icon: OSM.getUserIcon()});
-
   if (params.marker) {
-    marker.setLatLng([params.mlat, params.mlon]).addTo(map);
+    L.marker([params.mlat, params.mlon]).addTo(map);
   }
 
   $("#homeanchor").on("click", function(e) {
@@ -240,7 +265,7 @@ $(document).ready(function () {
       center = L.latLng(data.lat, data.lon);
 
     map.setView(center, data.zoom);
-    marker.setLatLng(center).addTo(map);
+    L.marker(center, {icon: OSM.getUserIcon()}).addTo(map);
   });
 
   function remoteEditHandler(bbox, object) {
index a8615d3eb11339f3cc7c35a39a9f06d28f00fdb5..2a1e045dae4efc2bf61a5c5c75ce80ac54849f65 100644 (file)
@@ -189,7 +189,7 @@ OSM.Directions = function (map) {
         map.removeLayer(polyline);
 
         if (!dragging) {
-          alert(I18n.t('javascripts.directions.errors.no_route'));
+          $('#sidebar_content').html('<p class="search_results_error">' + I18n.t('javascripts.directions.errors.no_route') + '</p>');
         }
 
         return;
@@ -302,10 +302,14 @@ OSM.Directions = function (map) {
   });
 
   $(".routing_marker").on('dragstart', function (e) {
-    e.originalEvent.dataTransfer.effectAllowed = 'move';
-    e.originalEvent.dataTransfer.setData('type', $(this).data('type'));
-    var img = $("<img>").attr("src", $(e.originalEvent.target).attr("src"));
-    e.originalEvent.dataTransfer.setDragImage(img.get(0), 12, 21);
+    var dt = e.originalEvent.dataTransfer;
+    dt.effectAllowed = 'move';
+    var dragData = { type: $(this).data('type') };
+    dt.setData('text', JSON.stringify(dragData));
+    if (dt.setDragImage) {
+      var img = $("<img>").attr("src", $(e.originalEvent.target).attr("src"));
+      dt.setDragImage(img.get(0), 12, 21);
+    }
   });
 
   var page = {};
@@ -321,7 +325,8 @@ OSM.Directions = function (map) {
     $("#map").on('drop', function (e) {
       e.preventDefault();
       var oe = e.originalEvent;
-      var type = oe.dataTransfer.getData('type');
+      var dragData = JSON.parse(oe.dataTransfer.getData('text'));
+      var type = dragData.type;
       var pt = L.DomEvent.getMousePosition(oe, map.getContainer());  // co-ordinates of the mouse pointer at present
       pt.y += 20;
       var ll = map.containerPointToLatLng(pt);
@@ -336,13 +341,8 @@ OSM.Directions = function (map) {
       setEngine(params.engine);
     }
 
-    if (params.from) {
-      endpoints[0].setValue(params.from);
-      endpoints[1].setValue("");
-    } else {
-      endpoints[0].setValue("");
-      endpoints[1].setValue("");
-    }
+    endpoints[0].setValue(params.from || "");
+    endpoints[1].setValue(params.to || "");
 
     var o = route[0] && L.latLng(route[0].split(',')),
         d = route[1] && L.latLng(route[1].split(','));
index 95cb29ab813c0ac61eb265281caf4a49c777b65b..88a9c15c1215b00ae19ba6a7373eb88dff1efd7c 100644 (file)
@@ -1,15 +1,15 @@
-function GraphHopperEngine(id, vehicleParam) {
+function GraphHopperEngine(id, vehicleType) {
   var GH_INSTR_MAP = {
-    "-3": 6, // sharp left
-    "-2": 7, // left
-    "-1": 8, // slight left
+    "-3": 7, // sharp left
+    "-2": 6, // left
+    "-1": 5, // slight left
     0: 0, // straight
     1: 1, // slight right
     2: 2, // right
     3: 3, // sharp right
-    4: -1, // finish reached
-    5: -1, // via reached
-    6: 11 // roundabout
+    4: 14, // finish reached
+    5: 14, // via reached
+    6: 10 // roundabout
   };
 
   return {
@@ -20,21 +20,19 @@ function GraphHopperEngine(id, vehicleParam) {
     getRoute: function (points, callback) {
       // GraphHopper Directions API documentation
       // https://github.com/graphhopper/directions-api/blob/master/docs-routing.md
-      var url = document.location.protocol + "//graphhopper.com/api/1/route?" +
-          vehicleParam +
-          "&locale=" + I18n.currentLocale() +
-          "&key=LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn" +
-          "&type=jsonp" +
-          "&elevation=false" +
-          "&instructions=true";
-
-      for (var i = 0; i < points.length; i++) {
-        url += "&point=" + points[i].lat + ',' + points[i].lng;
-      }
-
       return $.ajax({
-        url: url,
-        dataType: 'jsonp',
+        url: document.location.protocol + OSM.GRAPHHOPPER_URL,
+        data: {
+          vehicle: vehicleType,
+          locale: I18n.currentLocale(),
+          key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
+          type: "jsonp",
+          elevation: false,
+          instructions: true,
+          point: points.map(function (p) { return p.lat + "," + p.lng; })
+        },
+        traditional: true,
+        dataType: "jsonp",
         success: function (data) {
           if (!data.paths || data.paths.length === 0)
             return callback(true);
@@ -46,7 +44,7 @@ function GraphHopperEngine(id, vehicleParam) {
           var len = path.instructions.length;
           for (var i = 0; i < len; i++) {
             var instr = path.instructions[i];
-            var instrCode = (i === len - 1) ? 15 : GH_INSTR_MAP[instr.sign];
+            var instrCode = (i === len - 1) ? 14 : GH_INSTR_MAP[instr.sign];
             var instrText = "<b>" + (i + 1) + ".</b> ";
             instrText += instr.text;
             var latLng = line[instr.interval[0]];
@@ -60,17 +58,20 @@ function GraphHopperEngine(id, vehicleParam) {
             ]); // TODO does graphhopper map instructions onto line indices?
           }
 
-          callback(null, {
+          callback(false, {
             line: line,
             steps: steps,
             distance: path.distance,
             time: path.time / 1000
           });
+        },
+        error: function () {
+          callback(true);
         }
       });
     }
   };
 }
 
-OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_bicycle", "vehicle=bike"), true);
-OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_foot", "vehicle=foot"), true);
+OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_bicycle", "bike"), true);
+OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_foot", "foot"), true);
index fbbc55a5f660f2c2e89721a4fcaf4b8c85b23725..fcc47f103544ed3e99943eb5df17c573b655a826 100644 (file)
@@ -3,27 +3,27 @@
 // http://open.mapquestapi.com/directions/
 // https://github.com/apmon/openstreetmap-website/blob/21edc353a4558006f0ce23f5ec3930be6a7d4c8b/app/controllers/routing_controller.rb#L153
 
-function MapQuestEngine(id, vehicleParam) {
+function MapQuestEngine(id, routeType) {
   var MQ_SPRITE_MAP = {
-    0: 1, // straight
-    1: 2, // slight right
-    2: 3, // right
-    3: 4, // sharp right
-    4: 5, // reverse
-    5: 6, // sharp left
-    6: 7, // left
-    7: 8, // slight left
-    8: 5, // right U-turn
-    9: 5, // left U-turn
-    10: 2, // right merge
-    11: 8, // left merge
-    12: 2, // right on-ramp
-    13: 8, // left on-ramp
-    14: 2, // right off-ramp
-    15: 8, // left off-ramp
-    16: 2, // right fork
-    17: 8, // left fork
-    18: 1  // straight fork
+    0: 0, // straight
+    1: 1, // slight right
+    2: 2, // right
+    3: 3, // sharp right
+    4: 4, // reverse
+    5: 7, // sharp left
+    6: 6, // left
+    7: 5, // slight left
+    8: 4, // right U-turn
+    9: 4, // left U-turn
+    10: 21, // right merge
+    11: 20, // left merge
+    12: 21, // right on-ramp
+    13: 20, // left on-ramp
+    14: 24, // right off-ramp
+    15: 25, // left off-ramp
+    16: 18, // right fork
+    17: 19, // left fork
+    18: 0  // straight fork
   };
 
   return {
@@ -32,18 +32,23 @@ function MapQuestEngine(id, vehicleParam) {
     draggable: false,
 
     getRoute: function (points, callback) {
-      var url = document.location.protocol + "//open.mapquestapi.com/directions/v2/route?key=Fmjtd%7Cluur290anu%2Crl%3Do5-908a0y";
       var from = points[0];
       var to = points[points.length - 1];
-      url += "&from=" + from.lat + ',' + from.lng;
-      url += "&to=" + to.lat + ',' + to.lng;
-      url += "&" + vehicleParam;
-      //url+="&locale=" + I18n.currentLocale(); //Doesn't actually work. MapQuest requires full locale e.g. "de_DE", but I18n may only provides language, e.g. "de"
-      url += "&manMaps=false";
-      url += "&shapeFormat=raw&generalize=0&unit=k";
 
       return $.ajax({
-        url: url,
+        url: document.location.protocol + OSM.MAPQUEST_DIRECTIONS_URL,
+        data: {
+          key: OSM.MAPQUEST_KEY,
+          from: from.lat + "," + from.lng,
+          to: to.lat + "," + to.lng,
+          routeType: routeType,
+          // locale: I18n.currentLocale(), //Doesn't actually work. MapQuest requires full locale e.g. "de_DE", but I18n may only provides language, e.g. "de"
+          manMaps: false,
+          shapeFormat: "raw",
+          generalize: 0,
+          unit: "k"
+        },
+        dataType: "jsonp",
         success: function (data) {
           if (data.info.statuscode !== 0)
             return callback(true);
@@ -78,18 +83,23 @@ function MapQuestEngine(id, vehicleParam) {
             steps.push([L.latLng(s.startPoint.lat, s.startPoint.lng), d, s.narrative, s.distance * 1000, lineseg]);
           }
 
-          callback(null, {
+          callback(false, {
             line: line,
             steps: steps,
             distance: data.route.distance * 1000,
             time: data.route.time
           });
+        },
+        error: function () {
+          callback(true);
         }
       });
     }
   };
 }
 
-OSM.Directions.addEngine(new MapQuestEngine("mapquest_bicycle", "routeType=bicycle"), true);
-OSM.Directions.addEngine(new MapQuestEngine("mapquest_foot", "routeType=pedestrian"), true);
-OSM.Directions.addEngine(new MapQuestEngine("mapquest_car", "routeType=fastest"), true);
+if (OSM.MAPQUEST_KEY) {
+  OSM.Directions.addEngine(new MapQuestEngine("mapquest_bicycle", "bicycle"), true);
+  OSM.Directions.addEngine(new MapQuestEngine("mapquest_foot", "pedestrian"), true);
+  OSM.Directions.addEngine(new MapQuestEngine("mapquest_car", "fastest"), true);
+}
diff --git a/app/assets/javascripts/index/directions/mapzen.js b/app/assets/javascripts/index/directions/mapzen.js
new file mode 100644 (file)
index 0000000..2639388
--- /dev/null
@@ -0,0 +1,109 @@
+function MapzenEngine(id, costing) {
+  var MZ_INSTR_MAP = [
+    0,  // kNone = 0;
+    8, // kStart = 1;
+    8, // kStartRight = 2;
+    8, // kStartLeft = 3;
+    14,  // kDestination = 4;
+    14,  // kDestinationRight = 5;
+    14,  // kDestinationLeft = 6;
+    0,  // kBecomes = 7;
+    0,  // kContinue = 8;
+    1,  // kSlightRight = 9;
+    2,  // kRight = 10;
+    3,  // kSharpRight = 11;
+    4,  // kUturnRight = 12;
+    4,  // kUturnLeft = 13;
+    7,  // kSharpLeft = 14;
+    6,  // kLeft = 15;
+    5,  // kSlightLeft = 16;
+    0,  // kRampStraight = 17;
+    24, // kRampRight = 18;
+    25, // kRampLeft = 19;
+    24, // kExitRight = 20;
+    25, // kExitLeft = 21;
+    0,  // kStayStraight = 22;
+    1,  // kStayRight = 23;
+    5,  // kStayLeft = 24;
+    20, // kMerge = 25;
+    10, // kRoundaboutEnter = 26;
+    11, // kRoundaboutExit = 27;
+    17, // kFerryEnter = 28;
+    0   // kFerryExit = 29;
+  ];
+
+  return {
+    id: id,
+    creditline: "<a href='https://mapzen.com/projects/valhalla' target='_blank'>Mapzen</a>",
+    draggable: false,
+
+    getRoute: function (points, callback) {
+      return $.ajax({
+        url: document.location.protocol + OSM.MAPZEN_VALHALLA_URL,
+        data: {
+          api_key: OSM.MAPZEN_VALHALLA_KEY,
+          json: JSON.stringify({
+            locations: points.map(function (p) { return { lat: p.lat, lon: p.lng }; }),
+            costing: costing,
+            directions_options: {
+              units: "km",
+              language: I18n.currentLocale()
+            }
+          })
+        },
+        dataType: "json",
+        success: function (data) {
+          var trip = data.trip;
+
+          if (trip.status === 0) {
+            var line = [];
+            var steps = [];
+            var distance = 0;
+            var time = 0;
+
+            trip.legs.forEach(function (leg) {
+              var legLine = L.PolylineUtil.decode(leg.shape, {
+                precision: 6
+              });
+
+              line = line.concat(legLine);
+
+              leg.maneuvers.forEach(function (manoeuvre) {
+                var point = legLine[manoeuvre.begin_shape_index];
+
+                steps.push([
+                  { lat: point[0], lng: point[1] },
+                  MZ_INSTR_MAP[manoeuvre.type],
+                  manoeuvre.instruction,
+                  manoeuvre.length * 1000,
+                  []
+                ]);
+              });
+
+              distance = distance + leg.summary.length;
+              time = time + leg.summary.time;
+            });
+
+            callback(false, {
+              line: line,
+              steps: steps,
+              distance: distance * 1000,
+              time: time
+            });
+          } else {
+            callback(true);
+          }
+        },
+        error: function () {
+          callback(true);
+        }
+      });
+    }
+  };
+}
+
+if (OSM.MAPZEN_VALHALLA_KEY) {
+  OSM.Directions.addEngine(new MapzenEngine("mapzen_car", "auto"), true);
+  OSM.Directions.addEngine(new MapzenEngine("mapzen_bicycle", "bicycle"), true);
+  OSM.Directions.addEngine(new MapzenEngine("mapzen_foot", "pedestrian"), true);
+}
index b53fecb81921131aac57a0d6e908393425682521..69191e65a6b448516044cf5a9c8280a5a2212788 100644 (file)
 // Doesn't yet support hints
 
 function OSRMEngine() {
-  var previousPoints, hintData;
+  var cachedHints = [];
 
   return {
     id: "osrm_car",
     creditline: '<a href="http://project-osrm.org/" target="_blank">OSRM</a>',
     draggable: true,
 
+    _transformSteps: function(input_steps, line) {
+      var INSTRUCTION_TEMPLATE = {
+        'continue': 'javascripts.directions.instructions.continue',
+        'merge right': 'javascripts.directions.instructions.merge_right',
+        'merge left': 'javascripts.directions.instructions.merge_left',
+        'off ramp right': 'javascripts.directions.instructions.offramp_right',
+        'off ramp left': 'javascripts.directions.instructions.offramp_left',
+        'on ramp right': 'javascripts.directions.instructions.onramp_right',
+        'on ramp left': 'javascripts.directions.instructions.onramp_left',
+        'fork right': 'javascripts.directions.instructions.fork_right',
+        'fork left': 'javascripts.directions.instructions.fork_left',
+        'end of road right': 'javascripts.directions.instructions.endofroad_right',
+        'end of road left': 'javascripts.directions.instructions.endofroad_left',
+        'turn straight': 'javascripts.directions.instructions.continue',
+        'turn slight right': 'javascripts.directions.instructions.slight_right',
+        'turn right': 'javascripts.directions.instructions.turn_right',
+        'turn sharp right': 'javascripts.directions.instructions.sharp_right',
+        'turn uturn': 'javascripts.directions.instructions.uturn',
+        'turn sharp left': 'javascripts.directions.instructions.sharp_left',
+        'turn left': 'javascripts.directions.instructions.turn_left',
+        'turn slight left': 'javascripts.directions.instructions.slight_left',
+        'roundabout': 'javascripts.directions.instructions.roundabout',
+        'rotary': 'javascripts.directions.instructions.roundabout',
+        'depart': 'javascripts.directions.instructions.start',
+        'arrive': 'javascripts.directions.instructions.destination',
+      };
+      var ICON_MAP = {
+        'continue': 0,
+        'merge right': 21,
+        'merge left': 20,
+        'off ramp right': 24,
+        'off ramp left': 25,
+        'on ramp right': 2,
+        'on ramp left': 6,
+        'fork right': 18,
+        'fork left': 19,
+        'end of road right': 22,
+        'end of road left': 23,
+        'turn straight': 0,
+        'turn slight right': 1,
+        'turn right': 2,
+        'turn sharp right': 3,
+        'turn uturn': 4,
+        'turn slight left': 5,
+        'turn left': 6,
+        'turn sharp left': 7,
+        'roundabout': 10,
+        'rotary': 10,
+        'depart': 8,
+        'arrive': 14
+      };
+      var transformed_steps = input_steps.map(function(step, idx) {
+        var maneuver_id;
+
+        // special case handling
+        switch (step.maneuver.type) {
+          case 'on ramp':
+          case 'off ramp':
+          case 'merge':
+          case 'end of road':
+          case 'fork':
+            maneuver_id = step.maneuver.type + ' ' + (step.maneuver.modifier.indexOf('left') >= 0 ? 'left' : 'right');
+            break;
+          case 'depart':
+          case 'arrive':
+          case 'roundabout':
+          case 'rotary':
+            maneuver_id = step.maneuver.type;
+            break;
+          case 'roundabout turn':
+          case 'turn':
+            maneuver_id = "turn " + step.maneuver.modifier;
+            break;
+          // for unknown types the fallback is turn
+          default:
+            maneuver_id = "turn " + step.maneuver.modifier;
+            break;
+        }
+        var template = INSTRUCTION_TEMPLATE[maneuver_id];
+
+        // convert lat,lng pairs to LatLng objects
+        var step_geometry = L.PolylineUtil.decode(step.geometry, { precision: 5 }).map(function(a) { return L.latLng(a); }) ;
+        // append step_geometry on line
+        Array.prototype.push.apply(line, step_geometry);
+
+        var instText = "<b>" + (idx + 1) + ".</b> ";
+        var name = step.name ? "<b>" + step.name + "</b>" : I18n.t('javascripts.directions.instructions.unnamed');
+        if (step.maneuver.type.match(/rotary|roundabout/)) {
+          instText += I18n.t(template + '_with_exit', { exit: step.maneuver.exit, name: name } );
+        } else {
+          instText += I18n.t(template + '_without_exit', { name: name });
+        }
+        return [[step.maneuver.location[1], step.maneuver.location[0]], ICON_MAP[maneuver_id], instText, step.distance, step_geometry];
+      });
+
+      return transformed_steps;
+    },
+
     getRoute: function (points, callback) {
-      var TURN_INSTRUCTIONS = [
-        "",
-        'javascripts.directions.instructions.continue',         // 1
-        'javascripts.directions.instructions.slight_right',     // 2
-        'javascripts.directions.instructions.turn_right',       // 3
-        'javascripts.directions.instructions.sharp_right',      // 4
-        'javascripts.directions.instructions.uturn',            // 5
-        'javascripts.directions.instructions.sharp_left',       // 6
-        'javascripts.directions.instructions.turn_left',        // 7
-        'javascripts.directions.instructions.slight_left',      // 8
-        'javascripts.directions.instructions.via_point',        // 9
-        'javascripts.directions.instructions.follow',           // 10
-        'javascripts.directions.instructions.roundabout',       // 11
-        'javascripts.directions.instructions.leave_roundabout', // 12
-        'javascripts.directions.instructions.stay_roundabout',  // 13
-        'javascripts.directions.instructions.start',            // 14
-        'javascripts.directions.instructions.destination',      // 15
-        'javascripts.directions.instructions.against_oneway',   // 16
-        'javascripts.directions.instructions.end_oneway'        // 17
+
+      var params = [
+        { name: "overview", value: "false" },
+        { name: "geometries", value: "polyline" },
+        { name: "steps", value: true }
       ];
 
-      var url = document.location.protocol + "//router.project-osrm.org/viaroute?z=14&output=json&instructions=true";
 
-      for (var i = 0; i < points.length; i++) {
-        url += "&loc=" + points[i].lat + ',' + points[i].lng;
-        if (hintData && previousPoints && previousPoints[i].equals(points[i])) {
-          url += "&hint=" + hintData.locations[i];
-        }
+      if (cachedHints.length === points.length) {
+        params.push({name: "hints", value: cachedHints.join(";")});
+      } else {
+        // invalidate cache
+        cachedHints = [];
       }
 
-      if (hintData && hintData.checksum) {
-        url += "&checksum=" + hintData.checksum;
-      }
+      var encoded_coords = points.map(function(p) {
+        return p.lng + ',' + p.lat;
+      }).join(';');
+
+      var req_url = document.location.protocol + OSM.OSRM_URL + encoded_coords;
+
+      var onResponse = function (data) {
+        if (data.code !== 'Ok')
+          return callback(true);
+
+        cachedHints = data.waypoints.map(function(wp) {
+          return wp.hint;
+        });
+
+        var line = [];
+        var transformLeg = function (leg) {
+          return this._transformSteps(leg.steps, line);
+        };
+
+        var steps = [].concat.apply([], data.routes[0].legs.map(transformLeg.bind(this)));
+
+        callback(false, {
+          line: line,
+          steps: steps,
+          distance: data.routes[0].distance,
+          time: data.routes[0].duration
+        });
+      };
 
       return $.ajax({
-        url: url,
-        dataType: 'json',
-        success: function (data) {
-          if (data.status === 207)
-            return callback(true);
-
-          previousPoints = points;
-          hintData = data.hint_data;
-
-          var line = L.PolylineUtil.decode(data.route_geometry, {
-            precision: 6
-          });
-
-          var steps = [];
-          for (i = 0; i < data.route_instructions.length; i++) {
-            var s = data.route_instructions[i];
-            var linesegend;
-            var instCodes = s[0].split('-');
-            var instText = "<b>" + (i + 1) + ".</b> ";
-            var name = s[1] ? "<b>" + s[1] + "</b>" : I18n.t('javascripts.directions.instructions.unnamed');
-            if (instCodes[0] === "11" && instCodes[1]) {
-              instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]] + '_with_exit', { exit: instCodes[1], name: name } );
-            } else {
-              instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]] + '_without_exit', { name: name });
-            }
-            if ((i + 1) < data.route_instructions.length) {
-              linesegend = data.route_instructions[i + 1][3] + 1;
-            } else {
-              linesegend = s[3] + 1;
-            }
-            steps.push([line[s[3]], s[0].split('-')[0], instText, s[2], line.slice(s[3], linesegend)]);
-          }
-
-          callback(null, {
-            line: line,
-            steps: steps,
-            distance: data.route_summary.total_distance,
-            time: data.route_summary.total_time
-          });
+        url: req_url,
+        data: params,
+        dataType: "json",
+        success: onResponse.bind(this),
+        error: function () {
+          callback(true);
         }
       });
     }
index 55c5cbc934314f31670289d629833cb2313959d6..397daa637f4f7c2397b584a45339cda5a15d6231 100644 (file)
@@ -108,13 +108,7 @@ OSM.NewNote = function(map) {
     var mapSize = map.getSize();
     var markerPosition;
 
-    if (mapSize.y > 800) {
-      markerPosition = [mapSize.x / 2, mapSize.y / 2];
-    } else if (mapSize.y > 400) {
-      markerPosition = [mapSize.x / 2, 400];
-    } else {
-      markerPosition = [mapSize.x / 2, mapSize.y];
-    }
+    markerPosition = [mapSize.x / 2, mapSize.y / 2];
 
     newNote = L.marker(map.containerPointToLatLng(markerPosition), {
       icon: noteIcons["new"],
index d5ffbead13d849704b81d413e7445d818cb25819..fd5cd3ae9288ad8ffed7e79d557a44242a0a9ae4 100644 (file)
@@ -45,6 +45,7 @@ OSM.initializeNotes = function (map) {
     } else {
       marker = L.marker(feature.geometry.coordinates.reverse(), {
         icon: noteIcons[feature.properties.status],
+        title: feature.properties.comments[0].text,
         opacity: 0.8,
         clickable: true
       });
index 333fce5494866c9c9ff4503a61288b658ede9641..023e2a7f22069bba02babd5542246f0e711f0228 100644 (file)
@@ -161,7 +161,7 @@ OSM.Query = function(map) {
     return geometry;
   }
 
-  function runQuery(latlng, radius, query, $section, compare) {
+  function runQuery(latlng, radius, query, $section, merge, compare) {
     var $ul = $section.find("ul");
 
     $ul.empty();
@@ -179,19 +179,34 @@ OSM.Query = function(map) {
       url: url,
       method: "POST",
       data: {
-        data: "[timeout:5][out:json];" + query,
+        data: "[timeout:10][out:json];" + query,
       },
       success: function(results) {
         var elements;
 
         $section.find(".loader").stopTime("loading").hide();
 
-        if (compare) {
-          elements = results.elements.sort(compare);
+        if (merge) {
+          elements = results.elements.reduce(function (hash, element) {
+            var key = element.type + element.id;
+            if ("geometry" in element) {
+              delete element.bounds;
+            }
+            hash[key] = $.extend({}, hash[key], element);
+            return hash;
+          }, {});
+
+          elements = Object.keys(elements).map(function (key) {
+            return elements[key];
+          });
         } else {
           elements = results.elements;
         }
 
+        if (compare) {
+          elements = elements.sort(compare);
+        }
+
         for (var i = 0; i < elements.length; i++) {
           var element = elements[i];
 
@@ -211,6 +226,12 @@ OSM.Query = function(map) {
           }
         }
 
+        if (results.remark) {
+          $("<li>")
+            .text(I18n.t("javascripts.query.error", { server: url, error: results.remark }))
+            .appendTo($ul);
+        }
+
         if ($ul.find("li").length === 0) {
           $("<li>")
             .text(I18n.t("javascripts.query.nothing_found"))
@@ -268,7 +289,7 @@ OSM.Query = function(map) {
       ways = "way(" + around + ")",
       relations = "relation(" + around + ")",
       nearby = "(" + nodes + ";" + ways + ");out tags geom(" + bbox + ");" + relations + ";out geom(" + bbox + ");",
-      isin = "is_in(" + lat + "," + lng + ")->.a;way(pivot.a);out tags geom(" + bbox + ");relation(pivot.a);out tags bb;";
+      isin = "is_in(" + lat + "," + lng + ")->.a;way(pivot.a);out tags bb;out ids geom(" + bbox + ");relation(pivot.a);out tags bb;";
 
     $("#sidebar_content .query-intro")
       .hide();
@@ -287,8 +308,8 @@ OSM.Query = function(map) {
       }
     }, 10);
 
-    runQuery(latlng, radius, nearby, $("#query-nearby"));
-    runQuery(latlng, radius, isin, $("#query-isin"), compareSize);
+    runQuery(latlng, radius, nearby, $("#query-nearby"), false);
+    runQuery(latlng, radius, isin, $("#query-isin"), true, compareSize);
   }
 
   function clickHandler(e) {
index 485920c8e1f901f93c1a04b1e29bdcdac4ba0146..52af38c54f338b1d76290f8195108d48a0cf5de9 100644 (file)
@@ -95,15 +95,18 @@ OSM.Search = function(map) {
     $(this).closest("li").removeClass("selected");
   }
 
-  function clickSearchResult(e) {
-    var data = $(this).data(),
-      center = L.latLng(data.lat, data.lon);
-
+  function panToSearchResult(data) {
     if (data.minLon && data.minLat && data.maxLon && data.maxLat) {
       map.fitBounds([[data.minLat, data.minLon], [data.maxLat, data.maxLon]]);
     } else {
-      map.setView(center, data.zoom);
+      map.setView([data.lat, data.lon], data.zoom);
     }
+  }
+
+  function clickSearchResult(e) {
+    var data = $(this).data();
+
+    panToSearchResult(data);
 
     // Let clicks to object browser links propagate.
     if (data.type && data.id) return;
@@ -119,11 +122,12 @@ OSM.Search = function(map) {
   page.pushstate = page.popstate = function(path) {
     var params = querystring.parse(path.substring(path.indexOf('?') + 1));
     $(".search_form input[name=query]").val(params.query);
+    $(".describe_location").hide();
     OSM.loadSidebarContent(path, page.load);
   };
 
   page.load = function() {
-    $(".search_results_entry").each(function() {
+    $(".search_results_entry").each(function(index) {
       var entry = $(this);
       $.ajax({
         url: entry.data("href"),
@@ -137,6 +141,13 @@ OSM.Search = function(map) {
         },
         success: function(html) {
           entry.html(html);
+          // go to first result of first geocoder
+          if (index === 0) {
+            var firstResult = entry.find('*[data-lat][data-lon]:first').first();
+            if (firstResult.length) {
+              panToSearchResult(firstResult.data());
+            }
+          }
         }
       });
     });
index 68e822e7f3504409d41380abc9b9be2af159325d..5223b1420523fd58770177ea66dca42946483d17 100644 (file)
@@ -60,7 +60,7 @@ L.OSM.key = function (options) {
     }
 
     function updateButton() {
-      var disabled = map.getMapBaseLayerId() !== 'mapnik';
+      var disabled = ['mapnik', 'cyclemap'].indexOf(map.getMapBaseLayerId()) === -1;
       button
         .toggleClass('disabled', disabled)
         .attr('data-original-title',
index d2928068d4d6a1ec1a754e0a081f75b90f4cf356..eedf718d3a262ceb332f99d9dd89a87f264f918e 100644 (file)
@@ -50,7 +50,7 @@ L.OSM.layers = function(options) {
 
       map.whenReady(function() {
         var miniMap = L.map(div[0], {attributionControl: false, zoomControl: false})
-          .addLayer(new layer.constructor());
+          .addLayer(new layer.constructor({ apikey: layer.options.apikey }));
 
         miniMap.dragging.disable();
         miniMap.touchZoom.disable();
@@ -101,6 +101,8 @@ L.OSM.layers = function(options) {
         map.fire('baselayerchange', {layer: layer});
       });
 
+      item.on('dblclick', toggle);
+
       map.on('layeradd layerremove', function() {
         item.toggleClass('active', map.hasLayer(layer));
         input.prop('checked', map.hasLayer(layer));
@@ -174,6 +176,7 @@ L.OSM.layers = function(options) {
 
       addOverlay(map.noteLayer, 'notes', OSM.MAX_NOTE_REQUEST_AREA);
       addOverlay(map.dataLayer, 'data', OSM.MAX_REQUEST_AREA);
+      addOverlay(map.gpsLayer, 'gps', Number.POSITIVE_INFINITY);
     }
 
     options.sidebar.addPane($ui);
index 58360bbec57513bbd738db621ab79bca00008cd2..4b50cc78c4ca0660b3ff5cfe484b95a53e417b94 100644 (file)
@@ -16,44 +16,51 @@ L.OSM.Map = L.Map.extend({
     var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'});
     var donate = I18n.t('javascripts.map.donate_link_text', {donate_url: 'http://donate.openstreetmap.org'});
 
-    this.baseLayers = [
-      new L.OSM.Mapnik({
-        attribution: copyright + " &hearts; " + donate,
-        code: "M",
-        keyid: "mapnik",
-        name: I18n.t("javascripts.map.base.standard")
-      }),
-      new L.OSM.CycleMap({
+    this.baseLayers = [];
+
+    this.baseLayers.push(new L.OSM.Mapnik({
+      attribution: copyright + " &hearts; " + donate,
+      code: "M",
+      keyid: "mapnik",
+      name: I18n.t("javascripts.map.base.standard")
+    }));
+
+    if (OSM.THUNDERFOREST_KEY) {
+      this.baseLayers.push(new L.OSM.CycleMap({
         attribution: copyright + ". Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+        apikey: OSM.THUNDERFOREST_KEY,
         code: "C",
         keyid: "cyclemap",
         name: I18n.t("javascripts.map.base.cycle_map")
-      }),
-      new L.OSM.TransportMap({
+      }));
+
+      this.baseLayers.push(new L.OSM.TransportMap({
         attribution: copyright + ". Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+        apikey: OSM.THUNDERFOREST_KEY,
         code: "T",
         keyid: "transportmap",
         name: I18n.t("javascripts.map.base.transport_map")
-      }),
-      new L.OSM.MapQuestOpen({
-        attribution: copyright + ". Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='https://developer.mapquest.com/content/osm/mq_logo.png'>",
-        code: "Q",
-        keyid: "mapquest",
-        name: I18n.t("javascripts.map.base.mapquest")
-      }),
-      new L.OSM.HOT({
-        attribution: copyright + ". Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>",
-        code: "H",
-        keyid: "hot",
-        name: I18n.t("javascripts.map.base.hot")
-      })
-    ];
+      }));
+    }
+
+    this.baseLayers.push(new L.OSM.HOT({
+      attribution: copyright + ". Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>",
+      code: "H",
+      keyid: "hot",
+      name: I18n.t("javascripts.map.base.hot")
+    }));
 
     this.noteLayer = new L.FeatureGroup();
     this.noteLayer.options = {code: 'N'};
 
     this.dataLayer = new L.OSM.DataLayer(null);
     this.dataLayer.options.code = 'D';
+
+    this.gpsLayer = new L.OSM.GPS({
+      pane: "overlayPane",
+      code: "G",
+      name: I18n.t("javascripts.map.base.gps")
+    });
   },
 
   updateLayers: function(layerParam) {
@@ -204,16 +211,15 @@ L.OSM.Map = L.Map.extend({
       clickable: false
     };
 
-    this._object = object;
-
-    if (this._objectLoader) this._objectLoader.abort();
-    if (this._objectLayer) this.removeLayer(this._objectLayer);
+    this.removeObject();
 
     var map = this;
     this._objectLoader = $.ajax({
       url: OSM.apiUrl(object),
       dataType: "xml",
       success: function (xml) {
+        map._object = object;
+
         map._objectLayer = new L.OSM.DataLayer(null, {
           styles: {
             node: objectStyle,
@@ -276,7 +282,7 @@ L.OSM.Map = L.Map.extend({
   }
 });
 
-L.Icon.Default.imagePath = "/images";
+L.Icon.Default.imagePath = "/images/";
 
 L.Icon.Default.imageUrls = {
   "/images/marker-icon.png": OSM.MARKER_ICON,
index b991210dfad5a063fcc48d76181c0deb5e72a2c6..7cfd50c8e23e09eb7fcc550ca159797e92a797d3 100644 (file)
@@ -145,7 +145,14 @@ L.OSM.share = function (options) {
       .text(I18n.t('javascripts.share.image'))
       .appendTo($imageSection);
 
+    $('<div>')
+      .attr('id', 'export-warning')
+      .attr('class', 'deemphasize')
+      .text(I18n.t('javascripts.share.only_standard_layer'))
+      .appendTo($imageSection);
+
     $form = $('<form>')
+      .attr('id', 'export-image')
       .attr('class', 'standard-form')
       .attr('action', '/export/finish')
       .attr('method', 'post')
@@ -206,6 +213,15 @@ L.OSM.share = function (options) {
       .attr('type', 'hidden')
       .appendTo($form);
 
+    var csrf_param = $("meta[name=csrf-param]").attr("content"),
+        csrf_token = $("meta[name=csrf-token]").attr("content");
+
+    $('<input>')
+      .attr('name', csrf_param)
+      .attr('value', csrf_token)
+      .attr('type', 'hidden')
+      .appendTo($form);
+
     $('<p>')
       .attr('class', 'deemphasize')
       .html(I18n.t('javascripts.share.image_size') + ' <span id="mapnik_image_width"></span> x <span id="mapnik_image_height"></span>')
@@ -364,6 +380,14 @@ L.OSM.share = function (options) {
 
       $("#mapnik_image_width").text(Math.round(size.x / scale / 0.00028));
       $("#mapnik_image_height").text(Math.round(size.y / scale / 0.00028));
+
+      if (map.getMapBaseLayerId() === 'mapnik') {
+        $('#export-image').show();
+        $('#export-warning').hide();
+      } else {
+        $('#export-image').hide();
+        $('#export-warning').show();
+      }
     }
 
     function select() {
diff --git a/app/assets/javascripts/login.js b/app/assets/javascripts/login.js
new file mode 100644 (file)
index 0000000..b7a540f
--- /dev/null
@@ -0,0 +1,25 @@
+$(document).ready(function() {
+  // Preserve location hash in referer
+  if (window.location.hash) {
+    $("#referer").val($("#referer").val() + window.location.hash);
+  }
+
+  // Attach referer to authentication buttons
+  $(".auth_button").each(function () {
+    var params = querystring.parse(this.search.substring(1));
+    params.referer = $("#referer").val();
+    this.search = querystring.stringify(params);
+  });
+
+  // Add click handler to show OpenID field
+  $("#openid_open_url").click(function() {
+    $("#openid_url").val("http://");
+    $("#login_auth_buttons").hide();
+    $("#login_openid_url").show();
+    $("#login_openid_submit").show();
+  });
+
+  // Hide OpenID field for now
+  $("#login_openid_url").hide();
+  $("#login_openid_submit").hide();
+});
index 6afebf8e5dc0db61730a2feaa253a7fe7fcd3e0b..10b7cfdb81cda46676c9d397ded0d558fcf61af6 100644 (file)
@@ -1,26 +1,42 @@
+//= depend_on application.yml
+
 OSM = {
 <% if defined?(PIWIK) %>
-  PIWIK:                 <%= PIWIK.to_json %>,
+  PIWIK:                   <%= PIWIK.to_json %>,
 <% end %>
 
-  MAX_REQUEST_AREA:      <%= MAX_REQUEST_AREA.to_json %>,
-  SERVER_URL:            <%= SERVER_URL.to_json %>,
-  API_VERSION:           <%= API_VERSION.to_json %>,
-  STATUS:                <%= STATUS.to_json %>,
-  MAX_NOTE_REQUEST_AREA: <%= MAX_NOTE_REQUEST_AREA.to_json %>,
-  OVERPASS_URL:          <%= OVERPASS_URL.to_json %>,
-  NOMINATIM_URL:         <%= NOMINATIM_URL.to_json %>,
+  MAX_REQUEST_AREA:        <%= MAX_REQUEST_AREA.to_json %>,
+  SERVER_URL:              <%= SERVER_URL.to_json %>,
+  API_VERSION:             <%= API_VERSION.to_json %>,
+  STATUS:                  <%= STATUS.to_json %>,
+  MAX_NOTE_REQUEST_AREA:   <%= MAX_NOTE_REQUEST_AREA.to_json %>,
+  OVERPASS_URL:            <%= OVERPASS_URL.to_json %>,
+  NOMINATIM_URL:           <%= NOMINATIM_URL.to_json %>,
+  GRAPHHOPPER_URL:         <%= GRAPHHOPPER_URL.to_json %>,
+  MAPQUEST_DIRECTIONS_URL: <%= MAPQUEST_DIRECTIONS_URL.to_json %>,
+  MAPZEN_VALHALLA_URL:     <%= MAPZEN_VALHALLA_URL.to_json %>,
+  OSRM_URL:                <%= OSRM_URL.to_json %>,
+
+<% if defined?(MAPQUEST_KEY) %>
+  MAPQUEST_KEY:            <%= MAPQUEST_KEY.to_json %>,
+<% end %>
+<% if defined?(MAPZEN_VALHALLA_KEY) %>
+  MAPZEN_VALHALLA_KEY:     <%= MAPZEN_VALHALLA_KEY.to_json %>,
+<% end %>
+<% if defined?(THUNDERFOREST_KEY) %>
+  THUNDERFOREST_KEY:       <%= THUNDERFOREST_KEY.to_json %>,
+<% end %>
 
-  MARKER_GREEN:          <%= image_path("marker-green.png").to_json %>,
-  MARKER_RED:            <%= image_path("marker-red.png").to_json %>,
+  MARKER_GREEN:            <%= image_path("marker-green.png").to_json %>,
+  MARKER_RED:              <%= image_path("marker-red.png").to_json %>,
 
-  MARKER_ICON:           <%= image_path("images/marker-icon.png").to_json %>,
-  MARKER_ICON_2X:        <%= image_path("images/marker-icon-2x.png").to_json %>,
-  MARKER_SHADOW:         <%= image_path("images/marker-shadow.png").to_json %>,
+  MARKER_ICON:             <%= image_path("images/marker-icon.png").to_json %>,
+  MARKER_ICON_2X:          <%= image_path("images/marker-icon-2x.png").to_json %>,
+  MARKER_SHADOW:           <%= image_path("images/marker-shadow.png").to_json %>,
 
-  NEW_NOTE_MARKER:       <%= image_path("new_note_marker.png").to_json %>,
-  OPEN_NOTE_MARKER:      <%= image_path("open_note_marker.png").to_json %>,
-  CLOSED_NOTE_MARKER:    <%= image_path("closed_note_marker.png").to_json %>,
+  NEW_NOTE_MARKER:         <%= image_path("new_note_marker.png").to_json %>,
+  OPEN_NOTE_MARKER:        <%= image_path("open_note_marker.png").to_json %>,
+  CLOSED_NOTE_MARKER:      <%= image_path("closed_note_marker.png").to_json %>,
 
   apiUrl: function (object) {
     var url = "/api/" + OSM.API_VERSION + "/" + object.type + "/" + object.id;
@@ -44,7 +60,12 @@ OSM = {
         j = pair.indexOf('='),
         key = pair.slice(0, j),
         val = pair.slice(++j);
-      params[key] = decodeURIComponent(val);
+
+      try {
+        params[key] = decodeURIComponent(val);
+      } catch (e) {
+        // Ignore parse exceptions
+      }
     }
 
     return params;
index e8ad3324d0ccc2b01e5a4e3b388b39f0d47f6603..7e7e7c8032a6cbab6d9018d7d0ee888eb0dd0df2 100644 (file)
@@ -12,14 +12,25 @@ $(document).ready(function () {
     L.OSM.zoom({position: position})
       .addTo(map);
 
-    L.control.locate({
+    var locate = L.control.locate({
       position: position,
+      icon: 'icon geolocate',
+      iconLoading: 'icon geolocate',
       strings: {
         title: I18n.t('javascripts.map.locate.title'),
         popup: I18n.t('javascripts.map.locate.popup')
       }
     }).addTo(map);
 
+    var locateContainer = locate.getContainer();
+
+    $(locateContainer)
+      .removeClass('leaflet-control-locate leaflet-bar')
+      .addClass('control-locate')
+      .children("a")
+      .removeClass('leaflet-bar-part leaflet-bar-part-single')
+      .addClass('control-button');
+
     if (OSM.home) {
       map.setView([OSM.home.lat, OSM.home.lon], 12);
     } else {
index f2241b4cf12e5a894c464f71b83369b0136c510e..f497a22d86db7eb994ada531fbc07dc26110ed18 100644 (file)
@@ -98,6 +98,7 @@
   .shop.books::before { content: image-url('browse/shop_books.16.png'); }
   .shop.butcher::before { content: image-url('browse/shop_butcher.p.16.png'); }
   .shop.clothes::before { content: image-url('browse/shop_clothes.16.png'); }
+  .shop.car_parts::before { content: image-url('browse/shop_car_parts.16.png'); }
   .shop.car_repair::before { content: image-url('browse/shop_car_repair.16.png'); }
   .shop.convenience::before { content: image-url('browse/shop_convenience.p.16.png'); }
   .shop.diy::before { content: image-url('browse/shop_doityourself.16.png'); }
index 6706aa6ed9321b5e5c6ce5b14003a046ba91d3f3..bb0e6f0d44d728b64d5d67cc4d9414d55e3d90aa 100644 (file)
@@ -151,13 +151,14 @@ small, aside {
 /* Rules for icons */
 
 .icon {
-  display:inline-block;
-  vertical-align:top;
-  width:20px;
-  height:20px;
-  background:transparent image-url("sprite.png") no-repeat 0 0;
-  text-indent:-9999px;
-  overflow:hidden;
+  display: inline-block;
+  vertical-align: top;
+  width: 20px;
+  height: 20px;
+  background: transparent image-url("sprite.png") no-repeat 0 0;
+  background-image: image-url("sprite.svg");
+  text-indent: -9999px;
+  overflow: hidden;
 }
 
 .icon.search      { background-position: 0 0; }
@@ -172,9 +173,11 @@ small, aside {
 .icon.clipboard   { background-position: -160px 0; }
 .icon.link        { background-position: -180px 0; }
 .icon.close       { background-position: -200px 0; }
+.close-wrap:hover .icon.close,
 .icon.close:hover { background-position: -200px -20px; }
 .icon.check       { background-position: -220px 0; }
 .icon.note        { background-position: -240px 0; }
+.icon.note.grey   { background-position: -240px -20px; }
 .icon.query       { background-position: -260px 0; }
 
 /* Rules for links */
@@ -488,7 +491,8 @@ body.compact {
     background-color: black;
   }
 
-  &.disabled {
+  &.disabled,
+  &.leaflet-disabled {
     background-color: #333;
     background-color: rgba(0,0,0,.5);
     cursor: default;
@@ -544,6 +548,13 @@ body.compact {
     background: #fff;
     font-size: 12px;
 
+    > div {
+      position: relative;
+      float: left;
+      clear: both;
+      width: 100%;
+    }
+
     h2 {
       padding: $lineheight $lineheight $lineheight/2;
     }
@@ -554,6 +565,22 @@ body.compact {
       font-size: 13px;
     }
 
+    .close-wrap {
+      cursor: pointer;
+      position: absolute;
+      top: 0;
+      right: 0;
+      width: 60px;
+      height: 60px;
+
+      .icon.close {
+        pointer-events: none;
+        position: absolute;
+        right: 20px;
+        top: 20px;
+      }
+    }
+
     .icon.close {
       float: right;
       cursor: pointer;
@@ -566,25 +593,26 @@ body.compact {
     }
   }
 
-  .welcome {
-    display: none;
-  }
-
   .overlay-sidebar #sidebar {
     position: absolute;
     z-index: 1000;
     height: auto;
-    border-bottom-right-radius: 5px;
     overflow: hidden;
+
+    #banner,
     .welcome {
       display: block;
     }
+
     #sidebar_content {
       display: none;
     }
   }
 
   .welcome {
+    display: none;
+    padding-bottom: 5px;
+
     p {
       padding: $lineheight/2 $lineheight $lineheight;
       font-size: 110%;
@@ -605,6 +633,15 @@ body.compact {
     }
   }
 
+  #banner {
+    display: none;
+
+    img {
+      display: block;
+      width: $sidebarWidth;
+    }
+  }
+
   #map {
     height: 100%;
     overflow: hidden;
@@ -689,7 +726,7 @@ body.compact {
         font-size: 16px;
         text-stroke: 2px #fff;
         background: rgba(255,255,255,.9);
-        z-index: 2; // For IE9
+        z-index: 1000;
         input[type="radio"] {
           display: none;
         }
@@ -834,10 +871,15 @@ body.compact {
 
 #sidebar {
   #sidebar_loader,
+  .search_more {
+    width: 100%;
+    margin: $lineheight auto;
+  }
+
   .loader,
   .load_more {
     text-align: center;
-    margin: $lineheight auto;
+    margin: auto;
     width: 40px;
     display: block;
   }
@@ -1001,8 +1043,8 @@ div.direction {
   height: 20px;
   background-repeat: no-repeat;
 }
-@for $i from 1 through 17 {
-div.direction.i#{$i} { background-position: #{($i)*-20+20}px 0px; }
+@for $i from 0 through 25 {
+div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
 }
 
 p#routing_summary {
@@ -1059,6 +1101,15 @@ tr.turn:hover {
       color: #000;
     }
   }
+
+  .comments {
+    float: right;
+    color: #999;
+  }
+
+  .comments-0 {
+    opacity: 0.5;
+  }
 }
 
 /* Rules for the browse sidebar */
@@ -1131,6 +1182,7 @@ tr.turn:hover {
       width: 50%;
       padding: 6px 10px;
       word-wrap: break-word;
+      white-space: pre-wrap;
     }
 
     .browse-tag-k {
@@ -1324,6 +1376,11 @@ tr.turn:hover {
 .user-terms {
   .content-body .content-inner {
     padding: 0;
+
+    .message {
+      margin-top: 80px;
+      padding: 20px;
+    }
   }
 }
 
@@ -1577,10 +1634,6 @@ tr.turn:hover {
     float: left;
     display: block;
   }
-
-  ul.secondary-actions {
-    display: inline-block;
-  }
 }
 
 .content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div
@@ -1629,6 +1682,13 @@ tr.turn:hover {
   float: left;
 }
 
+
+.diary-subscribe-buttons {
+  position:relative;
+  top: -30px;
+  left: 130px;
+}
+
 /* Rules for the log in page */
 
 #login_auth_buttons {
@@ -1813,6 +1873,19 @@ tr.turn:hover {
     display: inline-block;
     margin-left: $lineheight / 2;
     vertical-align: middle;
+
+    p {
+      margin-top: $lineheight * 0.5;
+      margin-bottom: $lineheight * 0.5;
+
+      &:first-child {
+        margin-top: 0px;
+      }
+
+      &:last-child {
+        margin-bottom: 0px;
+      }
+    }
   }
 }
 
index eb363459c22854b1ec15be3ba9a1400c3d5f46ab..1cae5ba2f557df0ee0236ab58063e4cd7c51cd4f 100644 (file)
@@ -15,5 +15,5 @@ $headerHeight: 55px;
 $sidebarWidth: 350px;
 $keyline: 1px solid $lightgrey;
 $border-radius: 3px;
-$list-highlight: #FFFFE6;
+$list-highlight: #FFFFC0;
 $border: 1px solid $grey;
index c05c73c9d8b92825ae50fb6d59d7d5babdc8bbf3..984364736b35290d8cb38a272f1016711d6bdf22 100644 (file)
@@ -126,13 +126,13 @@ body.small {
     }
   }
 
-  #sidebar .welcome {
+  #sidebar .welcome,
+  #sidebar #banner {
     display: none !important;
   }
 
   .leaflet-top.leaflet-right {
     top: 10px !important;
-    z-index: 0;
   }
 
   .content_map {
index fb50b6aad39e0401ee64e469aa874019e9d1e221..47a28fd4041fd46a6a0c3eca84be7dff37cfe54d 100644 (file)
@@ -86,19 +86,19 @@ class AmfController < ApplicationController
           orn = renumberednodes.dup
           result = putway(renumberednodes, *args)
           result[4] = renumberednodes.reject { |k, _v| orn.key?(k) }
-          renumberedways[result[2]] = result[3] if result[0] == 0 && result[2] != result[3]
+          renumberedways[result[2]] = result[3] if result[0].zero? && result[2] != result[3]
         when "putrelation" then
           result = putrelation(renumberednodes, renumberedways, *args)
         when "deleteway" then
           result = deleteway(*args)
         when "putpoi" then
           result = putpoi(*args)
-          renumberednodes[result[2]] = result[3] if result[0] == 0 && result[2] != result[3]
+          renumberednodes[result[2]] = result[3] if result[0].zero? && result[2] != result[3]
         when "startchangeset" then
           result = startchangeset(*args)
         end
 
-        err = true if result[0] == -3  # If a conflict is detected, don't execute any more writes
+        err = true if result[0] == -3 # If a conflict is detected, don't execute any more writes
       end
 
       result
@@ -151,7 +151,7 @@ class AmfController < ApplicationController
         cs = Changeset.find(closeid.to_i)
         cs.set_closed_time_now
         if cs.user_id != user.id
-          fail OSM::APIUserChangesetMismatchError.new
+          raise OSM::APIUserChangesetMismatchError.new
         elsif closecomment.empty?
           cs.save!
         else
@@ -163,7 +163,7 @@ class AmfController < ApplicationController
       end
 
       # open a new changeset
-      if opennew != 0
+      if opennew.nonzero?
         cs = Changeset.new
         cs.tags = cstags
         cs.user_id = user.id
@@ -189,12 +189,14 @@ class AmfController < ApplicationController
   def getpresets(usertoken, lang) #:doc:
     user = getuser(usertoken)
 
-    if user && !user.languages.empty?
-      http_accept_language.user_preferred_languages = user.languages
-    end
+    langs = if user && !user.languages.empty?
+              Locale.list(user.languages)
+            else
+              Locale.list(http_accept_language.user_preferred_languages)
+            end
 
-    lang = http_accept_language.compatible_language_from(getlocales)
-    (real_lang, localised) = getlocalized(lang)
+    lang = getlocales.preferred(langs)
+    (real_lang, localised) = getlocalized(lang.to_s)
 
     # Tell Potlatch what language it's using
     localised["__potlatch_locale"] = real_lang
@@ -218,14 +220,14 @@ class AmfController < ApplicationController
     loaded_lang = "en"
 
     # Load English defaults
-    en = YAML.load(File.open("#{Rails.root}/config/potlatch/locales/en.yml"))["en"]
+    en = YAML.safe_load(File.open(Rails.root.join("config", "potlatch", "locales", "en.yml")))["en"]
 
     if lang == "en"
       return [loaded_lang, en]
     else
       # Use English as a fallback
       begin
-        other = YAML.load(File.open("#{Rails.root}/config/potlatch/locales/#{lang}.yml"))[lang]
+        other = YAML.safe_load(File.open(Rails.root.join("config", "potlatch", "locales", "#{lang}.yml")))[lang]
         loaded_lang = lang
       rescue
         other = en
@@ -469,11 +471,11 @@ class AmfController < ApplicationController
       return -1, t("application.setup_user_auth.blocked") if user.blocks.active.exists?
 
       query = Trace.visible_to(user)
-      if searchterm.to_i > 0
-        query = query.where(:id => searchterm.to_i)
-      else
-        query = query.where("MATCH(name) AGAINST (?)", searchterm).limit(21)
-      end
+      query = if searchterm.to_i > 0
+                query.where(:id => searchterm.to_i)
+              else
+                query.where("MATCH(name) AGAINST (?)", searchterm).limit(21)
+              end
       gpxs = query.collect do |gpx|
         [gpx.id, gpx.name, gpx.description]
       end
@@ -527,7 +529,7 @@ class AmfController < ApplicationController
   # 3. version.
 
   def putrelation(renumberednodes, renumberedways, usertoken, changeset_id, version, relid, tags, members, visible) #:doc:
-    amf_handle_error("'putrelation' #{relid}", "relation", relid)  do
+    amf_handle_error("'putrelation' #{relid}", "relation", relid) do
       user = getuser(usertoken)
 
       return -1, "You are not logged in, so the relation could not be saved." unless user
@@ -538,7 +540,7 @@ class AmfController < ApplicationController
       tags = strip_non_xml_chars tags
 
       relid = relid.to_i
-      visible = (visible.to_i != 0)
+      visible = visible.to_i.nonzero?
 
       new_relation = nil
       relation = nil
@@ -642,10 +644,10 @@ class AmfController < ApplicationController
           id = a[2].to_i
           version = a[3].to_i
 
-          return -2, "Server error - node with id 0 found in way #{originalway}." if id == 0
+          return -2, "Server error - node with id 0 found in way #{originalway}." if id.zero?
           return -2, "Server error - node with latitude -90 found in way #{originalway}." if lat == 90
 
-          id = renumberednodes[id]  if renumberednodes[id]
+          id = renumberednodes[id] if renumberednodes[id]
 
           node = Node.new
           node.changeset_id = changeset_id
@@ -675,7 +677,7 @@ class AmfController < ApplicationController
 
         # -- Save revised way
 
-        pointlist.collect! do|a|
+        pointlist.collect! do |a|
           renumberednodes[a] ? renumberednodes[a] : a
         end # renumber nodes
         new_way = Way.new
@@ -866,15 +868,14 @@ class AmfController < ApplicationController
 
   def getuser(token) #:doc:
     if token =~ /^(.+)\:(.+)$/
-      user = User.authenticate(:username => $1, :password => $2)
+      User.authenticate(:username => Regexp.last_match(1), :password => Regexp.last_match(2))
     else
-      user = User.authenticate(:token => token)
+      User.authenticate(:token => token)
     end
-    user
   end
 
   def getlocales
-    Dir.glob("#{Rails.root}/config/potlatch/locales/*").collect { |f| File.basename(f, ".yml") }
+    @locales ||= Locale.list(Dir.glob(Rails.root.join("config", "potlatch", "locales", "*")).collect { |f| File.basename(f, ".yml") })
   end
 
   ##
@@ -913,7 +914,7 @@ class AmfController < ApplicationController
     INNER JOIN current_ways  ON current_ways.id =current_way_nodes.id
        WHERE current_nodes.visible=TRUE
        AND current_ways.visible=TRUE
-       AND #{OSM.sql_for_area(bbox, "current_nodes.")}
+       AND #{OSM.sql_for_area(bbox, 'current_nodes.')}
     EOF
     ActiveRecord::Base.connection.select_all(sql).collect { |a| [a["wayid"].to_i, a["version"].to_i] }
   end
@@ -926,7 +927,7 @@ class AmfController < ApplicationController
        LEFT OUTER JOIN current_way_nodes cwn ON cwn.node_id=current_nodes.id
        WHERE current_nodes.visible=TRUE
        AND cwn.id IS NULL
-       AND #{OSM.sql_for_area(bbox, "current_nodes.")}
+       AND #{OSM.sql_for_area(bbox, 'current_nodes.')}
     EOF
     ActiveRecord::Base.connection.select_all(sql).each do |row|
       poitags = {}
@@ -946,7 +947,7 @@ class AmfController < ApplicationController
       FROM current_relations cr
       INNER JOIN current_relation_members crm ON crm.id=cr.id
       INNER JOIN current_nodes cn ON crm.member_id=cn.id AND crm.member_type='Node'
-       WHERE #{OSM.sql_for_area(bbox, "cn.")}
+       WHERE #{OSM.sql_for_area(bbox, 'cn.')}
       EOF
     unless way_ids.empty?
       sql += <<-EOF
index 379bb7e8650c3577588e4954d8a731c721425b99..eb59a8a8df0bda5da97d218ceee62bd99ed4393d 100644 (file)
@@ -136,12 +136,14 @@ class ApiController < ApplicationController
     doc = OSM::API.new.get_xml_doc
 
     # add bounds
-    doc.root << bbox.add_bounds_to(XML::Node.new "bounds")
+    doc.root << bbox.add_bounds_to(XML::Node.new("bounds"))
 
     # get ways
     # find which ways are needed
     ways = []
-    if node_ids.length > 0
+    if node_ids.empty?
+      list_of_way_nodes = []
+    else
       way_nodes = WayNode.where(:node_id => node_ids)
       way_ids = way_nodes.collect { |way_node| way_node.id[0] }
       ways = Way.preload(:way_nodes, :way_tags).find(way_ids)
@@ -150,15 +152,12 @@ class ApiController < ApplicationController
         way.way_nodes.collect(&:node_id)
       end
       list_of_way_nodes.flatten!
-
-    else
-      list_of_way_nodes = []
     end
 
     # - [0] in case some thing links to node 0 which doesn't exist. Shouldn't actually ever happen but it does. FIXME: file a ticket for this
     nodes_to_fetch = (list_of_way_nodes.uniq - node_ids) - [0]
 
-    if nodes_to_fetch.length > 0
+    unless nodes_to_fetch.empty?
       nodes += Node.includes(:node_tags).find(nodes_to_fetch)
     end
 
@@ -258,8 +257,8 @@ class ApiController < ApplicationController
 
     api = XML::Node.new "api"
     version = XML::Node.new "version"
-    version["minimum"] = "#{API_VERSION}"
-    version["maximum"] = "#{API_VERSION}"
+    version["minimum"] = API_VERSION.to_s
+    version["maximum"] = API_VERSION.to_s
     api << version
     area = XML::Node.new "area"
     area["maximum"] = MAX_REQUEST_AREA.to_s
@@ -301,10 +300,9 @@ class ApiController < ApplicationController
   # * if authenticated via basic auth all permissions are granted, so the list will contain all permissions.
   # * unauthenticated users have no permissions, so the list will be empty.
   def permissions
-    @permissions = case
-                   when current_token.present?
+    @permissions = if current_token.present?
                      ClientApplication.all_permissions.select { |p| current_token.read_attribute(p) }
-                   when @user
+                   elsif @user
                      ClientApplication.all_permissions
                    else
                      []
index 618f08a1fc84e3fb6281d15b4dca21f6addfc5e1..354fcc7c0cba1b61e3a3d04f73e0e9ddcf0f3fbf 100644 (file)
@@ -62,7 +62,7 @@ class ApplicationController < ActionController::Base
     unless current_token.nil?
       unless current_token.read_attribute(cap)
         report_error "OAuth token doesn't have that capability.", :forbidden
-        return false
+        false
       end
     end
   end
@@ -74,7 +74,7 @@ class ApplicationController < ActionController::Base
       if params[:cookie_test].nil?
         session[:cookie_test] = true
         redirect_to Hash[params].merge(:cookie_test => "true")
-        return false
+        false
       else
         flash.now[:warning] = t "application.require_cookies.cookies_needed"
       end
@@ -140,13 +140,13 @@ class ApplicationController < ActionController::Base
     unless Authenticator.new(self, [:token]).allow?
       username, passwd = get_auth_data # parse from headers
       # authenticate per-scheme
-      if username.nil?
-        @user = nil # no authentication provided - perhaps first connect (client should retry after 401)
-      elsif username == "token"
-        @user = User.authenticate(:token => passwd) # preferred - random token for user from db, passed in basic auth
-      else
-        @user = User.authenticate(:username => username, :password => passwd) # basic auth
-      end
+      @user = if username.nil?
+                nil # no authentication provided - perhaps first connect (client should retry after 401)
+              elsif username == "token"
+                User.authenticate(:token => passwd) # preferred - random token for user from db, passed in basic auth
+              else
+                User.authenticate(:username => username, :password => passwd) # basic auth
+              end
     end
 
     # have we identified the user?
@@ -192,7 +192,7 @@ class ApplicationController < ActionController::Base
     # check user is a moderator
     unless @user.moderator?
       render :text => errormessage, :status => :forbidden
-      return false
+      false
     end
   end
 
@@ -220,14 +220,14 @@ class ApplicationController < ActionController::Base
   def check_api_readable
     if api_status == :offline
       report_error "Database offline for maintenance", :service_unavailable
-      return false
+      false
     end
   end
 
   def check_api_writable
     unless api_status == :online
       report_error "Database offline for maintenance", :service_unavailable
-      return false
+      false
     end
   end
 
@@ -262,7 +262,7 @@ class ApplicationController < ActionController::Base
   def require_public_data
     unless @user.data_public?
       report_error "You must make your edits public to upload new data", :forbidden
-      return false
+      false
     end
   end
 
@@ -276,7 +276,7 @@ class ApplicationController < ActionController::Base
     response.headers["Error"] = message
 
     if request.headers["X-Error-Format"] &&
-       request.headers["X-Error-Format"].downcase == "xml"
+       request.headers["X-Error-Format"].casecmp("xml").zero?
       result = OSM::API.new.get_xml_doc
       result.root.name = "osmError"
       result.root << (XML::Node.new("status") << "#{Rack::Utils.status_code(status)} #{Rack::Utils::HTTP_STATUS_CODES[status]}")
@@ -288,47 +288,30 @@ class ApplicationController < ActionController::Base
     end
   end
 
-  def set_locale
-    response.header["Vary"] = "Accept-Language"
-
-    if @user && !@user.languages.empty?
-      http_accept_language.user_preferred_languages = @user.languages
-      response.header["Vary"] = "*"
-    end
+  def preferred_languages
+    @languages ||= if params[:locale]
+                     Locale.list(params[:locale])
+                   elsif @user
+                     @user.preferred_languages
+                   else
+                     Locale.list(http_accept_language.user_preferred_languages)
+                   end
+  end
 
-    I18n.locale = select_locale
+  helper_method :preferred_languages
 
+  def set_locale
     if @user && @user.languages.empty? && !http_accept_language.user_preferred_languages.empty?
       @user.languages = http_accept_language.user_preferred_languages
       @user.save
     end
 
-    response.headers["Content-Language"] = I18n.locale.to_s
-  end
-
-  def select_locale(locales = I18n.available_locales)
-    if params[:locale]
-      http_accept_language.user_preferred_languages = [params[:locale]]
-    end
-
-    if http_accept_language.compatible_language_from(locales).nil?
-      http_accept_language.user_preferred_languages = http_accept_language.user_preferred_languages.collect do |pl|
-        pls = [pl]
-
-        while pl.match(/^(.*)-[^-]+$/)
-          pls.push($1) if locales.include?($1) || locales.include?($1.to_sym)
-          pl = $1
-        end
-
-        pls
-      end.flatten
-    end
+    I18n.locale = Locale.available.preferred(preferred_languages)
 
-    http_accept_language.compatible_language_from(locales) || I18n.default_locale
+    response.headers["Vary"] = "Accept-Language"
+    response.headers["Content-Language"] = I18n.locale.to_s
   end
 
-  helper_method :select_locale
-
   def api_call_handle_error
     yield
   rescue ActiveRecord::RecordNotFound => ex
@@ -354,13 +337,13 @@ class ApplicationController < ActionController::Base
   # or raises a suitable error. +method+ should be a symbol, e.g: :put or :get.
   def assert_method(method)
     ok = request.send((method.to_s.downcase + "?").to_sym)
-    fail OSM::APIBadMethodError.new(method) unless ok
+    raise OSM::APIBadMethodError.new(method) unless ok
   end
 
   ##
   # wrap an api call in a timeout
   def api_call_timeout
-    OSM::Timer.timeout(API_TIMEOUT) do
+    OSM::Timer.timeout(API_TIMEOUT, Timeout::Error) do
       yield
     end
   rescue Timeout::Error
@@ -370,17 +353,13 @@ class ApplicationController < ActionController::Base
   ##
   # wrap a web page in a timeout
   def web_timeout
-    OSM::Timer.timeout(WEB_TIMEOUT) do
+    OSM::Timer.timeout(WEB_TIMEOUT, Timeout::Error) do
       yield
     end
   rescue ActionView::Template::Error => ex
     ex = ex.original_exception
 
     if ex.is_a?(ActiveRecord::StatementInvalid) && ex.message =~ /execution expired/
-      ex = Timeout::Error.new
-    end
-
-    if ex.is_a?(Timeout::Error)
       render :action => "timeout"
     else
       raise
@@ -392,7 +371,7 @@ class ApplicationController < ActionController::Base
   ##
   # ensure that there is a "this_user" instance variable
   def lookup_this_user
-    unless @this_user = User.active.find_by_display_name(params[:display_name])
+    unless @this_user = User.active.find_by(:display_name => params[:display_name])
       render_unknown_user params[:display_name]
     end
   end
@@ -435,24 +414,30 @@ class ApplicationController < ActionController::Base
                DEFAULT_EDITOR
              end
 
-    if request.env["HTTP_USER_AGENT"] =~ /MSIE|Trident/ && editor == "id"
-      editor = "potlatch2"
-    end
-
     editor
   end
 
   helper_method :preferred_editor
 
+  def update_totp
+    if defined?(TOTP_KEY)
+      cookies["_osm_totp_token"] = {
+        :value => ROTP::TOTP.new(TOTP_KEY, :interval => 3600).now,
+        :domain => "openstreetmap.org",
+        :expires => 1.hour.from_now
+      }
+    end
+  end
+
   private
 
   # extract authorisation credentials from headers, returns user = nil if none
   def get_auth_data
-    if request.env.key? "X-HTTP_AUTHORIZATION"          # where mod_rewrite might have put it
+    if request.env.key? "X-HTTP_AUTHORIZATION" # where mod_rewrite might have put it
       authdata = request.env["X-HTTP_AUTHORIZATION"].to_s.split
-    elsif request.env.key? "REDIRECT_X_HTTP_AUTHORIZATION"          # mod_fcgi
+    elsif request.env.key? "REDIRECT_X_HTTP_AUTHORIZATION" # mod_fcgi
       authdata = request.env["REDIRECT_X_HTTP_AUTHORIZATION"].to_s.split
-    elsif request.env.key? "HTTP_AUTHORIZATION"         # regular location
+    elsif request.env.key? "HTTP_AUTHORIZATION" # regular location
       authdata = request.env["HTTP_AUTHORIZATION"].to_s.split
     end
     # only basic authentication supported
@@ -473,6 +458,5 @@ class ApplicationController < ActionController::Base
   end
 
   # override to stop oauth plugin sending errors
-  def invalid_oauth_response
-  end
+  def invalid_oauth_response; end
 end
index c7f8b0e819849e66b4df3b554a6eee37d7a093a8..7d2f80eb90a4c6dde5f35876dfac24bc6235a890 100644 (file)
@@ -58,11 +58,11 @@ class BrowseController < ApplicationController
   def changeset
     @type = "changeset"
     @changeset = Changeset.find(params[:id])
-    if @user && @user.moderator?
-      @comments = @changeset.comments.unscope(:where => :visible).includes(:author)
-    else
-      @comments = @changeset.comments.includes(:author)
-    end
+    @comments = if @user && @user.moderator?
+                  @changeset.comments.unscope(:where => :visible).includes(:author)
+                else
+                  @changeset.comments.includes(:author)
+                end
     @node_pages, @nodes = paginate(:old_nodes, :conditions => { :changeset_id => @changeset.id }, :per_page => 20, :parameter => "node_page")
     @way_pages, @ways = paginate(:old_ways, :conditions => { :changeset_id => @changeset.id }, :per_page => 20, :parameter => "way_page")
     @relation_pages, @relations = paginate(:old_relations, :conditions => { :changeset_id => @changeset.id }, :per_page => 20, :parameter => "relation_page")
@@ -76,7 +76,14 @@ class BrowseController < ApplicationController
 
   def note
     @type = "note"
-    @note = Note.find(params[:id])
+
+    if @user && @user.moderator?
+      @note = Note.find(params[:id])
+      @note_comments = @note.comments.unscope(:where => :visible)
+    else
+      @note = Note.visible.find(params[:id])
+      @note_comments = @note.comments
+    end
   rescue ActiveRecord::RecordNotFound
     render :action => "not_found", :status => :not_found
   end
index 8a72d941d03752f3c826c4abd4f52ba2c233ae90..da066a73afa4bc703f293067ad536ea7c63536e7 100644 (file)
@@ -15,6 +15,7 @@ class ChangesetController < ApplicationController
   before_action :check_api_readable, :except => [:create, :update, :delete, :upload, :download, :query, :list, :feed, :comment, :subscribe, :unsubscribe, :comments_feed]
   before_action(:only => [:list, :feed, :comments_feed]) { |c| c.check_database_readable(true) }
   around_action :api_call_handle_error, :except => [:list, :feed, :comments_feed]
+  around_action :api_call_timeout, :except => [:list, :feed, :comments_feed, :upload]
   around_action :web_timeout, :only => [:list, :feed, :comments_feed]
 
   # Helper methods for checking consistency
@@ -82,7 +83,7 @@ class ChangesetController < ApplicationController
 
     # the request is in pseudo-osm format... this is kind-of an
     # abuse, maybe should change to some other format?
-    doc = XML::Parser.string(request.raw_post).parse
+    doc = XML::Parser.string(request.raw_post, :options => XML::Parser::Options::NOERROR).parse
     doc.find("//osm/node").each do |n|
       lon << n["lon"].to_f * GeoRecord::SCALE
       lat << n["lat"].to_f * GeoRecord::SCALE
@@ -161,7 +162,7 @@ class ChangesetController < ApplicationController
     # global (SVN-style) versioning were used - then that would be
     # unambiguous.
     elements.sort! do |a, b|
-      if (a.timestamp == b.timestamp)
+      if a.timestamp == b.timestamp
         a.version <=> b.version
       else
         a.timestamp <=> b.timestamp
@@ -181,20 +182,18 @@ class ChangesetController < ApplicationController
     # check these assertions.
     elements.each do |elt|
       result.root <<
-        if (elt.version == 1)
+        if elt.version == 1
           # first version, so it must be newly-created.
           created = XML::Node.new "create"
           created << elt.to_xml_node(changeset_cache, user_display_name_cache)
+        elsif elt.visible
+          # must be a modify
+          modified = XML::Node.new "modify"
+          modified << elt.to_xml_node(changeset_cache, user_display_name_cache)
         else
-          if elt.visible
-            # must be a modify
-            modified = XML::Node.new "modify"
-            modified << elt.to_xml_node(changeset_cache, user_display_name_cache)
-          else
-            # if the element isn't visible then it must have been deleted
-            deleted = XML::Node.new "delete"
-            deleted << elt.to_xml_node(changeset_cache, user_display_name_cache)
-          end
+          # if the element isn't visible then it must have been deleted
+          deleted = XML::Node.new "delete"
+          deleted << elt.to_xml_node(changeset_cache, user_display_name_cache)
         end
     end
 
@@ -257,7 +256,7 @@ class ChangesetController < ApplicationController
     end
 
     if params[:display_name]
-      user = User.find_by_display_name(params[:display_name])
+      user = User.find_by(:display_name => params[:display_name])
       if !user || !user.active?
         render_unknown_user params[:display_name]
         return
@@ -276,11 +275,11 @@ class ChangesetController < ApplicationController
       changesets = conditions_nonempty(Changeset.all)
 
       if params[:display_name]
-        if user.data_public? || user == @user
-          changesets = changesets.where(:user_id => user.id)
-        else
-          changesets = changesets.where("false")
-        end
+        changesets = if user.data_public? || user == @user
+                       changesets.where(:user_id => user.id)
+                     else
+                       changesets.where("false")
+                     end
       elsif params[:bbox]
         changesets = conditions_bbox(changesets, BoundingBox.from_bbox_params(params))
       elsif params[:friends] && @user
@@ -293,7 +292,7 @@ class ChangesetController < ApplicationController
         changesets = changesets.where("changesets.id <= ?", params[:max_id])
       end
 
-      @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags)
+      @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments)
 
       render :action => :list, :layout => false
     end
@@ -309,8 +308,8 @@ class ChangesetController < ApplicationController
   # Add a comment to a changeset
   def comment
     # Check the arguments are sane
-    fail OSM::APIBadUserInput.new("No id was given") unless params[:id]
-    fail OSM::APIBadUserInput.new("No text was given") if params[:text].blank?
+    raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
+    raise OSM::APIBadUserInput.new("No text was given") if params[:text].blank?
 
     # Extract the arguments
     id = params[:id].to_i
@@ -318,7 +317,7 @@ class ChangesetController < ApplicationController
 
     # Find the changeset and check it is valid
     changeset = Changeset.find(id)
-    fail OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
+    raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
 
     # Add a comment to the changeset
     comment = changeset.comments.create(:changeset => changeset,
@@ -326,7 +325,7 @@ class ChangesetController < ApplicationController
                                         :author => @user)
 
     # Notify current subscribers of the new comment
-    changeset.subscribers.each do |user|
+    changeset.subscribers.visible.each do |user|
       if @user != user
         Notifier.changeset_comment_notification(comment, user).deliver_now
       end
@@ -343,15 +342,15 @@ class ChangesetController < ApplicationController
   # Adds a subscriber to the changeset
   def subscribe
     # Check the arguments are sane
-    fail OSM::APIBadUserInput.new("No id was given") unless params[:id]
+    raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
 
     # Extract the arguments
     id = params[:id].to_i
 
     # Find the changeset and check it is valid
     changeset = Changeset.find(id)
-    fail OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
-    fail OSM::APIChangesetAlreadySubscribedError.new(changeset) if changeset.subscribers.exists?(@user.id)
+    raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
+    raise OSM::APIChangesetAlreadySubscribedError.new(changeset) if changeset.subscribers.exists?(@user.id)
 
     # Add the subscriber
     changeset.subscribers << @user
@@ -364,15 +363,15 @@ class ChangesetController < ApplicationController
   # Removes a subscriber from the changeset
   def unsubscribe
     # Check the arguments are sane
-    fail OSM::APIBadUserInput.new("No id was given") unless params[:id]
+    raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
 
     # Extract the arguments
     id = params[:id].to_i
 
     # Find the changeset and check it is valid
     changeset = Changeset.find(id)
-    fail OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
-    fail OSM::APIChangesetNotSubscribedError.new(changeset) unless changeset.subscribers.exists?(@user.id)
+    raise OSM::APIChangesetNotYetClosedError.new(changeset) if changeset.is_open?
+    raise OSM::APIChangesetNotSubscribedError.new(changeset) unless changeset.subscribers.exists?(@user.id)
 
     # Remove the subscriber
     changeset.subscribers.delete(@user)
@@ -385,7 +384,7 @@ class ChangesetController < ApplicationController
   # Sets visible flag on comment to false
   def hide_comment
     # Check the arguments are sane
-    fail OSM::APIBadUserInput.new("No id was given") unless params[:id]
+    raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
 
     # Extract the arguments
     id = params[:id].to_i
@@ -404,7 +403,7 @@ class ChangesetController < ApplicationController
   # Sets visible flag on comment to true
   def unhide_comment
     # Check the arguments are sane
-    fail OSM::APIBadUserInput.new("No id was given") unless params[:id]
+    raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
 
     # Extract the arguments
     id = params[:id].to_i
@@ -455,14 +454,15 @@ class ChangesetController < ApplicationController
   # restrict changesets to those enclosed by a bounding box
   # we need to return both the changesets and the bounding box
   def conditions_bbox(changesets, bbox)
-    if  bbox
+    if bbox
       bbox.check_boundaries
       bbox = bbox.to_scaled
-      return changesets.where("min_lon < ? and max_lon > ? and min_lat < ? and max_lat > ?",
-                              bbox.max_lon.to_i, bbox.min_lon.to_i,
-                              bbox.max_lat.to_i, bbox.min_lat.to_i)
+
+      changesets.where("min_lon < ? and max_lon > ? and min_lat < ? and max_lat > ?",
+                       bbox.max_lon.to_i, bbox.min_lon.to_i,
+                       bbox.max_lat.to_i, bbox.min_lat.to_i)
     else
-      return changesets
+      changesets
     end
   end
 
@@ -470,22 +470,22 @@ class ChangesetController < ApplicationController
   # restrict changesets to those by a particular user
   def conditions_user(changesets, user, name)
     if user.nil? && name.nil?
-      return changesets
+      changesets
     else
       # shouldn't provide both name and UID
-      fail OSM::APIBadUserInput.new("provide either the user ID or display name, but not both") if user && name
+      raise OSM::APIBadUserInput.new("provide either the user ID or display name, but not both") if user && name
 
       # use either the name or the UID to find the user which we're selecting on.
       u = if name.nil?
             # user input checking, we don't have any UIDs < 1
-            fail OSM::APIBadUserInput.new("invalid user ID") if user.to_i < 1
+            raise OSM::APIBadUserInput.new("invalid user ID") if user.to_i < 1
             u = User.find(user.to_i)
           else
-            u = User.find_by_display_name(name)
+            u = User.find_by(:display_name => name)
           end
 
&nbs