Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1890 commits
Select commit Hold shift + click to select a range
a30a29f
Fix stripping of trailing slash
tomhughes Dec 1, 2013
d5a7655
Fix URL updating in Potlatch 1
tomhughes Dec 1, 2013
63617da
Fix javascript eror redirecting to new notes
tomhughes Dec 1, 2013
f53ae66
Prevent wrapping of dates in message lists
tomhughes Dec 1, 2013
1999e94
Localisation updates from https://translatewiki.net.
siebrand Dec 2, 2013
f42af6d
Removed bogus translation
tomhughes Dec 2, 2013
9e25f55
Drop click handler for changeset entries in the history sidebar
tomhughes Dec 2, 2013
be931d0
Restore click handler for changeset entries
tomhughes Dec 2, 2013
f3f31d3
Remove unused strings
tomhughes Dec 2, 2013
69fdcfd
Restore legacy bbox/min/max params support
jfirebaugh Dec 2, 2013
d95361b
Support legacy bbox param on /history as well
jfirebaugh Dec 2, 2013
16a72d9
Don't show "Load More" if we found less than 20 changesets
tomhughes Dec 2, 2013
11d8dc5
Document need for a Javascript runtime
tomhughes Dec 2, 2013
031afed
Merge remote-tracking branch 'jfirebaugh/legacy-params'
tomhughes Dec 2, 2013
95f1069
Fix application error on non-feature search results
jfirebaugh Dec 2, 2013
10c8be0
Restore correct link behavior with modifier keys
jfirebaugh Dec 2, 2013
fc891d9
Generate valid URLs for search results with no object attached
tomhughes Dec 2, 2013
880d53d
Allow word-breaks in long keys/values
jfirebaugh Dec 2, 2013
c32fec1
Align "Way" in relation member list
jfirebaugh Dec 2, 2013
528d4a0
Improve click behavior on changeset entries
jfirebaugh Dec 3, 2013
6913521
Merge remote-tracking branch 'jfirebaugh/562'
tomhughes Dec 3, 2013
77b4ff6
Use jQuery Simulate to simulate click events
tomhughes Dec 3, 2013
cc57c65
Auto-uncheck the data and notes layers at low zoom
jfirebaugh Dec 3, 2013
6362f60
Display the size warning when the data layer is disabled
tomhughes Dec 3, 2013
50fafa1
Improve zoom level selection when invoking Potlatch on an object
tomhughes Dec 3, 2013
ecf3bdf
Remove unused code for handling search results in Potlatch
tomhughes Dec 3, 2013
b04339f
Increase z-index for maximised content
tomhughes Dec 3, 2013
e18c3fd
Log failures to match a route for the initial path
tomhughes Dec 3, 2013
78f8e2a
Throw an exception instead of logging to the console
tomhughes Dec 3, 2013
5642cf6
Fix UCL link
tomhughes Dec 3, 2013
ba4a3e3
Remove debugging code
tomhughes Dec 3, 2013
e418075
Replace some legacy routes with redirects
tomhughes Dec 3, 2013
0797667
Restore support for #layers=X with no map parameter
jfirebaugh Dec 3, 2013
944f3eb
Remove map data size warning (#592)
jfirebaugh Dec 3, 2013
6053ed4
Update history feed URL with bbox parameter
jfirebaugh Dec 3, 2013
cc4bca2
Update to rails 4.0.2
tomhughes Dec 3, 2013
a6fb1ea
Use a table for tags
jfirebaugh Dec 3, 2013
413baec
Refactor generation of object metadata in API calls
simon04 Dec 3, 2013
9544ab1
More refactoring of common code in object models
tomhughes Dec 4, 2013
bdbc1d6
Unconditionally unbind moveend event
jfirebaugh Dec 3, 2013
b65ad20
Position on notes correctly when a link to a comment is loaded
tomhughes Dec 4, 2013
10e92b8
Fix OldRelation.tags
tomhughes Dec 4, 2013
5ed8ee3
Add tests for tag methods on object models
tomhughes Dec 4, 2013
9e8cf3e
Update i18n to fix bogus deprecation warning
tomhughes Dec 4, 2013
cd81a3f
Add tests for node methods on way models
tomhughes Dec 4, 2013
1f52e52
Add tests for member methods on relation models
tomhughes Dec 5, 2013
8c029f8
Simplify a number of object model methods
tomhughes Dec 5, 2013
7318ee4
The value of mapParams.object is always a node/way/relation now
tomhughes Dec 5, 2013
7a35004
Always use controller computed zoom when starting Potlatch
tomhughes Dec 5, 2013
a51b4c8
Use the map layout when rendering index for a remote edit
tomhughes Dec 5, 2013
6670de1
Make remote edit work when /edit is loaded
tomhughes Dec 5, 2013
c866d28
Test get_nodes_undelete methods of the OldWay model
tomhughes Dec 5, 2013
0f2958a
Report an error if a bogus limit value is passed to a notes API call
tomhughes Dec 5, 2013
1d1f194
Extend API to allow changesets to be queried by ids
simon04 Dec 5, 2013
190d0fd
Remove object parameter from share URL
jfirebaugh Dec 5, 2013
a47d6c2
Restore marker for non-browse search results
jfirebaugh Dec 5, 2013
21407ed
Ensure object parameter is removed from edit link when closing sidebar
jfirebaugh Dec 5, 2013
69aca22
Run unload method before pushing the new state
jfirebaugh Dec 5, 2013
b7b76e8
Localisation updates from https://translatewiki.net.
siebrand Dec 5, 2013
0162e94
Fix translation interpolations
tomhughes Dec 5, 2013
66aac9c
Pass details of any selected object to remote editors
tomhughes Dec 6, 2013
e05adbb
Obey the location hash for edit URLs with objects
jfirebaugh Dec 6, 2013
ba1268e
Update to Leaflet 0.7.1
tomhughes Dec 6, 2013
a2e06ea
Update leaflet.locate
tomhughes Dec 6, 2013
8af565b
Reapply leaflet.locate patch
tomhughes Dec 6, 2013
1467d82
Localisation updates from https://translatewiki.net.
siebrand Dec 7, 2013
83b93b9
Add some more unit tests for the Trace model
tomhughes Dec 7, 2013
2366ecb
Fix interpolation variable errors
tomhughes Dec 7, 2013
70be432
Make title of "More" menu translatable
tomhughes Dec 7, 2013
512c02b
Diary and trace feeds are RSS not Atom
tomhughes Dec 7, 2013
ab3c8a2
Put all feed discovery tags in the auto_discovery_link_tag section
tomhughes Dec 7, 2013
db41978
Remove unused file
tomhughes Dec 7, 2013
83b3db9
Improve display of alternative download sources
drolbr Dec 7, 2013
4755096
Add link to per-user RSS feed on diary view page
tomhughes Dec 7, 2013
57b05b2
Revert "Remove unused file"
tomhughes Dec 7, 2013
04ad0f6
Do basic testing of all site controller methods
tomhughes Dec 7, 2013
3a6dc17
Test XHR rendering of pages which can load in the sidebar
tomhughes Dec 7, 2013
4395ed6
Fix untranslatable string
tomhughes Dec 8, 2013
5d6a479
Don't show lat/lon for a deleted node, in case it is redacted
tomhughes Dec 8, 2013
5c53bb7
Don't linkify comments in the changeset list
tomhughes Dec 8, 2013
f8e645f
Remove stub test for non-existent controller
tomhughes Dec 8, 2013
67e7ced
Remove unused controllers
tomhughes Dec 8, 2013
b93f79f
Add functions tests for the oauth_clients controller
tomhughes Dec 8, 2013
de9d26c
Drop redundant monkey patches
tomhughes Dec 8, 2013
24893c0
Update page title when switching to the front page view
tomhughes Dec 9, 2013
44f89c0
Remove export rule for translations which no longer exist
tomhughes Dec 9, 2013
f3af824
Update gitignore
tomhughes Dec 9, 2013
4bd573b
Require i18n-js 3.0.0.rc5.3 for proper dependency on configuration
tomhughes Dec 9, 2013
a796c41
Refine zooming and panning for note and data layers
aaronlidman Dec 9, 2013
c2c817a
Remove duplicate (hidden) search box from header
tomhughes Dec 10, 2013
9cc9a00
Restore autofocusing of the search field
tomhughes Dec 10, 2013
5460812
Update jquery.cookie
tomhughes Dec 11, 2013
19c77c3
Issue all _osm_location cookies against the root path
tomhughes Dec 11, 2013
32f86af
Allow word-breaks in changeset comments
tomhughes Dec 11, 2013
92d7a9f
Make rich text edit controls use as much space as possible
tomhughes Dec 12, 2013
48c2031
Fix typo
systemed Dec 11, 2013
ea5183c
Fix typo in diary form html
tyrasd Dec 12, 2013
0c8ed19
Add an index on created_at to the note_comments table
tomhughes Dec 12, 2013
6ff6b2f
Change "My Inbox" to "My Messages" in user menu
tomhughes Dec 15, 2013
dd12e1d
Restore the duplicate search form in the header
tomhughes Dec 16, 2013
7ef2307
Localisation updates from https://translatewiki.net.
siebrand Dec 17, 2013
14cb332
Stop the "Load" button overlaying text in the data browser warning
tomhughes Dec 17, 2013
fd0ed54
Add a close icon to the feature warning panel
tomhughes Dec 18, 2013
41d0222
Add details for Finland to copyright page
tomhughes Dec 19, 2013
9326c7e
Update bundle
tomhughes Dec 19, 2013
822496f
Localisation updates from https://translatewiki.net.
siebrand Dec 20, 2013
53d2b6e
Localisation updates from https://translatewiki.net.
siebrand Dec 23, 2013
a8e04f0
Update bundle
tomhughes Dec 23, 2013
6a94cae
Localisation updates from https://translatewiki.net.
siebrand Dec 28, 2013
0c3c2e0
Localisation updates from https://translatewiki.net.
siebrand Jan 6, 2014
1e2b99a
Disable notes search until it can be made scalable
tomhughes Jan 9, 2014
65b009e
Update to iD v1.3.5
jfirebaugh Jan 9, 2014
7444f21
Localisation updates from https://translatewiki.net.
siebrand Jan 11, 2014
67dbde0
Set empty alt text on user images
tomhughes Jan 12, 2014
a4561fe
Preserve aspect ratio when scaling a user thumbnail
tomhughes Jan 12, 2014
4561872
Reenable the note search API
tomhughes Jan 15, 2014
0764bb4
Change attribute names for diary/message titles to match UI labels
tomhughes Jan 15, 2014
933b091
Highlight erroneous fields by adding a class to them
tomhughes Jan 15, 2014
42b329e
Replace the country table with a static XML countries file
tomhughes Jan 17, 2014
d35403f
Load soap4r so IP geolocation works
tomhughes Jan 17, 2014
8accdb9
Remove code to populate countries table
tomhughes Jan 17, 2014
58381bb
Stick with dalli 2.6.x for now until ruby-openid is updated
tomhughes Jan 18, 2014
c78853a
Changing the note search limit from 9999 to 10000
ToeBee Jan 16, 2014
a24f52d
Add a landing page for "fix the map / report a problem" links
simonpoole Jan 19, 2014
affe17a
Add a tests for the fixthemap page
tomhughes Jan 19, 2014
b01bda9
Reserve enough space for the buttons at the bottom of the message list
51114u9 Jan 16, 2014
1db1277
Compile the fixthemap javascript
tomhughes Jan 19, 2014
2198b6e
Beginning of JavaScript-only routing UI
systemed Jan 21, 2014
69437cf
Presentation work
systemed Jan 21, 2014
99cf44b
Precompile routing JS
systemed Jan 21, 2014
c6e8775
Presentation of directions
systemed Jan 21, 2014
ad01a61
Query options presentation
systemed Jan 21, 2014
fd991a0
Close directions
systemed Jan 21, 2014
15c1564
Start to make turn-by-turn instructions clickable
systemed Jan 21, 2014
a41aec9
Show little popup on click
systemed Jan 21, 2014
40ad8c7
Start work on second engine
systemed Jan 21, 2014
3bd5ae2
Move routing engines into their own files
systemed Jan 22, 2014
7834c62
Simplify usage, fix closures
systemed Jan 22, 2014
c4f3d1b
Start MapQuest Open support
systemed Jan 22, 2014
d14406c
Move more engine-specific stuff out of main .js
systemed Jan 22, 2014
36ee18b
Parse MapQuest directions
systemed Jan 22, 2014
81ebdee
Parse CloudMade directions
systemed Jan 22, 2014
576745e
Allow user to click Go before geocode result
systemed Jan 22, 2014
d40d328
Remove logging
systemed Jan 22, 2014
08837b2
Start work on drag-and-drop start/end markers
systemed Jan 23, 2014
edd6235
More work on draggable markers
systemed Jan 23, 2014
e825f8b
More draggable routes work
systemed Jan 23, 2014
423b13d
Add GraphHopper engine (thanks @karussell!)
systemed Jan 23, 2014
7c13b43
Integrate marker & geocoding behaviours
systemed Jan 23, 2014
149182f
Apparently 'final' is a reserved word in JS...
systemed Jan 23, 2014
0e6a41c
Repair Go button
systemed Jan 23, 2014
33b1845
Remove a couple of TODOs
systemed Jan 23, 2014
3cfcf18
Remove some repeated-query funkiness
systemed Jan 23, 2014
e9825a8
Localisation updates from https://translatewiki.net.
siebrand Jan 24, 2014
b28b550
Fix interpolation variables
tomhughes Jan 24, 2014
ccebb79
Use api.geonames.org for reverse searches
tomhughes Jan 27, 2014
339ac9d
Pass preferred language to geonames API calls
tomhughes Jan 27, 2014
3ec53f3
Remove version lock on dalli now that ruby-openid is updated
tomhughes Jan 29, 2014
3eaf58c
Make more of the javascript routing functions internationalizable
apmon Feb 2, 2014
fd97eb6
Localisation updates from https://translatewiki.net.
siebrand Feb 2, 2014
a52242c
Fix broken interpolation variables
tomhughes Feb 2, 2014
04e2d35
Merge pull request #6 from apmon/jsroute
systemed Feb 3, 2014
f383fe2
Fiiiix siiiiilly direeeeections
systemed Feb 3, 2014
25b9347
Preserve message details over validation errors
tomhughes Feb 4, 2014
6b843cc
Send 5% of users tiles over https as a test
tomhughes Feb 5, 2014
b76bfe3
Update to iD v1.3.6
jfirebaugh Feb 5, 2014
ef448ea
Boost https tile traffic to 20%
tomhughes Feb 5, 2014
e5ff267
Avoid using one translation as the key for a second
tomhughes Feb 6, 2014
78c040d
Make it clear that notes are for map improvements
systemed Feb 7, 2014
a7f9ca3
Fix some mixed content issues
tomhughes Feb 8, 2014
e5c9dc6
Fix various broken interpolations
tomhughes Feb 9, 2014
3a58288
More interpolation fixes
tomhughes Feb 9, 2014
56f8aa9
Localisation updates from https://translatewiki.net.
siebrand Feb 9, 2014
6d8fb47
Removed bogus translations
tomhughes Feb 9, 2014
e36aa53
Update to paperclip 4.x and add content type validation
tomhughes Feb 10, 2014
ee3e5d5
Remove https load test
tomhughes Feb 11, 2014
b947358
Include selected layer in short links
tomhughes Feb 15, 2014
4784182
Improve redirection of shortlinks
tomhughes Feb 15, 2014
457ba2e
Add some more shortlink tests
tomhughes Feb 15, 2014
f9ae6d2
Drop the slim layout
tomhughes Feb 16, 2014
c02fa94
Fixed missing translation
tomhughes Feb 17, 2014
60fd6e2
Update to rails 4.0.3
tomhughes Feb 18, 2014
41b1bd4
Fix updateLinks({lat: 0, lon: 0}, ...)
jfirebaugh Feb 19, 2014
a949f98
Apparently asin now throws Math::DomainError instead of Errno::EDOM
tomhughes Feb 20, 2014
c26cdeb
The html.dir key should not be translated...
tomhughes Feb 23, 2014
d1313a8
Uniqify lists of containing ways/relations
tomhughes Feb 23, 2014
1ea64ea
Add a test to check that html.dir is sensible in every locale
tomhughes Feb 23, 2014
acf7cf5
add a credits line for each routing service
danstowell Feb 23, 2014
205ccf2
remove the todo that I addressed
danstowell Feb 23, 2014
deea77a
refresh search if showing and user changes provider
danstowell Feb 23, 2014
98184df
Reorganise tests to match modern rails test layout
tomhughes Feb 26, 2014
1c46fb5
Remove unused session model
tomhughes Feb 26, 2014
e83fdf0
Add some more tests for library code
tomhughes Feb 26, 2014
e50229c
Update to iD v1.3.7
jfirebaugh Feb 26, 2014
28b8863
Remove unused (and non-functioning) code
tomhughes Feb 26, 2014
665abc5
Use Konacha for testing JavaScript
jfirebaugh Sep 11, 2012
66039de
Move zoomPrecision function to the OSM namespace
tomhughes Feb 27, 2014
bf797f4
Update osm.js tests for changes and add some more
tomhughes Feb 27, 2014
1f22b62
Move cookieContent to OSM.locationCookie
tomhughes Feb 28, 2014
8c9992f
Apply zoomPrecision to location cookie
tomhughes Feb 28, 2014
42b7c58
Add tests for OSM.locationCookie
tomhughes Feb 28, 2014
109dcff
Add tests for BrowseHelper#wikipedia_link
tomhughes Mar 1, 2014
1873478
Fixed wikipedia link reference to specific sections
jgpacker Feb 28, 2014
7331085
Update config/wiki_pages.yml
tomhughes Mar 1, 2014
0de7fdb
Add more tests for BrowseHelper
tomhughes Mar 1, 2014
1e45b8f
Update to Leaflet 0.7.2
tomhughes Mar 4, 2014
0c80a48
Remove an unused method
tomhughes Mar 5, 2014
d65e019
Add more helper tests
tomhughes Mar 5, 2014
44c3e1d
Merge pull request #10 from danstowell/jsrouting-credits
systemed Mar 7, 2014
565f661
Merge pull request #11 from danstowell/jsrouting-pulldownchange
systemed Mar 7, 2014
8c82be0
Make the search form a GET form with no extra fields
tomhughes Mar 7, 2014
628eea2
jsrouting: zoom to bbox on getting fresh geocoded route, but not on d…
danstowell Mar 8, 2014
1951382
Merge pull request #12 from danstowell/jsrouting-bboxzoom
systemed Mar 8, 2014
bf895a0
Reformat string to avoid long line
systemed Mar 8, 2014
f28676c
fix firefox behaviour when dragging pointer from the tray to the map
danstowell Mar 8, 2014
902f1b0
Add spinner while awaiting route
systemed Mar 8, 2014
5b6558c
Improve error-handling
systemed Mar 8, 2014
3ddda73
Merge pull request #13 from danstowell/jsrouting-ffoxdragok
systemed Mar 8, 2014
7915a22
Use generic GraphHopper engine
systemed Mar 8, 2014
dd4406e
Remove CloudMade foot engine
systemed Mar 8, 2014
a997690
Refactor MQ/OSRM engines a la @karussell patch
systemed Mar 8, 2014
2f07947
Add CORS for engines that support it
systemed Mar 8, 2014
1590454
Pass on routing failures from MapQuest
systemed Mar 8, 2014
9a05a7b
Put marker at exact position user dragged it to
systemed Mar 8, 2014
3ef8024
Add distance/time summary
systemed Mar 8, 2014
926c7b5
Zoom to fit when submitting form
systemed Mar 8, 2014
5c0e96e
Convert tabs to spaces
systemed Mar 8, 2014
b095b59
Merge remote-tracking branch 'origin/master' into routing
tomhughes Mar 8, 2014
eab2eea
Merge pull request #14 from tomhughes/routing
systemed Mar 8, 2014
15f0367
jsrouting: mouseover an instruction, highlight the route segment
danstowell Mar 9, 2014
5853f81
Merge pull request #15 from danstowell/jsrouting-highlightsegments
systemed Mar 9, 2014
42c1dec
Resolve conflict
systemed Mar 9, 2014
bc67479
jsrouting: clear search boxes on page unload
danstowell Mar 9, 2014
373b932
Merge pull request #17 from danstowell/jsrouting-clearsearch
systemed Mar 9, 2014
608ec07
Refer to the id for the distance/time summary
systemed Mar 9, 2014
888db7a
Firefox-friendly calculation of dragstart offset
systemed Mar 9, 2014
9d8ab7d
From->To->Go order as per @samanpwbb's comment
systemed Mar 10, 2014
23ffdad
Don't show http-only routers to users on https
systemed Mar 10, 2014
52054e6
Fix hours:minutes duration display for routing
danstowell Mar 22, 2014
d24cba4
Minor fixes to the I18n code of routing
apmon Mar 29, 2014
73eb8a5
Merge pull request #18 from danstowell/jsrouting-durationcalc
systemed Mar 31, 2014
9126653
Merge pull request #19 from apmon/jsroute2
systemed Mar 31, 2014
873c1cb
Using GraphHopper new API
Apr 1, 2014
1408672
Merge pull request #20 from karussell/routing
systemed Apr 1, 2014
ed75d47
Conform to project style conventions
jfirebaugh May 12, 2014
be79156
OSM.Routing -> OSM.Directions
jfirebaugh May 12, 2014
18c7c4f
Use unobtrusive JS for routing related events
jfirebaugh May 12, 2014
2b252e8
Refactor
jfirebaugh May 12, 2014
f2bf386
Permalinks for directions
jfirebaugh May 13, 2014
6b0d4dc
Supply hints for OSRM
jfirebaugh May 14, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
log
config/piwik.yml
public/assets
public/attachments
public/export
tmp
.DS_Store
*~
doc
6 changes: 6 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Andrzej Zaborowski <balrogg@gmail.com> <andrew.zaborowski@intel.com>
Andy Allan <andy@gravitystorm.co.uk> <gravitystorm@gmail.com> <github@gravitystorm.co.uk>
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)>
Richard Fairhurst <richard@systemeD.net> <richard@systemed.net>
117 changes: 117 additions & 0 deletions CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Configuration

After [installing](INSTALL.md) this software, you may need to carry out some of these configuration steps, depending on your tasks.

## 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.

* Use this [yet-to-be-written script](https://github.com/openstreetmap/openstreetmap-website/issues/282)

## Managing Users

If you create a user by signing up to your local website, you need to confirm the user before you can log in, which normally happens by clicking a link sent via email. If don't want to set up your development box to send emails to public email addresses then you can create the user as normal and then confirm it manually through the Rails console:

```
$ bundle exec rails console
>> user = User.find_by_display_name("My New User Name")
=> #[ ... ]
>> user.status = "active"
=> "active"
>> user.save!
=> true
>> quit
```

### Giving Administrator/Moderator Permissions

To give administrator or moderator permissions:

```
$ bundle exec rails console
>> user = User.find_by_display_name("My New User Name")
=> #[ ... ]
>> user.roles.create(:role => "administrator", :granter_id => user.id)
=> #[ ... ]
>> user.roles.create(:role => "moderator", :granter_id => user.id)
=> #[ ... ]
>> user.save!
=> true
>> quit
```

## OAuth Consumer Keys

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.

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"
* 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/application.yml in your rails tree
* Uncomment and change the "potlatch2_key" configuration value
* Restart your rails server

An example excerpt from application.yml:

```
# Default editor
default_editor: "potlatch2"
# OAuth consumer key for Potlatch 2
potlatch2_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.

## Troubleshooting

Rails has its own log. To inspect the log, do this:

```
tail -f log/development.log
```

If you have more problems, please ask on the [rails-dev@openstreetmap.org mailing list](http://lists.openstreetmap.org/listinfo/rails-dev) or on the [#osm-dev IRC Channel](http://wiki.openstreetmap.org/wiki/IRC)

## Maintaining your installation

If your installation stops working for some reason:

* Sometimes gem dependencies change. To update go to your rails_port directory and run ''bundle install'' as root.

* The OSM database schema is changed periodically and you need to keep up with these improvements. Go to your rails_port directory and run:

```
bundle exec rake db:migrate
```

## Testing on the osm dev server

For example, after developing a patch for the rails_port, you might want to demonstrate it to others or ask for comments and testing. To do this one can [set up an instance of the rails_port on the dev server in ones user directory](http://wiki.openstreetmap.org/wiki/Using_the_dev_server#Rails_Applications).

# Contributing

For information on contributing changes to the codes, see [CONTRIBUTING.md](CONTRIBUTING.md)

# Production Deployment

If you want to deploy The Rails Port for production use, you'll need to make a few changes.

* It's not recommended to use `rails server` in production. Our recommended approach is to use [Phusion Passenger](https://www.phusionpassenger.com/).
* Passenger will, by design, use the Production environment and therefore the production database - make sure it contains the appropriate data and user accounts.
* Your production database will also need the extensions and functions installed - see [INSTALL.md](INSTALL.md)
* The included version of the map call is quite slow and eats a lot of memory. You should consider using [CGIMap](https://github.com/zerebubuth/openstreetmap-cgimap) instead.
* The included version of the GPX importer is slow and/or completely inoperable. You should consider using [the high-speed GPX importer](http://git.openstreetmap.org/gpx-import.git/).
99 changes: 99 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
* http://www.ruby-lang.org/ - The homepage of Ruby which has more links and some great tutorials.
* http://rubyonrails.org/ - The homepage of Rails, also has links and tutorials

## Coding style

When writing code it is generally a good idea to try and match your
formatting to that of any existing code in the same file, or to other
similar files if you are writing new code. Consistency of layout is
far more important that the layout itself as it makes reading code
much easier.

One golden rule of formatting -- please don't use tabs in your code
as they will cause the file to be formatted differently for different
people depending on how they have their editor configured.

## Testing

Having a good suite of tests is very important to the stability and
maintainability of any code base. The tests in the Rails port code are
by no means complete, but they are extensive, and must continue to be
so with any new functionality which is written. Tests are also useful
in giving others confidence in the code you've written, and can
greatly speed up the process of merging in new code.

When hacking, you should:

* Write new tests to cover the new functionality you've added.
* Where appropriate, modify existing tests to reflect new or changed
functionality.
* Never comment out or remove a test just because it doesn't pass.

You can run the existing test suite with:

```
bundle exec rake test
```

You can generate test coverage stats with:

```
sudo gem install rcov
rcov -x gems test/*/*.rb
```

The tests are automatically run on commit with the results shown at [http://cruise.openstreetmap.org/](http://cruise.openstreetmap.org/)

## Comments

Sometimes it's not apparent from the code itself what it does, or,
more importantly, **why** it does that. Good comments help your fellow
developers to read the code and satisfy themselves that it's doing the
right thing.

When hacking, you should:

* Comment your code - don't go overboard, but explain the bits which
might be difficult to understand what the code does, why it does it
and why it should be the way it is.
* Check existing comments to ensure that they are not misleading.

## Code Documentation

To generate the HTML documentation of the API/rails code, run the command

```
rake doc:app
```

## Committing

When you submit patches, the project maintainer has to read them and
understand them. This is difficult enough at the best of times, and
misunderstanding patches can lead to them being more difficult to
merge. To help with this, when submitting you should:

* Split up large patches into smaller units of functionality.
* Keep your commit messages relevant to the changes in each individual
unit.

When writing commit messages please try and stick to the same style as
other commits, namely:

* A one line summary, starting with a capital and with no full stop.
* A blank line.
* Full description, as proper sentences with capitals and full stops.

For simple commits the one line summary is often enough and the body
of the commit message can be left out.

## Sending the patches

If you have forked on GitHub then the best way to submit your patches is to
push your changes back to GitHub and then send a "pull request" on GitHub.

Otherwise you should either push your changes to a publicly visible git repository
and send the details to the [rails-dev](http://lists.openstreetmap.org/listinfo/rails-dev)
list or generate patches with `git format-patch` and send them to the
[rails-dev](http://lists.openstreetmap.org/listinfo/rails-dev) list.

74 changes: 50 additions & 24 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,62 @@
# Gem source to use
source 'http://rubygems.org'

# Require rails
gem 'rails', '3.2.6'
gem 'rails', '4.0.3'

# Require things which have moved to gems in ruby 1.9
gem 'bigdecimal', :platforms => :ruby_19
gem 'bigdecimal', "~> 1.1.0", :platforms => :ruby_19

# Require the postgres database driver
# Require things which have moved to gems in ruby 2.0
gem 'psych', :platforms => :ruby_20

# Require json for multi_json
gem 'json'

# Use postgres as the database
gem 'pg'

# Load jquery support
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 1.2'
gem 'jsonify-rails'

# Use R2 for RTL conversion
gem 'r2'

# Load rails plugins
gem 'rails-i18n', ">= 0.6.3"
gem 'rails-i18n', "~> 4.0.0"
gem 'dynamic_form'
gem 'rinku', '>= 1.2.2', :require => 'rails_rinku'
gem 'oauth-plugin', '>= 0.4.1', :require => 'oauth-plugin'
gem 'oauth-plugin', '>= 0.5.1'
gem 'open_id_authentication', '>= 1.1.0'
gem 'validates_email_format_of', '>= 1.5.1'
gem 'composite_primary_keys', '>= 5.0.8'
gem 'http_accept_language', '>= 1.0.2'
gem 'paperclip', '~> 2.0'
gem 'composite_primary_keys', '>= 6.0.1'
gem 'http_accept_language', '~> 2.0.0'
gem 'paperclip', '~> 4.0'
gem 'deadlock_retry', '>= 1.2.0'
gem 'openstreetmap-i18n-js', '>= 3.0.0.rc5.3', :require => 'i18n-js'
gem 'rack-cors'
gem 'actionpack-page_caching'

# We need ruby-openid 2.2.0 or later for ruby 1.9 support
gem 'ruby-openid', '>= 2.2.0'

# Browser detection support
gem 'browser'

# Markdown formatting support
gem 'redcarpet'

# Character conversion support for ruby 1.8
gem 'iconv', :platforms => :ruby_18
gem 'iconv', '= 0.1', :platforms => :ruby_18

# Load libxml support for XML parsing and generation
gem 'libxml-ruby', '>= 2.0.5', :require => 'libxml'
Expand All @@ -47,22 +68,27 @@ gem 'htmlentities'
# Load SystemTimer for implementing request timeouts
gem 'SystemTimer', '>= 1.1.3', :require => 'system_timer', :platforms => :ruby_18

# Load httpclient for SOAP support for Quova GeoIP queries
# Load httpclient and soap4r for SOAP support for Quova GeoIP queries
gem 'httpclient'
gem 'soap4r-ruby1.9'

# Load memcache in case we are using it
gem 'memcached', '>= 1.4.1'
# Load memcache client in case we are using it
gem 'dalli'
gem 'kgio'

# Gems useful for development
group :development do
gem 'vendorer'
end

# Gems needed for running tests
group :test do
gem 'timecop'
gem 'minitest', :platforms => :ruby_19
gem 'minitest', '~> 4.7.0', :platforms => [:ruby_19, :ruby_20]
end

# Gems needed for compiling assets
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'therubyracer'
# Needed in development as well so rake can see konacha tasks
group :development, :test do
gem 'konacha'
gem 'poltergeist'
end
Loading