Skip to content

Commit

Permalink
Remove both Potlatch versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 5, 2021
1 parent 84d90fa commit 0ff89c3
Show file tree
Hide file tree
Showing 206 changed files with 28 additions and 15,123 deletions.
1 change: 0 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ Naming/AccessorMethodName:
- 'app/helpers/title_helper.rb'
- 'app/models/old_way.rb'
- 'lib/osm.rb'
- 'lib/potlatch.rb'

# Offense count: 8
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
Expand Down
17 changes: 8 additions & 9 deletions CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Many settings are available in `config/settings.yml`. You can customize your ins

## Populating the database

Your installation comes with no geographic data loaded. You can either create new data using one of the editors (Potlatch 2, iD, JOSM etc) or by loading an OSM extract.
Your installation comes with no geographic data loaded. You can either create new data using one of the editors (iD, JOSM etc) or by loading an OSM extract.

After installing but before creating any users or data, import an extract with [Osmosis](https://wiki.openstreetmap.org/wiki/Osmosis) and the [``--write-apidb``](https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--write-apidb_.28--wd.29) task.

Expand Down Expand Up @@ -58,37 +58,36 @@ $ bundle exec rails console

Three of the built-in applications communicate via the API, and therefore need OAuth consumer keys configured. These are:

* Potlatch 2
* iD
* The website itself (for the Notes functionality)

For example, to use the Potlatch 2 editor you need to register it as an OAuth application.
For example, to use the iD editor you need to register it as an OAuth application.

Do the following:
* Log into your Rails Port instance - e.g. http://localhost:3000
* Click on your user name to go to your user page
* Click on "my settings" on the user page
* Click on "oauth settings" on the My settings page
* Click on 'Register your application'.
* Unless you have set up alternatives, use Name: "Local Potlatch" and URL: "http://localhost:3000"
* Unless you have set up alternatives, use Name: "Local iD" and URL: "http://localhost:3000"
* Check the 'modify the map' box.
* Everything else can be left with the default blank values.
* Click the "Register" button
* On the next page, copy the "consumer key"
* Edit config/settings.local.yml in your rails tree
* Add the "potlatch2_key" configuration key and the consumer key as the value
* Add the "id_key" configuration key and the consumer key as the value
* Restart your rails server

An example excerpt from settings.local.yml:

```
# Default editor
default_editor: "potlatch2"
# OAuth consumer key for Potlatch 2
potlatch2_key: "8lFmZPsagHV4l3rkAHq0hWY5vV3Ctl3oEFY1aXth"
default_editor: "id"
# OAuth consumer key for iD
id_key: "8lFmZPsagHV4l3rkAHq0hWY5vV3Ctl3oEFY1aXth"
```

Follow the same process for registering and configuring iD (`id_key`) and the website/Notes (`oauth_key`), or to save time, simply reuse the same consumer key for each.
Follow the same process for registering and configuring the website/Notes (`oauth_key`), or to save time, simply reuse the same consumer key for each.

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This repository consists of:

* The web site, including user accounts, diary entries, user-to-user messaging.
* The XML-based editing [API](https://wiki.openstreetmap.org/wiki/API_v0.6).
* The integrated versions of the [Potlatch](https://wiki.openstreetmap.org/wiki/Potlatch_1), [Potlatch 2](https://wiki.openstreetmap.org/wiki/Potlatch_2) and [iD](https://wiki.openstreetmap.org/wiki/ID) editors.
* The integrated version of the [iD](https://wiki.openstreetmap.org/wiki/ID) editors.
* The Browse pages - a web front-end to the OpenStreetMap data.
* The GPX uploads, browsing and API.

Expand Down
6 changes: 0 additions & 6 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@

//= link_directory ../../../vendor/assets/polyfill .js

//= link_directory ../../../vendor/assets/potlatch2/help
//= link_tree ../../../vendor/assets/potlatch2 .swf
//= link_tree ../../../vendor/assets/potlatch2 .zip

//= link_directory ../../../vendor/assets/swfobject

//= link html5shiv/dist/html5shiv.js

//= link leaflet/dist/images/marker-icon.png
Expand Down
61 changes: 0 additions & 61 deletions app/assets/javascripts/edit/potlatch.js.erb

This file was deleted.

83 changes: 0 additions & 83 deletions app/assets/javascripts/edit/potlatch2.js.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/assets/javascripts/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", function () {
if (typeof iD === "undefined" || !iD.utilDetect().support) {
container.innerHTML = "This editor is supported " +
"in Firefox, Chrome, Safari, Opera, Edge, and Internet Explorer 11. " +
"Please upgrade your browser or use Potlatch 2 to edit the map.";
"Please upgrade your browser or use JOSM to edit the map.";
container.className = "unsupported";
} else {
var id = iD.coreContext()
Expand Down
Loading

0 comments on commit 0ff89c3

Please sign in to comment.